@fiado/type-kit 3.162.0 → 3.163.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/walletFunding/dtos/ApplyWalletFundingRequest.d.ts +21 -0
- package/bin/walletFunding/dtos/ApplyWalletFundingRequest.js +68 -0
- package/bin/walletFunding/dtos/ApplyWalletFundingResponse.d.ts +10 -0
- package/bin/walletFunding/dtos/ApplyWalletFundingResponse.js +6 -0
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.d.ts +2 -1
- package/bin/walletFunding/dtos/CancelFundingReferenceRequest.js +1 -1
- package/bin/walletFunding/dtos/CancelFundingReferenceResponse.d.ts +1 -1
- package/bin/walletFunding/dtos/CancelFundingRequest.d.ts +1 -1
- package/bin/walletFunding/dtos/CancelFundingRequest.js +1 -1
- package/bin/walletFunding/dtos/CancelFundingResponse.d.ts +1 -1
- package/bin/walletFunding/dtos/CancelWalletFundingResponse.d.ts +1 -1
- package/bin/walletFunding/dtos/GetExposureStateResponse.d.ts +9 -0
- package/bin/walletFunding/dtos/GetExposureStateResponse.js +7 -0
- package/bin/walletFunding/dtos/ReleaseExposureRequest.d.ts +10 -0
- package/bin/walletFunding/dtos/ReleaseExposureRequest.js +37 -0
- package/bin/walletFunding/dtos/ReleaseExposureResponse.d.ts +6 -0
- package/bin/walletFunding/dtos/ReleaseExposureResponse.js +6 -0
- package/bin/walletFunding/dtos/ReserveExposureRequest.d.ts +13 -0
- package/bin/walletFunding/dtos/ReserveExposureRequest.js +47 -0
- package/bin/walletFunding/dtos/ReserveExposureResponse.d.ts +8 -0
- package/bin/walletFunding/dtos/ReserveExposureResponse.js +6 -0
- package/bin/walletFunding/dtos/index.d.ts +7 -0
- package/bin/walletFunding/dtos/index.js +7 -0
- package/bin/walletFunding/enums/FundingVerificationOutcomeEnum.d.ts +6 -0
- package/bin/walletFunding/enums/FundingVerificationOutcomeEnum.js +10 -0
- package/bin/walletFunding/enums/ServiceStateEnum.d.ts +6 -0
- package/bin/walletFunding/enums/ServiceStateEnum.js +10 -0
- package/bin/walletFunding/enums/WalletFundingPaymentStatusEnum.d.ts +4 -0
- package/bin/walletFunding/enums/WalletFundingPaymentStatusEnum.js +4 -0
- package/bin/walletFunding/enums/index.d.ts +2 -0
- package/bin/walletFunding/enums/index.js +2 -0
- package/bin/walletFunding/schemas/AggregateExposureStateSchema.d.ts +30 -0
- package/bin/walletFunding/schemas/AggregateExposureStateSchema.js +32 -0
- package/bin/walletFunding/schemas/index.d.ts +1 -0
- package/bin/walletFunding/schemas/index.js +1 -0
- package/package.json +1 -1
- package/src/walletFunding/dtos/ApplyWalletFundingRequest.ts +23 -0
- package/src/walletFunding/dtos/ApplyWalletFundingResponse.ts +11 -0
- package/src/walletFunding/dtos/GetExposureStateResponse.ts +10 -0
- package/src/walletFunding/dtos/ReleaseExposureRequest.ts +12 -0
- package/src/walletFunding/dtos/ReleaseExposureResponse.ts +7 -0
- package/src/walletFunding/dtos/ReserveExposureRequest.ts +15 -0
- package/src/walletFunding/dtos/ReserveExposureResponse.ts +9 -0
- package/src/walletFunding/dtos/index.ts +7 -0
- package/src/walletFunding/enums/FundingVerificationOutcomeEnum.ts +6 -0
- package/src/walletFunding/enums/ServiceStateEnum.ts +6 -0
- package/src/walletFunding/enums/WalletFundingPaymentStatusEnum.ts +4 -0
- package/src/walletFunding/enums/index.ts +2 -0
- package/src/walletFunding/schemas/AggregateExposureStateSchema.ts +32 -0
- package/src/walletFunding/schemas/index.ts +1 -0
- 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/places/dtos/CashInFeeDto.d.ts +0 -17
- package/bin/places/dtos/CashInFeeDto.js +0 -12
- 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
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FundingVerificationOutcomeEnum } from "../enums/FundingVerificationOutcomeEnum";
|
|
2
|
+
/**
|
|
3
|
+
* Request del endpoint privado `POST /funding/apply` del connector.
|
|
4
|
+
*
|
|
5
|
+
* Lo invoca `db-conciliacion` cuando la verificación autoritativa (poll al
|
|
6
|
+
* portal del Proveedor, ~10 min) resuelve. Dispara el acreditamiento diferido:
|
|
7
|
+
* el webhook `payment` NO acredita — solo deja el pago en IN_VERIFICATION;
|
|
8
|
+
* este apply es la segunda ejecución (async) que mueve el dinero.
|
|
9
|
+
*/
|
|
10
|
+
export declare class ApplyWalletFundingRequest {
|
|
11
|
+
providerName: string;
|
|
12
|
+
providerTxId: string;
|
|
13
|
+
providerReference: string;
|
|
14
|
+
directoryId: string;
|
|
15
|
+
walletAccountId: string;
|
|
16
|
+
amount: number;
|
|
17
|
+
currencyCode: string;
|
|
18
|
+
paidAt: string;
|
|
19
|
+
/** Resultado de la verificación. APPROVED → acredita (settle); REJECTED → revierte. */
|
|
20
|
+
outcome: FundingVerificationOutcomeEnum;
|
|
21
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
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.ApplyWalletFundingRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const FundingVerificationOutcomeEnum_1 = require("../enums/FundingVerificationOutcomeEnum");
|
|
15
|
+
/**
|
|
16
|
+
* Request del endpoint privado `POST /funding/apply` del connector.
|
|
17
|
+
*
|
|
18
|
+
* Lo invoca `db-conciliacion` cuando la verificación autoritativa (poll al
|
|
19
|
+
* portal del Proveedor, ~10 min) resuelve. Dispara el acreditamiento diferido:
|
|
20
|
+
* el webhook `payment` NO acredita — solo deja el pago en IN_VERIFICATION;
|
|
21
|
+
* este apply es la segunda ejecución (async) que mueve el dinero.
|
|
22
|
+
*/
|
|
23
|
+
class ApplyWalletFundingRequest {
|
|
24
|
+
}
|
|
25
|
+
exports.ApplyWalletFundingRequest = ApplyWalletFundingRequest;
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
(0, class_validator_1.MaxLength)(32),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], ApplyWalletFundingRequest.prototype, "providerName", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
(0, class_validator_1.MaxLength)(64),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], ApplyWalletFundingRequest.prototype, "providerTxId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsString)(),
|
|
38
|
+
(0, class_validator_1.MaxLength)(128),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], ApplyWalletFundingRequest.prototype, "providerReference", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, class_validator_1.IsString)(),
|
|
43
|
+
(0, class_validator_1.MaxLength)(64),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ApplyWalletFundingRequest.prototype, "directoryId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsString)(),
|
|
48
|
+
(0, class_validator_1.MaxLength)(64),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], ApplyWalletFundingRequest.prototype, "walletAccountId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, class_validator_1.IsNumber)(),
|
|
53
|
+
(0, class_validator_1.IsPositive)(),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], ApplyWalletFundingRequest.prototype, "amount", void 0);
|
|
56
|
+
__decorate([
|
|
57
|
+
(0, class_validator_1.IsString)(),
|
|
58
|
+
(0, class_validator_1.Length)(3, 3),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], ApplyWalletFundingRequest.prototype, "currencyCode", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsDateString)(),
|
|
63
|
+
__metadata("design:type", String)
|
|
64
|
+
], ApplyWalletFundingRequest.prototype, "paidAt", void 0);
|
|
65
|
+
__decorate([
|
|
66
|
+
(0, class_validator_1.IsEnum)(FundingVerificationOutcomeEnum_1.FundingVerificationOutcomeEnum),
|
|
67
|
+
__metadata("design:type", String)
|
|
68
|
+
], ApplyWalletFundingRequest.prototype, "outcome", void 0);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { WalletFundingPaymentStatusEnum } from "../enums/WalletFundingPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
export declare class ApplyWalletFundingResponse {
|
|
4
|
+
/** Estado del pago tras aplicar la verificación: APPLIED (acreditado) o REVERSED. */
|
|
5
|
+
status: WalletFundingPaymentStatusEnum;
|
|
6
|
+
/** Folio del processor si se acreditó (idempotente si ya estaba APPLIED). */
|
|
7
|
+
processorTransactionNumber?: string;
|
|
8
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
9
|
+
message?: string;
|
|
10
|
+
}
|
|
@@ -18,7 +18,7 @@ __decorate([
|
|
|
18
18
|
(0, class_validator_1.IsString)(),
|
|
19
19
|
(0, class_validator_1.MaxLength)(64),
|
|
20
20
|
__metadata("design:type", String)
|
|
21
|
-
], CancelFundingReferenceRequest.prototype, "
|
|
21
|
+
], CancelFundingReferenceRequest.prototype, "reference", void 0);
|
|
22
22
|
__decorate([
|
|
23
23
|
(0, class_validator_1.IsString)(),
|
|
24
24
|
(0, class_validator_1.MaxLength)(64),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { BenefitPaymentStatusEnum } from "../../benefitCenter/enums/BenefitPaymentStatusEnum";
|
|
2
2
|
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
3
|
export declare class CancelFundingReferenceResponse {
|
|
4
|
-
|
|
4
|
+
reference: string;
|
|
5
5
|
status: BenefitPaymentStatusEnum;
|
|
6
6
|
errorCode?: WalletFundingErrorCodeEnum;
|
|
7
7
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Request del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
3
|
-
* `
|
|
3
|
+
* `reference` viaja en el path, `directoryId` se resuelve del JWT.
|
|
4
4
|
* `providerModuleName` permite al marketplace rutear al publisher correcto
|
|
5
5
|
* sin tener que persistir el mapping (el wallet-app sabe el moduleName
|
|
6
6
|
* porque vino en la respuesta del authorize).
|
|
@@ -13,7 +13,7 @@ exports.CancelFundingRequest = void 0;
|
|
|
13
13
|
const class_validator_1 = require("class-validator");
|
|
14
14
|
/**
|
|
15
15
|
* Request del cancel via Centro de Beneficios (spec 13 v2.0).
|
|
16
|
-
* `
|
|
16
|
+
* `reference` viaja en el path, `directoryId` se resuelve del JWT.
|
|
17
17
|
* `providerModuleName` permite al marketplace rutear al publisher correcto
|
|
18
18
|
* sin tener que persistir el mapping (el wallet-app sabe el moduleName
|
|
19
19
|
* porque vino en la respuesta del authorize).
|
|
@@ -7,7 +7,7 @@ import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum"
|
|
|
7
7
|
* (marketplace ↔ connector). Idempotente: re-cancelar devuelve APPROVED.
|
|
8
8
|
*/
|
|
9
9
|
export declare class CancelFundingResponse {
|
|
10
|
-
|
|
10
|
+
reference: string;
|
|
11
11
|
status: BenefitPaymentStatusEnum;
|
|
12
12
|
errorCode?: WalletFundingErrorCodeEnum;
|
|
13
13
|
message?: string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServiceStateEnum } from "../enums/ServiceStateEnum";
|
|
2
|
+
/** Response de `wallet-funding-rules` (GET /state). Estado del cap + breaker. */
|
|
3
|
+
export declare class GetExposureStateResponse {
|
|
4
|
+
currentExposureAmount: number;
|
|
5
|
+
serviceState: ServiceStateEnum;
|
|
6
|
+
capThreshold: number;
|
|
7
|
+
alertThreshold: number;
|
|
8
|
+
reactivationThreshold: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.GetExposureStateResponse = void 0;
|
|
4
|
+
/** Response de `wallet-funding-rules` (GET /state). Estado del cap + breaker. */
|
|
5
|
+
class GetExposureStateResponse {
|
|
6
|
+
}
|
|
7
|
+
exports.GetExposureStateResponse = GetExposureStateResponse;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request de `wallet-funding-rules` (POST /release). Lo llama la conciliación
|
|
3
|
+
* (db-conciliacion) al liquidar el SPEI, o el flujo de rechazo/reverso.
|
|
4
|
+
* Libera monto de la exposición agregada; puede reactivar el servicio.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReleaseExposureRequest {
|
|
7
|
+
amount: number;
|
|
8
|
+
currencyCode: string;
|
|
9
|
+
providerTxId?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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.ReleaseExposureRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* Request de `wallet-funding-rules` (POST /release). Lo llama la conciliación
|
|
16
|
+
* (db-conciliacion) al liquidar el SPEI, o el flujo de rechazo/reverso.
|
|
17
|
+
* Libera monto de la exposición agregada; puede reactivar el servicio.
|
|
18
|
+
*/
|
|
19
|
+
class ReleaseExposureRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.ReleaseExposureRequest = ReleaseExposureRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsNumber)(),
|
|
24
|
+
(0, class_validator_1.IsPositive)(),
|
|
25
|
+
__metadata("design:type", Number)
|
|
26
|
+
], ReleaseExposureRequest.prototype, "amount", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
(0, class_validator_1.Length)(3, 3),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], ReleaseExposureRequest.prototype, "currencyCode", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsOptional)(),
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
(0, class_validator_1.MaxLength)(64),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ReleaseExposureRequest.prototype, "providerTxId", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request de `wallet-funding-rules` (POST /reserve). Lo llama el processor en
|
|
3
|
+
* `walletFundingValidate` (cap gate). Reserva monto contra la exposición
|
|
4
|
+
* agregada FSA de forma atómica (single-region + ConditionExpression).
|
|
5
|
+
*/
|
|
6
|
+
export declare class ReserveExposureRequest {
|
|
7
|
+
directoryId: string;
|
|
8
|
+
amount: number;
|
|
9
|
+
currencyCode: string;
|
|
10
|
+
providerName: string;
|
|
11
|
+
/** Idempotencia: referencia/tx del Proveedor para no doble-reservar en reintentos. */
|
|
12
|
+
providerTxId?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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.ReserveExposureRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
/**
|
|
15
|
+
* Request de `wallet-funding-rules` (POST /reserve). Lo llama el processor en
|
|
16
|
+
* `walletFundingValidate` (cap gate). Reserva monto contra la exposición
|
|
17
|
+
* agregada FSA de forma atómica (single-region + ConditionExpression).
|
|
18
|
+
*/
|
|
19
|
+
class ReserveExposureRequest {
|
|
20
|
+
}
|
|
21
|
+
exports.ReserveExposureRequest = ReserveExposureRequest;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
(0, class_validator_1.MaxLength)(64),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], ReserveExposureRequest.prototype, "directoryId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsNumber)(),
|
|
29
|
+
(0, class_validator_1.IsPositive)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], ReserveExposureRequest.prototype, "amount", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
(0, class_validator_1.Length)(3, 3),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], ReserveExposureRequest.prototype, "currencyCode", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsString)(),
|
|
39
|
+
(0, class_validator_1.MaxLength)(32),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ReserveExposureRequest.prototype, "providerName", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
(0, class_validator_1.MaxLength)(64),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], ReserveExposureRequest.prototype, "providerTxId", void 0);
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ServiceStateEnum } from "../enums/ServiceStateEnum";
|
|
2
|
+
export declare class ReserveExposureResponse {
|
|
3
|
+
/** true si la reserva pasó el cap; false si excede el cap o el servicio está SUSPENDED. */
|
|
4
|
+
allowed: boolean;
|
|
5
|
+
serviceState: ServiceStateEnum;
|
|
6
|
+
/** Motivo cuando allowed=false (ej. "CAP_REACHED", "SERVICE_SUSPENDED"). */
|
|
7
|
+
reason?: string;
|
|
8
|
+
}
|
|
@@ -21,3 +21,10 @@ export * from "./AuthorizeFundingRequest";
|
|
|
21
21
|
export * from "./AuthorizeFundingResponse";
|
|
22
22
|
export * from "./SettleWalletFundingRequest";
|
|
23
23
|
export * from "./SettleWalletFundingResponse";
|
|
24
|
+
export * from "./ApplyWalletFundingRequest";
|
|
25
|
+
export * from "./ApplyWalletFundingResponse";
|
|
26
|
+
export * from "./ReserveExposureRequest";
|
|
27
|
+
export * from "./ReserveExposureResponse";
|
|
28
|
+
export * from "./ReleaseExposureRequest";
|
|
29
|
+
export * from "./ReleaseExposureResponse";
|
|
30
|
+
export * from "./GetExposureStateResponse";
|
|
@@ -37,3 +37,10 @@ __exportStar(require("./AuthorizeFundingRequest"), exports);
|
|
|
37
37
|
__exportStar(require("./AuthorizeFundingResponse"), exports);
|
|
38
38
|
__exportStar(require("./SettleWalletFundingRequest"), exports);
|
|
39
39
|
__exportStar(require("./SettleWalletFundingResponse"), exports);
|
|
40
|
+
__exportStar(require("./ApplyWalletFundingRequest"), exports);
|
|
41
|
+
__exportStar(require("./ApplyWalletFundingResponse"), exports);
|
|
42
|
+
__exportStar(require("./ReserveExposureRequest"), exports);
|
|
43
|
+
__exportStar(require("./ReserveExposureResponse"), exports);
|
|
44
|
+
__exportStar(require("./ReleaseExposureRequest"), exports);
|
|
45
|
+
__exportStar(require("./ReleaseExposureResponse"), exports);
|
|
46
|
+
__exportStar(require("./GetExposureStateResponse"), exports);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare enum FundingVerificationOutcomeEnum {
|
|
2
|
+
/** La verificación autoritativa confirmó el pago en el Proveedor → acreditar. */
|
|
3
|
+
APPROVED = "APPROVED",
|
|
4
|
+
/** La verificación determinó que el pago fue rechazado → revertir, no acreditar. */
|
|
5
|
+
REJECTED = "REJECTED"
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FundingVerificationOutcomeEnum = void 0;
|
|
4
|
+
var FundingVerificationOutcomeEnum;
|
|
5
|
+
(function (FundingVerificationOutcomeEnum) {
|
|
6
|
+
/** La verificación autoritativa confirmó el pago en el Proveedor → acreditar. */
|
|
7
|
+
FundingVerificationOutcomeEnum["APPROVED"] = "APPROVED";
|
|
8
|
+
/** La verificación determinó que el pago fue rechazado → revertir, no acreditar. */
|
|
9
|
+
FundingVerificationOutcomeEnum["REJECTED"] = "REJECTED";
|
|
10
|
+
})(FundingVerificationOutcomeEnum || (exports.FundingVerificationOutcomeEnum = FundingVerificationOutcomeEnum = {}));
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceStateEnum = void 0;
|
|
4
|
+
var ServiceStateEnum;
|
|
5
|
+
(function (ServiceStateEnum) {
|
|
6
|
+
/** Servicio operando normal — se autorizan nuevos permisos de Cash In. */
|
|
7
|
+
ServiceStateEnum["NORMAL"] = "NORMAL";
|
|
8
|
+
/** Cap agregado FSA alcanzado — se rechazan nuevos permisos hasta reactivar. */
|
|
9
|
+
ServiceStateEnum["SUSPENDED"] = "SUSPENDED";
|
|
10
|
+
})(ServiceStateEnum || (exports.ServiceStateEnum = ServiceStateEnum = {}));
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export declare enum WalletFundingPaymentStatusEnum {
|
|
2
2
|
/** Webhook consult procesado — pre-check OK, esperando webhook payment. */
|
|
3
3
|
CONSULTED = "CONSULTED",
|
|
4
|
+
/** Pago recibido (webhook payment), en verificación autoritativa; aún NO acreditado. El webhook lo escribe y termina; el crédito es una invocación async posterior (db-conciliacion → /funding/apply). */
|
|
5
|
+
IN_VERIFICATION = "IN_VERIFICATION",
|
|
4
6
|
/** Pago aplicado al wallet via processor.credit. */
|
|
5
7
|
APPLIED = "APPLIED",
|
|
8
|
+
/** Liquidado por el Proveedor a FSA (SPEI recibido); marcado en la conciliación semanal. */
|
|
9
|
+
SETTLED = "SETTLED",
|
|
6
10
|
/** Pago revertido via processor.reverse. */
|
|
7
11
|
REVERSED = "REVERSED",
|
|
8
12
|
/** Cliente ya gastó el dinero — ops resuelve manualmente. */
|
|
@@ -5,8 +5,12 @@ var WalletFundingPaymentStatusEnum;
|
|
|
5
5
|
(function (WalletFundingPaymentStatusEnum) {
|
|
6
6
|
/** Webhook consult procesado — pre-check OK, esperando webhook payment. */
|
|
7
7
|
WalletFundingPaymentStatusEnum["CONSULTED"] = "CONSULTED";
|
|
8
|
+
/** Pago recibido (webhook payment), en verificación autoritativa; aún NO acreditado. El webhook lo escribe y termina; el crédito es una invocación async posterior (db-conciliacion → /funding/apply). */
|
|
9
|
+
WalletFundingPaymentStatusEnum["IN_VERIFICATION"] = "IN_VERIFICATION";
|
|
8
10
|
/** Pago aplicado al wallet via processor.credit. */
|
|
9
11
|
WalletFundingPaymentStatusEnum["APPLIED"] = "APPLIED";
|
|
12
|
+
/** Liquidado por el Proveedor a FSA (SPEI recibido); marcado en la conciliación semanal. */
|
|
13
|
+
WalletFundingPaymentStatusEnum["SETTLED"] = "SETTLED";
|
|
10
14
|
/** Pago revertido via processor.reverse. */
|
|
11
15
|
WalletFundingPaymentStatusEnum["REVERSED"] = "REVERSED";
|
|
12
16
|
/** Cliente ya gastó el dinero — ops resuelve manualmente. */
|
|
@@ -23,3 +23,5 @@ __exportStar(require("./WalletFundingRefundReasonEnum"), exports);
|
|
|
23
23
|
__exportStar(require("./PaymentCodeTypeEnum"), exports);
|
|
24
24
|
__exportStar(require("./FundingWebhookTypeEnum"), exports);
|
|
25
25
|
__exportStar(require("./SettlementErrorCodeEnum"), exports);
|
|
26
|
+
__exportStar(require("./ServiceStateEnum"), exports);
|
|
27
|
+
__exportStar(require("./FundingVerificationOutcomeEnum"), exports);
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema literal de la tabla DDB `AggregateExposureState_GT`.
|
|
3
|
+
*
|
|
4
|
+
* Singleton (pk `AGGREGATE#CASH_IN` / sk `STATE`) que lleva la exposición
|
|
5
|
+
* agregada de FiadoSA frente al Proveedor y el estado del circuit breaker.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANTE: tabla SINGLE-REGION (una sola réplica). Las escrituras del cap
|
|
8
|
+
* son UpdateItem con ConditionExpression y deben ser atómicas; una Global
|
|
9
|
+
* Table multi-región (last-writer-wins) rompería la garantía del cap.
|
|
10
|
+
*
|
|
11
|
+
* Owner: wallet-funding-rules-business.
|
|
12
|
+
*/
|
|
13
|
+
export declare const AggregateExposureStateTable: {
|
|
14
|
+
readonly name: "AggregateExposureState_GT";
|
|
15
|
+
readonly pk: "pk";
|
|
16
|
+
readonly sk: "sk";
|
|
17
|
+
readonly attributes: {
|
|
18
|
+
readonly pk: "pk";
|
|
19
|
+
readonly sk: "sk";
|
|
20
|
+
readonly currentExposureAmount: "currentExposureAmount";
|
|
21
|
+
readonly serviceState: "serviceState";
|
|
22
|
+
readonly capThreshold: "capThreshold";
|
|
23
|
+
readonly alertThreshold: "alertThreshold";
|
|
24
|
+
readonly reactivationThreshold: "reactivationThreshold";
|
|
25
|
+
readonly lastCapReachedAt: "lastCapReachedAt";
|
|
26
|
+
readonly lastAlertSentAt: "lastAlertSentAt";
|
|
27
|
+
readonly updatedAt: "updatedAt";
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export type AggregateExposureStateAttribute = typeof AggregateExposureStateTable.attributes[keyof typeof AggregateExposureStateTable.attributes];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AggregateExposureStateTable = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Schema literal de la tabla DDB `AggregateExposureState_GT`.
|
|
6
|
+
*
|
|
7
|
+
* Singleton (pk `AGGREGATE#CASH_IN` / sk `STATE`) que lleva la exposición
|
|
8
|
+
* agregada de FiadoSA frente al Proveedor y el estado del circuit breaker.
|
|
9
|
+
*
|
|
10
|
+
* IMPORTANTE: tabla SINGLE-REGION (una sola réplica). Las escrituras del cap
|
|
11
|
+
* son UpdateItem con ConditionExpression y deben ser atómicas; una Global
|
|
12
|
+
* Table multi-región (last-writer-wins) rompería la garantía del cap.
|
|
13
|
+
*
|
|
14
|
+
* Owner: wallet-funding-rules-business.
|
|
15
|
+
*/
|
|
16
|
+
exports.AggregateExposureStateTable = {
|
|
17
|
+
name: "AggregateExposureState_GT",
|
|
18
|
+
pk: "pk",
|
|
19
|
+
sk: "sk",
|
|
20
|
+
attributes: {
|
|
21
|
+
pk: "pk",
|
|
22
|
+
sk: "sk",
|
|
23
|
+
currentExposureAmount: "currentExposureAmount",
|
|
24
|
+
serviceState: "serviceState",
|
|
25
|
+
capThreshold: "capThreshold",
|
|
26
|
+
alertThreshold: "alertThreshold",
|
|
27
|
+
reactivationThreshold: "reactivationThreshold",
|
|
28
|
+
lastCapReachedAt: "lastCapReachedAt",
|
|
29
|
+
lastAlertSentAt: "lastAlertSentAt",
|
|
30
|
+
updatedAt: "updatedAt",
|
|
31
|
+
},
|
|
32
|
+
};
|
|
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./EqualityFundingPaymentSchema"), exports);
|
|
18
18
|
__exportStar(require("./AccountPagoConfiadoSchema"), exports);
|
|
19
|
+
__exportStar(require("./AggregateExposureStateSchema"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { IsString, IsNumber, IsPositive, Length, IsDateString, MaxLength, IsEnum } from "class-validator";
|
|
2
|
+
import { FundingVerificationOutcomeEnum } from "../enums/FundingVerificationOutcomeEnum";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Request del endpoint privado `POST /funding/apply` del connector.
|
|
6
|
+
*
|
|
7
|
+
* Lo invoca `db-conciliacion` cuando la verificación autoritativa (poll al
|
|
8
|
+
* portal del Proveedor, ~10 min) resuelve. Dispara el acreditamiento diferido:
|
|
9
|
+
* el webhook `payment` NO acredita — solo deja el pago en IN_VERIFICATION;
|
|
10
|
+
* este apply es la segunda ejecución (async) que mueve el dinero.
|
|
11
|
+
*/
|
|
12
|
+
export class ApplyWalletFundingRequest {
|
|
13
|
+
@IsString() @MaxLength(32) providerName!: string;
|
|
14
|
+
@IsString() @MaxLength(64) providerTxId!: string;
|
|
15
|
+
@IsString() @MaxLength(128) providerReference!: string;
|
|
16
|
+
@IsString() @MaxLength(64) directoryId!: string;
|
|
17
|
+
@IsString() @MaxLength(64) walletAccountId!: string;
|
|
18
|
+
@IsNumber() @IsPositive() amount!: number;
|
|
19
|
+
@IsString() @Length(3, 3) currencyCode!: string;
|
|
20
|
+
@IsDateString() paidAt!: string;
|
|
21
|
+
/** Resultado de la verificación. APPROVED → acredita (settle); REJECTED → revierte. */
|
|
22
|
+
@IsEnum(FundingVerificationOutcomeEnum) outcome!: FundingVerificationOutcomeEnum;
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { WalletFundingPaymentStatusEnum } from "../enums/WalletFundingPaymentStatusEnum";
|
|
2
|
+
import { WalletFundingErrorCodeEnum } from "../enums/WalletFundingErrorCodeEnum";
|
|
3
|
+
|
|
4
|
+
export class ApplyWalletFundingResponse {
|
|
5
|
+
/** Estado del pago tras aplicar la verificación: APPLIED (acreditado) o REVERSED. */
|
|
6
|
+
status!: WalletFundingPaymentStatusEnum;
|
|
7
|
+
/** Folio del processor si se acreditó (idempotente si ya estaba APPLIED). */
|
|
8
|
+
processorTransactionNumber?: string;
|
|
9
|
+
errorCode?: WalletFundingErrorCodeEnum;
|
|
10
|
+
message?: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ServiceStateEnum } from "../enums/ServiceStateEnum";
|
|
2
|
+
|
|
3
|
+
/** Response de `wallet-funding-rules` (GET /state). Estado del cap + breaker. */
|
|
4
|
+
export class GetExposureStateResponse {
|
|
5
|
+
currentExposureAmount!: number;
|
|
6
|
+
serviceState!: ServiceStateEnum;
|
|
7
|
+
capThreshold!: number;
|
|
8
|
+
alertThreshold!: number;
|
|
9
|
+
reactivationThreshold!: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { IsString, IsNumber, IsPositive, Length, MaxLength, IsOptional } from "class-validator";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Request de `wallet-funding-rules` (POST /release). Lo llama la conciliación
|
|
5
|
+
* (db-conciliacion) al liquidar el SPEI, o el flujo de rechazo/reverso.
|
|
6
|
+
* Libera monto de la exposición agregada; puede reactivar el servicio.
|
|
7
|
+
*/
|
|
8
|
+
export class ReleaseExposureRequest {
|
|
9
|
+
@IsNumber() @IsPositive() amount!: number;
|
|
10
|
+
@IsString() @Length(3, 3) currencyCode!: string;
|
|
11
|
+
@IsOptional() @IsString() @MaxLength(64) providerTxId?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsString, IsNumber, IsPositive, Length, MaxLength, IsOptional } from "class-validator";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Request de `wallet-funding-rules` (POST /reserve). Lo llama el processor en
|
|
5
|
+
* `walletFundingValidate` (cap gate). Reserva monto contra la exposición
|
|
6
|
+
* agregada FSA de forma atómica (single-region + ConditionExpression).
|
|
7
|
+
*/
|
|
8
|
+
export class ReserveExposureRequest {
|
|
9
|
+
@IsString() @MaxLength(64) directoryId!: string;
|
|
10
|
+
@IsNumber() @IsPositive() amount!: number;
|
|
11
|
+
@IsString() @Length(3, 3) currencyCode!: string;
|
|
12
|
+
@IsString() @MaxLength(32) providerName!: string;
|
|
13
|
+
/** Idempotencia: referencia/tx del Proveedor para no doble-reservar en reintentos. */
|
|
14
|
+
@IsOptional() @IsString() @MaxLength(64) providerTxId?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ServiceStateEnum } from "../enums/ServiceStateEnum";
|
|
2
|
+
|
|
3
|
+
export class ReserveExposureResponse {
|
|
4
|
+
/** true si la reserva pasó el cap; false si excede el cap o el servicio está SUSPENDED. */
|
|
5
|
+
allowed!: boolean;
|
|
6
|
+
serviceState!: ServiceStateEnum;
|
|
7
|
+
/** Motivo cuando allowed=false (ej. "CAP_REACHED", "SERVICE_SUSPENDED"). */
|
|
8
|
+
reason?: string;
|
|
9
|
+
}
|
|
@@ -21,3 +21,10 @@ export * from "./AuthorizeFundingRequest";
|
|
|
21
21
|
export * from "./AuthorizeFundingResponse";
|
|
22
22
|
export * from "./SettleWalletFundingRequest";
|
|
23
23
|
export * from "./SettleWalletFundingResponse";
|
|
24
|
+
export * from "./ApplyWalletFundingRequest";
|
|
25
|
+
export * from "./ApplyWalletFundingResponse";
|
|
26
|
+
export * from "./ReserveExposureRequest";
|
|
27
|
+
export * from "./ReserveExposureResponse";
|
|
28
|
+
export * from "./ReleaseExposureRequest";
|
|
29
|
+
export * from "./ReleaseExposureResponse";
|
|
30
|
+
export * from "./GetExposureStateResponse";
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
export enum WalletFundingPaymentStatusEnum {
|
|
2
2
|
/** Webhook consult procesado — pre-check OK, esperando webhook payment. */
|
|
3
3
|
CONSULTED = "CONSULTED",
|
|
4
|
+
/** Pago recibido (webhook payment), en verificación autoritativa; aún NO acreditado. El webhook lo escribe y termina; el crédito es una invocación async posterior (db-conciliacion → /funding/apply). */
|
|
5
|
+
IN_VERIFICATION = "IN_VERIFICATION",
|
|
4
6
|
/** Pago aplicado al wallet via processor.credit. */
|
|
5
7
|
APPLIED = "APPLIED",
|
|
8
|
+
/** Liquidado por el Proveedor a FSA (SPEI recibido); marcado en la conciliación semanal. */
|
|
9
|
+
SETTLED = "SETTLED",
|
|
6
10
|
/** Pago revertido via processor.reverse. */
|
|
7
11
|
REVERSED = "REVERSED",
|
|
8
12
|
/** Cliente ya gastó el dinero — ops resuelve manualmente. */
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema literal de la tabla DDB `AggregateExposureState_GT`.
|
|
3
|
+
*
|
|
4
|
+
* Singleton (pk `AGGREGATE#CASH_IN` / sk `STATE`) que lleva la exposición
|
|
5
|
+
* agregada de FiadoSA frente al Proveedor y el estado del circuit breaker.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANTE: tabla SINGLE-REGION (una sola réplica). Las escrituras del cap
|
|
8
|
+
* son UpdateItem con ConditionExpression y deben ser atómicas; una Global
|
|
9
|
+
* Table multi-región (last-writer-wins) rompería la garantía del cap.
|
|
10
|
+
*
|
|
11
|
+
* Owner: wallet-funding-rules-business.
|
|
12
|
+
*/
|
|
13
|
+
export const AggregateExposureStateTable = {
|
|
14
|
+
name: "AggregateExposureState_GT",
|
|
15
|
+
pk: "pk",
|
|
16
|
+
sk: "sk",
|
|
17
|
+
attributes: {
|
|
18
|
+
pk: "pk",
|
|
19
|
+
sk: "sk",
|
|
20
|
+
currentExposureAmount: "currentExposureAmount",
|
|
21
|
+
serviceState: "serviceState",
|
|
22
|
+
capThreshold: "capThreshold",
|
|
23
|
+
alertThreshold: "alertThreshold",
|
|
24
|
+
reactivationThreshold: "reactivationThreshold",
|
|
25
|
+
lastCapReachedAt: "lastCapReachedAt",
|
|
26
|
+
lastAlertSentAt: "lastAlertSentAt",
|
|
27
|
+
updatedAt: "updatedAt",
|
|
28
|
+
},
|
|
29
|
+
} as const;
|
|
30
|
+
|
|
31
|
+
export type AggregateExposureStateAttribute =
|
|
32
|
+
typeof AggregateExposureStateTable.attributes[keyof typeof AggregateExposureStateTable.attributes];
|
|
@@ -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,17 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -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);
|