@fiado/type-kit 3.101.0 → 3.103.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/productCatalog/enums/ProductTypeEnum.d.ts +2 -1
- package/bin/productCatalog/enums/ProductTypeEnum.js +1 -0
- package/bin/walletFunding/dtos/CreditWalletFundingRequest.d.ts +10 -0
- package/bin/walletFunding/dtos/CreditWalletFundingRequest.js +6 -0
- package/bin/walletFunding/dtos/ValidateWalletFundingRequest.d.ts +2 -0
- package/bin/walletFunding/dtos/ValidateWalletFundingRequest.js +6 -0
- package/package.json +1 -1
- package/src/productCatalog/enums/ProductTypeEnum.ts +2 -1
- package/src/walletFunding/dtos/CreditWalletFundingRequest.ts +11 -1
- package/src/walletFunding/dtos/ValidateWalletFundingRequest.ts +3 -1
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +0 -7
- package/bin/cognitoBackofficeConnector/dtos/MfaPoolConfig.js +0 -36
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.d.ts +0 -20
- package/bin/cognitoBackofficeConnector/dtos/PoolConfigResponse.js +0 -11
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.d.ts +0 -4
- package/bin/cognitoBackofficeConnector/dtos/PoolsListResponse.js +0 -6
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.d.ts +0 -17
- package/bin/cognitoBackofficeConnector/validators/MfaTypesRequiresOne.js +0 -39
- package/bin/rbac/enums/PoolKind.d.ts +0 -16
- package/bin/rbac/enums/PoolKind.js +0 -20
- package/bin/rbac/index.d.ts +0 -1
- package/bin/rbac/index.js +0 -17
|
@@ -10,5 +10,6 @@ export declare enum ProductTypeEnum {
|
|
|
10
10
|
CREDIT = "CREDIT",
|
|
11
11
|
MULTICOMM_SERV_SA = "MULTICOMM_SERV_SA",
|
|
12
12
|
MULTICENTER_SERV_SA = "MULTICENTER_SERV_SA",
|
|
13
|
-
UNITELLER_REMIT = "UNITELLER_REMIT"
|
|
13
|
+
UNITELLER_REMIT = "UNITELLER_REMIT",
|
|
14
|
+
WALLET_FUNDING = "WALLET_FUNDING"
|
|
14
15
|
}
|
|
@@ -15,4 +15,5 @@ var ProductTypeEnum;
|
|
|
15
15
|
ProductTypeEnum["MULTICOMM_SERV_SA"] = "MULTICOMM_SERV_SA";
|
|
16
16
|
ProductTypeEnum["MULTICENTER_SERV_SA"] = "MULTICENTER_SERV_SA";
|
|
17
17
|
ProductTypeEnum["UNITELLER_REMIT"] = "UNITELLER_REMIT";
|
|
18
|
+
ProductTypeEnum["WALLET_FUNDING"] = "WALLET_FUNDING";
|
|
18
19
|
})(ProductTypeEnum || (exports.ProductTypeEnum = ProductTypeEnum = {}));
|
|
@@ -7,4 +7,14 @@ export declare class CreditWalletFundingRequest {
|
|
|
7
7
|
providerReference: string;
|
|
8
8
|
providerTxId: string;
|
|
9
9
|
paidAt: string;
|
|
10
|
+
/**
|
|
11
|
+
* Nombre legible del centro de pago donde el cliente deposito (ej. "Farmacias del
|
|
12
|
+
* Ahorro", "Oxxo", "7-Eleven"). Lo usa el processor para los campos visibles al
|
|
13
|
+
* usuario: sourceName del producto en la Transaction (movimiento en la app),
|
|
14
|
+
* description del ticket y `{{center}}` en la notificacion push.
|
|
15
|
+
*
|
|
16
|
+
* Opcional para compat con callers viejos (caen al providerName, que es el slug
|
|
17
|
+
* tecnico — e.g. "equality" — y se ve feo en UI).
|
|
18
|
+
*/
|
|
19
|
+
center?: string;
|
|
10
20
|
}
|
|
@@ -53,3 +53,9 @@ __decorate([
|
|
|
53
53
|
(0, class_validator_1.IsDateString)(),
|
|
54
54
|
__metadata("design:type", String)
|
|
55
55
|
], CreditWalletFundingRequest.prototype, "paidAt", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsOptional)(),
|
|
58
|
+
(0, class_validator_1.IsString)(),
|
|
59
|
+
(0, class_validator_1.MaxLength)(64),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], CreditWalletFundingRequest.prototype, "center", void 0);
|
|
@@ -49,3 +49,9 @@ __decorate([
|
|
|
49
49
|
(0, class_validator_1.MaxLength)(64),
|
|
50
50
|
__metadata("design:type", String)
|
|
51
51
|
], ValidateWalletFundingRequest.prototype, "providerTxId", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_validator_1.IsOptional)(),
|
|
54
|
+
(0, class_validator_1.IsString)(),
|
|
55
|
+
(0, class_validator_1.MaxLength)(64),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ValidateWalletFundingRequest.prototype, "center", void 0);
|
package/package.json
CHANGED
|
@@ -10,5 +10,6 @@ export enum ProductTypeEnum {
|
|
|
10
10
|
CREDIT = "CREDIT",
|
|
11
11
|
MULTICOMM_SERV_SA = "MULTICOMM_SERV_SA",
|
|
12
12
|
MULTICENTER_SERV_SA = "MULTICENTER_SERV_SA",
|
|
13
|
-
UNITELLER_REMIT = "UNITELLER_REMIT"
|
|
13
|
+
UNITELLER_REMIT = "UNITELLER_REMIT",
|
|
14
|
+
WALLET_FUNDING = "WALLET_FUNDING"
|
|
14
15
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsString, IsNumber, IsPositive, Length, IsDateString, MaxLength } from "class-validator";
|
|
1
|
+
import { IsString, IsNumber, IsPositive, Length, IsDateString, MaxLength, IsOptional } from "class-validator";
|
|
2
2
|
|
|
3
3
|
export class CreditWalletFundingRequest {
|
|
4
4
|
@IsString() @MaxLength(64) directoryId!: string;
|
|
@@ -9,4 +9,14 @@ export class CreditWalletFundingRequest {
|
|
|
9
9
|
@IsString() @MaxLength(128) providerReference!: string;
|
|
10
10
|
@IsString() @MaxLength(64) providerTxId!: string;
|
|
11
11
|
@IsDateString() paidAt!: string;
|
|
12
|
+
/**
|
|
13
|
+
* Nombre legible del centro de pago donde el cliente deposito (ej. "Farmacias del
|
|
14
|
+
* Ahorro", "Oxxo", "7-Eleven"). Lo usa el processor para los campos visibles al
|
|
15
|
+
* usuario: sourceName del producto en la Transaction (movimiento en la app),
|
|
16
|
+
* description del ticket y `{{center}}` en la notificacion push.
|
|
17
|
+
*
|
|
18
|
+
* Opcional para compat con callers viejos (caen al providerName, que es el slug
|
|
19
|
+
* tecnico — e.g. "equality" — y se ve feo en UI).
|
|
20
|
+
*/
|
|
21
|
+
@IsOptional() @IsString() @MaxLength(64) center?: string;
|
|
12
22
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IsString, IsNumber, IsPositive, Length, MaxLength } from "class-validator";
|
|
1
|
+
import { IsString, IsNumber, IsPositive, Length, MaxLength, IsOptional } from "class-validator";
|
|
2
2
|
|
|
3
3
|
export class ValidateWalletFundingRequest {
|
|
4
4
|
@IsString() @MaxLength(64) directoryId!: string;
|
|
@@ -8,4 +8,6 @@ export class ValidateWalletFundingRequest {
|
|
|
8
8
|
@IsString() @MaxLength(32) providerName!: string;
|
|
9
9
|
@IsString() @MaxLength(128) providerReference!: string;
|
|
10
10
|
@IsString() @MaxLength(64) providerTxId!: string;
|
|
11
|
+
/** Nombre legible del centro de pago (paridad con CreditWalletFundingRequest). */
|
|
12
|
+
@IsOptional() @IsString() @MaxLength(64) center?: string;
|
|
11
13
|
}
|
|
@@ -1,36 +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.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);
|
|
@@ -1,20 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,39 +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
|
-
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);
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
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 = {}));
|
package/bin/rbac/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './enums/PoolKind';
|
package/bin/rbac/index.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
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);
|