easywork-common-lib 1.0.1030 → 1.0.1032
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.
|
@@ -18,12 +18,8 @@ export declare class RoleAuditLog {
|
|
|
18
18
|
performedById: number;
|
|
19
19
|
targetUser: User;
|
|
20
20
|
targetUserId: number;
|
|
21
|
-
actionType: AuditActionType;
|
|
22
21
|
description: string;
|
|
23
22
|
oldValue: any;
|
|
24
23
|
newValue: any;
|
|
25
|
-
entityType: string;
|
|
26
|
-
entityName: string;
|
|
27
24
|
createdAt: Date;
|
|
28
|
-
getSummary(): string;
|
|
29
25
|
}
|
|
@@ -34,18 +34,10 @@ let RoleAuditLog = class RoleAuditLog {
|
|
|
34
34
|
performedById;
|
|
35
35
|
targetUser;
|
|
36
36
|
targetUserId;
|
|
37
|
-
actionType;
|
|
38
37
|
description;
|
|
39
38
|
oldValue;
|
|
40
39
|
newValue;
|
|
41
|
-
entityType;
|
|
42
|
-
entityName;
|
|
43
40
|
createdAt;
|
|
44
|
-
getSummary() {
|
|
45
|
-
const performer = this.performedBy?.name || `Usuario ${this.performedById}`;
|
|
46
|
-
const target = this.targetUser?.name || `Usuario ${this.targetUserId}`;
|
|
47
|
-
return `${performer} ${this.actionType.toLowerCase().replace('_', ' ')} para ${target}`;
|
|
48
|
-
}
|
|
49
41
|
};
|
|
50
42
|
exports.RoleAuditLog = RoleAuditLog;
|
|
51
43
|
__decorate([
|
|
@@ -90,19 +82,6 @@ __decorate([
|
|
|
90
82
|
(0, typeorm_1.Column)({ name: 'target_user_id' }),
|
|
91
83
|
__metadata("design:type", Number)
|
|
92
84
|
], RoleAuditLog.prototype, "targetUserId", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
(0, swagger_1.ApiProperty)({
|
|
95
|
-
description: 'Tipo de acción realizada',
|
|
96
|
-
enum: AuditActionType,
|
|
97
|
-
example: AuditActionType.ROLE_ASSIGNED,
|
|
98
|
-
}),
|
|
99
|
-
(0, typeorm_1.Column)({
|
|
100
|
-
type: 'enum',
|
|
101
|
-
enum: AuditActionType,
|
|
102
|
-
name: 'action_type',
|
|
103
|
-
}),
|
|
104
|
-
__metadata("design:type", String)
|
|
105
|
-
], RoleAuditLog.prototype, "actionType", void 0);
|
|
106
85
|
__decorate([
|
|
107
86
|
(0, swagger_1.ApiProperty)({
|
|
108
87
|
description: 'Descripción detallada del cambio realizado',
|
|
@@ -129,23 +108,6 @@ __decorate([
|
|
|
129
108
|
(0, typeorm_1.Column)({ type: 'json', nullable: true, name: 'new_value' }),
|
|
130
109
|
__metadata("design:type", Object)
|
|
131
110
|
], RoleAuditLog.prototype, "newValue", void 0);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, swagger_1.ApiProperty)({
|
|
134
|
-
description: 'Entidad afectada (rol, permiso, módulo)',
|
|
135
|
-
example: 'Role',
|
|
136
|
-
}),
|
|
137
|
-
(0, typeorm_1.Column)({ name: 'entity_type' }),
|
|
138
|
-
__metadata("design:type", String)
|
|
139
|
-
], RoleAuditLog.prototype, "entityType", void 0);
|
|
140
|
-
__decorate([
|
|
141
|
-
(0, swagger_1.ApiProperty)({
|
|
142
|
-
description: 'Nombre de la entidad afectada',
|
|
143
|
-
example: 'Administrador',
|
|
144
|
-
required: false,
|
|
145
|
-
}),
|
|
146
|
-
(0, typeorm_1.Column)({ nullable: true, name: 'entity_name' }),
|
|
147
|
-
__metadata("design:type", String)
|
|
148
|
-
], RoleAuditLog.prototype, "entityName", void 0);
|
|
149
111
|
__decorate([
|
|
150
112
|
(0, swagger_1.ApiProperty)({
|
|
151
113
|
description: 'Fecha y hora de creación del registro',
|
|
@@ -155,6 +117,6 @@ __decorate([
|
|
|
155
117
|
__metadata("design:type", Date)
|
|
156
118
|
], RoleAuditLog.prototype, "createdAt", void 0);
|
|
157
119
|
exports.RoleAuditLog = RoleAuditLog = __decorate([
|
|
158
|
-
(0, typeorm_1.Entity)(
|
|
120
|
+
(0, typeorm_1.Entity)()
|
|
159
121
|
], RoleAuditLog);
|
|
160
122
|
//# sourceMappingURL=role-audit-log.entity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role-audit-log.entity.js","sourceRoot":"","sources":["../../src/entities/role-audit-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0G;AAC1G,6CAA8C;AAC9C,+CAAqC;AAKrC,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,kDAA+B,CAAA;IAC/B,gDAA6B,CAAA;IAC7B,4DAAyC,CAAA;IACzC,4DAAyC,CAAA;IACzC,kEAA+C,CAAA;IAC/C,kEAA+C,CAAA;AACjD,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAKD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAOM,IAAM,YAAY,GAAlB,MAAM,YAAY;IAMvB,EAAE,CAAS;IAQX,WAAW,CAAO;IAOlB,aAAa,CAAS;IAQtB,UAAU,CAAO;IAOjB,YAAY,CAAS;
|
|
1
|
+
{"version":3,"file":"role-audit-log.entity.js","sourceRoot":"","sources":["../../src/entities/role-audit-log.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA0G;AAC1G,6CAA8C;AAC9C,+CAAqC;AAKrC,IAAY,eAOX;AAPD,WAAY,eAAe;IACzB,kDAA+B,CAAA;IAC/B,gDAA6B,CAAA;IAC7B,4DAAyC,CAAA;IACzC,4DAAyC,CAAA;IACzC,kEAA+C,CAAA;IAC/C,kEAA+C,CAAA;AACjD,CAAC,EAPW,eAAe,+BAAf,eAAe,QAO1B;AAKD,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,kCAAmB,CAAA;AACrB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAOM,IAAM,Y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AAE,CAAC;;kDACd;AAOrB;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,4CAA4C;QACzD,OAAO,EAAE,yDAAyD;KACnE,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;;iDACL;AAQpB;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,wCAAwC;QACrD,OAAO,EAAE,2CAA2C;QACpD,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;;8CAC9C;AAQd;IANC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,+DAA+D;QACxE,QAAQ,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;;8CAC9C;AAOd;IALC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,uCAAuC;QACpD,OAAO,EAAE,sBAAsB;KAChC,CAAC;IACD,IAAA,0BAAgB,EAAC,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;8BAC9B,IAAI;+CAAC;uBAlEL,YAAY;IADxB,IAAA,gBAAM,GAAE;GACI,YAAY,CAmExB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easywork-common-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1032",
|
|
4
4
|
"description": "Librería común de Easywork",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,22 +30,22 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@golevelup/nestjs-rabbitmq": "^5.7.0",
|
|
32
32
|
"@nestjs/cache-manager": "^3.0.1",
|
|
33
|
-
"@nestjs/common": "^10.4.
|
|
33
|
+
"@nestjs/common": "^10.4.19",
|
|
34
34
|
"@nestjs/swagger": "^7.4.2",
|
|
35
35
|
"@nestjs/typeorm": "^10.0.2",
|
|
36
36
|
"cache-manager": "^7.0.1",
|
|
37
37
|
"class-transformer": "^0.5.1",
|
|
38
|
-
"class-validator": "^0.14.
|
|
38
|
+
"class-validator": "^0.14.2",
|
|
39
39
|
"googleapis": "^144.0.0",
|
|
40
40
|
"nanoid": "^3.3.11",
|
|
41
41
|
"nestjs-rabbitmq": "link:@types/@golevelup/nestjs-rabbitmq",
|
|
42
42
|
"rxjs": "^7.8.2",
|
|
43
43
|
"sharp": "^0.33.5",
|
|
44
|
-
"typeorm": "^0.3.
|
|
44
|
+
"typeorm": "^0.3.25"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@rubiin/tsconfig": "^1.2.1",
|
|
48
|
-
"@types/node": "^20.
|
|
48
|
+
"@types/node": "^20.19.4",
|
|
49
49
|
"cpx-fixed": "^1.6.0",
|
|
50
50
|
"ts-loader": "^9.5.2",
|
|
51
51
|
"typescript": "^5.8.3"
|