@fiado/type-kit 3.75.0 → 3.77.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/complaint/dtos/ComplaintResponse.d.ts +23 -0
- package/bin/complaint/dtos/ComplaintResponse.js +77 -0
- package/bin/complaint/dtos/CreateComplaintRequest.d.ts +16 -0
- package/bin/complaint/dtos/CreateComplaintRequest.js +56 -0
- package/bin/complaint/index.d.ts +2 -0
- package/bin/complaint/index.js +18 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +1 -0
- package/bin/riskProfile/enums/AlarmType.d.ts +2 -1
- package/bin/riskProfile/enums/AlarmType.js +1 -0
- package/package.json +1 -1
- package/src/complaint/dtos/ComplaintResponse.ts +26 -0
- package/src/complaint/dtos/CreateComplaintRequest.ts +43 -0
- package/src/complaint/index.ts +2 -0
- package/src/index.ts +1 -0
- package/src/riskProfile/enums/AlarmType.ts +2 -1
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Respuesta de lectura de una denuncia (`GET /complaints/{complaintId}`).
|
|
3
|
+
* NO incluye `createdBy` (email real) — solo `createdByHash`. El Dashboard
|
|
4
|
+
* nunca conoce la identidad del denunciante.
|
|
5
|
+
*/
|
|
6
|
+
export declare class ComplaintResponse {
|
|
7
|
+
id: string;
|
|
8
|
+
category: string;
|
|
9
|
+
title: string;
|
|
10
|
+
message: string;
|
|
11
|
+
status: string;
|
|
12
|
+
alertId?: string;
|
|
13
|
+
createdByHash?: string;
|
|
14
|
+
deadlineAt: string;
|
|
15
|
+
dictamenAt?: string | null;
|
|
16
|
+
dictamenBy?: string | null;
|
|
17
|
+
createdAt?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Respuesta del create — ids para enlazar denuncia ↔ alerta. */
|
|
20
|
+
export declare class CreateComplaintResponse {
|
|
21
|
+
complaintId: string;
|
|
22
|
+
alertId: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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.CreateComplaintResponse = exports.ComplaintResponse = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
/**
|
|
15
|
+
* Respuesta de lectura de una denuncia (`GET /complaints/{complaintId}`).
|
|
16
|
+
* NO incluye `createdBy` (email real) — solo `createdByHash`. El Dashboard
|
|
17
|
+
* nunca conoce la identidad del denunciante.
|
|
18
|
+
*/
|
|
19
|
+
class ComplaintResponse {
|
|
20
|
+
}
|
|
21
|
+
exports.ComplaintResponse = ComplaintResponse;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_transformer_1.Expose)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ComplaintResponse.prototype, "id", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_transformer_1.Expose)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ComplaintResponse.prototype, "category", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_transformer_1.Expose)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ComplaintResponse.prototype, "title", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_transformer_1.Expose)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ComplaintResponse.prototype, "message", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_transformer_1.Expose)(),
|
|
40
|
+
__metadata("design:type", String)
|
|
41
|
+
], ComplaintResponse.prototype, "status", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_transformer_1.Expose)(),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], ComplaintResponse.prototype, "alertId", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Expose)(),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], ComplaintResponse.prototype, "createdByHash", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_transformer_1.Expose)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], ComplaintResponse.prototype, "deadlineAt", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_transformer_1.Expose)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], ComplaintResponse.prototype, "dictamenAt", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_transformer_1.Expose)(),
|
|
60
|
+
__metadata("design:type", String)
|
|
61
|
+
], ComplaintResponse.prototype, "dictamenBy", void 0);
|
|
62
|
+
__decorate([
|
|
63
|
+
(0, class_transformer_1.Expose)(),
|
|
64
|
+
__metadata("design:type", String)
|
|
65
|
+
], ComplaintResponse.prototype, "createdAt", void 0);
|
|
66
|
+
/** Respuesta del create — ids para enlazar denuncia ↔ alerta. */
|
|
67
|
+
class CreateComplaintResponse {
|
|
68
|
+
}
|
|
69
|
+
exports.CreateComplaintResponse = CreateComplaintResponse;
|
|
70
|
+
__decorate([
|
|
71
|
+
(0, class_transformer_1.Expose)(),
|
|
72
|
+
__metadata("design:type", String)
|
|
73
|
+
], CreateComplaintResponse.prototype, "complaintId", void 0);
|
|
74
|
+
__decorate([
|
|
75
|
+
(0, class_transformer_1.Expose)(),
|
|
76
|
+
__metadata("design:type", String)
|
|
77
|
+
], CreateComplaintResponse.prototype, "alertId", void 0);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Catálogo de categorías del buzón anónimo de denuncias (BO-19, Manual cap. 20.3).
|
|
3
|
+
*/
|
|
4
|
+
export declare const COMPLAINT_CATEGORIES: readonly ["Sospecha sobre un cliente", "Sospecha sobre un empleado", "Conflicto de interés", "Incumplimiento del Manual", "Otro"];
|
|
5
|
+
export type ComplaintCategory = (typeof COMPLAINT_CATEGORIES)[number];
|
|
6
|
+
/**
|
|
7
|
+
* Request para crear una denuncia en el buzón anónimo (`complaint-mailbox-business`).
|
|
8
|
+
* El `userEmail` se persiste interno como `createdBy` y se hashea (`createdByHash`);
|
|
9
|
+
* el Dashboard nunca conoce la identidad real del denunciante.
|
|
10
|
+
*/
|
|
11
|
+
export declare class CreateComplaintRequest {
|
|
12
|
+
category: string;
|
|
13
|
+
title: string;
|
|
14
|
+
message: string;
|
|
15
|
+
userEmail: string;
|
|
16
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
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.CreateComplaintRequest = exports.COMPLAINT_CATEGORIES = void 0;
|
|
13
|
+
const class_transformer_1 = require("class-transformer");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
/**
|
|
16
|
+
* Catálogo de categorías del buzón anónimo de denuncias (BO-19, Manual cap. 20.3).
|
|
17
|
+
*/
|
|
18
|
+
exports.COMPLAINT_CATEGORIES = [
|
|
19
|
+
"Sospecha sobre un cliente",
|
|
20
|
+
"Sospecha sobre un empleado",
|
|
21
|
+
"Conflicto de interés",
|
|
22
|
+
"Incumplimiento del Manual",
|
|
23
|
+
"Otro",
|
|
24
|
+
];
|
|
25
|
+
/**
|
|
26
|
+
* Request para crear una denuncia en el buzón anónimo (`complaint-mailbox-business`).
|
|
27
|
+
* El `userEmail` se persiste interno como `createdBy` y se hashea (`createdByHash`);
|
|
28
|
+
* el Dashboard nunca conoce la identidad real del denunciante.
|
|
29
|
+
*/
|
|
30
|
+
class CreateComplaintRequest {
|
|
31
|
+
}
|
|
32
|
+
exports.CreateComplaintRequest = CreateComplaintRequest;
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_transformer_1.Expose)(),
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
(0, class_validator_1.IsIn)(exports.COMPLAINT_CATEGORIES, { message: "category inválida" }),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CreateComplaintRequest.prototype, "category", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_transformer_1.Expose)(),
|
|
41
|
+
(0, class_validator_1.IsString)(),
|
|
42
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
43
|
+
(0, class_validator_1.MaxLength)(200),
|
|
44
|
+
__metadata("design:type", String)
|
|
45
|
+
], CreateComplaintRequest.prototype, "title", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_transformer_1.Expose)(),
|
|
48
|
+
(0, class_validator_1.IsString)(),
|
|
49
|
+
(0, class_validator_1.IsNotEmpty)(),
|
|
50
|
+
__metadata("design:type", String)
|
|
51
|
+
], CreateComplaintRequest.prototype, "message", void 0);
|
|
52
|
+
__decorate([
|
|
53
|
+
(0, class_transformer_1.Expose)(),
|
|
54
|
+
(0, class_validator_1.IsEmail)({}, { message: "userEmail debe ser un correo válido" }),
|
|
55
|
+
__metadata("design:type", String)
|
|
56
|
+
], CreateComplaintRequest.prototype, "userEmail", void 0);
|
|
@@ -0,0 +1,18 @@
|
|
|
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("./dtos/CreateComplaintRequest"), exports);
|
|
18
|
+
__exportStar(require("./dtos/ComplaintResponse"), exports);
|
package/bin/index.d.ts
CHANGED
package/bin/index.js
CHANGED
|
@@ -126,3 +126,4 @@ exports.Remittance = __importStar(require("./remittance"));
|
|
|
126
126
|
exports.WalletFunding = __importStar(require("./walletFunding"));
|
|
127
127
|
exports.TotpSecurity = __importStar(require("./totpSecurity"));
|
|
128
128
|
__exportStar(require("./messaging"), exports);
|
|
129
|
+
__exportStar(require("./complaint"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Respuesta de lectura de una denuncia (`GET /complaints/{complaintId}`).
|
|
5
|
+
* NO incluye `createdBy` (email real) — solo `createdByHash`. El Dashboard
|
|
6
|
+
* nunca conoce la identidad del denunciante.
|
|
7
|
+
*/
|
|
8
|
+
export class ComplaintResponse {
|
|
9
|
+
@Expose() id!: string;
|
|
10
|
+
@Expose() category!: string;
|
|
11
|
+
@Expose() title!: string;
|
|
12
|
+
@Expose() message!: string;
|
|
13
|
+
@Expose() status!: string; // OPEN | CLOSE_JUSTIFIED | CLOSE_RULED
|
|
14
|
+
@Expose() alertId?: string;
|
|
15
|
+
@Expose() createdByHash?: string;
|
|
16
|
+
@Expose() deadlineAt!: string;
|
|
17
|
+
@Expose() dictamenAt?: string | null;
|
|
18
|
+
@Expose() dictamenBy?: string | null;
|
|
19
|
+
@Expose() createdAt?: string;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/** Respuesta del create — ids para enlazar denuncia ↔ alerta. */
|
|
23
|
+
export class CreateComplaintResponse {
|
|
24
|
+
@Expose() complaintId!: string;
|
|
25
|
+
@Expose() alertId!: string;
|
|
26
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Expose } from "class-transformer";
|
|
2
|
+
import { IsEmail, IsIn, IsNotEmpty, IsString, MaxLength } from "class-validator";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Catálogo de categorías del buzón anónimo de denuncias (BO-19, Manual cap. 20.3).
|
|
6
|
+
*/
|
|
7
|
+
export const COMPLAINT_CATEGORIES = [
|
|
8
|
+
"Sospecha sobre un cliente",
|
|
9
|
+
"Sospecha sobre un empleado",
|
|
10
|
+
"Conflicto de interés",
|
|
11
|
+
"Incumplimiento del Manual",
|
|
12
|
+
"Otro",
|
|
13
|
+
] as const;
|
|
14
|
+
|
|
15
|
+
export type ComplaintCategory = (typeof COMPLAINT_CATEGORIES)[number];
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Request para crear una denuncia en el buzón anónimo (`complaint-mailbox-business`).
|
|
19
|
+
* El `userEmail` se persiste interno como `createdBy` y se hashea (`createdByHash`);
|
|
20
|
+
* el Dashboard nunca conoce la identidad real del denunciante.
|
|
21
|
+
*/
|
|
22
|
+
export class CreateComplaintRequest {
|
|
23
|
+
|
|
24
|
+
@Expose()
|
|
25
|
+
@IsString()
|
|
26
|
+
@IsIn(COMPLAINT_CATEGORIES as unknown as string[], { message: "category inválida" })
|
|
27
|
+
category!: string;
|
|
28
|
+
|
|
29
|
+
@Expose()
|
|
30
|
+
@IsString()
|
|
31
|
+
@IsNotEmpty()
|
|
32
|
+
@MaxLength(200)
|
|
33
|
+
title!: string;
|
|
34
|
+
|
|
35
|
+
@Expose()
|
|
36
|
+
@IsString()
|
|
37
|
+
@IsNotEmpty()
|
|
38
|
+
message!: string; // HTML del editor
|
|
39
|
+
|
|
40
|
+
@Expose()
|
|
41
|
+
@IsEmail({}, { message: "userEmail debe ser un correo válido" })
|
|
42
|
+
userEmail!: string;
|
|
43
|
+
}
|
package/src/index.ts
CHANGED