@fiado/type-kit 3.199.0 → 3.202.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/_test_/unit/auth/SignUpProspectRequest.test.ts +32 -0
  2. package/_test_/unit/auth/SignUpProspectResponse.test.ts +26 -0
  3. package/_test_/unit/kyc/KycByDirectoryResponse.test.ts +139 -0
  4. package/_test_/unit/kyc/KycVerificationChangedV1.test.ts +99 -0
  5. package/_test_/unit/messagesConnector/SendMessageRequest.test.ts +48 -0
  6. package/bin/auth/dtos/SignUpProspectRequest.d.ts +15 -0
  7. package/bin/auth/dtos/SignUpProspectRequest.js +44 -0
  8. package/bin/auth/dtos/SignUpProspectResponse.d.ts +11 -0
  9. package/bin/auth/dtos/SignUpProspectResponse.js +36 -0
  10. package/bin/auth/index.d.ts +2 -0
  11. package/bin/auth/index.js +2 -0
  12. package/bin/benefitCenter/enums/BenefitFlowEnum.d.ts +11 -0
  13. package/bin/benefitCenter/enums/BenefitFlowEnum.js +15 -0
  14. package/bin/index.d.ts +1 -0
  15. package/bin/index.js +5 -0
  16. package/bin/kyc/dtos/responses/KycByDirectoryResponse.d.ts +49 -0
  17. package/bin/kyc/dtos/responses/KycByDirectoryResponse.js +91 -0
  18. package/bin/kyc/dtos/responses/KycPersonData.d.ts +11 -0
  19. package/bin/{loanCredit/dtos/requests/UpdateActivationChecklistRequest.js → kyc/dtos/responses/KycPersonData.js} +23 -18
  20. package/bin/kyc/enums/KycVerificationStatusEnum.d.ts +18 -0
  21. package/bin/kyc/enums/KycVerificationStatusEnum.js +22 -0
  22. package/bin/kyc/events/KycVerificationChangedV1.d.ts +35 -0
  23. package/bin/kyc/events/KycVerificationChangedV1.js +76 -0
  24. package/bin/kyc/index.d.ts +4 -0
  25. package/bin/kyc/index.js +24 -0
  26. package/bin/loanConfig/enums/ModifiableByRoleEnum.d.ts +11 -0
  27. package/bin/loanConfig/enums/ModifiableByRoleEnum.js +15 -0
  28. package/bin/messagesConnector/dtos/SendMessageRequest.js +2 -1
  29. package/bin/places/dtos/CashInFeeDto.d.ts +17 -0
  30. package/bin/places/dtos/CashInFeeDto.js +12 -0
  31. package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +22 -0
  32. package/bin/platformRbac/dtos/ResendOtpRequest.js +36 -0
  33. package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +11 -0
  34. package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.js +36 -0
  35. package/bin/retailCustomer/dtos/RetailCustomer.d.ts +24 -2
  36. package/bin/retailCustomer/dtos/RetailCustomer.js +64 -1
  37. package/bin/retailCustomer/dtos/requests/CreateCustomerRequest.d.ts +7 -1
  38. package/bin/retailCustomer/dtos/requests/CreateCustomerRequest.js +30 -1
  39. package/bin/retailCustomer/dtos/requests/UpdateCustomerRequest.d.ts +7 -1
  40. package/bin/retailCustomer/dtos/requests/UpdateCustomerRequest.js +31 -1
  41. package/bin/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.d.ts +13 -1
  42. package/bin/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.js +41 -1
  43. package/bin/retailCustomer/dtos/responses/CustomerResponse.d.ts +14 -2
  44. package/bin/retailCustomer/enums/RetailCustomerStatusEnum.d.ts +10 -0
  45. package/bin/retailCustomer/enums/RetailCustomerStatusEnum.js +14 -0
  46. package/bin/retailCustomer/index.d.ts +1 -0
  47. package/bin/retailCustomer/index.js +1 -0
  48. package/package.json +1 -1
  49. package/src/auth/dtos/SignUpProspectRequest.ts +23 -0
  50. package/src/auth/dtos/SignUpProspectResponse.ts +17 -0
  51. package/src/auth/index.ts +2 -0
  52. package/src/index.ts +4 -0
  53. package/src/kyc/dtos/responses/KycByDirectoryResponse.ts +69 -0
  54. package/src/kyc/dtos/responses/KycPersonData.ts +23 -0
  55. package/src/kyc/enums/KycVerificationStatusEnum.ts +18 -0
  56. package/src/kyc/events/KycVerificationChangedV1.ts +51 -0
  57. package/src/kyc/index.ts +10 -0
  58. package/src/messagesConnector/dtos/SendMessageRequest.ts +8 -1
  59. package/src/retailCustomer/dtos/RetailCustomer.ts +75 -3
  60. package/src/retailCustomer/dtos/requests/CreateCustomerRequest.ts +26 -2
  61. package/src/retailCustomer/dtos/requests/UpdateCustomerRequest.ts +28 -2
  62. package/src/retailCustomer/dtos/requests/UpsertCustomerFromKycRequest.ts +49 -2
  63. package/src/retailCustomer/dtos/responses/CustomerResponse.ts +14 -2
  64. package/src/retailCustomer/enums/RetailCustomerStatusEnum.ts +10 -0
  65. package/src/retailCustomer/index.ts +1 -0
  66. package/bin/loanCredit/dtos/requests/UpdateActivationChecklistRequest.d.ts +0 -11
  67. package/bin/loanCredit/enums/ClientLevelEnum.d.ts +0 -11
  68. package/bin/loanCredit/enums/ClientLevelEnum.js +0 -15
