@fiado/type-kit 3.132.0 → 3.133.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/cognitoBackofficeConnector/dtos/MfaPoolConfig.d.ts +7 -0
- package/bin/{platformRbac/dtos/ResendSelfRegisterOtpRequest.js → cognitoBackofficeConnector/dtos/MfaPoolConfig.js} +18 -18
- 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/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/bin/remittance/dtos/RemittanceUserLimits.d.ts +34 -0
- package/bin/remittance/dtos/RemittanceUserLimits.js +20 -0
- package/bin/remittance/dtos/index.d.ts +1 -0
- package/bin/remittance/dtos/index.js +1 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +5 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +31 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.js +6 -0
- package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +11 -0
- package/bin/{platformRbac/dtos/ResendOtpRequest.js → walletFunding/dtos/CancelFundingRequest.js} +13 -16
- package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +14 -0
- package/bin/walletFunding/dtos/CancelFundingResponse.js +12 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.d.ts +3 -0
- package/bin/walletFunding/dtos/CancelWalletFundingRequest.js +21 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +7 -0
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.js +6 -0
- package/package.json +1 -1
- package/src/remittance/dtos/RemittanceUserLimits.ts +36 -0
- package/src/remittance/dtos/index.ts +1 -0
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
|
@@ -9,28 +9,28 @@ 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.
|
|
12
|
+
exports.MfaPoolConfig = void 0;
|
|
13
13
|
const class_transformer_1 = require("class-transformer");
|
|
14
14
|
const class_validator_1 = require("class-validator");
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class
|
|
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
23
|
}
|
|
24
|
-
exports.
|
|
24
|
+
exports.MfaPoolConfig = MfaPoolConfig;
|
|
25
25
|
__decorate([
|
|
26
26
|
(0, class_transformer_1.Expose)(),
|
|
27
|
-
(0, class_validator_1.
|
|
28
|
-
(
|
|
29
|
-
|
|
30
|
-
], ResendSelfRegisterOtpRequest.prototype, "tenantId", void 0);
|
|
27
|
+
(0, class_validator_1.IsBoolean)(),
|
|
28
|
+
__metadata("design:type", Boolean)
|
|
29
|
+
], MfaPoolConfig.prototype, "requireMfa", void 0);
|
|
31
30
|
__decorate([
|
|
32
31
|
(0, class_transformer_1.Expose)(),
|
|
33
|
-
(0, class_validator_1.
|
|
34
|
-
(0, class_validator_1.
|
|
35
|
-
|
|
36
|
-
|
|
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);
|
|
@@ -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);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Límites por usuario para el backoffice de Operación (pantalla Límites, read-only).
|
|
3
|
+
*
|
|
4
|
+
* Los LÍMITES los define el provider (UNIR): `UserCreditLimit` (Wlp Wallet daily/weekly
|
|
5
|
+
* + levelName) + `UserComplianceLimit` (ventanas 4/14/30/60/90 d). El **usage** NO lo
|
|
6
|
+
* expone UNIR (txAggregate da 403) → lo calcula el connector sumando las tx no-canceladas
|
|
7
|
+
* por ventana móvil. `limitUSD` es null cuando el provider no envía ese límite (d180, B3).
|
|
8
|
+
*/
|
|
9
|
+
export declare class RemittanceLimitWindow {
|
|
10
|
+
/** Ventana en días: 1 | 4 | 7 | 14 | 30 | 60 | 90 | 180. */
|
|
11
|
+
windowDays: number;
|
|
12
|
+
/** Límite USD del provider; null si UNIR no lo da (p.ej. d180). */
|
|
13
|
+
limitUSD: number | null;
|
|
14
|
+
/** Consumo USD calculado desde nuestras tx (rolling window, no-canceladas). */
|
|
15
|
+
usedUSD: number;
|
|
16
|
+
/** Procedencia del límite: d1/d7 de UserCreditLimit; el resto de UserComplianceLimit. */
|
|
17
|
+
source: "credit" | "compliance";
|
|
18
|
+
}
|
|
19
|
+
export declare class RemittanceUserLimits {
|
|
20
|
+
directoryId: string;
|
|
21
|
+
/** Nivel de UserProfileInfo.remitterLevel (display). null si no se pudo leer. */
|
|
22
|
+
profileLevel: string | null;
|
|
23
|
+
/** Nivel de UserCreditLimit.levelName (el efectivo que enforza el provider). */
|
|
24
|
+
creditLevel: string | null;
|
|
25
|
+
/** profileLevel !== creditLevel (ambos no-null). Bug real del provider; se marca, no se corrige. */
|
|
26
|
+
discrepancy: boolean;
|
|
27
|
+
/** Ventanas con límite (provider) + consumo (calculado). */
|
|
28
|
+
windows: RemittanceLimitWindow[];
|
|
29
|
+
/** ISO — cuándo se trajeron los límites del provider (para el FreshnessBadge). */
|
|
30
|
+
lastSyncedAt: string;
|
|
31
|
+
}
|
|
32
|
+
export declare class RemittanceUserLimitsBatchResponse {
|
|
33
|
+
items: RemittanceUserLimits[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RemittanceUserLimitsBatchResponse = exports.RemittanceUserLimits = exports.RemittanceLimitWindow = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Límites por usuario para el backoffice de Operación (pantalla Límites, read-only).
|
|
6
|
+
*
|
|
7
|
+
* Los LÍMITES los define el provider (UNIR): `UserCreditLimit` (Wlp Wallet daily/weekly
|
|
8
|
+
* + levelName) + `UserComplianceLimit` (ventanas 4/14/30/60/90 d). El **usage** NO lo
|
|
9
|
+
* expone UNIR (txAggregate da 403) → lo calcula el connector sumando las tx no-canceladas
|
|
10
|
+
* por ventana móvil. `limitUSD` es null cuando el provider no envía ese límite (d180, B3).
|
|
11
|
+
*/
|
|
12
|
+
class RemittanceLimitWindow {
|
|
13
|
+
}
|
|
14
|
+
exports.RemittanceLimitWindow = RemittanceLimitWindow;
|
|
15
|
+
class RemittanceUserLimits {
|
|
16
|
+
}
|
|
17
|
+
exports.RemittanceUserLimits = RemittanceUserLimits;
|
|
18
|
+
class RemittanceUserLimitsBatchResponse {
|
|
19
|
+
}
|
|
20
|
+
exports.RemittanceUserLimitsBatchResponse = RemittanceUserLimitsBatchResponse;
|
|
@@ -50,3 +50,4 @@ __exportStar(require("./RemittanceBackofficeUserDetail"), exports);
|
|
|
50
50
|
__exportStar(require("./RemittanceBackofficeUserListResponse"), exports);
|
|
51
51
|
__exportStar(require("./RemittanceBackofficeTxListResponse"), exports);
|
|
52
52
|
__exportStar(require("./RemittanceBackofficeStats"), exports);
|
|
53
|
+
__exportStar(require("./RemittanceUserLimits"), exports);
|
|
@@ -0,0 +1,31 @@
|
|
|
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.CancelFundingReferenceRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CancelFundingReferenceRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.CancelFundingReferenceRequest = CancelFundingReferenceRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.MaxLength)(64),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CancelFundingReferenceRequest.prototype, "fundingId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.MaxLength)(64),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CancelFundingReferenceRequest.prototype, "directoryId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.MaxLength)(64),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CancelFundingReferenceRequest.prototype, "idempotencyKey", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
export declare class CancelFundingReferenceResponse {
|
|
4
|
+
fundingId: string;
|
|
5
|
+
status: BenefitPaymentStatusEnum;
|
|
6
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
3
|
+
* `fundingId` viaja en el path, `directoryId` se resuelve del JWT.
|
|
4
|
+
* `providerModuleName` permite al marketplace rutear al publisher correcto
|
|
5
|
+
* sin tener que persistir el mapping (el wallet-app sabe el moduleName
|
|
6
|
+
* porque vino en la respuesta del authorize).
|
|
7
|
+
*/
|
|
8
|
+
export declare class CancelFundingRequest {
|
|
9
|
+
idempotencyKey: string;
|
|
10
|
+
providerModuleName: string;
|
|
11
|
+
}
|
package/bin/{platformRbac/dtos/ResendOtpRequest.js → walletFunding/dtos/CancelFundingRequest.js}
RENAMED
|
@@ -9,28 +9,25 @@ 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.
|
|
13
|
-
const class_transformer_1 = require("class-transformer");
|
|
12
|
+
exports.CancelFundingRequest = void 0;
|
|
14
13
|
const class_validator_1 = require("class-validator");
|
|
15
14
|
/**
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
15
|
+
* Request del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
16
|
+
* `fundingId` viaja en el path, `directoryId` se resuelve del JWT.
|
|
17
|
+
* `providerModuleName` permite al marketplace rutear al publisher correcto
|
|
18
|
+
* sin tener que persistir el mapping (el wallet-app sabe el moduleName
|
|
19
|
+
* porque vino en la respuesta del authorize).
|
|
21
20
|
*/
|
|
22
|
-
class
|
|
21
|
+
class CancelFundingRequest {
|
|
23
22
|
}
|
|
24
|
-
exports.
|
|
23
|
+
exports.CancelFundingRequest = CancelFundingRequest;
|
|
25
24
|
__decorate([
|
|
26
|
-
(0,
|
|
27
|
-
(0, class_validator_1.
|
|
28
|
-
(0, class_validator_1.IsNotEmpty)(),
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
(0, class_validator_1.MaxLength)(64),
|
|
29
27
|
__metadata("design:type", String)
|
|
30
|
-
],
|
|
28
|
+
], CancelFundingRequest.prototype, "idempotencyKey", void 0);
|
|
31
29
|
__decorate([
|
|
32
|
-
(0, class_transformer_1.Expose)(),
|
|
33
30
|
(0, class_validator_1.IsString)(),
|
|
34
|
-
(0, class_validator_1.
|
|
31
|
+
(0, class_validator_1.MaxLength)(128),
|
|
35
32
|
__metadata("design:type", String)
|
|
36
|
-
],
|
|
33
|
+
], CancelFundingRequest.prototype, "providerModuleName", void 0);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
/**
|
|
4
|
+
* Response del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
5
|
+
* `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
|
|
6
|
+
* REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
|
|
7
|
+
* (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
|
|
8
|
+
*/
|
|
9
|
+
export declare class CancelFundingResponse {
|
|
10
|
+
fundingId: string;
|
|
11
|
+
status: BenefitPaymentStatusEnum;
|
|
12
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
13
|
+
message?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CancelFundingResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Response del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
6
|
+
* `status` reusa `BenefitPaymentStatusEnum` (APPROVED = cancel aceptado;
|
|
7
|
+
* REJECTED = no se pudo) para consistencia con `CancelFundingReferenceResponse`
|
|
8
|
+
* (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
|
|
9
|
+
*/
|
|
10
|
+
class CancelFundingResponse {
|
|
11
|
+
}
|
|
12
|
+
exports.CancelFundingResponse = CancelFundingResponse;
|
|
@@ -0,0 +1,21 @@
|
|
|
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.CancelWalletFundingRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CancelWalletFundingRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.CancelWalletFundingRequest = CancelWalletFundingRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
(0, class_validator_1.MaxLength)(64),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CancelWalletFundingRequest.prototype, "idempotencyKey", void 0);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
export declare class CancelWalletFundingResponse {
|
|
4
|
+
status: BenefitPaymentStatusEnum;
|
|
5
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
6
|
+
fundingId?: string;
|
|
7
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Límites por usuario para el backoffice de Operación (pantalla Límites, read-only).
|
|
3
|
+
*
|
|
4
|
+
* Los LÍMITES los define el provider (UNIR): `UserCreditLimit` (Wlp Wallet daily/weekly
|
|
5
|
+
* + levelName) + `UserComplianceLimit` (ventanas 4/14/30/60/90 d). El **usage** NO lo
|
|
6
|
+
* expone UNIR (txAggregate da 403) → lo calcula el connector sumando las tx no-canceladas
|
|
7
|
+
* por ventana móvil. `limitUSD` es null cuando el provider no envía ese límite (d180, B3).
|
|
8
|
+
*/
|
|
9
|
+
export class RemittanceLimitWindow {
|
|
10
|
+
/** Ventana en días: 1 | 4 | 7 | 14 | 30 | 60 | 90 | 180. */
|
|
11
|
+
windowDays!: number;
|
|
12
|
+
/** Límite USD del provider; null si UNIR no lo da (p.ej. d180). */
|
|
13
|
+
limitUSD!: number | null;
|
|
14
|
+
/** Consumo USD calculado desde nuestras tx (rolling window, no-canceladas). */
|
|
15
|
+
usedUSD!: number;
|
|
16
|
+
/** Procedencia del límite: d1/d7 de UserCreditLimit; el resto de UserComplianceLimit. */
|
|
17
|
+
source!: "credit" | "compliance";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export class RemittanceUserLimits {
|
|
21
|
+
directoryId!: string;
|
|
22
|
+
/** Nivel de UserProfileInfo.remitterLevel (display). null si no se pudo leer. */
|
|
23
|
+
profileLevel!: string | null;
|
|
24
|
+
/** Nivel de UserCreditLimit.levelName (el efectivo que enforza el provider). */
|
|
25
|
+
creditLevel!: string | null;
|
|
26
|
+
/** profileLevel !== creditLevel (ambos no-null). Bug real del provider; se marca, no se corrige. */
|
|
27
|
+
discrepancy!: boolean;
|
|
28
|
+
/** Ventanas con límite (provider) + consumo (calculado). */
|
|
29
|
+
windows!: RemittanceLimitWindow[];
|
|
30
|
+
/** ISO — cuándo se trajeron los límites del provider (para el FreshnessBadge). */
|
|
31
|
+
lastSyncedAt!: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export class RemittanceUserLimitsBatchResponse {
|
|
35
|
+
items!: RemittanceUserLimits[];
|
|
36
|
+
}
|
|
@@ -1,22 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
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
|
-
}
|