@fiado/type-kit 3.139.0 → 3.141.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/RemittanceAuditLog.d.ts +42 -0
- package/bin/remittance/dtos/RemittanceAuditLog.js +62 -0
- package/bin/remittance/dtos/RemittanceBackofficeTransaction.d.ts +6 -0
- package/bin/remittance/dtos/RemittanceBackofficeUserView.d.ts +6 -0
- package/bin/remittance/dtos/RemittanceCohort.d.ts +62 -0
- package/bin/remittance/dtos/RemittanceCohort.js +105 -0
- package/bin/remittance/dtos/index.d.ts +2 -0
- package/bin/remittance/dtos/index.js +2 -0
- package/bin/remittance/dtos/internal/RemittanceCohortCount.d.ts +16 -0
- package/bin/remittance/dtos/internal/RemittanceCohortCount.js +34 -0
- package/bin/remittance/enums/AuditAction.d.ts +12 -0
- package/bin/remittance/enums/AuditAction.js +16 -0
- package/bin/remittance/enums/AuditEntityType.d.ts +12 -0
- package/bin/remittance/enums/AuditEntityType.js +16 -0
- package/bin/remittance/enums/CohortField.d.ts +23 -0
- package/bin/remittance/enums/CohortField.js +27 -0
- package/bin/remittance/enums/CohortOperator.d.ts +11 -0
- package/bin/remittance/enums/CohortOperator.js +15 -0
- package/bin/remittance/enums/CohortRefresh.d.ts +9 -0
- package/bin/remittance/enums/CohortRefresh.js +13 -0
- package/bin/remittance/enums/index.d.ts +5 -0
- package/bin/remittance/enums/index.js +5 -0
- package/bin/remittance/index.d.ts +1 -0
- package/bin/remittance/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/RemittanceAuditLog.ts +60 -0
- package/src/remittance/dtos/RemittanceBackofficeTransaction.ts +6 -0
- package/src/remittance/dtos/RemittanceBackofficeUserView.ts +6 -0
- package/src/remittance/dtos/RemittanceCohort.ts +112 -0
- package/src/remittance/dtos/index.ts +2 -0
- package/src/remittance/dtos/internal/RemittanceCohortCount.ts +24 -0
- package/src/remittance/enums/AuditAction.ts +12 -0
- package/src/remittance/enums/AuditEntityType.ts +12 -0
- package/src/remittance/enums/CohortField.ts +23 -0
- package/src/remittance/enums/CohortOperator.ts +11 -0
- package/src/remittance/enums/CohortRefresh.ts +9 -0
- package/src/remittance/enums/index.ts +5 -0
- package/src/remittance/index.ts +1 -0
- package/bin/platformRbac/dtos/ResendOtpRequest.d.ts +0 -22
- package/bin/platformRbac/dtos/ResendSelfRegisterOtpRequest.d.ts +0 -11
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuditEntityType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Módulo/dominio afectado por una entrada del audit trail (PK de RemittanceAuditLog_GT).
|
|
6
|
+
*/
|
|
7
|
+
var AuditEntityType;
|
|
8
|
+
(function (AuditEntityType) {
|
|
9
|
+
AuditEntityType["COHORT"] = "COHORT";
|
|
10
|
+
AuditEntityType["COMMITTEE"] = "COMMITTEE";
|
|
11
|
+
AuditEntityType["SEGMENT"] = "SEGMENT";
|
|
12
|
+
AuditEntityType["PRICING"] = "PRICING";
|
|
13
|
+
AuditEntityType["PROMOTION"] = "PROMOTION";
|
|
14
|
+
AuditEntityType["RULE"] = "RULE";
|
|
15
|
+
AuditEntityType["USER"] = "USER";
|
|
16
|
+
})(AuditEntityType || (exports.AuditEntityType = AuditEntityType = {}));
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Campos conductuales del rule builder de Cohorts (Dashboard Ops · Configuración §3).
|
|
3
|
+
* Los valores son los del mockup (snake_case) para que el front no traduzca.
|
|
4
|
+
*
|
|
5
|
+
* MVP soporta 6 campos; TX_POST_REACTIVACION está DIFERIDO (el backend lo rechaza
|
|
6
|
+
* hasta que exista el contador denormalizado `txSinceReactivation` en el connector).
|
|
7
|
+
*/
|
|
8
|
+
export declare enum CohortField {
|
|
9
|
+
/** # de tx totales (RemittanceUsers_GT.txCount). */
|
|
10
|
+
TX_TOTALES = "tx_totales",
|
|
11
|
+
/** Días desde el signup (now − (unirSignupDate ?? createdAt)). */
|
|
12
|
+
DIAS_DESDE_SIGNUP = "dias_desde_signup",
|
|
13
|
+
/** Días desde la última tx (now − lastTxAt). */
|
|
14
|
+
DIAS_DESDE_ULTIMA_TX = "dias_desde_ultima_tx",
|
|
15
|
+
/** Días sin actividad — sinónimo de DIAS_DESDE_ULTIMA_TX. */
|
|
16
|
+
DIAS_SIN_TX = "dias_sin_tx",
|
|
17
|
+
/** Monto total histórico en USD (RemittanceUsers_GT.totalSentUSD). */
|
|
18
|
+
MONTO_TOTAL_HISTORICO = "monto_total_historico",
|
|
19
|
+
/** Tx en los últimos 30 días (query nivel-tx por usuario). */
|
|
20
|
+
TX_ULTIMOS_30_DIAS = "tx_ultimos_30_dias",
|
|
21
|
+
/** # de tx tras reactivación — DIFERIDO (no-MVP, el backend lo rechaza). */
|
|
22
|
+
TX_POST_REACTIVACION = "tx_post_reactivacion"
|
|
23
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CohortField = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Campos conductuales del rule builder de Cohorts (Dashboard Ops · Configuración §3).
|
|
6
|
+
* Los valores son los del mockup (snake_case) para que el front no traduzca.
|
|
7
|
+
*
|
|
8
|
+
* MVP soporta 6 campos; TX_POST_REACTIVACION está DIFERIDO (el backend lo rechaza
|
|
9
|
+
* hasta que exista el contador denormalizado `txSinceReactivation` en el connector).
|
|
10
|
+
*/
|
|
11
|
+
var CohortField;
|
|
12
|
+
(function (CohortField) {
|
|
13
|
+
/** # de tx totales (RemittanceUsers_GT.txCount). */
|
|
14
|
+
CohortField["TX_TOTALES"] = "tx_totales";
|
|
15
|
+
/** Días desde el signup (now − (unirSignupDate ?? createdAt)). */
|
|
16
|
+
CohortField["DIAS_DESDE_SIGNUP"] = "dias_desde_signup";
|
|
17
|
+
/** Días desde la última tx (now − lastTxAt). */
|
|
18
|
+
CohortField["DIAS_DESDE_ULTIMA_TX"] = "dias_desde_ultima_tx";
|
|
19
|
+
/** Días sin actividad — sinónimo de DIAS_DESDE_ULTIMA_TX. */
|
|
20
|
+
CohortField["DIAS_SIN_TX"] = "dias_sin_tx";
|
|
21
|
+
/** Monto total histórico en USD (RemittanceUsers_GT.totalSentUSD). */
|
|
22
|
+
CohortField["MONTO_TOTAL_HISTORICO"] = "monto_total_historico";
|
|
23
|
+
/** Tx en los últimos 30 días (query nivel-tx por usuario). */
|
|
24
|
+
CohortField["TX_ULTIMOS_30_DIAS"] = "tx_ultimos_30_dias";
|
|
25
|
+
/** # de tx tras reactivación — DIFERIDO (no-MVP, el backend lo rechaza). */
|
|
26
|
+
CohortField["TX_POST_REACTIVACION"] = "tx_post_reactivacion";
|
|
27
|
+
})(CohortField || (exports.CohortField = CohortField = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operadores de comparación del rule builder de Cohorts. Los valores son los
|
|
3
|
+
* símbolos que renderiza el mockup; todas las condiciones se evalúan en AND.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CohortOperator {
|
|
6
|
+
LT = "<",
|
|
7
|
+
LTE = "<=",
|
|
8
|
+
EQ = "==",
|
|
9
|
+
GTE = ">=",
|
|
10
|
+
GT = ">"
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CohortOperator = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Operadores de comparación del rule builder de Cohorts. Los valores son los
|
|
6
|
+
* símbolos que renderiza el mockup; todas las condiciones se evalúan en AND.
|
|
7
|
+
*/
|
|
8
|
+
var CohortOperator;
|
|
9
|
+
(function (CohortOperator) {
|
|
10
|
+
CohortOperator["LT"] = "<";
|
|
11
|
+
CohortOperator["LTE"] = "<=";
|
|
12
|
+
CohortOperator["EQ"] = "==";
|
|
13
|
+
CohortOperator["GTE"] = ">=";
|
|
14
|
+
CohortOperator["GT"] = ">";
|
|
15
|
+
})(CohortOperator || (exports.CohortOperator = CohortOperator = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Frecuencia de recálculo de un cohort. Un solo cron horario en remittance-business
|
|
3
|
+
* honra las 3 frecuencias respetando `nextCalculationAt` (+1h / +1d / +7d).
|
|
4
|
+
*/
|
|
5
|
+
export declare enum CohortRefresh {
|
|
6
|
+
HORARIO = "horario",
|
|
7
|
+
DIARIO = "diario",
|
|
8
|
+
SEMANAL = "semanal"
|
|
9
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CohortRefresh = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Frecuencia de recálculo de un cohort. Un solo cron horario en remittance-business
|
|
6
|
+
* honra las 3 frecuencias respetando `nextCalculationAt` (+1h / +1d / +7d).
|
|
7
|
+
*/
|
|
8
|
+
var CohortRefresh;
|
|
9
|
+
(function (CohortRefresh) {
|
|
10
|
+
CohortRefresh["HORARIO"] = "horario";
|
|
11
|
+
CohortRefresh["DIARIO"] = "diario";
|
|
12
|
+
CohortRefresh["SEMANAL"] = "semanal";
|
|
13
|
+
})(CohortRefresh || (exports.CohortRefresh = CohortRefresh = {}));
|
|
@@ -5,3 +5,8 @@ export * from "./RemittanceUserState";
|
|
|
5
5
|
export * from "./RemittanceCancelledByEnum";
|
|
6
6
|
export * from "./RemittanceCancelOutcomeEnum";
|
|
7
7
|
export * from "./FeeAbsorbedByEnum";
|
|
8
|
+
export * from "./CohortField";
|
|
9
|
+
export * from "./CohortOperator";
|
|
10
|
+
export * from "./CohortRefresh";
|
|
11
|
+
export * from "./AuditAction";
|
|
12
|
+
export * from "./AuditEntityType";
|
|
@@ -21,3 +21,8 @@ __exportStar(require("./RemittanceUserState"), exports);
|
|
|
21
21
|
__exportStar(require("./RemittanceCancelledByEnum"), exports);
|
|
22
22
|
__exportStar(require("./RemittanceCancelOutcomeEnum"), exports);
|
|
23
23
|
__exportStar(require("./FeeAbsorbedByEnum"), exports);
|
|
24
|
+
__exportStar(require("./CohortField"), exports);
|
|
25
|
+
__exportStar(require("./CohortOperator"), exports);
|
|
26
|
+
__exportStar(require("./CohortRefresh"), exports);
|
|
27
|
+
__exportStar(require("./AuditAction"), exports);
|
|
28
|
+
__exportStar(require("./AuditEntityType"), exports);
|
package/bin/remittance/index.js
CHANGED
|
@@ -20,3 +20,4 @@ __exportStar(require("./enums"), exports);
|
|
|
20
20
|
__exportStar(require("./dtos"), exports);
|
|
21
21
|
__exportStar(require("./dtos/internal/RemittanceCreditBackRequest"), exports);
|
|
22
22
|
__exportStar(require("./dtos/internal/RemittanceCreditBackResponse"), exports);
|
|
23
|
+
__exportStar(require("./dtos/internal/RemittanceCohortCount"), 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,60 @@
|
|
|
1
|
+
import { IsEnum, IsObject, IsOptional, IsString, MaxLength } from "class-validator";
|
|
2
|
+
import { AuditAction } from "../enums/AuditAction";
|
|
3
|
+
import { AuditEntityType } from "../enums/AuditEntityType";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* DTOs del audit trail del backoffice de remesas (RemittanceAuditLog_GT, dueño:
|
|
7
|
+
* remittance-business). Append-only: registra "quién cambió qué, cuándo" en cada
|
|
8
|
+
* mutación (Configuración, Variables Operativas y, a futuro, suspend/reactivate
|
|
9
|
+
* desde el connector vía api-invoker — por eso el request vive en type-kit).
|
|
10
|
+
*
|
|
11
|
+
* MVP persiste `summary` + `after` (snapshot nuevo); `before` se agrega después
|
|
12
|
+
* si la UI quiere diff visual.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/** Request de append (helper `recordAudit` en rb; futuro cross-lambda). */
|
|
16
|
+
export class AuditAppendRequest {
|
|
17
|
+
@IsEnum(AuditEntityType)
|
|
18
|
+
entityType!: AuditEntityType;
|
|
19
|
+
|
|
20
|
+
/** Id de la entidad afectada (cohortId, segmentId, directoryId…). */
|
|
21
|
+
@IsString()
|
|
22
|
+
entityId!: string;
|
|
23
|
+
|
|
24
|
+
@IsEnum(AuditAction)
|
|
25
|
+
action!: AuditAction;
|
|
26
|
+
|
|
27
|
+
/** Email del operador (claim del JWT) o "sistema" para jobs. */
|
|
28
|
+
@IsString()
|
|
29
|
+
actor!: string;
|
|
30
|
+
|
|
31
|
+
/** Descripción legible ("Editó condiciones del cohort 'Activo'"). */
|
|
32
|
+
@IsString()
|
|
33
|
+
@MaxLength(500)
|
|
34
|
+
summary!: string;
|
|
35
|
+
|
|
36
|
+
/** Snapshot del estado nuevo de la entidad (opcional). */
|
|
37
|
+
@IsOptional()
|
|
38
|
+
@IsObject()
|
|
39
|
+
after?: Record<string, unknown>;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/** Entrada del audit trail (response). */
|
|
43
|
+
export class AuditLogEntry {
|
|
44
|
+
entityType!: AuditEntityType;
|
|
45
|
+
/** SK: ISO-8601 + `#<uuid>` (orden cronológico + unicidad dentro del entityType). */
|
|
46
|
+
at!: string;
|
|
47
|
+
actor!: string;
|
|
48
|
+
entityId!: string;
|
|
49
|
+
action!: AuditAction;
|
|
50
|
+
summary!: string;
|
|
51
|
+
after!: Record<string, unknown> | null;
|
|
52
|
+
createdAt!: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** Response de GET /backoffice/audit (paginación estándar index/pageSize). */
|
|
56
|
+
export class AuditListResponse {
|
|
57
|
+
items!: AuditLogEntry[];
|
|
58
|
+
/** Cursor opaco (base64) para la próxima página; null/ausente = última. */
|
|
59
|
+
index?: string | null;
|
|
60
|
+
}
|
|
@@ -9,6 +9,12 @@ export class RemittanceBackofficeTransaction {
|
|
|
9
9
|
directoryId!: string;
|
|
10
10
|
txNumber!: string;
|
|
11
11
|
marketplaceTransactionNumber?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Nombre del remitente (usuario de remesas). Se resuelve en el connector
|
|
14
|
+
* uniendo `directoryId` → `RemittanceUser.fullName` (tabla de remesas), NO
|
|
15
|
+
* viene de directory. `null` si el usuario aún no tiene `fullName` snapshotteado.
|
|
16
|
+
*/
|
|
17
|
+
senderName?: string | null;
|
|
12
18
|
beneficiaryId!: string;
|
|
13
19
|
beneficiaryName!: string;
|
|
14
20
|
countryISO!: string;
|
|
@@ -6,6 +6,12 @@
|
|
|
6
6
|
export class RemittanceBackofficeUserView {
|
|
7
7
|
directoryId!: string;
|
|
8
8
|
unirEmail!: string;
|
|
9
|
+
/** Nombre del usuario (snapshot de identidad UNIR en la tabla de remesas). `null` si aún no se snapshoteó. */
|
|
10
|
+
fullName?: string | null;
|
|
11
|
+
/** Ciudad del usuario (RemittanceUser.addressCity). `null` si no está poblada. */
|
|
12
|
+
city?: string | null;
|
|
13
|
+
/** Estado/provincia del usuario (RemittanceUser.addressState). `null` si no está poblada. */
|
|
14
|
+
state?: string | null;
|
|
9
15
|
status!: string;
|
|
10
16
|
remitterStatus?: string;
|
|
11
17
|
remitterLevel?: string;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { Type } from "class-transformer";
|
|
2
|
+
import {
|
|
3
|
+
ArrayMinSize,
|
|
4
|
+
IsArray,
|
|
5
|
+
IsEnum,
|
|
6
|
+
IsNumber,
|
|
7
|
+
IsOptional,
|
|
8
|
+
IsString,
|
|
9
|
+
Length,
|
|
10
|
+
MaxLength,
|
|
11
|
+
ValidateNested,
|
|
12
|
+
} from "class-validator";
|
|
13
|
+
import { CohortField } from "../enums/CohortField";
|
|
14
|
+
import { CohortOperator } from "../enums/CohortOperator";
|
|
15
|
+
import { CohortRefresh } from "../enums/CohortRefresh";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* DTOs de Cohorts (Dashboard Ops · Configuración §3, EP-26..30).
|
|
19
|
+
*
|
|
20
|
+
* Un cohort es un grupo dinámico de clientes definido por condiciones en AND
|
|
21
|
+
* (rule builder del mockup) que se recalcula periódicamente. Dueño de la tabla:
|
|
22
|
+
* remittance-business (RemittanceCohorts_GT). Solo se persiste el count (D4.5),
|
|
23
|
+
* nunca la membership.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
/** Condición del rule builder: `SI <field> <op> <value>`. Todas en AND. */
|
|
27
|
+
export class CohortCondition {
|
|
28
|
+
@IsEnum(CohortField)
|
|
29
|
+
field!: CohortField;
|
|
30
|
+
|
|
31
|
+
@IsEnum(CohortOperator)
|
|
32
|
+
op!: CohortOperator;
|
|
33
|
+
|
|
34
|
+
@IsNumber()
|
|
35
|
+
value!: number;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** Body de EP-27 POST /backoffice/config/cohorts. */
|
|
39
|
+
export class CreateCohortRequest {
|
|
40
|
+
@IsString()
|
|
41
|
+
@Length(3, 100)
|
|
42
|
+
name!: string;
|
|
43
|
+
|
|
44
|
+
@IsOptional()
|
|
45
|
+
@IsString()
|
|
46
|
+
@MaxLength(500)
|
|
47
|
+
description?: string;
|
|
48
|
+
|
|
49
|
+
@IsArray()
|
|
50
|
+
@ArrayMinSize(1)
|
|
51
|
+
@ValidateNested({ each: true })
|
|
52
|
+
@Type(() => CohortCondition)
|
|
53
|
+
conditions!: CohortCondition[];
|
|
54
|
+
|
|
55
|
+
@IsEnum(CohortRefresh)
|
|
56
|
+
refresh!: CohortRefresh;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/** Body de EP-28 PUT /backoffice/config/cohorts/{id} (reemplazo completo, patrón Save del mockup). */
|
|
60
|
+
export class UpdateCohortRequest {
|
|
61
|
+
@IsString()
|
|
62
|
+
@Length(3, 100)
|
|
63
|
+
name!: string;
|
|
64
|
+
|
|
65
|
+
@IsOptional()
|
|
66
|
+
@IsString()
|
|
67
|
+
@MaxLength(500)
|
|
68
|
+
description?: string;
|
|
69
|
+
|
|
70
|
+
@IsArray()
|
|
71
|
+
@ArrayMinSize(1)
|
|
72
|
+
@ValidateNested({ each: true })
|
|
73
|
+
@Type(() => CohortCondition)
|
|
74
|
+
conditions!: CohortCondition[];
|
|
75
|
+
|
|
76
|
+
@IsEnum(CohortRefresh)
|
|
77
|
+
refresh!: CohortRefresh;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/** Cohort completo (response). `memberCount`/`pctTotal` son null si nunca se calculó. */
|
|
81
|
+
export class Cohort {
|
|
82
|
+
id!: string;
|
|
83
|
+
name!: string;
|
|
84
|
+
description!: string | null;
|
|
85
|
+
conditions!: CohortCondition[];
|
|
86
|
+
refresh!: CohortRefresh;
|
|
87
|
+
/** Clientes actualmente en el cohort (snapshot del último recálculo). */
|
|
88
|
+
memberCount!: number | null;
|
|
89
|
+
/** % del total de RemittanceUsers (denominador = todos, no solo ACTIVE). 0-100. */
|
|
90
|
+
pctTotal!: number | null;
|
|
91
|
+
lastCalculatedAt!: string | null;
|
|
92
|
+
/** ISO — próxima corrida que el cron horario debe honrar (derivado de `refresh`). */
|
|
93
|
+
nextCalculationAt!: string;
|
|
94
|
+
createdAt!: string;
|
|
95
|
+
updatedAt!: string;
|
|
96
|
+
createdBy!: string;
|
|
97
|
+
updatedBy!: string;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Response de EP-26 GET /backoffice/config/cohorts (tabla chica, sin paginación). */
|
|
101
|
+
export class CohortListResponse {
|
|
102
|
+
items!: Cohort[];
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/** Response de EP-30 POST /backoffice/config/cohorts/{id}/recalcular. */
|
|
106
|
+
export class RecalculateCohortResponse {
|
|
107
|
+
id!: string;
|
|
108
|
+
memberCount!: number;
|
|
109
|
+
pctTotal!: number;
|
|
110
|
+
lastCalculatedAt!: string;
|
|
111
|
+
nextCalculationAt!: string;
|
|
112
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { Type } from "class-transformer";
|
|
2
|
+
import { ArrayMinSize, IsArray, ValidateNested } from "class-validator";
|
|
3
|
+
import { CohortCondition } from "../RemittanceCohort";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Contrato interno del puente de recálculo de Cohorts (Opción A):
|
|
7
|
+
* remittance-business pide al uniteller-connector (dueño de RemittanceUsers_GT /
|
|
8
|
+
* RemittanceTransactions_GT) cuántos usuarios cumplen las condiciones, vía
|
|
9
|
+
* api-invoker → POST /backoffice/config/cohorts/count (privado).
|
|
10
|
+
*/
|
|
11
|
+
export class CohortCountRequest {
|
|
12
|
+
@IsArray()
|
|
13
|
+
@ArrayMinSize(1)
|
|
14
|
+
@ValidateNested({ each: true })
|
|
15
|
+
@Type(() => CohortCondition)
|
|
16
|
+
conditions!: CohortCondition[];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export class CohortCountResponse {
|
|
20
|
+
/** Usuarios que cumplen TODAS las condiciones (AND). */
|
|
21
|
+
count!: number;
|
|
22
|
+
/** Universo total de RemittanceUsers (denominador del % — todos, no solo ACTIVE). */
|
|
23
|
+
total!: number;
|
|
24
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Acción registrada en el audit trail del backoffice de remesas (RemittanceAuditLog_GT).
|
|
3
|
+
* SUSPEND/REACTIVATE quedan listos para el flujo futuro de Operación (EP-02/03).
|
|
4
|
+
*/
|
|
5
|
+
export enum AuditAction {
|
|
6
|
+
CREATE = "CREATE",
|
|
7
|
+
UPDATE = "UPDATE",
|
|
8
|
+
DELETE = "DELETE",
|
|
9
|
+
RECALCULATE = "RECALCULATE",
|
|
10
|
+
SUSPEND = "SUSPEND",
|
|
11
|
+
REACTIVATE = "REACTIVATE",
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Módulo/dominio afectado por una entrada del audit trail (PK de RemittanceAuditLog_GT).
|
|
3
|
+
*/
|
|
4
|
+
export enum AuditEntityType {
|
|
5
|
+
COHORT = "COHORT",
|
|
6
|
+
COMMITTEE = "COMMITTEE",
|
|
7
|
+
SEGMENT = "SEGMENT",
|
|
8
|
+
PRICING = "PRICING",
|
|
9
|
+
PROMOTION = "PROMOTION",
|
|
10
|
+
RULE = "RULE",
|
|
11
|
+
USER = "USER",
|
|
12
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Campos conductuales del rule builder de Cohorts (Dashboard Ops · Configuración §3).
|
|
3
|
+
* Los valores son los del mockup (snake_case) para que el front no traduzca.
|
|
4
|
+
*
|
|
5
|
+
* MVP soporta 6 campos; TX_POST_REACTIVACION está DIFERIDO (el backend lo rechaza
|
|
6
|
+
* hasta que exista el contador denormalizado `txSinceReactivation` en el connector).
|
|
7
|
+
*/
|
|
8
|
+
export enum CohortField {
|
|
9
|
+
/** # de tx totales (RemittanceUsers_GT.txCount). */
|
|
10
|
+
TX_TOTALES = "tx_totales",
|
|
11
|
+
/** Días desde el signup (now − (unirSignupDate ?? createdAt)). */
|
|
12
|
+
DIAS_DESDE_SIGNUP = "dias_desde_signup",
|
|
13
|
+
/** Días desde la última tx (now − lastTxAt). */
|
|
14
|
+
DIAS_DESDE_ULTIMA_TX = "dias_desde_ultima_tx",
|
|
15
|
+
/** Días sin actividad — sinónimo de DIAS_DESDE_ULTIMA_TX. */
|
|
16
|
+
DIAS_SIN_TX = "dias_sin_tx",
|
|
17
|
+
/** Monto total histórico en USD (RemittanceUsers_GT.totalSentUSD). */
|
|
18
|
+
MONTO_TOTAL_HISTORICO = "monto_total_historico",
|
|
19
|
+
/** Tx en los últimos 30 días (query nivel-tx por usuario). */
|
|
20
|
+
TX_ULTIMOS_30_DIAS = "tx_ultimos_30_dias",
|
|
21
|
+
/** # de tx tras reactivación — DIFERIDO (no-MVP, el backend lo rechaza). */
|
|
22
|
+
TX_POST_REACTIVACION = "tx_post_reactivacion",
|
|
23
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Operadores de comparación del rule builder de Cohorts. Los valores son los
|
|
3
|
+
* símbolos que renderiza el mockup; todas las condiciones se evalúan en AND.
|
|
4
|
+
*/
|
|
5
|
+
export enum CohortOperator {
|
|
6
|
+
LT = "<",
|
|
7
|
+
LTE = "<=",
|
|
8
|
+
EQ = "==",
|
|
9
|
+
GTE = ">=",
|
|
10
|
+
GT = ">",
|
|
11
|
+
}
|