@fiado/type-kit 3.51.1 → 3.53.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/dtos/BackofficeLeafDetailResponse.d.ts +3 -0
- package/bin/benefitCenter/dtos/BackofficeLeafListItem.d.ts +1 -0
- package/bin/benefitCenter/dtos/BackofficeLeafUpdateRequest.d.ts +10 -2
- package/bin/benefitCenter/dtos/BackofficeLeafUpdateRequest.js +24 -2
- package/bin/benefitCenter/dtos/BackofficeProductUpdateRequest.d.ts +28 -0
- package/bin/benefitCenter/dtos/BackofficeProductUpdateRequest.js +82 -0
- package/bin/benefitCenter/dtos/ProductItem.d.ts +8 -0
- package/bin/benefitCenter/dtos/VerifyEquivalentInfo.d.ts +20 -0
- package/bin/benefitCenter/dtos/VerifyEquivalentInfo.js +10 -0
- package/bin/benefitCenter/index.d.ts +2 -0
- package/bin/benefitCenter/index.js +4 -0
- package/bin/card/validations/CardUpdateKeyConstraint.js +2 -2
- package/bin/card/validations/IsPhoneNumberConstraint.js +2 -2
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +7 -0
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.js +36 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +20 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +11 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +4 -0
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +6 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +17 -0
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +39 -0
- package/bin/index.js +17 -7
- package/bin/rbac/enums/PoolKind.d.ts +16 -0
- package/bin/rbac/enums/PoolKind.js +20 -0
- package/bin/rbac/index.d.ts +1 -0
- package/bin/rbac/index.js +17 -0
- package/package.json +1 -1
- package/src/benefitCenter/dtos/BackofficeLeafDetailResponse.ts +3 -0
- package/src/benefitCenter/dtos/BackofficeLeafListItem.ts +2 -0
- package/src/benefitCenter/dtos/BackofficeLeafUpdateRequest.ts +13 -2
- package/src/benefitCenter/dtos/BackofficeProductUpdateRequest.ts +75 -0
- package/src/benefitCenter/dtos/ProductItem.ts +9 -0
- package/src/benefitCenter/dtos/VerifyEquivalentInfo.ts +21 -0
- package/src/benefitCenter/index.ts +4 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConnectorCatalogItem } from "./ConnectorCatalogItem";
|
|
2
|
+
import { VerifyEquivalentInfo } from "./VerifyEquivalentInfo";
|
|
2
3
|
/**
|
|
3
4
|
* Respuesta del detalle de un leaf en el backoffice (v2 in-place).
|
|
4
5
|
* Devuelve el item del catálogo del conector tal cual — sin paso de merge
|
|
@@ -10,4 +11,6 @@ export interface BackofficeLeafDetailResponse {
|
|
|
10
11
|
moduleName: string;
|
|
11
12
|
serviceId: string;
|
|
12
13
|
item: ConnectorCatalogItem;
|
|
14
|
+
verifyEquivalent: VerifyEquivalentInfo;
|
|
15
|
+
warnings?: string[];
|
|
13
16
|
}
|
|
@@ -3,9 +3,14 @@
|
|
|
3
3
|
* opcionales pero al menos uno debe venir; si el body está vacío el backend
|
|
4
4
|
* responde 400 INVALID_PATCH_PAYLOAD.
|
|
5
5
|
*
|
|
6
|
-
* Los campos
|
|
7
|
-
* `inputSchema`, `requiresReferenceVerification`) ya no son editables —
|
|
6
|
+
* Los campos `description`, `helpText` e `inputSchema` NO son editables —
|
|
8
7
|
* vienen derivados del producto en el mapper del conector.
|
|
8
|
+
*
|
|
9
|
+
* `requiresReferenceVerification` SÍ es editable: es un toggle a nivel
|
|
10
|
+
* servicio que el backend traduce a `verificateReference` en TODOS los
|
|
11
|
+
* productos del servicio (el derivado se recalcula solo en el siguiente read).
|
|
12
|
+
*
|
|
13
|
+
* `currency` y `countryId` también son editables a nivel servicio (F5).
|
|
9
14
|
*/
|
|
10
15
|
export declare class BackofficeLeafUpdateRequest {
|
|
11
16
|
serviceName?: string;
|
|
@@ -15,4 +20,7 @@ export declare class BackofficeLeafUpdateRequest {
|
|
|
15
20
|
logo?: string;
|
|
16
21
|
serviceOrder?: number;
|
|
17
22
|
subcategoryOrder?: number;
|
|
23
|
+
requiresReferenceVerification?: boolean;
|
|
24
|
+
currency?: string;
|
|
25
|
+
countryId?: string;
|
|
18
26
|
}
|
|
@@ -16,9 +16,14 @@ const class_validator_1 = require("class-validator");
|
|
|
16
16
|
* opcionales pero al menos uno debe venir; si el body está vacío el backend
|
|
17
17
|
* responde 400 INVALID_PATCH_PAYLOAD.
|
|
18
18
|
*
|
|
19
|
-
* Los campos
|
|
20
|
-
* `inputSchema`, `requiresReferenceVerification`) ya no son editables —
|
|
19
|
+
* Los campos `description`, `helpText` e `inputSchema` NO son editables —
|
|
21
20
|
* vienen derivados del producto en el mapper del conector.
|
|
21
|
+
*
|
|
22
|
+
* `requiresReferenceVerification` SÍ es editable: es un toggle a nivel
|
|
23
|
+
* servicio que el backend traduce a `verificateReference` en TODOS los
|
|
24
|
+
* productos del servicio (el derivado se recalcula solo en el siguiente read).
|
|
25
|
+
*
|
|
26
|
+
* `currency` y `countryId` también son editables a nivel servicio (F5).
|
|
22
27
|
*/
|
|
23
28
|
class BackofficeLeafUpdateRequest {
|
|
24
29
|
}
|
|
@@ -64,3 +69,20 @@ __decorate([
|
|
|
64
69
|
(0, class_validator_1.IsNumber)(),
|
|
65
70
|
__metadata("design:type", Number)
|
|
66
71
|
], BackofficeLeafUpdateRequest.prototype, "subcategoryOrder", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.IsBoolean)(),
|
|
75
|
+
__metadata("design:type", Boolean)
|
|
76
|
+
], BackofficeLeafUpdateRequest.prototype, "requiresReferenceVerification", void 0);
|
|
77
|
+
__decorate([
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
(0, class_validator_1.IsString)(),
|
|
80
|
+
(0, class_validator_1.MaxLength)(10),
|
|
81
|
+
__metadata("design:type", String)
|
|
82
|
+
], BackofficeLeafUpdateRequest.prototype, "currency", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, class_validator_1.IsString)(),
|
|
86
|
+
(0, class_validator_1.MaxLength)(10),
|
|
87
|
+
__metadata("design:type", String)
|
|
88
|
+
], BackofficeLeafUpdateRequest.prototype, "countryId", void 0);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AmountTypeEnum } from "../../servicePayment/enums/AmountTypeEnum";
|
|
2
|
+
import { ReferenceTypeEnum } from "../enums/ReferenceTypeEnum";
|
|
3
|
+
/**
|
|
4
|
+
* Patch parcial in-place de un producto existente (F2/F3). Se traduce a forma
|
|
5
|
+
* nativa en el conector (que re-deriva tipoFront de amountType).
|
|
6
|
+
*/
|
|
7
|
+
export declare class BackofficeProductUpdateRequest {
|
|
8
|
+
productName?: string;
|
|
9
|
+
/** Precio del producto (0 para monto VARIABLE). */
|
|
10
|
+
price?: number;
|
|
11
|
+
/** Comisión. */
|
|
12
|
+
fee?: number;
|
|
13
|
+
amountType?: AmountTypeEnum;
|
|
14
|
+
/** Tipo de referencia (→ tipoReferencia nativo; define el input de la app). */
|
|
15
|
+
referenceType?: ReferenceTypeEnum;
|
|
16
|
+
/** Si la referencia lleva dígito verificador (→ hasDigitoVerificador). */
|
|
17
|
+
hasCheckDigit?: boolean;
|
|
18
|
+
/** Si la referencia se verifica antes de pagar (→ verificateReference). */
|
|
19
|
+
verifyReference?: boolean;
|
|
20
|
+
/** Texto de ayuda (→ legend). */
|
|
21
|
+
helpText?: string;
|
|
22
|
+
/** Imagen de ayuda / dónde escanear (→ refSrc). */
|
|
23
|
+
helpImage?: string;
|
|
24
|
+
/** Logo del producto (→ logoSrc). */
|
|
25
|
+
logo?: string;
|
|
26
|
+
/** Habilitado. */
|
|
27
|
+
enabled?: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
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.BackofficeProductUpdateRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const AmountTypeEnum_1 = require("../../servicePayment/enums/AmountTypeEnum");
|
|
15
|
+
const ReferenceTypeEnum_1 = require("../enums/ReferenceTypeEnum");
|
|
16
|
+
/**
|
|
17
|
+
* Patch parcial in-place de un producto existente (F2/F3). Se traduce a forma
|
|
18
|
+
* nativa en el conector (que re-deriva tipoFront de amountType).
|
|
19
|
+
*/
|
|
20
|
+
class BackofficeProductUpdateRequest {
|
|
21
|
+
}
|
|
22
|
+
exports.BackofficeProductUpdateRequest = BackofficeProductUpdateRequest;
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsOptional)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.MaxLength)(200),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], BackofficeProductUpdateRequest.prototype, "productName", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsOptional)(),
|
|
31
|
+
(0, class_validator_1.IsNumber)(),
|
|
32
|
+
(0, class_validator_1.Min)(0),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], BackofficeProductUpdateRequest.prototype, "price", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsOptional)(),
|
|
37
|
+
(0, class_validator_1.IsNumber)(),
|
|
38
|
+
(0, class_validator_1.Min)(0),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], BackofficeProductUpdateRequest.prototype, "fee", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
(0, class_validator_1.IsEnum)(AmountTypeEnum_1.AmountTypeEnum),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], BackofficeProductUpdateRequest.prototype, "amountType", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
(0, class_validator_1.IsEnum)(ReferenceTypeEnum_1.ReferenceTypeEnum),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], BackofficeProductUpdateRequest.prototype, "referenceType", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
(0, class_validator_1.IsBoolean)(),
|
|
54
|
+
__metadata("design:type", Boolean)
|
|
55
|
+
], BackofficeProductUpdateRequest.prototype, "hasCheckDigit", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
(0, class_validator_1.IsBoolean)(),
|
|
59
|
+
__metadata("design:type", Boolean)
|
|
60
|
+
], BackofficeProductUpdateRequest.prototype, "verifyReference", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsOptional)(),
|
|
63
|
+
(0, class_validator_1.IsString)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], BackofficeProductUpdateRequest.prototype, "helpText", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsOptional)(),
|
|
68
|
+
(0, class_validator_1.IsString)(),
|
|
69
|
+
(0, class_validator_1.MaxLength)(500),
|
|
70
|
+
__metadata("design:type", String)
|
|
71
|
+
], BackofficeProductUpdateRequest.prototype, "helpImage", void 0);
|
|
72
|
+
__decorate([
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.IsString)(),
|
|
75
|
+
(0, class_validator_1.MaxLength)(500),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], BackofficeProductUpdateRequest.prototype, "logo", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, class_validator_1.IsBoolean)(),
|
|
81
|
+
__metadata("design:type", Boolean)
|
|
82
|
+
], BackofficeProductUpdateRequest.prototype, "enabled", void 0);
|
|
@@ -19,4 +19,12 @@ export declare class ProductItem {
|
|
|
19
19
|
* el producto del catálogo público.
|
|
20
20
|
*/
|
|
21
21
|
enabled?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Si este producto verifica la referencia (consulta de saldo) antes de
|
|
24
|
+
* pagar. Mapea del campo nativo del producto `verificateReference`. Es lo
|
|
25
|
+
* que deriva `requiresReferenceVerification` a nivel servicio
|
|
26
|
+
* (`products.some(p => p.verificateReference === true)`). Opcional/aditivo:
|
|
27
|
+
* ausente o `false` ⇒ no verifica.
|
|
28
|
+
*/
|
|
29
|
+
verificateReference?: boolean;
|
|
22
30
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Por qué no hay equivalente verificable (cuando `feasible === false`). */
|
|
2
|
+
export declare enum VerifyEquivalentReasonEnum {
|
|
3
|
+
NO_SUBCATEGORY = "NO_SUBCATEGORY",
|
|
4
|
+
NO_EQUIVALENT = "NO_EQUIVALENT",
|
|
5
|
+
NO_VERIFIABLE_PRODUCT = "NO_VERIFIABLE_PRODUCT"
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Dónde ocurriría realmente la verificación de referencia de un leaf y si es
|
|
9
|
+
* factible. Para módulos sin verify nativo (multicomm/multicenter) describe el
|
|
10
|
+
* equivalente resuelto por subcategoría (STP). Para módulos con verify nativo
|
|
11
|
+
* (STP) describe su propio servicio/producto.
|
|
12
|
+
*/
|
|
13
|
+
export interface VerifyEquivalentInfo {
|
|
14
|
+
feasible: boolean;
|
|
15
|
+
module: string;
|
|
16
|
+
serviceId?: string;
|
|
17
|
+
serviceName?: string;
|
|
18
|
+
productId?: string;
|
|
19
|
+
reason?: VerifyEquivalentReasonEnum;
|
|
20
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VerifyEquivalentReasonEnum = void 0;
|
|
4
|
+
/** Por qué no hay equivalente verificable (cuando `feasible === false`). */
|
|
5
|
+
var VerifyEquivalentReasonEnum;
|
|
6
|
+
(function (VerifyEquivalentReasonEnum) {
|
|
7
|
+
VerifyEquivalentReasonEnum["NO_SUBCATEGORY"] = "NO_SUBCATEGORY";
|
|
8
|
+
VerifyEquivalentReasonEnum["NO_EQUIVALENT"] = "NO_EQUIVALENT";
|
|
9
|
+
VerifyEquivalentReasonEnum["NO_VERIFIABLE_PRODUCT"] = "NO_VERIFIABLE_PRODUCT";
|
|
10
|
+
})(VerifyEquivalentReasonEnum || (exports.VerifyEquivalentReasonEnum = VerifyEquivalentReasonEnum = {}));
|
|
@@ -74,3 +74,5 @@ export * from "./dtos/BackofficeProductCreateItem";
|
|
|
74
74
|
export * from "./dtos/BackofficeLeafCreateRequest";
|
|
75
75
|
export * from "./dtos/BannerUploadUrlRequest";
|
|
76
76
|
export * from "./dtos/BannerUploadUrlResponse";
|
|
77
|
+
export * from "./dtos/VerifyEquivalentInfo";
|
|
78
|
+
export * from "./dtos/BackofficeProductUpdateRequest";
|
|
@@ -101,3 +101,7 @@ __exportStar(require("./dtos/BackofficeLeafCreateRequest"), exports);
|
|
|
101
101
|
//Banner assets upload (presigned PUT)
|
|
102
102
|
__exportStar(require("./dtos/BannerUploadUrlRequest"), exports);
|
|
103
103
|
__exportStar(require("./dtos/BannerUploadUrlResponse"), exports);
|
|
104
|
+
//Backoffice verify toggle + equivalente STP (Fase 1)
|
|
105
|
+
__exportStar(require("./dtos/VerifyEquivalentInfo"), exports);
|
|
106
|
+
//Backoffice product editor (F2/F3): patch parcial in-place de un producto
|
|
107
|
+
__exportStar(require("./dtos/BackofficeProductUpdateRequest"), exports);
|
|
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.CardUpdateKeyConstraint = exports.IsReasonRequiredForCancelledStatusConstraint = void 0;
|
|
10
|
+
exports.IsValueValid = IsValueValid;
|
|
10
11
|
const class_validator_1 = require("class-validator");
|
|
11
12
|
const Status_1 = require("../enums/Status");
|
|
12
13
|
const UpdateKey_1 = require("../enums/UpdateKey");
|
|
@@ -70,4 +71,3 @@ function IsValueValid(validationOptions) {
|
|
|
70
71
|
});
|
|
71
72
|
};
|
|
72
73
|
}
|
|
73
|
-
exports.IsValueValid = IsValueValid;
|
|
@@ -6,7 +6,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
9
|
+
exports.IsPhoneNumberConstraint = void 0;
|
|
10
|
+
exports.IsPhoneNumberFiado = IsPhoneNumberFiado;
|
|
10
11
|
const class_validator_1 = require("class-validator");
|
|
11
12
|
const regex_1 = require("../../helpers/constans/regex");
|
|
12
13
|
let IsPhoneNumberConstraint = class IsPhoneNumberConstraint {
|
|
@@ -36,4 +37,3 @@ function IsPhoneNumberFiado(validationOptions) {
|
|
|
36
37
|
});
|
|
37
38
|
};
|
|
38
39
|
}
|
|
39
|
-
exports.IsPhoneNumberFiado = IsPhoneNumberFiado;
|
|
@@ -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.MfaPoolConfig = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const MfaTypesRequiresOne_1 = require("../validators/MfaTypesRequiresOne");
|
|
16
|
+
// EMAIL_OTP removido (3.41.0): el cognito-backoffice-connector no provisiona
|
|
17
|
+
// EmailMfaConfiguration a nivel pool (requiere infra SES que no está montada
|
|
18
|
+
// y la integración con messages-lambda aún no tiene diseño). Ver TD-020 +
|
|
19
|
+
// DEC-001 en cognito-backoffice-connector/docs/. Si se reintroduce, agregar
|
|
20
|
+
// 'EMAIL_OTP' a este array.
|
|
21
|
+
const ALLOWED_MFA_TYPES = ['SOFTWARE_TOKEN_MFA'];
|
|
22
|
+
class MfaPoolConfig {
|
|
23
|
+
}
|
|
24
|
+
exports.MfaPoolConfig = MfaPoolConfig;
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
(0, class_validator_1.IsBoolean)(),
|
|
28
|
+
__metadata("design:type", Boolean)
|
|
29
|
+
], MfaPoolConfig.prototype, "requireMfa", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
(0, class_validator_1.IsArray)(),
|
|
33
|
+
(0, class_validator_1.IsIn)(ALLOWED_MFA_TYPES, { each: true }),
|
|
34
|
+
(0, class_validator_1.Validate)(MfaTypesRequiresOne_1.MfaTypesRequiresOne),
|
|
35
|
+
__metadata("design:type", Array)
|
|
36
|
+
], MfaPoolConfig.prototype, "mfaTypes", void 0);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { PoolKind } from '../../rbac/enums/PoolKind';
|
|
2
|
+
/**
|
|
3
|
+
* Shape del `PoolConfigRow` expuesto al caller (BFF M18 / otros lambdas Fiado).
|
|
4
|
+
* Refleja la configuración de un Cognito User Pool registrado en la tabla
|
|
5
|
+
* `PoolConfigs_GT` del lambda `cognito-backoffice-connector`.
|
|
6
|
+
*/
|
|
7
|
+
export declare class PoolConfigResponse {
|
|
8
|
+
userPoolId: string;
|
|
9
|
+
userPoolArn: string;
|
|
10
|
+
region: string;
|
|
11
|
+
poolKind: PoolKind;
|
|
12
|
+
displayName: string;
|
|
13
|
+
appClients: Record<string, {
|
|
14
|
+
clientId: string;
|
|
15
|
+
clientName: string;
|
|
16
|
+
}>;
|
|
17
|
+
status: 'active' | 'deprecated';
|
|
18
|
+
createdAt: number;
|
|
19
|
+
updatedAt: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PoolConfigResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Shape del `PoolConfigRow` expuesto al caller (BFF M18 / otros lambdas Fiado).
|
|
6
|
+
* Refleja la configuración de un Cognito User Pool registrado en la tabla
|
|
7
|
+
* `PoolConfigs_GT` del lambda `cognito-backoffice-connector`.
|
|
8
|
+
*/
|
|
9
|
+
class PoolConfigResponse {
|
|
10
|
+
}
|
|
11
|
+
exports.PoolConfigResponse = PoolConfigResponse;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ValidatorConstraintInterface, ValidationArguments } from 'class-validator';
|
|
2
|
+
/**
|
|
3
|
+
* Cross-field validator: si `requireMfa: true`, entonces `mfaTypes` debe tener
|
|
4
|
+
* al menos 1 elemento. Si `requireMfa: false`, `mfaTypes` puede ser vacío.
|
|
5
|
+
*
|
|
6
|
+
* Razón: cuando el pool nace con MFA habilitado, el connector llama
|
|
7
|
+
* `SetUserPoolMfaConfigCommand` con la lista de tipos del DTO. Si el array
|
|
8
|
+
* llega vacío con `requireMfa: true`, el SDK rechaza con InvalidParameterException
|
|
9
|
+
* y el pool queda en estado inconsistente (MfaConfiguration:'ON' sin tipos).
|
|
10
|
+
* Mejor rechazar en validación del DTO antes de tocar AWS.
|
|
11
|
+
*
|
|
12
|
+
* Ver pivote v1.4.1 TD-017 cerrado + spec doc §1 R3.
|
|
13
|
+
*/
|
|
14
|
+
export declare class MfaTypesRequiresOne implements ValidatorConstraintInterface {
|
|
15
|
+
validate(mfaTypes: unknown, args: ValidationArguments): boolean;
|
|
16
|
+
defaultMessage(): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.MfaTypesRequiresOne = void 0;
|
|
10
|
+
const class_validator_1 = require("class-validator");
|
|
11
|
+
/**
|
|
12
|
+
* Cross-field validator: si `requireMfa: true`, entonces `mfaTypes` debe tener
|
|
13
|
+
* al menos 1 elemento. Si `requireMfa: false`, `mfaTypes` puede ser vacío.
|
|
14
|
+
*
|
|
15
|
+
* Razón: cuando el pool nace con MFA habilitado, el connector llama
|
|
16
|
+
* `SetUserPoolMfaConfigCommand` con la lista de tipos del DTO. Si el array
|
|
17
|
+
* llega vacío con `requireMfa: true`, el SDK rechaza con InvalidParameterException
|
|
18
|
+
* y el pool queda en estado inconsistente (MfaConfiguration:'ON' sin tipos).
|
|
19
|
+
* Mejor rechazar en validación del DTO antes de tocar AWS.
|
|
20
|
+
*
|
|
21
|
+
* Ver pivote v1.4.1 TD-017 cerrado + spec doc §1 R3.
|
|
22
|
+
*/
|
|
23
|
+
let MfaTypesRequiresOne = class MfaTypesRequiresOne {
|
|
24
|
+
validate(mfaTypes, args) {
|
|
25
|
+
const obj = args.object;
|
|
26
|
+
if (obj.requireMfa === true) {
|
|
27
|
+
return Array.isArray(mfaTypes) && mfaTypes.length >= 1;
|
|
28
|
+
}
|
|
29
|
+
// requireMfa: false → cualquier mfaTypes pasa.
|
|
30
|
+
return true;
|
|
31
|
+
}
|
|
32
|
+
defaultMessage() {
|
|
33
|
+
return 'mfaTypes requiere al menos un tipo cuando requireMfa=true';
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
exports.MfaTypesRequiresOne = MfaTypesRequiresOne;
|
|
37
|
+
exports.MfaTypesRequiresOne = MfaTypesRequiresOne = __decorate([
|
|
38
|
+
(0, class_validator_1.ValidatorConstraint)({ name: 'MfaTypesRequiresOneWhenMfaRequired', async: false })
|
|
39
|
+
], MfaTypesRequiresOne);
|
package/bin/index.js
CHANGED
|
@@ -15,13 +15,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
15
15
|
}) : function(o, v) {
|
|
16
16
|
o["default"] = v;
|
|
17
17
|
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
25
35
|
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
26
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
27
37
|
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tipo de User Pool de Cognito desde la perspectiva del modelo RBAC Fiado.
|
|
3
|
+
*
|
|
4
|
+
* Origen: spec del proyecto `cognito-backoffice-connector` (Fase 0, componente 01
|
|
5
|
+
* documento `docs/superpowers/specs/2026-05-26-cognito-connector-decisiones-pendientes-design.md`).
|
|
6
|
+
*
|
|
7
|
+
* Decisión (TD-003): el proyecto converge en estos 2 valores. El documento componente 03
|
|
8
|
+
* lista 3 valores (incluyendo una variante adicional) pero queda como outlier — la
|
|
9
|
+
* decisión vigente en los 6 docs restantes y en el plan de implementación es 2 valores:
|
|
10
|
+
* - BACKOFFICE_PLATFORM — pool del backoffice de plataforma (cross-tenant)
|
|
11
|
+
* - BACKOFFICE_TENANT — pool por tenant (multi-tenant isolation)
|
|
12
|
+
*/
|
|
13
|
+
export declare enum PoolKind {
|
|
14
|
+
BACKOFFICE_PLATFORM = "BACKOFFICE_PLATFORM",
|
|
15
|
+
BACKOFFICE_TENANT = "BACKOFFICE_TENANT"
|
|
16
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PoolKind = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Tipo de User Pool de Cognito desde la perspectiva del modelo RBAC Fiado.
|
|
6
|
+
*
|
|
7
|
+
* Origen: spec del proyecto `cognito-backoffice-connector` (Fase 0, componente 01
|
|
8
|
+
* documento `docs/superpowers/specs/2026-05-26-cognito-connector-decisiones-pendientes-design.md`).
|
|
9
|
+
*
|
|
10
|
+
* Decisión (TD-003): el proyecto converge en estos 2 valores. El documento componente 03
|
|
11
|
+
* lista 3 valores (incluyendo una variante adicional) pero queda como outlier — la
|
|
12
|
+
* decisión vigente en los 6 docs restantes y en el plan de implementación es 2 valores:
|
|
13
|
+
* - BACKOFFICE_PLATFORM — pool del backoffice de plataforma (cross-tenant)
|
|
14
|
+
* - BACKOFFICE_TENANT — pool por tenant (multi-tenant isolation)
|
|
15
|
+
*/
|
|
16
|
+
var PoolKind;
|
|
17
|
+
(function (PoolKind) {
|
|
18
|
+
PoolKind["BACKOFFICE_PLATFORM"] = "BACKOFFICE_PLATFORM";
|
|
19
|
+
PoolKind["BACKOFFICE_TENANT"] = "BACKOFFICE_TENANT";
|
|
20
|
+
})(PoolKind || (exports.PoolKind = PoolKind = {}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './enums/PoolKind';
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
__exportStar(require("./enums/PoolKind"), exports);
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ConnectorCatalogItem } from "./ConnectorCatalogItem";
|
|
2
|
+
import { VerifyEquivalentInfo } from "./VerifyEquivalentInfo";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Respuesta del detalle de un leaf en el backoffice (v2 in-place).
|
|
@@ -11,4 +12,6 @@ export interface BackofficeLeafDetailResponse {
|
|
|
11
12
|
moduleName: string;
|
|
12
13
|
serviceId: string;
|
|
13
14
|
item: ConnectorCatalogItem;
|
|
15
|
+
verifyEquivalent: VerifyEquivalentInfo;
|
|
16
|
+
warnings?: string[];
|
|
14
17
|
}
|
|
@@ -24,4 +24,6 @@ export interface BackofficeLeafListItem {
|
|
|
24
24
|
countryId: string; // ISO numérico del país destino de la recarga (840 USA, 484 MX, 192 CU, …)
|
|
25
25
|
serviceOrder: number; // orden del leaf en su subcategory
|
|
26
26
|
subcategoryOrder: number;// orden de la subcategory en su category
|
|
27
|
+
|
|
28
|
+
requiresReferenceVerification: boolean; // Derivado: ¿algún producto requiere verificación?
|
|
27
29
|
}
|
|
@@ -5,9 +5,14 @@ import { IsBoolean, IsNumber, IsOptional, IsString, Matches, MaxLength } from "c
|
|
|
5
5
|
* opcionales pero al menos uno debe venir; si el body está vacío el backend
|
|
6
6
|
* responde 400 INVALID_PATCH_PAYLOAD.
|
|
7
7
|
*
|
|
8
|
-
* Los campos
|
|
9
|
-
* `inputSchema`, `requiresReferenceVerification`) ya no son editables —
|
|
8
|
+
* Los campos `description`, `helpText` e `inputSchema` NO son editables —
|
|
10
9
|
* vienen derivados del producto en el mapper del conector.
|
|
10
|
+
*
|
|
11
|
+
* `requiresReferenceVerification` SÍ es editable: es un toggle a nivel
|
|
12
|
+
* servicio que el backend traduce a `verificateReference` en TODOS los
|
|
13
|
+
* productos del servicio (el derivado se recalcula solo en el siguiente read).
|
|
14
|
+
*
|
|
15
|
+
* `currency` y `countryId` también son editables a nivel servicio (F5).
|
|
11
16
|
*/
|
|
12
17
|
export class BackofficeLeafUpdateRequest {
|
|
13
18
|
@IsOptional() @IsString() @MaxLength(200) serviceName?: string;
|
|
@@ -27,4 +32,10 @@ export class BackofficeLeafUpdateRequest {
|
|
|
27
32
|
@IsOptional() @IsNumber() serviceOrder?: number;
|
|
28
33
|
|
|
29
34
|
@IsOptional() @IsNumber() subcategoryOrder?: number;
|
|
35
|
+
|
|
36
|
+
@IsOptional() @IsBoolean() requiresReferenceVerification?: boolean;
|
|
37
|
+
|
|
38
|
+
@IsOptional() @IsString() @MaxLength(10) currency?: string;
|
|
39
|
+
|
|
40
|
+
@IsOptional() @IsString() @MaxLength(10) countryId?: string;
|
|
30
41
|
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import {
|
|
2
|
+
IsBoolean,
|
|
3
|
+
IsEnum,
|
|
4
|
+
IsNumber,
|
|
5
|
+
IsOptional,
|
|
6
|
+
IsString,
|
|
7
|
+
Min,
|
|
8
|
+
MaxLength,
|
|
9
|
+
} from "class-validator";
|
|
10
|
+
import { AmountTypeEnum } from "../../servicePayment/enums/AmountTypeEnum";
|
|
11
|
+
import { ReferenceTypeEnum } from "../enums/ReferenceTypeEnum";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Patch parcial in-place de un producto existente (F2/F3). Se traduce a forma
|
|
15
|
+
* nativa en el conector (que re-deriva tipoFront de amountType).
|
|
16
|
+
*/
|
|
17
|
+
export class BackofficeProductUpdateRequest {
|
|
18
|
+
@IsOptional()
|
|
19
|
+
@IsString()
|
|
20
|
+
@MaxLength(200)
|
|
21
|
+
productName?: string;
|
|
22
|
+
|
|
23
|
+
/** Precio del producto (0 para monto VARIABLE). */
|
|
24
|
+
@IsOptional()
|
|
25
|
+
@IsNumber()
|
|
26
|
+
@Min(0)
|
|
27
|
+
price?: number;
|
|
28
|
+
|
|
29
|
+
/** Comisión. */
|
|
30
|
+
@IsOptional()
|
|
31
|
+
@IsNumber()
|
|
32
|
+
@Min(0)
|
|
33
|
+
fee?: number;
|
|
34
|
+
|
|
35
|
+
@IsOptional()
|
|
36
|
+
@IsEnum(AmountTypeEnum)
|
|
37
|
+
amountType?: AmountTypeEnum;
|
|
38
|
+
|
|
39
|
+
/** Tipo de referencia (→ tipoReferencia nativo; define el input de la app). */
|
|
40
|
+
@IsOptional()
|
|
41
|
+
@IsEnum(ReferenceTypeEnum)
|
|
42
|
+
referenceType?: ReferenceTypeEnum;
|
|
43
|
+
|
|
44
|
+
/** Si la referencia lleva dígito verificador (→ hasDigitoVerificador). */
|
|
45
|
+
@IsOptional()
|
|
46
|
+
@IsBoolean()
|
|
47
|
+
hasCheckDigit?: boolean;
|
|
48
|
+
|
|
49
|
+
/** Si la referencia se verifica antes de pagar (→ verificateReference). */
|
|
50
|
+
@IsOptional()
|
|
51
|
+
@IsBoolean()
|
|
52
|
+
verifyReference?: boolean;
|
|
53
|
+
|
|
54
|
+
/** Texto de ayuda (→ legend). */
|
|
55
|
+
@IsOptional()
|
|
56
|
+
@IsString()
|
|
57
|
+
helpText?: string;
|
|
58
|
+
|
|
59
|
+
/** Imagen de ayuda / dónde escanear (→ refSrc). */
|
|
60
|
+
@IsOptional()
|
|
61
|
+
@IsString()
|
|
62
|
+
@MaxLength(500)
|
|
63
|
+
helpImage?: string;
|
|
64
|
+
|
|
65
|
+
/** Logo del producto (→ logoSrc). */
|
|
66
|
+
@IsOptional()
|
|
67
|
+
@IsString()
|
|
68
|
+
@MaxLength(500)
|
|
69
|
+
logo?: string;
|
|
70
|
+
|
|
71
|
+
/** Habilitado. */
|
|
72
|
+
@IsOptional()
|
|
73
|
+
@IsBoolean()
|
|
74
|
+
enabled?: boolean;
|
|
75
|
+
}
|
|
@@ -22,4 +22,13 @@ export class ProductItem {
|
|
|
22
22
|
* el producto del catálogo público.
|
|
23
23
|
*/
|
|
24
24
|
enabled?: boolean;
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Si este producto verifica la referencia (consulta de saldo) antes de
|
|
28
|
+
* pagar. Mapea del campo nativo del producto `verificateReference`. Es lo
|
|
29
|
+
* que deriva `requiresReferenceVerification` a nivel servicio
|
|
30
|
+
* (`products.some(p => p.verificateReference === true)`). Opcional/aditivo:
|
|
31
|
+
* ausente o `false` ⇒ no verifica.
|
|
32
|
+
*/
|
|
33
|
+
verificateReference?: boolean;
|
|
25
34
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Por qué no hay equivalente verificable (cuando `feasible === false`). */
|
|
2
|
+
export enum VerifyEquivalentReasonEnum {
|
|
3
|
+
NO_SUBCATEGORY = "NO_SUBCATEGORY",
|
|
4
|
+
NO_EQUIVALENT = "NO_EQUIVALENT",
|
|
5
|
+
NO_VERIFIABLE_PRODUCT = "NO_VERIFIABLE_PRODUCT",
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Dónde ocurriría realmente la verificación de referencia de un leaf y si es
|
|
10
|
+
* factible. Para módulos sin verify nativo (multicomm/multicenter) describe el
|
|
11
|
+
* equivalente resuelto por subcategoría (STP). Para módulos con verify nativo
|
|
12
|
+
* (STP) describe su propio servicio/producto.
|
|
13
|
+
*/
|
|
14
|
+
export interface VerifyEquivalentInfo {
|
|
15
|
+
feasible: boolean;
|
|
16
|
+
module: string;
|
|
17
|
+
serviceId?: string;
|
|
18
|
+
serviceName?: string;
|
|
19
|
+
productId?: string;
|
|
20
|
+
reason?: VerifyEquivalentReasonEnum;
|
|
21
|
+
}
|
|
@@ -86,3 +86,7 @@ export * from "./dtos/BackofficeLeafCreateRequest";
|
|
|
86
86
|
//Banner assets upload (presigned PUT)
|
|
87
87
|
export * from "./dtos/BannerUploadUrlRequest";
|
|
88
88
|
export * from "./dtos/BannerUploadUrlResponse";
|
|
89
|
+
//Backoffice verify toggle + equivalente STP (Fase 1)
|
|
90
|
+
export * from "./dtos/VerifyEquivalentInfo";
|
|
91
|
+
//Backoffice product editor (F2/F3): patch parcial in-place de un producto
|
|
92
|
+
export * from "./dtos/BackofficeProductUpdateRequest";
|