@@ -0,0 +1,91 @@
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.KycByDirectoryResponse = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const IdentificationDocumentStatus_1 = require("../../../identity/enums/IdentificationDocumentStatus");
16
+ const RetailKycStatusEnum_1 = require("../../../retailCustomer/enums/RetailKycStatusEnum");
17
+ const KycVerificationStatusEnum_1 = require("../../enums/KycVerificationStatusEnum");
18
+ const KycPersonData_1 = require("./KycPersonData");
19
+ /**
20
+ * Estado consolidado del KYC de un directorio + los estados crudos + los datos de persona.
21
+ *
22
+ * Los campos crudos viajan además del consolidado para que el consumidor NO tenga que
23
+ * reimplementar el mapeo de otro dominio.
24
+ *
25
+ * DEC-KYC-014: "sin verificación" se responde con 404, NO con un valor de enum. Por eso todos
26
+ * los campos de identidad y estado son REQUERIDOS — este DTO solo describe el caso en que sí
27
+ * existe una verificación.
28
+ *
29
+ * DEC-KYC-004: el vocabulario del consolidado es `RetailKycStatusEnum`, el único de la lib.
30
+ *
31
+ * DEC-KYC-016: `verificationResult` reusa `IdentificationDocumentStatus` — es el enum que el
32
+ * lambda productor (`kyc-verifications-business`) escribe literalmente en la tabla; duplicarlo
33
+ * aquí sería drift garantizado.
34
+ *
35
+ * ⚠️ Lleva PII en `person` (CURP y nombre completo).
36
+ */
37
+ class KycByDirectoryResponse {
38
+ }
39
+ exports.KycByDirectoryResponse = KycByDirectoryResponse;
40
+ __decorate([
41
+ (0, class_transformer_1.Expose)(),
42
+ (0, class_validator_1.IsEnum)(RetailKycStatusEnum_1.RetailKycStatusEnum),
43
+ __metadata("design:type", String)
44
+ ], KycByDirectoryResponse.prototype, "consolidated", void 0);
45
+ __decorate([
46
+ (0, class_transformer_1.Expose)(),
47
+ (0, class_validator_1.IsString)(),
48
+ (0, class_validator_1.IsNotEmpty)(),
49
+ __metadata("design:type", String)
50
+ ], KycByDirectoryResponse.prototype, "verificationId", void 0);
51
+ __decorate([
52
+ (0, class_transformer_1.Expose)(),
53
+ (0, class_validator_1.IsString)(),
54
+ (0, class_validator_1.IsNotEmpty)(),
55
+ __metadata("design:type", String)
56
+ ], KycByDirectoryResponse.prototype, "peopleId", void 0);
57
+ __decorate([
58
+ (0, class_transformer_1.Expose)(),
59
+ (0, class_validator_1.IsOptional)(),
60
+ (0, class_validator_1.IsString)(),
61
+ __metadata("design:type", String)
62
+ ], KycByDirectoryResponse.prototype, "metamapFlowId", void 0);
63
+ __decorate([
64
+ (0, class_transformer_1.Expose)(),
65
+ (0, class_validator_1.IsEnum)(KycVerificationStatusEnum_1.KycVerificationStatusEnum),
66
+ __metadata("design:type", String)
67
+ ], KycByDirectoryResponse.prototype, "verificationStatus", void 0);
68
+ __decorate([
69
+ (0, class_transformer_1.Expose)(),
70
+ (0, class_validator_1.IsEnum)(IdentificationDocumentStatus_1.IdentificationDocumentStatus),
71
+ __metadata("design:type", String)
72
+ ], KycByDirectoryResponse.prototype, "verificationResult", void 0);
73
+ __decorate([
74
+ (0, class_transformer_1.Expose)(),
75
+ (0, class_validator_1.IsString)(),
76
+ (0, class_validator_1.IsISO8601)(),
77
+ __metadata("design:type", String)
78
+ ], KycByDirectoryResponse.prototype, "createDate", void 0);
79
+ __decorate([
80
+ (0, class_transformer_1.Expose)(),
81
+ (0, class_validator_1.IsString)(),
82
+ (0, class_validator_1.IsISO8601)(),
83
+ __metadata("design:type", String)
84
+ ], KycByDirectoryResponse.prototype, "updateDate", void 0);
85
+ __decorate([
86
+ (0, class_transformer_1.Expose)(),
87
+ (0, class_validator_1.IsOptional)(),
88
+ (0, class_validator_1.ValidateNested)(),
89
+ (0, class_transformer_1.Type)(() => KycPersonData_1.KycPersonData),
90
+ __metadata("design:type", KycPersonData_1.KycPersonData)
91
+ ], KycByDirectoryResponse.prototype, "person", void 0);
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Datos de identidad del cliente, leídos de People tras un KYC completado.
3
+ * ⚠️ PII: nunca loguear esta estructura ni exponerla en endpoints de alta frecuencia.
4
+ */
5
+ export declare class KycPersonData {
6
+ names?: string;
7
+ paternalLastName?: string;
8
+ maternalLastName?: string;
9
+ curp?: string;
10
+ dateOfBirth?: string;
11
+ }
@@ -9,38 +9,43 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.UpdateActivationChecklistRequest = void 0;
12
+ exports.KycPersonData = void 0;
13
13
  const class_transformer_1 = require("class-transformer");
