@fiado/type-kit 3.81.0 → 3.83.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/_test_/unit/platformRbac/enums/__snapshots__/permissionBits.test.ts.snap +2 -1
- package/bin/platformRbac/enums/Permission.d.ts +2 -1
- package/bin/platformRbac/enums/Permission.js +3 -0
- package/bin/riskProfile/dtos/private/AnalisisTransaccionalResponse.d.ts +41 -0
- package/bin/riskProfile/dtos/private/AnalisisTransaccionalResponse.js +112 -0
- package/bin/riskProfile/dtos/private/CreateClientFinancialHistoryRequest.js +1 -1
- package/bin/riskProfile/index.d.ts +1 -0
- package/bin/riskProfile/index.js +1 -0
- package/bin/transaction/dtos/CounterQueryResponse.d.ts +34 -0
- package/bin/transaction/dtos/CounterQueryResponse.js +55 -0
- package/bin/transaction/dtos/UpdateR27StatusRequest.d.ts +13 -0
- package/bin/transaction/dtos/UpdateR27StatusRequest.js +10 -0
- package/bin/transaction/dtos/UpdateR27StatusResponse.d.ts +13 -0
- package/bin/transaction/dtos/UpdateR27StatusResponse.js +11 -0
- package/bin/transaction/index.d.ts +2 -0
- package/bin/transaction/index.js +2 -0
- package/package.json +1 -1
- package/src/platformRbac/enums/Permission.ts +3 -0
- package/src/riskProfile/dtos/private/AnalisisTransaccionalResponse.ts +49 -0
- package/src/riskProfile/dtos/private/CreateClientFinancialHistoryRequest.ts +3 -2
- package/src/riskProfile/index.ts +1 -0
- package/src/transaction/dtos/CounterQueryResponse.ts +42 -0
- package/src/transaction/dtos/UpdateR27StatusRequest.ts +13 -0
- package/src/transaction/dtos/UpdateR27StatusResponse.ts +13 -0
- package/src/transaction/index.ts +2 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing
|
|
2
2
|
|
|
3
|
-
exports[`PERMISSION_BIT_ORDER PERMS_VERSION es número estable 1`] = `
|
|
3
|
+
exports[`PERMISSION_BIT_ORDER PERMS_VERSION es número estable 1`] = `231160135`;
|
|
4
4
|
|
|
5
5
|
exports[`PERMISSION_BIT_ORDER append-only: snapshot del ORDEN COMPLETO (rompe ante cualquier reorden/inserción) 1`] = `
|
|
6
6
|
[
|
|
@@ -117,5 +117,6 @@ exports[`PERMISSION_BIT_ORDER append-only: snapshot del ORDEN COMPLETO (rompe an
|
|
|
117
117
|
"agents.notification.send",
|
|
118
118
|
"agents.export.run",
|
|
119
119
|
"agents.catalog.view",
|
|
120
|
+
"agents.group.manage",
|
|
120
121
|
]
|
|
121
122
|
`;
|
|
@@ -141,7 +141,8 @@ export declare enum Permission {
|
|
|
141
141
|
AGENTS_CHAT_SEND = "agents.chat.send",
|
|
142
142
|
AGENTS_NOTIFICATION_SEND = "agents.notification.send",
|
|
143
143
|
AGENTS_EXPORT_RUN = "agents.export.run",
|
|
144
|
-
AGENTS_CATALOG_VIEW = "agents.catalog.view"
|
|
144
|
+
AGENTS_CATALOG_VIEW = "agents.catalog.view",
|
|
145
|
+
AGENTS_GROUP_MANAGE = "agents.group.manage"
|
|
145
146
|
}
|
|
146
147
|
/**
|
|
147
148
|
* Orden CANÓNICO y APPEND-ONLY de los permisos para el bitset del token.
|
|
@@ -183,6 +183,8 @@ var Permission;
|
|
|
183
183
|
Permission["AGENTS_NOTIFICATION_SEND"] = "agents.notification.send";
|
|
184
184
|
Permission["AGENTS_EXPORT_RUN"] = "agents.export.run";
|
|
185
185
|
Permission["AGENTS_CATALOG_VIEW"] = "agents.catalog.view";
|
|
186
|
+
// Gestión de grupos del tenant AGENTS (scope TENANT — el operador). Espejo de retail.retailer.manage.
|
|
187
|
+
Permission["AGENTS_GROUP_MANAGE"] = "agents.group.manage";
|
|
186
188
|
})(Permission || (exports.Permission = Permission = {}));
|
|
187
189
|
/**
|
|
188
190
|
* Orden CANÓNICO y APPEND-ONLY de los permisos para el bitset del token.
|
|
@@ -310,6 +312,7 @@ exports.PERMISSION_BIT_ORDER = [
|
|
|
310
312
|
Permission.AGENTS_NOTIFICATION_SEND,
|
|
311
313
|
Permission.AGENTS_EXPORT_RUN,
|
|
312
314
|
Permission.AGENTS_CATALOG_VIEW,
|
|
315
|
+
Permission.AGENTS_GROUP_MANAGE,
|
|
313
316
|
];
|
|
314
317
|
function djb2(input) {
|
|
315
318
|
let h = 5381;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Respuesta de `POST /risk/backoffice/profiles/{directoryId}/analisis-transaccional`
|
|
3
|
+
* (BO-03 §3.4). El BO calcula server-side los 3 criterios de Vía B
|
|
4
|
+
* (Manual de Cumplimiento v1.1 §8.30) sobre la ventana indicada y devuelve
|
|
5
|
+
* un folio determinístico para que el caller lo adjunte como evidencia.
|
|
6
|
+
*/
|
|
7
|
+
/** Criterio (i): no hay alertas reportables (UNUSUAL/WORRYING) abiertas en la ventana. */
|
|
8
|
+
export declare class CriterioAlertasAbiertas {
|
|
9
|
+
pass: boolean;
|
|
10
|
+
count: number;
|
|
11
|
+
}
|
|
12
|
+
/** Criterio (ii): el volumen de entradas observado cae dentro de [declarado×0.5, declarado×1.5]. */
|
|
13
|
+
export declare class CriterioVolumenEnRango {
|
|
14
|
+
pass: boolean;
|
|
15
|
+
observado: number;
|
|
16
|
+
declarado: number;
|
|
17
|
+
min: number;
|
|
18
|
+
max: number;
|
|
19
|
+
}
|
|
20
|
+
/** Criterio (iii): el nivel de riesgo no empeoró más de 2 niveles en la ventana. */
|
|
21
|
+
export declare class CriterioRiesgoEstable {
|
|
22
|
+
pass: boolean;
|
|
23
|
+
delta: number;
|
|
24
|
+
}
|
|
25
|
+
export declare class AnalisisTransaccionalCriterios {
|
|
26
|
+
alertasAbiertas: CriterioAlertasAbiertas;
|
|
27
|
+
volumenEnRango: CriterioVolumenEnRango;
|
|
28
|
+
riesgoEstable: CriterioRiesgoEstable;
|
|
29
|
+
}
|
|
30
|
+
export declare class AnalisisTransaccionalVentana {
|
|
31
|
+
from: string;
|
|
32
|
+
to: string;
|
|
33
|
+
}
|
|
34
|
+
export declare class AnalisisTransaccionalResponse {
|
|
35
|
+
/** Folio determinístico = hash(directoryId, from, to). */
|
|
36
|
+
folio: string;
|
|
37
|
+
ventana: AnalisisTransaccionalVentana;
|
|
38
|
+
criterios: AnalisisTransaccionalCriterios;
|
|
39
|
+
/** true si y solo si los 3 criterios pasan. */
|
|
40
|
+
viaBPermitida: boolean;
|
|
41
|
+
}
|
|
@@ -0,0 +1,112 @@
|
|
|
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.AnalisisTransaccionalResponse = exports.AnalisisTransaccionalVentana = exports.AnalisisTransaccionalCriterios = exports.CriterioRiesgoEstable = exports.CriterioVolumenEnRango = exports.CriterioAlertasAbiertas = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
/**
|
|
15
|
+
* Respuesta de `POST /risk/backoffice/profiles/{directoryId}/analisis-transaccional`
|
|
16
|
+
* (BO-03 §3.4). El BO calcula server-side los 3 criterios de Vía B
|
|
17
|
+
* (Manual de Cumplimiento v1.1 §8.30) sobre la ventana indicada y devuelve
|
|
18
|
+
* un folio determinístico para que el caller lo adjunte como evidencia.
|
|
19
|
+
*/
|
|
20
|
+
/** Criterio (i): no hay alertas reportables (UNUSUAL/WORRYING) abiertas en la ventana. */
|
|
21
|
+
class CriterioAlertasAbiertas {
|
|
22
|
+
}
|
|
23
|
+
exports.CriterioAlertasAbiertas = CriterioAlertasAbiertas;
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_transformer_1.Expose)(),
|
|
26
|
+
__metadata("design:type", Boolean)
|
|
27
|
+
], CriterioAlertasAbiertas.prototype, "pass", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_transformer_1.Expose)(),
|
|
30
|
+
__metadata("design:type", Number)
|
|
31
|
+
], CriterioAlertasAbiertas.prototype, "count", void 0);
|
|
32
|
+
/** Criterio (ii): el volumen de entradas observado cae dentro de [declarado×0.5, declarado×1.5]. */
|
|
33
|
+
class CriterioVolumenEnRango {
|
|
34
|
+
}
|
|
35
|
+
exports.CriterioVolumenEnRango = CriterioVolumenEnRango;
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_transformer_1.Expose)(),
|
|
38
|
+
__metadata("design:type", Boolean)
|
|
39
|
+
], CriterioVolumenEnRango.prototype, "pass", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
__metadata("design:type", Number)
|
|
43
|
+
], CriterioVolumenEnRango.prototype, "observado", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
__metadata("design:type", Number)
|
|
47
|
+
], CriterioVolumenEnRango.prototype, "declarado", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_transformer_1.Expose)(),
|
|
50
|
+
__metadata("design:type", Number)
|
|
51
|
+
], CriterioVolumenEnRango.prototype, "min", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Expose)(),
|
|
54
|
+
__metadata("design:type", Number)
|
|
55
|
+
], CriterioVolumenEnRango.prototype, "max", void 0);
|
|
56
|
+
/** Criterio (iii): el nivel de riesgo no empeoró más de 2 niveles en la ventana. */
|
|
57
|
+
class CriterioRiesgoEstable {
|
|
58
|
+
}
|
|
59
|
+
exports.CriterioRiesgoEstable = CriterioRiesgoEstable;
|
|
60
|
+
__decorate([
|
|
61
|
+
(0, class_transformer_1.Expose)(),
|
|
62
|
+
__metadata("design:type", Boolean)
|
|
63
|
+
], CriterioRiesgoEstable.prototype, "pass", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, class_transformer_1.Expose)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], CriterioRiesgoEstable.prototype, "delta", void 0);
|
|
68
|
+
class AnalisisTransaccionalCriterios {
|
|
69
|
+
}
|
|
70
|
+
exports.AnalisisTransaccionalCriterios = AnalisisTransaccionalCriterios;
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_transformer_1.Expose)(),
|
|
73
|
+
__metadata("design:type", CriterioAlertasAbiertas)
|
|
74
|
+
], AnalisisTransaccionalCriterios.prototype, "alertasAbiertas", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, class_transformer_1.Expose)(),
|
|
77
|
+
__metadata("design:type", CriterioVolumenEnRango)
|
|
78
|
+
], AnalisisTransaccionalCriterios.prototype, "volumenEnRango", void 0);
|
|
79
|
+
__decorate([
|
|
80
|
+
(0, class_transformer_1.Expose)(),
|
|
81
|
+
__metadata("design:type", CriterioRiesgoEstable)
|
|
82
|
+
], AnalisisTransaccionalCriterios.prototype, "riesgoEstable", void 0);
|
|
83
|
+
class AnalisisTransaccionalVentana {
|
|
84
|
+
}
|
|
85
|
+
exports.AnalisisTransaccionalVentana = AnalisisTransaccionalVentana;
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_transformer_1.Expose)(),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], AnalisisTransaccionalVentana.prototype, "from", void 0);
|
|
90
|
+
__decorate([
|
|
91
|
+
(0, class_transformer_1.Expose)(),
|
|
92
|
+
__metadata("design:type", String)
|
|
93
|
+
], AnalisisTransaccionalVentana.prototype, "to", void 0);
|
|
94
|
+
class AnalisisTransaccionalResponse {
|
|
95
|
+
}
|
|
96
|
+
exports.AnalisisTransaccionalResponse = AnalisisTransaccionalResponse;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_transformer_1.Expose)(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], AnalisisTransaccionalResponse.prototype, "folio", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, class_transformer_1.Expose)(),
|
|
103
|
+
__metadata("design:type", AnalisisTransaccionalVentana)
|
|
104
|
+
], AnalisisTransaccionalResponse.prototype, "ventana", void 0);
|
|
105
|
+
__decorate([
|
|
106
|
+
(0, class_transformer_1.Expose)(),
|
|
107
|
+
__metadata("design:type", AnalisisTransaccionalCriterios)
|
|
108
|
+
], AnalisisTransaccionalResponse.prototype, "criterios", void 0);
|
|
109
|
+
__decorate([
|
|
110
|
+
(0, class_transformer_1.Expose)(),
|
|
111
|
+
__metadata("design:type", Boolean)
|
|
112
|
+
], AnalisisTransaccionalResponse.prototype, "viaBPermitida", void 0);
|
|
@@ -33,7 +33,7 @@ __decorate([
|
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, class_transformer_1.Expose)(),
|
|
35
35
|
(0, class_validator_1.IsString)(),
|
|
36
|
-
(0, class_validator_1.IsIn)(["declaredMonthlyIncome", "manualRiskLevel", "customHighAmount", "customMonthlyIncrease"]),
|
|
36
|
+
(0, class_validator_1.IsIn)(["declaredMonthlyIncome", "manualRiskLevel", "customHighAmount", "customMonthlyIncrease", "riskLevel"]),
|
|
37
37
|
__metadata("design:type", String)
|
|
38
38
|
], CreateClientFinancialHistoryRequest.prototype, "field", void 0);
|
|
39
39
|
__decorate([
|
|
@@ -41,3 +41,4 @@ export * from './dtos/private/CreateClientFinancialHistoryRequest';
|
|
|
41
41
|
export * from './dtos/private/ClientFinancialHistoryResponse';
|
|
42
42
|
export * from './dtos/private/ListClientFinancialHistoryResponse';
|
|
43
43
|
export * from './dtos/private/CreateProfileNoteRequest';
|
|
44
|
+
export * from './dtos/private/AnalisisTransaccionalResponse';
|
package/bin/riskProfile/index.js
CHANGED
|
@@ -59,3 +59,4 @@ __exportStar(require("./dtos/private/CreateClientFinancialHistoryRequest"), expo
|
|
|
59
59
|
__exportStar(require("./dtos/private/ClientFinancialHistoryResponse"), exports);
|
|
60
60
|
__exportStar(require("./dtos/private/ListClientFinancialHistoryResponse"), exports);
|
|
61
61
|
__exportStar(require("./dtos/private/CreateProfileNoteRequest"), exports);
|
|
62
|
+
__exportStar(require("./dtos/private/AnalisisTransaccionalResponse"), exports);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Contrato de respuesta del endpoint de contadores de transaction-business:
|
|
3
|
+
* `GET /private/counters/directory/{directoryId}`.
|
|
4
|
+
*
|
|
5
|
+
* Reemplaza a los contadores de activity-business (en deprecación). Lo consume
|
|
6
|
+
* el cliente de `@fiado/api-invoker` y los lambdas que necesitan contadores
|
|
7
|
+
* agregados (ej. risk-profile-business para el análisis transaccional de Vía B).
|
|
8
|
+
*/
|
|
9
|
+
export type CounterWindow = "day" | "week" | "month" | "quarter" | "semester" | "year" | "allTime";
|
|
10
|
+
/** Resultado agregado de un contador en una ventana. */
|
|
11
|
+
export interface CounterWindowResult {
|
|
12
|
+
count: number;
|
|
13
|
+
totalAmount: number;
|
|
14
|
+
}
|
|
15
|
+
/** Ventana de rango arbitrario, fechas calendario MX inclusivas (YYYY-MM-DD). */
|
|
16
|
+
export interface CounterDateRange {
|
|
17
|
+
from: string;
|
|
18
|
+
to: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class CounterQueryResult {
|
|
21
|
+
counterId: string;
|
|
22
|
+
type: "unique" | "composite";
|
|
23
|
+
components?: string[];
|
|
24
|
+
windows: Partial<Record<CounterWindow, CounterWindowResult>>;
|
|
25
|
+
/** Resultado de la ventana de rango [from,to]; presente solo si se pidió `range`. */
|
|
26
|
+
range?: CounterWindowResult;
|
|
27
|
+
}
|
|
28
|
+
export declare class CounterQueryResponse {
|
|
29
|
+
computedAt: string;
|
|
30
|
+
windowsRequested: CounterWindow[];
|
|
31
|
+
/** Eco del rango solicitado; presente solo si se pidió. */
|
|
32
|
+
rangeRequested?: CounterDateRange;
|
|
33
|
+
results: CounterQueryResult[];
|
|
34
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
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.CounterQueryResponse = exports.CounterQueryResult = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
class CounterQueryResult {
|
|
15
|
+
}
|
|
16
|
+
exports.CounterQueryResult = CounterQueryResult;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_transformer_1.Expose)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], CounterQueryResult.prototype, "counterId", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_transformer_1.Expose)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CounterQueryResult.prototype, "type", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_transformer_1.Expose)(),
|
|
27
|
+
__metadata("design:type", Array)
|
|
28
|
+
], CounterQueryResult.prototype, "components", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_transformer_1.Expose)(),
|
|
31
|
+
__metadata("design:type", Object)
|
|
32
|
+
], CounterQueryResult.prototype, "windows", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
|
+
], CounterQueryResult.prototype, "range", void 0);
|
|
37
|
+
class CounterQueryResponse {
|
|
38
|
+
}
|
|
39
|
+
exports.CounterQueryResponse = CounterQueryResponse;
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_transformer_1.Expose)(),
|
|
42
|
+
__metadata("design:type", String)
|
|
43
|
+
], CounterQueryResponse.prototype, "computedAt", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
(0, class_transformer_1.Expose)(),
|
|
46
|
+
__metadata("design:type", Array)
|
|
47
|
+
], CounterQueryResponse.prototype, "windowsRequested", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_transformer_1.Expose)(),
|
|
50
|
+
__metadata("design:type", Object)
|
|
51
|
+
], CounterQueryResponse.prototype, "rangeRequested", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Expose)(),
|
|
54
|
+
__metadata("design:type", Array)
|
|
55
|
+
], CounterQueryResponse.prototype, "results", void 0);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request del endpoint BO-R27 (cierre de dictamen UNE) en disputes-business.
|
|
3
|
+
* POST disputes/{id}/r27-status — privado (VPC/VPN, sin Cognito).
|
|
4
|
+
*/
|
|
5
|
+
export declare class UpdateR27StatusRequest {
|
|
6
|
+
newR27Status: number;
|
|
7
|
+
resolutionDate: string;
|
|
8
|
+
resolutionCause: number;
|
|
9
|
+
signedBy: string;
|
|
10
|
+
signedByName: string;
|
|
11
|
+
dictamenS3Key: string;
|
|
12
|
+
contentHash: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateR27StatusRequest = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Request del endpoint BO-R27 (cierre de dictamen UNE) en disputes-business.
|
|
6
|
+
* POST disputes/{id}/r27-status — privado (VPC/VPN, sin Cognito).
|
|
7
|
+
*/
|
|
8
|
+
class UpdateR27StatusRequest {
|
|
9
|
+
}
|
|
10
|
+
exports.UpdateR27StatusRequest = UpdateR27StatusRequest;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response 200 del endpoint BO-R27. `r27Status` y `disputeOrFraudStatus` son el
|
|
3
|
+
* mismo valor numerico (101-104): r27Status es el nombre del contrato, mapeado
|
|
4
|
+
* internamente a disputeOrFraudStatus (vocabulario que ya lee la app).
|
|
5
|
+
*/
|
|
6
|
+
export declare class UpdateR27StatusResponse {
|
|
7
|
+
success: boolean;
|
|
8
|
+
folio: string;
|
|
9
|
+
id: string;
|
|
10
|
+
r27Status: number;
|
|
11
|
+
disputeOrFraudStatus: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UpdateR27StatusResponse = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Response 200 del endpoint BO-R27. `r27Status` y `disputeOrFraudStatus` son el
|
|
6
|
+
* mismo valor numerico (101-104): r27Status es el nombre del contrato, mapeado
|
|
7
|
+
* internamente a disputeOrFraudStatus (vocabulario que ya lee la app).
|
|
8
|
+
*/
|
|
9
|
+
class UpdateR27StatusResponse {
|
|
10
|
+
}
|
|
11
|
+
exports.UpdateR27StatusResponse = UpdateR27StatusResponse;
|
package/bin/transaction/index.js
CHANGED
|
@@ -15,6 +15,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
//dtos
|
|
18
|
+
__exportStar(require("./dtos/UpdateR27StatusRequest"), exports);
|
|
19
|
+
__exportStar(require("./dtos/UpdateR27StatusResponse"), exports);
|
|
18
20
|
__exportStar(require("./dtos/TransactionCreateRequest"), exports);
|
|
19
21
|
__exportStar(require("./dtos/TransactionCreateResponse"), exports);
|
|
20
22
|
__exportStar(require("./dtos/TransactionGetDetailResponse"), exports);
|
package/package.json
CHANGED
|
@@ -184,6 +184,8 @@ export enum Permission {
|
|
|
184
184
|
AGENTS_NOTIFICATION_SEND = 'agents.notification.send',
|
|
185
185
|
AGENTS_EXPORT_RUN = 'agents.export.run',
|
|
186
186
|
AGENTS_CATALOG_VIEW = 'agents.catalog.view',
|
|
187
|
+
// Gestión de grupos del tenant AGENTS (scope TENANT — el operador). Espejo de retail.retailer.manage.
|
|
188
|
+
AGENTS_GROUP_MANAGE = 'agents.group.manage',
|
|
187
189
|
}
|
|
188
190
|
|
|
189
191
|
/**
|
|
@@ -312,6 +314,7 @@ export const PERMISSION_BIT_ORDER: readonly Permission[] = [
|
|
|
312
314
|
Permission.AGENTS_NOTIFICATION_SEND,
|
|
313
315
|
Permission.AGENTS_EXPORT_RUN,
|
|
314
316
|
Permission.AGENTS_CATALOG_VIEW,
|
|
317
|
+
Permission.AGENTS_GROUP_MANAGE,
|
|
315
318
|
] as const;
|
|
316
319
|
|
|
317
320
|
function djb2(input: string): number {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Respuesta de `POST /risk/backoffice/profiles/{directoryId}/analisis-transaccional`
|
|
5
|
+
* (BO-03 §3.4). El BO calcula server-side los 3 criterios de Vía B
|
|
6
|
+
* (Manual de Cumplimiento v1.1 §8.30) sobre la ventana indicada y devuelve
|
|
7
|
+
* un folio determinístico para que el caller lo adjunte como evidencia.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/** Criterio (i): no hay alertas reportables (UNUSUAL/WORRYING) abiertas en la ventana. */
|
|
11
|
+
export class CriterioAlertasAbiertas {
|
|
12
|
+
@Expose() pass!: boolean;
|
|
13
|
+
@Expose() count!: number;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/** Criterio (ii): el volumen de entradas observado cae dentro de [declarado×0.5, declarado×1.5]. */
|
|
17
|
+
export class CriterioVolumenEnRango {
|
|
18
|
+
@Expose() pass!: boolean;
|
|
19
|
+
@Expose() observado!: number;
|
|
20
|
+
@Expose() declarado!: number;
|
|
21
|
+
@Expose() min!: number;
|
|
22
|
+
@Expose() max!: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Criterio (iii): el nivel de riesgo no empeoró más de 2 niveles en la ventana. */
|
|
26
|
+
export class CriterioRiesgoEstable {
|
|
27
|
+
@Expose() pass!: boolean;
|
|
28
|
+
@Expose() delta!: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class AnalisisTransaccionalCriterios {
|
|
32
|
+
@Expose() alertasAbiertas!: CriterioAlertasAbiertas;
|
|
33
|
+
@Expose() volumenEnRango!: CriterioVolumenEnRango;
|
|
34
|
+
@Expose() riesgoEstable!: CriterioRiesgoEstable;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class AnalisisTransaccionalVentana {
|
|
38
|
+
@Expose() from!: string;
|
|
39
|
+
@Expose() to!: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export class AnalisisTransaccionalResponse {
|
|
43
|
+
/** Folio determinístico = hash(directoryId, from, to). */
|
|
44
|
+
@Expose() folio!: string;
|
|
45
|
+
@Expose() ventana!: AnalisisTransaccionalVentana;
|
|
46
|
+
@Expose() criterios!: AnalisisTransaccionalCriterios;
|
|
47
|
+
/** true si y solo si los 3 criterios pasan. */
|
|
48
|
+
@Expose() viaBPermitida!: boolean;
|
|
49
|
+
}
|
|
@@ -17,10 +17,11 @@ export class CreateClientFinancialHistoryRequest {
|
|
|
17
17
|
@IsNotEmpty()
|
|
18
18
|
directoryId!: string;
|
|
19
19
|
|
|
20
|
-
// Campo que cambió.
|
|
20
|
+
// Campo que cambió. Los 4 factores declarados (§3.2) + `riskLevel` para
|
|
21
|
+
// auditar el recálculo automático del nivel (triggeredBy=SYSTEM, BO-03 §iii).
|
|
21
22
|
@Expose()
|
|
22
23
|
@IsString()
|
|
23
|
-
@IsIn(["declaredMonthlyIncome", "manualRiskLevel", "customHighAmount", "customMonthlyIncrease"])
|
|
24
|
+
@IsIn(["declaredMonthlyIncome", "manualRiskLevel", "customHighAmount", "customMonthlyIncrease", "riskLevel"])
|
|
24
25
|
field!: string;
|
|
25
26
|
|
|
26
27
|
// Valor anterior: number, o null/omitido en alta (sin valor previo).
|
package/src/riskProfile/index.ts
CHANGED
|
@@ -46,4 +46,5 @@ export * from './dtos/private/CreateClientFinancialHistoryRequest';
|
|
|
46
46
|
export * from './dtos/private/ClientFinancialHistoryResponse';
|
|
47
47
|
export * from './dtos/private/ListClientFinancialHistoryResponse';
|
|
48
48
|
export * from './dtos/private/CreateProfileNoteRequest';
|
|
49
|
+
export * from './dtos/private/AnalisisTransaccionalResponse';
|
|
49
50
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Contrato de respuesta del endpoint de contadores de transaction-business:
|
|
5
|
+
* `GET /private/counters/directory/{directoryId}`.
|
|
6
|
+
*
|
|
7
|
+
* Reemplaza a los contadores de activity-business (en deprecación). Lo consume
|
|
8
|
+
* el cliente de `@fiado/api-invoker` y los lambdas que necesitan contadores
|
|
9
|
+
* agregados (ej. risk-profile-business para el análisis transaccional de Vía B).
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
export type CounterWindow =
|
|
13
|
+
| "day" | "week" | "month" | "quarter" | "semester" | "year" | "allTime";
|
|
14
|
+
|
|
15
|
+
/** Resultado agregado de un contador en una ventana. */
|
|
16
|
+
export interface CounterWindowResult {
|
|
17
|
+
count: number;
|
|
18
|
+
totalAmount: number;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Ventana de rango arbitrario, fechas calendario MX inclusivas (YYYY-MM-DD). */
|
|
22
|
+
export interface CounterDateRange {
|
|
23
|
+
from: string;
|
|
24
|
+
to: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export class CounterQueryResult {
|
|
28
|
+
@Expose() counterId!: string;
|
|
29
|
+
@Expose() type!: "unique" | "composite";
|
|
30
|
+
@Expose() components?: string[];
|
|
31
|
+
@Expose() windows!: Partial<Record<CounterWindow, CounterWindowResult>>;
|
|
32
|
+
/** Resultado de la ventana de rango [from,to]; presente solo si se pidió `range`. */
|
|
33
|
+
@Expose() range?: CounterWindowResult;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export class CounterQueryResponse {
|
|
37
|
+
@Expose() computedAt!: string;
|
|
38
|
+
@Expose() windowsRequested!: CounterWindow[];
|
|
39
|
+
/** Eco del rango solicitado; presente solo si se pidió. */
|
|
40
|
+
@Expose() rangeRequested?: CounterDateRange;
|
|
41
|
+
@Expose() results!: CounterQueryResult[];
|
|
42
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Request del endpoint BO-R27 (cierre de dictamen UNE) en disputes-business.
|
|
3
|
+
* POST disputes/{id}/r27-status — privado (VPC/VPN, sin Cognito).
|
|
4
|
+
*/
|
|
5
|
+
export class UpdateR27StatusRequest {
|
|
6
|
+
newR27Status: number; // 102 | 104
|
|
7
|
+
resolutionDate: string; // ISO datetime, <= ahora
|
|
8
|
+
resolutionCause: number; // 701-709 (catalogo R27 sentido_resolucion)
|
|
9
|
+
signedBy: string; // email del Titular UNE
|
|
10
|
+
signedByName: string;
|
|
11
|
+
dictamenS3Key: string; // path en fiado-prod-data-lake
|
|
12
|
+
contentHash: string; // sha256:...
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Response 200 del endpoint BO-R27. `r27Status` y `disputeOrFraudStatus` son el
|
|
3
|
+
* mismo valor numerico (101-104): r27Status es el nombre del contrato, mapeado
|
|
4
|
+
* internamente a disputeOrFraudStatus (vocabulario que ya lee la app).
|
|
5
|
+
*/
|
|
6
|
+
export class UpdateR27StatusResponse {
|
|
7
|
+
success: boolean;
|
|
8
|
+
folio: string;
|
|
9
|
+
id: string;
|
|
10
|
+
r27Status: number;
|
|
11
|
+
disputeOrFraudStatus: string;
|
|
12
|
+
updatedAt: string;
|
|
13
|
+
}
|
package/src/transaction/index.ts
CHANGED