@fiado/type-kit 3.199.0 → 3.200.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/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/bin/retailCustomer/dtos/RetailCustomer.d.ts +24 -2
- package/bin/retailCustomer/dtos/RetailCustomer.js +64 -1
- package/bin/retailCustomer/dtos/requests/CreateCustomerRequest.d.ts +7 -1
- package/bin/retailCustomer/dtos/requests/CreateCustomerRequest.js +30 -1
- package/bin/retailCustomer/dtos/requests/UpdateCustomerRequest.d.ts +7 -1
- package/bin/retailCustomer/dtos/requests/UpdateCustomerRequest.js +31 -1
- package/bin/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.d.ts +13 -1
- package/bin/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.js +41 -1
- package/bin/retailCustomer/dtos/responses/CustomerResponse.d.ts +14 -2
- package/bin/retailCustomer/enums/RetailCustomerStatusEnum.d.ts +10 -0
- package/bin/retailCustomer/enums/RetailCustomerStatusEnum.js +14 -0
- package/bin/retailCustomer/index.d.ts +1 -0
- package/bin/retailCustomer/index.js +1 -0
- package/package.json +1 -1
- package/src/retailCustomer/dtos/RetailCustomer.ts +75 -3
- package/src/retailCustomer/dtos/requests/CreateCustomerRequest.ts +26 -2
- package/src/retailCustomer/dtos/requests/UpdateCustomerRequest.ts +28 -2
- package/src/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.ts +49 -2
- package/src/retailCustomer/dtos/responses/CustomerResponse.ts +14 -2
- package/src/retailCustomer/enums/RetailCustomerStatusEnum.ts +10 -0
- package/src/retailCustomer/index.ts +1 -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,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);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressBase } from '../../address/dtos/AddressBase';
|
|
2
2
|
import { AccountStatusEnum } from '../enums/AccountStatusEnum';
|
|
3
3
|
import { KycModalityEnum } from '../enums/KycModalityEnum';
|
|
4
|
+
import { RetailCustomerStatusEnum } from '../enums/RetailCustomerStatusEnum';
|
|
4
5
|
import { RetailKycStatusEnum } from '../enums/RetailKycStatusEnum';
|
|
5
6
|
import { KycReview } from './KycReview';
|
|
6
7
|
/**
|
|
@@ -12,9 +13,20 @@ import { KycReview } from './KycReview';
|
|
|
12
13
|
export declare class RetailCustomer {
|
|
13
14
|
retailCustomerId: string;
|
|
14
15
|
retailerId: string;
|
|
15
|
-
|
|
16
|
+
/** Tienda de alta/origen del cliente — hash del GSI `retailerId-originStoreId-index` (F1 §3.5). */
|
|
17
|
+
originStoreId: string;
|
|
18
|
+
/** Nombre(s) de pila. Nombre partido por convención Fiado (`PeopleName` del dominio identity), F1 §3.5. */
|
|
19
|
+
names: string;
|
|
20
|
+
paternalLastName: string;
|
|
21
|
+
/** Segundo apellido — nullable (F1 §3.5: "el 2º apellido nullable"). */
|
|
22
|
+
maternalLastName: string | null;
|
|
16
23
|
phone: string;
|
|
17
|
-
|
|
24
|
+
/** Lo pone el OTP del paso 01 del wizard (F1 §3.5). Default false. */
|
|
25
|
+
phoneVerified: boolean;
|
|
26
|
+
/** null hasta el KYC (F1 §3.5); al capturarse se crea el centinela `UNIQ#CURP#<curp>` en la misma TX. */
|
|
27
|
+
curp: string | null;
|
|
28
|
+
rfc: string | null;
|
|
29
|
+
email: string | null;
|
|
18
30
|
/** Fecha de nacimiento (ISO 8601, admite fecha sola); se completa con el OCR del KYC. */
|
|
19
31
|
birthDate?: string;
|
|
20
32
|
fiadoDirectoryId: string | null;
|
|
@@ -30,6 +42,16 @@ export declare class RetailCustomer {
|
|
|
30
42
|
kycStatus: RetailKycStatusEnum;
|
|
31
43
|
kycModality: KycModalityEnum | null;
|
|
32
44
|
kycReview: KycReview | null;
|
|
45
|
+
/** Score de confianza que devuelve Metamap con el resultado del KYC (F1 §3.5). */
|
|
46
|
+
kycScore: number | null;
|
|
47
|
+
/** Referencia a la verificación en `kyc-verifications-business` (INT1, F1 §3.5). */
|
|
48
|
+
metamapVerificationId: string | null;
|
|
49
|
+
/** Alerta PLD (regulatorio, F1 §3.5). Default false. */
|
|
50
|
+
pldFlag: boolean;
|
|
51
|
+
/** Notas operativas del BO (F1 §3.5). */
|
|
52
|
+
notes: string | null;
|
|
53
|
+
/** Soft-delete (F1 §3.5). Default ACTIVE. */
|
|
54
|
+
status: RetailCustomerStatusEnum;
|
|
33
55
|
createdAt: string;
|
|
34
56
|
updatedAt: string;
|
|
35
57
|
createdBy: string;
|
|
@@ -16,6 +16,7 @@ const regex_1 = require("../../helpers/constans/regex");
|
|
|
16
16
|
const AddressBase_1 = require("../../address/dtos/AddressBase");
|
|
17
17
|
const AccountStatusEnum_1 = require("../enums/AccountStatusEnum");
|
|
18
18
|
const KycModalityEnum_1 = require("../enums/KycModalityEnum");
|
|
19
|
+
const RetailCustomerStatusEnum_1 = require("../enums/RetailCustomerStatusEnum");
|
|
19
20
|
const RetailKycStatusEnum_1 = require("../enums/RetailKycStatusEnum");
|
|
20
21
|
const KycReview_1 = require("./KycReview");
|
|
21
22
|
/**
|
|
@@ -41,7 +42,23 @@ __decorate([
|
|
|
41
42
|
(0, class_transformer_1.Expose)(),
|
|
42
43
|
(0, class_validator_1.IsString)(),
|
|
43
44
|
__metadata("design:type", String)
|
|
44
|
-
], RetailCustomer.prototype, "
|
|
45
|
+
], RetailCustomer.prototype, "originStoreId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Expose)(),
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], RetailCustomer.prototype, "names", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_transformer_1.Expose)(),
|
|
53
|
+
(0, class_validator_1.IsString)(),
|
|
54
|
+
__metadata("design:type", String)
|
|
55
|
+
], RetailCustomer.prototype, "paternalLastName", 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
|
+
], RetailCustomer.prototype, "maternalLastName", void 0);
|
|
45
62
|
__decorate([
|
|
46
63
|
(0, class_transformer_1.Expose)(),
|
|
47
64
|
(0, class_validator_1.IsString)(),
|
|
@@ -49,9 +66,27 @@ __decorate([
|
|
|
49
66
|
], RetailCustomer.prototype, "phone", void 0);
|
|
50
67
|
__decorate([
|
|
51
68
|
(0, class_transformer_1.Expose)(),
|
|
69
|
+
(0, class_validator_1.IsBoolean)(),
|
|
70
|
+
__metadata("design:type", Boolean)
|
|
71
|
+
], RetailCustomer.prototype, "phoneVerified", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_transformer_1.Expose)(),
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
52
75
|
(0, class_validator_1.IsString)(),
|
|
53
76
|
__metadata("design:type", String)
|
|
54
77
|
], RetailCustomer.prototype, "curp", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_transformer_1.Expose)(),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsString)(),
|
|
82
|
+
__metadata("design:type", String)
|
|
83
|
+
], RetailCustomer.prototype, "rfc", void 0);
|
|
84
|
+
__decorate([
|
|
85
|
+
(0, class_transformer_1.Expose)(),
|
|
86
|
+
(0, class_validator_1.IsOptional)(),
|
|
87
|
+
(0, class_validator_1.IsEmail)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], RetailCustomer.prototype, "email", void 0);
|
|
55
90
|
__decorate([
|
|
56
91
|
(0, class_transformer_1.Expose)(),
|
|
57
92
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -136,6 +171,34 @@ __decorate([
|
|
|
136
171
|
(0, class_transformer_1.Type)(() => KycReview_1.KycReview),
|
|
137
172
|
__metadata("design:type", KycReview_1.KycReview)
|
|
138
173
|
], RetailCustomer.prototype, "kycReview", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
(0, class_transformer_1.Expose)(),
|
|
176
|
+
(0, class_validator_1.IsOptional)(),
|
|
177
|
+
(0, class_validator_1.IsNumber)(),
|
|
178
|
+
__metadata("design:type", Number)
|
|
179
|
+
], RetailCustomer.prototype, "kycScore", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
(0, class_transformer_1.Expose)(),
|
|
182
|
+
(0, class_validator_1.IsOptional)(),
|
|
183
|
+
(0, class_validator_1.IsString)(),
|
|
184
|
+
__metadata("design:type", String)
|
|
185
|
+
], RetailCustomer.prototype, "metamapVerificationId", void 0);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, class_transformer_1.Expose)(),
|
|
188
|
+
(0, class_validator_1.IsBoolean)(),
|
|
189
|
+
__metadata("design:type", Boolean)
|
|
190
|
+
], RetailCustomer.prototype, "pldFlag", void 0);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, class_transformer_1.Expose)(),
|
|
193
|
+
(0, class_validator_1.IsOptional)(),
|
|
194
|
+
(0, class_validator_1.IsString)(),
|
|
195
|
+
__metadata("design:type", String)
|
|
196
|
+
], RetailCustomer.prototype, "notes", void 0);
|
|
197
|
+
__decorate([
|
|
198
|
+
(0, class_transformer_1.Expose)(),
|
|
199
|
+
(0, class_validator_1.IsEnum)(RetailCustomerStatusEnum_1.RetailCustomerStatusEnum),
|
|
200
|
+
__metadata("design:type", String)
|
|
201
|
+
], RetailCustomer.prototype, "status", void 0);
|
|
139
202
|
__decorate([
|
|
140
203
|
(0, class_transformer_1.Expose)(),
|
|
141
204
|
(0, class_validator_1.IsString)(),
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Alta básica de un cliente retail (identidad comercial mínima; el KYC la enriquece después).
|
|
3
|
+
* Nombre partido por convención Fiado y CURP opcional — "null hasta KYC" (F1 §3.5).
|
|
3
4
|
* SureKeep Fase 2 — pista Retail.
|
|
4
5
|
*/
|
|
5
6
|
export declare class CreateCustomerRequest {
|
|
6
|
-
|
|
7
|
+
originStoreId: string;
|
|
8
|
+
names: string;
|
|
9
|
+
paternalLastName: string;
|
|
10
|
+
maternalLastName?: string;
|
|
7
11
|
phone: string;
|
|
8
12
|
curp?: string;
|
|
13
|
+
rfc?: string;
|
|
14
|
+
email?: string;
|
|
9
15
|
birthDate?: string;
|
|
10
16
|
}
|
|
@@ -15,6 +15,7 @@ const class_validator_1 = require("class-validator");
|
|
|
15
15
|
const regex_1 = require("../../../helpers/constans/regex");
|
|
16
16
|
/**
|
|
17
17
|
* Alta básica de un cliente retail (identidad comercial mínima; el KYC la enriquece después).
|
|
18
|
+
* Nombre partido por convención Fiado y CURP opcional — "null hasta KYC" (F1 §3.5).
|
|
18
19
|
* SureKeep Fase 2 — pista Retail.
|
|
19
20
|
*/
|
|
20
21
|
class CreateCustomerRequest {
|
|
@@ -24,7 +25,23 @@ __decorate([
|
|
|
24
25
|
(0, class_transformer_1.Expose)(),
|
|
25
26
|
(0, class_validator_1.IsString)(),
|
|
26
27
|
__metadata("design:type", String)
|
|
27
|
-
], CreateCustomerRequest.prototype, "
|
|
28
|
+
], CreateCustomerRequest.prototype, "originStoreId", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], CreateCustomerRequest.prototype, "names", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CreateCustomerRequest.prototype, "paternalLastName", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.IsOptional)(),
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CreateCustomerRequest.prototype, "maternalLastName", void 0);
|
|
28
45
|
__decorate([
|
|
29
46
|
(0, class_transformer_1.Expose)(),
|
|
30
47
|
(0, class_validator_1.IsString)(),
|
|
@@ -36,6 +53,18 @@ __decorate([
|
|
|
36
53
|
(0, class_validator_1.IsString)(),
|
|
37
54
|
__metadata("design:type", String)
|
|
38
55
|
], CreateCustomerRequest.prototype, "curp", 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
|
+
], CreateCustomerRequest.prototype, "rfc", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsEmail)(),
|
|
66
|
+
__metadata("design:type", String)
|
|
67
|
+
], CreateCustomerRequest.prototype, "email", void 0);
|
|
39
68
|
__decorate([
|
|
40
69
|
(0, class_transformer_1.Expose)(),
|
|
41
70
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -3,8 +3,14 @@
|
|
|
3
3
|
* AuditTrail + PiiAccessLog en el lambda. SureKeep Fase 2 — pista Retail.
|
|
4
4
|
*/
|
|
5
5
|
export declare class UpdateCustomerRequest {
|
|
6
|
-
|
|
6
|
+
names?: string;
|
|
7
|
+
paternalLastName?: string;
|
|
8
|
+
maternalLastName?: string;
|
|
7
9
|
phone?: string;
|
|
8
10
|
curp?: string;
|
|
11
|
+
rfc?: string;
|
|
12
|
+
email?: string;
|
|
13
|
+
/** Notas operativas del BO (F1 §3.5). */
|
|
14
|
+
notes?: string;
|
|
9
15
|
birthDate?: string;
|
|
10
16
|
}
|
|
@@ -25,7 +25,19 @@ __decorate([
|
|
|
25
25
|
(0, class_validator_1.IsOptional)(),
|
|
26
26
|
(0, class_validator_1.IsString)(),
|
|
27
27
|
__metadata("design:type", String)
|
|
28
|
-
], UpdateCustomerRequest.prototype, "
|
|
28
|
+
], UpdateCustomerRequest.prototype, "names", 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
|
+
], UpdateCustomerRequest.prototype, "paternalLastName", 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
|
+
], UpdateCustomerRequest.prototype, "maternalLastName", void 0);
|
|
29
41
|
__decorate([
|
|
30
42
|
(0, class_transformer_1.Expose)(),
|
|
31
43
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -38,6 +50,24 @@ __decorate([
|
|
|
38
50
|
(0, class_validator_1.IsString)(),
|
|
39
51
|
__metadata("design:type", String)
|
|
40
52
|
], UpdateCustomerRequest.prototype, "curp", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_transformer_1.Expose)(),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], UpdateCustomerRequest.prototype, "rfc", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, class_transformer_1.Expose)(),
|
|
61
|
+
(0, class_validator_1.IsOptional)(),
|
|
62
|
+
(0, class_validator_1.IsEmail)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], UpdateCustomerRequest.prototype, "email", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_transformer_1.Expose)(),
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
(0, class_validator_1.IsString)(),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], UpdateCustomerRequest.prototype, "notes", void 0);
|
|
41
71
|
__decorate([
|
|
42
72
|
(0, class_transformer_1.Expose)(),
|
|
43
73
|
(0, class_validator_1.IsOptional)(),
|
|
@@ -7,10 +7,22 @@ import { RetailKycStatusEnum } from '../../enums/RetailKycStatusEnum';
|
|
|
7
7
|
* SureKeep Fase 2 — pista Retail.
|
|
8
8
|
*/
|
|
9
9
|
export declare class UpsertCustomerFromKycRequest {
|
|
10
|
-
|
|
10
|
+
/** Tienda de alta/origen — del JWT del vendedor dueño de la sesión del wizard (F1 §3.5). */
|
|
11
|
+
originStoreId: string;
|
|
12
|
+
/** Nombre partido por convención Fiado (F1 §3.5) — lo entrega el OCR del INE, NO se deriva de un string. */
|
|
13
|
+
names: string;
|
|
14
|
+
paternalLastName: string;
|
|
15
|
+
/** Segundo apellido — opcional (F1 §3.5: "el 2º apellido nullable"). */
|
|
16
|
+
maternalLastName?: string;
|
|
11
17
|
phone: string;
|
|
12
18
|
curp: string;
|
|
13
19
|
birthDate?: string;
|
|
20
|
+
rfc?: string;
|
|
21
|
+
email?: string;
|
|
22
|
+
/** Score de confianza que devuelve Metamap junto con el resultado del KYC (F1 §3.5). */
|
|
23
|
+
kycScore?: number;
|
|
24
|
+
/** Referencia a la verificación en `kyc-verifications-business` (INT1, F1 §3.5). */
|
|
25
|
+
metamapVerificationId?: string;
|
|
14
26
|
fiadoDirectoryId: string;
|
|
15
27
|
fiadoPeopleId: string;
|
|
16
28
|
pcfAccountId?: string;
|
|
@@ -28,7 +28,23 @@ __decorate([
|
|
|
28
28
|
(0, class_transformer_1.Expose)(),
|
|
29
29
|
(0, class_validator_1.IsString)(),
|
|
30
30
|
__metadata("design:type", String)
|
|
31
|
-
], UpsertCustomerFromKycRequest.prototype, "
|
|
31
|
+
], UpsertCustomerFromKycRequest.prototype, "originStoreId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_transformer_1.Expose)(),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], UpsertCustomerFromKycRequest.prototype, "names", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_transformer_1.Expose)(),
|
|
39
|
+
(0, class_validator_1.IsString)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], UpsertCustomerFromKycRequest.prototype, "paternalLastName", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], UpsertCustomerFromKycRequest.prototype, "maternalLastName", void 0);
|
|
32
48
|
__decorate([
|
|
33
49
|
(0, class_transformer_1.Expose)(),
|
|
34
50
|
(0, class_transformer_1.Transform)(({ value }) => (typeof value === 'string' ? value.replace(/[\s-]/g, '') : value)),
|
|
@@ -50,6 +66,30 @@ __decorate([
|
|
|
50
66
|
(0, class_validator_1.Matches)(regex_1.regexIso8601Date, { message: 'birthDate debe ser una fecha ISO 8601' }),
|
|
51
67
|
__metadata("design:type", String)
|
|
52
68
|
], UpsertCustomerFromKycRequest.prototype, "birthDate", void 0);
|
|
69
|
+
__decorate([
|
|
70
|
+
(0, class_transformer_1.Expose)(),
|
|
71
|
+
(0, class_validator_1.IsOptional)(),
|
|
72
|
+
(0, class_validator_1.IsString)(),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], UpsertCustomerFromKycRequest.prototype, "rfc", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_transformer_1.Expose)(),
|
|
77
|
+
(0, class_validator_1.IsOptional)(),
|
|
78
|
+
(0, class_validator_1.IsEmail)(),
|
|
79
|
+
__metadata("design:type", String)
|
|
80
|
+
], UpsertCustomerFromKycRequest.prototype, "email", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_transformer_1.Expose)(),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
(0, class_validator_1.IsNumber)(),
|
|
85
|
+
__metadata("design:type", Number)
|
|
86
|
+
], UpsertCustomerFromKycRequest.prototype, "kycScore", void 0);
|
|
87
|
+
__decorate([
|
|
88
|
+
(0, class_transformer_1.Expose)(),
|
|
89
|
+
(0, class_validator_1.IsOptional)(),
|
|
90
|
+
(0, class_validator_1.IsString)(),
|
|
91
|
+
__metadata("design:type", String)
|
|
92
|
+
], UpsertCustomerFromKycRequest.prototype, "metamapVerificationId", void 0);
|
|
53
93
|
__decorate([
|
|
54
94
|
(0, class_transformer_1.Expose)(),
|
|
55
95
|
(0, class_validator_1.IsString)(),
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressBase } from '../../../address/dtos/AddressBase';
|
|
2
2
|
import { AccountStatusEnum } from '../../enums/AccountStatusEnum';
|
|
3
3
|
import { KycModalityEnum } from '../../enums/KycModalityEnum';
|
|
4
|
+
import { RetailCustomerStatusEnum } from '../../enums/RetailCustomerStatusEnum';
|
|
4
5
|
import { RetailKycStatusEnum } from '../../enums/RetailKycStatusEnum';
|
|
5
6
|
/**
|
|
6
7
|
* Vista de un cliente retail hacia el consumidor (BO / api-invoker). SureKeep Fase 2 — pista Retail.
|
|
@@ -9,9 +10,15 @@ import { RetailKycStatusEnum } from '../../enums/RetailKycStatusEnum';
|
|
|
9
10
|
export interface CustomerResponse {
|
|
10
11
|
retailCustomerId: string;
|
|
11
12
|
retailerId: string;
|
|
12
|
-
|
|
13
|
+
originStoreId: string;
|
|
14
|
+
names: string;
|
|
15
|
+
paternalLastName: string;
|
|
16
|
+
maternalLastName: string | null;
|
|
13
17
|
phone: string;
|
|
14
|
-
|
|
18
|
+
phoneVerified: boolean;
|
|
19
|
+
curp: string | null;
|
|
20
|
+
rfc: string | null;
|
|
21
|
+
email: string | null;
|
|
15
22
|
birthDate: string | null;
|
|
16
23
|
fiadoDirectoryId: string | null;
|
|
17
24
|
fiadoPeopleId: string | null;
|
|
@@ -25,6 +32,11 @@ export interface CustomerResponse {
|
|
|
25
32
|
addressConfirmed: boolean;
|
|
26
33
|
kycStatus: RetailKycStatusEnum;
|
|
27
34
|
kycModality: KycModalityEnum | null;
|
|
35
|
+
kycScore: number | null;
|
|
36
|
+
metamapVerificationId: string | null;
|
|
37
|
+
pldFlag: boolean;
|
|
38
|
+
notes: string | null;
|
|
39
|
+
status: RetailCustomerStatusEnum;
|
|
28
40
|
createdAt: string;
|
|
29
41
|
updatedAt: string;
|
|
30
42
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de vigencia del cliente retail — soft-delete de la convención F1 (modelo-datos F1 §1-§2:
|
|
3
|
+
* "soft-delete" es obligatorio en todas las entidades del silo). ACTIVE es el default del alta;
|
|
4
|
+
* INACTIVE marca la baja lógica (nunca se borra el ítem, para trazabilidad regulatoria).
|
|
5
|
+
* SureKeep Fase 2 — pista Retail.
|
|
6
|
+
*/
|
|
7
|
+
export declare enum RetailCustomerStatusEnum {
|
|
8
|
+
ACTIVE = "ACTIVE",
|
|
9
|
+
INACTIVE = "INACTIVE"
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetailCustomerStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Estado de vigencia del cliente retail — soft-delete de la convención F1 (modelo-datos F1 §1-§2:
|
|
6
|
+
* "soft-delete" es obligatorio en todas las entidades del silo). ACTIVE es el default del alta;
|
|
7
|
+
* INACTIVE marca la baja lógica (nunca se borra el ítem, para trazabilidad regulatoria).
|
|
8
|
+
* SureKeep Fase 2 — pista Retail.
|
|
9
|
+
*/
|
|
10
|
+
var RetailCustomerStatusEnum;
|
|
11
|
+
(function (RetailCustomerStatusEnum) {
|
|
12
|
+
RetailCustomerStatusEnum["ACTIVE"] = "ACTIVE";
|
|
13
|
+
RetailCustomerStatusEnum["INACTIVE"] = "INACTIVE";
|
|
14
|
+
})(RetailCustomerStatusEnum || (exports.RetailCustomerStatusEnum = RetailCustomerStatusEnum = {}));
|
|
@@ -2,6 +2,7 @@ export * from './enums/AccountStatusEnum';
|
|
|
2
2
|
export * from './enums/RetailKycStatusEnum';
|
|
3
3
|
export * from './enums/KycModalityEnum';
|
|
4
4
|
export * from './enums/KycReviewResultEnum';
|
|
5
|
+
export * from './enums/RetailCustomerStatusEnum';
|
|
5
6
|
export * from './dtos/KycReview';
|
|
6
7
|
export * from './dtos/RetailCustomer';
|
|
7
8
|
export * from './dtos/requests/CreateCustomerRequest';
|
|
@@ -19,6 +19,7 @@ __exportStar(require("./enums/AccountStatusEnum"), exports);
|
|
|
19
19
|
__exportStar(require("./enums/RetailKycStatusEnum"), exports);
|
|
20
20
|
__exportStar(require("./enums/KycModalityEnum"), exports);
|
|
21
21
|
__exportStar(require("./enums/KycReviewResultEnum"), exports);
|
|
22
|
+
__exportStar(require("./enums/RetailCustomerStatusEnum"), exports);
|
|
22
23
|
// Entidades (planas, con class-validator + @Expose)
|
|
23
24
|
__exportStar(require("./dtos/KycReview"), exports);
|
|
24
25
|
__exportStar(require("./dtos/RetailCustomer"), exports);
|
package/package.json
CHANGED
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { Expose, Type } from 'class-transformer';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsBoolean,
|
|
4
|
+
IsEmail,
|
|
5
|
+
IsEnum,
|
|
6
|
+
IsIn,
|
|
7
|
+
IsNumber,
|
|
8
|
+
IsOptional,
|
|
9
|
+
IsString,
|
|
10
|
+
Matches,
|
|
11
|
+
ValidateNested,
|
|
12
|
+
} from 'class-validator';
|
|
3
13
|
import { regexIso8601, regexIso8601Date } from '../../helpers/constans/regex';
|
|
4
14
|
import { AddressBase } from '../../address/dtos/AddressBase';
|
|
5
15
|
import { AccountStatusEnum } from '../enums/AccountStatusEnum';
|
|
6
16
|
import { KycModalityEnum } from '../enums/KycModalityEnum';
|
|
17
|
+
import { RetailCustomerStatusEnum } from '../enums/RetailCustomerStatusEnum';
|
|
7
18
|
import { RetailKycStatusEnum } from '../enums/RetailKycStatusEnum';
|
|
8
19
|
import { KycReview } from './KycReview';
|
|
9
20
|
|
|
@@ -22,17 +33,50 @@ export class RetailCustomer {
|
|
|
22
33
|
@IsString()
|
|
23
34
|
retailerId!: string;
|
|
24
35
|
|
|
36
|
+
/** Tienda de alta/origen del cliente — hash del GSI `retailerId-originStoreId-index` (F1 §3.5). */
|
|
25
37
|
@Expose()
|
|
26
38
|
@IsString()
|
|
27
|
-
|
|
39
|
+
originStoreId!: string;
|
|
40
|
+
|
|
41
|
+
/** Nombre(s) de pila. Nombre partido por convención Fiado (`PeopleName` del dominio identity), F1 §3.5. */
|
|
42
|
+
@Expose()
|
|
43
|
+
@IsString()
|
|
44
|
+
names!: string;
|
|
45
|
+
|
|
46
|
+
@Expose()
|
|
47
|
+
@IsString()
|
|
48
|
+
paternalLastName!: string;
|
|
49
|
+
|
|
50
|
+
/** Segundo apellido — nullable (F1 §3.5: "el 2º apellido nullable"). */
|
|
51
|
+
@Expose()
|
|
52
|
+
@IsOptional()
|
|
53
|
+
@IsString()
|
|
54
|
+
maternalLastName!: string | null;
|
|
28
55
|
|
|
29
56
|
@Expose()
|
|
30
57
|
@IsString()
|
|
31
58
|
phone!: string;
|
|
32
59
|
|
|
60
|
+
/** Lo pone el OTP del paso 01 del wizard (F1 §3.5). Default false. */
|
|
33
61
|
@Expose()
|
|
62
|
+
@IsBoolean()
|
|
63
|
+
phoneVerified!: boolean;
|
|
64
|
+
|
|
65
|
+
/** null hasta el KYC (F1 §3.5); al capturarse se crea el centinela `UNIQ#CURP#<curp>` en la misma TX. */
|
|
66
|
+
@Expose()
|
|
67
|
+
@IsOptional()
|
|
34
68
|
@IsString()
|
|
35
|
-
curp!: string;
|
|
69
|
+
curp!: string | null;
|
|
70
|
+
|
|
71
|
+
@Expose()
|
|
72
|
+
@IsOptional()
|
|
73
|
+
@IsString()
|
|
74
|
+
rfc!: string | null;
|
|
75
|
+
|
|
76
|
+
@Expose()
|
|
77
|
+
@IsOptional()
|
|
78
|
+
@IsEmail()
|
|
79
|
+
email!: string | null;
|
|
36
80
|
|
|
37
81
|
/** Fecha de nacimiento (ISO 8601, admite fecha sola); se completa con el OCR del KYC. */
|
|
38
82
|
@Expose()
|
|
@@ -112,6 +156,34 @@ export class RetailCustomer {
|
|
|
112
156
|
@Type(() => KycReview)
|
|
113
157
|
kycReview!: KycReview | null;
|
|
114
158
|
|
|
159
|
+
/** Score de confianza que devuelve Metamap con el resultado del KYC (F1 §3.5). */
|
|
160
|
+
@Expose()
|
|
161
|
+
@IsOptional()
|
|
162
|
+
@IsNumber()
|
|
163
|
+
kycScore!: number | null;
|
|
164
|
+
|
|
165
|
+
/** Referencia a la verificación en `kyc-verifications-business` (INT1, F1 §3.5). */
|
|
166
|
+
@Expose()
|
|
167
|
+
@IsOptional()
|
|
168
|
+
@IsString()
|
|
169
|
+
metamapVerificationId!: string | null;
|
|
170
|
+
|
|
171
|
+
/** Alerta PLD (regulatorio, F1 §3.5). Default false. */
|
|
172
|
+
@Expose()
|
|
173
|
+
@IsBoolean()
|
|
174
|
+
pldFlag!: boolean;
|
|
175
|
+
|
|
176
|
+
/** Notas operativas del BO (F1 §3.5). */
|
|
177
|
+
@Expose()
|
|
178
|
+
@IsOptional()
|
|
179
|
+
@IsString()
|
|
180
|
+
notes!: string | null;
|
|
181
|
+
|
|
182
|
+
/** Soft-delete (F1 §3.5). Default ACTIVE. */
|
|
183
|
+
@Expose()
|
|
184
|
+
@IsEnum(RetailCustomerStatusEnum)
|
|
185
|
+
status!: RetailCustomerStatusEnum;
|
|
186
|
+
|
|
115
187
|
@Expose()
|
|
116
188
|
@IsString()
|
|
117
189
|
@Matches(regexIso8601, { message: 'createdAt debe ser una fecha ISO 8601' })
|
|
@@ -1,15 +1,29 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsOptional, IsString, Matches } from 'class-validator';
|
|
2
|
+
import { IsEmail, IsOptional, IsString, Matches } from 'class-validator';
|
|
3
3
|
import { regexIso8601Date } from '../../../helpers/constans/regex';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Alta básica de un cliente retail (identidad comercial mínima; el KYC la enriquece después).
|
|
7
|
+
* Nombre partido por convención Fiado y CURP opcional — "null hasta KYC" (F1 §3.5).
|
|
7
8
|
* SureKeep Fase 2 — pista Retail.
|
|
8
9
|
*/
|
|
9
10
|
export class CreateCustomerRequest {
|
|
10
11
|
@Expose()
|
|
11
12
|
@IsString()
|
|
12
|
-
|
|
13
|
+
originStoreId!: string;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsString()
|
|
17
|
+
names!: string;
|
|
18
|
+
|
|
19
|
+
@Expose()
|
|
20
|
+
@IsString()
|
|
21
|
+
paternalLastName!: string;
|
|
22
|
+
|
|
23
|
+
@Expose()
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsString()
|
|
26
|
+
maternalLastName?: string;
|
|
13
27
|
|
|
14
28
|
@Expose()
|
|
15
29
|
@IsString()
|
|
@@ -20,6 +34,16 @@ export class CreateCustomerRequest {
|
|
|
20
34
|
@IsString()
|
|
21
35
|
curp?: string;
|
|
22
36
|
|
|
37
|
+
@Expose()
|
|
38
|
+
@IsOptional()
|
|
39
|
+
@IsString()
|
|
40
|
+
rfc?: string;
|
|
41
|
+
|
|
42
|
+
@Expose()
|
|
43
|
+
@IsOptional()
|
|
44
|
+
@IsEmail()
|
|
45
|
+
email?: string;
|
|
46
|
+
|
|
23
47
|
@Expose()
|
|
24
48
|
@IsOptional()
|
|
25
49
|
@IsString()
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Expose } from 'class-transformer';
|
|
2
|
-
import { IsOptional, IsString, Matches } from 'class-validator';
|
|
2
|
+
import { IsEmail, IsOptional, IsString, Matches } from 'class-validator';
|
|
3
3
|
import { regexIso8601Date } from '../../../helpers/constans/regex';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -10,7 +10,17 @@ export class UpdateCustomerRequest {
|
|
|
10
10
|
@Expose()
|
|
11
11
|
@IsOptional()
|
|
12
12
|
@IsString()
|
|
13
|
-
|
|
13
|
+
names?: string;
|
|
14
|
+
|
|
15
|
+
@Expose()
|
|
16
|
+
@IsOptional()
|
|
17
|
+
@IsString()
|
|
18
|
+
paternalLastName?: string;
|
|
19
|
+
|
|
20
|
+
@Expose()
|
|
21
|
+
@IsOptional()
|
|
22
|
+
@IsString()
|
|
23
|
+
maternalLastName?: string;
|
|
14
24
|
|
|
15
25
|
@Expose()
|
|
16
26
|
@IsOptional()
|
|
@@ -22,6 +32,22 @@ export class UpdateCustomerRequest {
|
|
|
22
32
|
@IsString()
|
|
23
33
|
curp?: string;
|
|
24
34
|
|
|
35
|
+
@Expose()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
@IsString()
|
|
38
|
+
rfc?: string;
|
|
39
|
+
|
|
40
|
+
@Expose()
|
|
41
|
+
@IsOptional()
|
|
42
|
+
@IsEmail()
|
|
43
|
+
email?: string;
|
|
44
|
+
|
|
45
|
+
/** Notas operativas del BO (F1 §3.5). */
|
|
46
|
+
@Expose()
|
|
47
|
+
@IsOptional()
|
|
48
|
+
@IsString()
|
|
49
|
+
notes?: string;
|
|
50
|
+
|
|
25
51
|
@Expose()
|
|
26
52
|
@IsOptional()
|
|
27
53
|
@IsString()
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { Expose, Transform, Type } from 'class-transformer';
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
IsEmail,
|
|
4
|
+
IsEnum,
|
|
5
|
+
IsIn,
|
|
6
|
+
IsNumber,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsString,
|
|
9
|
+
Matches,
|
|
10
|
+
ValidateNested,
|
|
11
|
+
} from 'class-validator';
|
|
3
12
|
import { regexCurp, regexIso8601Date, regexPhoneMx } from '../../../helpers/constans/regex';
|
|
4
13
|
import { AddressBase } from '../../../address/dtos/AddressBase';
|
|
5
14
|
import { KycModalityEnum } from '../../enums/KycModalityEnum';
|
|
@@ -11,9 +20,25 @@ import { RetailKycStatusEnum } from '../../enums/RetailKycStatusEnum';
|
|
|
11
20
|
* SureKeep Fase 2 — pista Retail.
|
|
12
21
|
*/
|
|
13
22
|
export class UpsertCustomerFromKycRequest {
|
|
23
|
+
/** Tienda de alta/origen — del JWT del vendedor dueño de la sesión del wizard (F1 §3.5). */
|
|
14
24
|
@Expose()
|
|
15
25
|
@IsString()
|
|
16
|
-
|
|
26
|
+
originStoreId!: string;
|
|
27
|
+
|
|
28
|
+
/** Nombre partido por convención Fiado (F1 §3.5) — lo entrega el OCR del INE, NO se deriva de un string. */
|
|
29
|
+
@Expose()
|
|
30
|
+
@IsString()
|
|
31
|
+
names!: string;
|
|
32
|
+
|
|
33
|
+
@Expose()
|
|
34
|
+
@IsString()
|
|
35
|
+
paternalLastName!: string;
|
|
36
|
+
|
|
37
|
+
/** Segundo apellido — opcional (F1 §3.5: "el 2º apellido nullable"). */
|
|
38
|
+
@Expose()
|
|
39
|
+
@IsOptional()
|
|
40
|
+
@IsString()
|
|
41
|
+
maternalLastName?: string;
|
|
17
42
|
|
|
18
43
|
// Normalización en el boundary: se strippean espacios/guiones para que centinela de unicidad,
|
|
19
44
|
// lookup y search del BO (que también strippea) usen el MISMO formato de teléfono.
|
|
@@ -37,6 +62,28 @@ export class UpsertCustomerFromKycRequest {
|
|
|
37
62
|
@Matches(regexIso8601Date, { message: 'birthDate debe ser una fecha ISO 8601' })
|
|
38
63
|
birthDate?: string;
|
|
39
64
|
|
|
65
|
+
@Expose()
|
|
66
|
+
@IsOptional()
|
|
67
|
+
@IsString()
|
|
68
|
+
rfc?: string;
|
|
69
|
+
|
|
70
|
+
@Expose()
|
|
71
|
+
@IsOptional()
|
|
72
|
+
@IsEmail()
|
|
73
|
+
email?: string;
|
|
74
|
+
|
|
75
|
+
/** Score de confianza que devuelve Metamap junto con el resultado del KYC (F1 §3.5). */
|
|
76
|
+
@Expose()
|
|
77
|
+
@IsOptional()
|
|
78
|
+
@IsNumber()
|
|
79
|
+
kycScore?: number;
|
|
80
|
+
|
|
81
|
+
/** Referencia a la verificación en `kyc-verifications-business` (INT1, F1 §3.5). */
|
|
82
|
+
@Expose()
|
|
83
|
+
@IsOptional()
|
|
84
|
+
@IsString()
|
|
85
|
+
metamapVerificationId?: string;
|
|
86
|
+
|
|
40
87
|
@Expose()
|
|
41
88
|
@IsString()
|
|
42
89
|
fiadoDirectoryId!: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { AddressBase } from '../../../address/dtos/AddressBase';
|
|
2
2
|
import { AccountStatusEnum } from '../../enums/AccountStatusEnum';
|
|
3
3
|
import { KycModalityEnum } from '../../enums/KycModalityEnum';
|
|
4
|
+
import { RetailCustomerStatusEnum } from '../../enums/RetailCustomerStatusEnum';
|
|
4
5
|
import { RetailKycStatusEnum } from '../../enums/RetailKycStatusEnum';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -10,9 +11,15 @@ import { RetailKycStatusEnum } from '../../enums/RetailKycStatusEnum';
|
|
|
10
11
|
export interface CustomerResponse {
|
|
11
12
|
retailCustomerId: string;
|
|
12
13
|
retailerId: string;
|
|
13
|
-
|
|
14
|
+
originStoreId: string;
|
|
15
|
+
names: string;
|
|
16
|
+
paternalLastName: string;
|
|
17
|
+
maternalLastName: string | null;
|
|
14
18
|
phone: string;
|
|
15
|
-
|
|
19
|
+
phoneVerified: boolean;
|
|
20
|
+
curp: string | null;
|
|
21
|
+
rfc: string | null;
|
|
22
|
+
email: string | null;
|
|
16
23
|
birthDate: string | null;
|
|
17
24
|
fiadoDirectoryId: string | null;
|
|
18
25
|
fiadoPeopleId: string | null;
|
|
@@ -26,6 +33,11 @@ export interface CustomerResponse {
|
|
|
26
33
|
addressConfirmed: boolean;
|
|
27
34
|
kycStatus: RetailKycStatusEnum;
|
|
28
35
|
kycModality: KycModalityEnum | null;
|
|
36
|
+
kycScore: number | null;
|
|
37
|
+
metamapVerificationId: string | null;
|
|
38
|
+
pldFlag: boolean;
|
|
39
|
+
notes: string | null;
|
|
40
|
+
status: RetailCustomerStatusEnum;
|
|
29
41
|
createdAt: string;
|
|
30
42
|
updatedAt: string;
|
|
31
43
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Estado de vigencia del cliente retail — soft-delete de la convención F1 (modelo-datos F1 §1-§2:
|
|
3
|
+
* "soft-delete" es obligatorio en todas las entidades del silo). ACTIVE es el default del alta;
|
|
4
|
+
* INACTIVE marca la baja lógica (nunca se borra el ítem, para trazabilidad regulatoria).
|
|
5
|
+
* SureKeep Fase 2 — pista Retail.
|
|
6
|
+
*/
|
|
7
|
+
export enum RetailCustomerStatusEnum {
|
|
8
|
+
ACTIVE = 'ACTIVE',
|
|
9
|
+
INACTIVE = 'INACTIVE',
|
|
10
|
+
}
|
|
@@ -3,6 +3,7 @@ export * from './enums/AccountStatusEnum';
|
|
|
3
3
|
export * from './enums/RetailKycStatusEnum';
|
|
4
4
|
export * from './enums/KycModalityEnum';
|
|
5
5
|
export * from './enums/KycReviewResultEnum';
|
|
6
|
+
export * from './enums/RetailCustomerStatusEnum';
|
|
6
7
|
|
|
7
8
|
// Entidades (planas, con class-validator + @Expose)
|
|
8
9
|
export * from './dtos/KycReview';
|
|
@@ -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 = {}));
|