14
14
  const class_validator_1 = require("class-validator");
15
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`).
16
+ * Datos de identidad del cliente, leídos de People tras un KYC completado.
17
+ * ⚠️ PII: nunca loguear esta estructura ni exponerla en endpoints de alta frecuencia.
19
18
  */
20
- class UpdateActivationChecklistRequest {
19
+ class KycPersonData {
21
20
  }
22
- exports.UpdateActivationChecklistRequest = UpdateActivationChecklistRequest;
21
+ exports.KycPersonData = KycPersonData;
23
22
  __decorate([
24
23
  (0, class_transformer_1.Expose)(),
25
24
  (0, class_validator_1.IsOptional)(),
26
- (0, class_validator_1.IsBoolean)(),
27
- __metadata("design:type", Boolean)
28
- ], UpdateActivationChecklistRequest.prototype, "downPayment", void 0);
25
+ (0, class_validator_1.IsString)(),
26
+ __metadata("design:type", String)
27
+ ], KycPersonData.prototype, "names", void 0);
29
28
  __decorate([
30
29
  (0, class_transformer_1.Expose)(),
31
30
  (0, class_validator_1.IsOptional)(),
32
- (0, class_validator_1.IsBoolean)(),
33
- __metadata("design:type", Boolean)
34
- ], UpdateActivationChecklistRequest.prototype, "contractSigned", void 0);
31
+ (0, class_validator_1.IsString)(),
32
+ __metadata("design:type", String)
33
+ ], KycPersonData.prototype, "paternalLastName", void 0);
35
34
  __decorate([
36
35
  (0, class_transformer_1.Expose)(),
37
36
  (0, class_validator_1.IsOptional)(),
38
- (0, class_validator_1.IsBoolean)(),
39
- __metadata("design:type", Boolean)
40
- ], UpdateActivationChecklistRequest.prototype, "imeiEnrolled", void 0);
37
+ (0, class_validator_1.IsString)(),
38
+ __metadata("design:type", String)
39
+ ], KycPersonData.prototype, "maternalLastName", void 0);
41
40
  __decorate([
42
41
  (0, class_transformer_1.Expose)(),
43
42
  (0, class_validator_1.IsOptional)(),
44
- (0, class_validator_1.IsBoolean)(),
45
- __metadata("design:type", Boolean)
46
- ], UpdateActivationChecklistRequest.prototype, "lockVerified", void 0);
43
+ (0, class_validator_1.IsString)(),
44
+ __metadata("design:type", String)
45
+ ], KycPersonData.prototype, "curp", void 0);
46
+ __decorate([
47
+ (0, class_transformer_1.Expose)(),
48
+ (0, class_validator_1.IsOptional)(),
49
+ (0, class_validator_1.IsString)(),
50
+ __metadata("design:type", String)
51
+ ], KycPersonData.prototype, "dateOfBirth", void 0);
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Ciclo de vida de la verificación en `kyc-verifications-business` (crudo, sin colapsar).
3
+ *
4
+ * DEC-KYC-016: sí, duplica `KycVerificationStatus` de `@fiado/fiado-abstractions`
5
+ * (`bin/Fiado/Database/KycVerifications.d.ts`, mismos 5 valores) — y se queda así a propósito.
6
+ * `fiado-abstractions` es la lib legacy de la que `type-kit` está migrando: el contrato nuevo no
7
+ * debe depender de ella. No lo "arregles" importando desde abstractions.
8
+ *
9
+ * (Contraste: `verificationResult` NO se duplica — reusa `IdentificationDocumentStatus`, que ya
10
+ * vive publicado en esta misma lib bajo `identity`.)
11
+ */
12
+ export declare enum KycVerificationStatusEnum {
13
+ CREATED = "CREATED",
14
+ SENT = "SENT",
15
+ IN_PROGRESS = "IN_PROGRESS",
16
+ COMPLETED = "COMPLETED",
17
+ ERROR = "ERROR"
18
+ }
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.KycVerificationStatusEnum = void 0;
4
+ /**
5
+ * Ciclo de vida de la verificación en `kyc-verifications-business` (crudo, sin colapsar).
6
+ *
7
+ * DEC-KYC-016: sí, duplica `KycVerificationStatus` de `@fiado/fiado-abstractions`
8
+ * (`bin/Fiado/Database/KycVerifications.d.ts`, mismos 5 valores) — y se queda así a propósito.
9
+ * `fiado-abstractions` es la lib legacy de la que `type-kit` está migrando: el contrato nuevo no
10
+ * debe depender de ella. No lo "arregles" importando desde abstractions.
11
+ *
12
+ * (Contraste: `verificationResult` NO se duplica — reusa `IdentificationDocumentStatus`, que ya
13
+ * vive publicado en esta misma lib bajo `identity`.)
14
+ */
15
+ var KycVerificationStatusEnum;
16
+ (function (KycVerificationStatusEnum) {
17
+ KycVerificationStatusEnum["CREATED"] = "CREATED";
18
+ KycVerificationStatusEnum["SENT"] = "SENT";
19
+ KycVerificationStatusEnum["IN_PROGRESS"] = "IN_PROGRESS";
20
+ KycVerificationStatusEnum["COMPLETED"] = "COMPLETED";
21
+ KycVerificationStatusEnum["ERROR"] = "ERROR";
22
+ })(KycVerificationStatusEnum || (exports.KycVerificationStatusEnum = KycVerificationStatusEnum = {}));
@@ -0,0 +1,35 @@
1
+ import { IdentificationDocumentStatus } from '../../identity/enums/IdentificationDocumentStatus';
2
+ import { KycVerificationStatusEnum } from '../enums/KycVerificationStatusEnum';
3
+ /**
4
+ * Cambio terminal de una verificación KYC, tal como llega desde el DDB Stream de
5
+ * `KycVerifications` a través del EventBridge Pipe (filtrado a COMPLETED).
6
+ *
7
+ * NO lleva `tenantId`: el de la tabla es un valor hardcodeado que no discrimina silo.
8
+ * La pertenencia se resuelve en el consumer con el gate de `WizardSession`.
9
+ *
10
+ * Los estados viajan CRUDOS para no acoplar al consumidor con el mapeo del dominio dueño.
11
+ *
12
+ * DEC-KYC-015: los tres identificadores usan `@IsNotEmpty()`. El NewImage de DDB puede traer
13
+ * `S: ""` — que `@IsString()` aceptaría en silencio. Preferimos que el mensaje caiga al DLQ
14
+ * en el boundary antes que fallar mudo tres pasos río abajo.
15
+ *
16
+ * DEC-KYC-016: `verificationResult` reusa `IdentificationDocumentStatus` — es el enum que el
17
+ * lambda productor (`kyc-verifications-business`) escribe literalmente en la tabla; duplicarlo
18
+ * aquí sería drift garantizado.
19
+ */
20
+ export declare class KycVerificationChangedV1 {
21
+ /** La PK de la fila (`id`) mapeada a nombre de negocio. */
22
+ verificationId: string;
23
+ directoryId: string;
24
+ peopleId: string;
25
+ metamapFlowId?: string;
26
+ verificationStatus: KycVerificationStatusEnum;
27
+ verificationResult: IdentificationDocumentStatus;
28
+ /**
29
+ * ISO-8601 obligatorio: el ordenamiento del endpoint (spec §6) se apoya en que la fecha es
30
+ * léxicamente ordenable. Se escanearon las 193 filas de `KycVerifications` en dev —
31
+ * `createDate` 193/193 y `updateDate` 193/193 ISO-8601: 386/386, cero excepciones
32
+ * (ejemplo real: '2025-10-06T21:40:58.277Z'). Verificado, no asumido (2026-07-21).
33
+ */
34
+ updateDate: string;
35
+ }
@@ -0,0 +1,76 @@
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.KycVerificationChangedV1 = void 0;
13
+ const class_transformer_1 = require("class-transformer");
14
+ const class_validator_1 = require("class-validator");
15
+ const IdentificationDocumentStatus_1 = require("../../identity/enums/IdentificationDocumentStatus");
16
+ const KycVerificationStatusEnum_1 = require("../enums/KycVerificationStatusEnum");
17
+ /**
18
+ * Cambio terminal de una verificación KYC, tal como llega desde el DDB Stream de
19
+ * `KycVerifications` a través del EventBridge Pipe (filtrado a COMPLETED).
20
+ *
21
+ * NO lleva `tenantId`: el de la tabla es un valor hardcodeado que no discrimina silo.
22
+ * La pertenencia se resuelve en el consumer con el gate de `WizardSession`.
23
+ *
24
+ * Los estados viajan CRUDOS para no acoplar al consumidor con el mapeo del dominio dueño.
25
+ *
26
+ * DEC-KYC-015: los tres identificadores usan `@IsNotEmpty()`. El NewImage de DDB puede traer
27
+ * `S: ""` — que `@IsString()` aceptaría en silencio. Preferimos que el mensaje caiga al DLQ
28
+ * en el boundary antes que fallar mudo tres pasos río abajo.
29
+ *
30
+ * DEC-KYC-016: `verificationResult` reusa `IdentificationDocumentStatus` — es el enum que el
31
+ * lambda productor (`kyc-verifications-business`) escribe literalmente en la tabla; duplicarlo
32
+ * aquí sería drift garantizado.
33
+ */
34
+ class KycVerificationChangedV1 {
35
+ }
36
+ exports.KycVerificationChangedV1 = KycVerificationChangedV1;
37
+ __decorate([
38
+ (0, class_transformer_1.Expose)(),
39
+ (0, class_validator_1.IsString)(),
40
+ (0, class_validator_1.IsNotEmpty)(),
41
+ __metadata("design:type", String)
42
+ ], KycVerificationChangedV1.prototype, "verificationId", void 0);
43
+ __decorate([
44
+ (0, class_transformer_1.Expose)(),
45
+ (0, class_validator_1.IsString)(),
46
+ (0, class_validator_1.IsNotEmpty)(),
47
+ __metadata("design:type", String)
48
+ ], KycVerificationChangedV1.prototype, "directoryId", void 0);
49
+ __decorate([
50
+ (0, class_transformer_1.Expose)(),
51
+ (0, class_validator_1.IsString)(),
52
+ (0, class_validator_1.IsNotEmpty)(),
53
+ __metadata("design:type", String)
54
+ ], KycVerificationChangedV1.prototype, "peopleId", void 0);
55
+ __decorate([
56
+ (0, class_transformer_1.Expose)(),
57
+ (0, class_validator_1.IsOptional)(),
58
+ (0, class_validator_1.IsString)(),
59
+ __metadata("design:type", String)
60
+ ], KycVerificationChangedV1.prototype, "metamapFlowId", void 0);
61
+ __decorate([
62
+ (0, class_transformer_1.Expose)(),
63
+ (0, class_validator_1.IsEnum)(KycVerificationStatusEnum_1.KycVerificationStatusEnum),
64
+ __metadata("design:type", String)
65
+ ], KycVerificationChangedV1.prototype, "verificationStatus", void 0);
66
+ __decorate([
67
+ (0, class_transformer_1.Expose)(),
68
+ (0, class_validator_1.IsEnum)(IdentificationDocumentStatus_1.IdentificationDocumentStatus),
69
+ __metadata("design:type", String)
70
+ ], KycVerificationChangedV1.prototype, "verificationResult", void 0);
71
+ __decorate([
72
+ (0, class_transformer_1.Expose)(),
73
+ (0, class_validator_1.IsString)(),
74
+ (0, class_validator_1.IsISO8601)(),
75
+ __metadata("design:type", String)
76
+ ], KycVerificationChangedV1.prototype, "updateDate", void 0);
@@ -0,0 +1,4 @@
1
+ export * from './enums/KycVerificationStatusEnum';
2
+ export * from './dtos/responses/KycPersonData';
3
+ export * from './dtos/responses/KycByDirectoryResponse';
4
+ export * from './events/KycVerificationChangedV1';
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ // Enums (el consolidado reusa RetailKycStatusEnum del dominio retailCustomer — DEC-KYC-014;
18
+ // `verificationResult` reusa IdentificationDocumentStatus de `identity` — DEC-KYC-016)
19
+ __exportStar(require("./enums/KycVerificationStatusEnum"), exports);
20
+ // Response DTOs
21
+ __exportStar(require("./dtos/responses/KycPersonData"), exports);
22
+ __exportStar(require("./dtos/responses/KycByDirectoryResponse"), exports);
23
+ // Events
24
+ __exportStar(require("./events/KycVerificationChangedV1"), 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 = {}));
@@ -29,7 +29,8 @@ __decorate([
29
29
  ], SendMessageRequest.prototype, "messageType", void 0);
30
30
  __decorate([
31
31
  (0, class_transformer_1.Expose)(),
32
- (0, class_validator_1.IsUUID)(),
32
+ (0, class_validator_1.IsString)(),
33
+ (0, class_validator_1.IsNotEmpty)(),
33
34
  __metadata("design:type", String)
34
35
  ], SendMessageRequest.prototype, "directoryId", void 0);
35
36
  __decorate([
@@ -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
- name: string;
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
- curp: string;
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;