@likewatt/models 1.104.1 → 1.105.1

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.
@@ -29,8 +29,6 @@ export declare class Consent {
29
29
  isValidateConsent?: boolean;
30
30
  dateConsentCheck?: Date;
31
31
  pdlNotCovered?: boolean;
32
- identityMismatch?: boolean;
33
- forged?: boolean;
34
32
  flagReason?: string;
35
33
  }
36
34
  export type ConsentDocument = Consent & Document;
@@ -231,24 +231,6 @@ __decorate([
231
231
  (0, class_validator_1.IsBoolean)(),
232
232
  __metadata("design:type", Boolean)
233
233
  ], Consent.prototype, "pdlNotCovered", void 0);
234
- __decorate([
235
- (0, swagger_1.ApiPropertyOptional)({
236
- description: 'Signal : même PDL déjà consenti dans le groupe avec une identité différente',
237
- }),
238
- (0, mongoose_1.Prop)({ type: Boolean, default: false }),
239
- (0, class_validator_1.IsOptional)(),
240
- (0, class_validator_1.IsBoolean)(),
241
- __metadata("design:type", Boolean)
242
- ], Consent.prototype, "identityMismatch", void 0);
243
- __decorate([
244
- (0, swagger_1.ApiPropertyOptional)({
245
- description: 'Signal : document suspecté falsifié (réservé v2)',
246
- }),
247
- (0, mongoose_1.Prop)({ type: Boolean, default: false }),
248
- (0, class_validator_1.IsOptional)(),
249
- (0, class_validator_1.IsBoolean)(),
250
- __metadata("design:type", Boolean)
251
- ], Consent.prototype, "forged", void 0);
252
234
  __decorate([
253
235
  (0, swagger_1.ApiPropertyOptional)({ description: 'Motif lisible du flag (suivi admin)' }),
254
236
  (0, mongoose_1.Prop)({ type: String, required: false }),
@@ -0,0 +1,10 @@
1
+ export declare class AdminActionLog {
2
+ id: number;
3
+ actorUserId: string;
4
+ action: string;
5
+ targetUserId?: string | null;
6
+ resourceType?: string | null;
7
+ resourceId?: string | null;
8
+ metadata?: Record<string, unknown> | null;
9
+ createdAt?: Date;
10
+ }
@@ -0,0 +1,74 @@
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.AdminActionLog = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let AdminActionLog = class AdminActionLog {
15
+ };
16
+ exports.AdminActionLog = AdminActionLog;
17
+ __decorate([
18
+ (0, typeorm_1.PrimaryGeneratedColumn)({ type: 'bigint' }),
19
+ __metadata("design:type", Number)
20
+ ], AdminActionLog.prototype, "id", void 0);
21
+ __decorate([
22
+ (0, typeorm_1.Column)({
23
+ name: 'actor_user_id',
24
+ type: 'varchar',
25
+ length: 64,
26
+ nullable: false,
27
+ }),
28
+ __metadata("design:type", String)
29
+ ], AdminActionLog.prototype, "actorUserId", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)({ type: 'varchar', length: 48, nullable: false }),
32
+ __metadata("design:type", String)
33
+ ], AdminActionLog.prototype, "action", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)({
36
+ name: 'target_user_id',
37
+ type: 'varchar',
38
+ length: 64,
39
+ nullable: true,
40
+ }),
41
+ __metadata("design:type", Object)
42
+ ], AdminActionLog.prototype, "targetUserId", void 0);
43
+ __decorate([
44
+ (0, typeorm_1.Column)({
45
+ name: 'resource_type',
46
+ type: 'varchar',
47
+ length: 32,
48
+ nullable: true,
49
+ }),
50
+ __metadata("design:type", Object)
51
+ ], AdminActionLog.prototype, "resourceType", void 0);
52
+ __decorate([
53
+ (0, typeorm_1.Column)({
54
+ name: 'resource_id',
55
+ type: 'varchar',
56
+ length: 64,
57
+ nullable: true,
58
+ }),
59
+ __metadata("design:type", Object)
60
+ ], AdminActionLog.prototype, "resourceId", void 0);
61
+ __decorate([
62
+ (0, typeorm_1.Column)({ type: 'json', nullable: true }),
63
+ __metadata("design:type", Object)
64
+ ], AdminActionLog.prototype, "metadata", void 0);
65
+ __decorate([
66
+ (0, typeorm_1.CreateDateColumn)({ name: 'created_at' }),
67
+ __metadata("design:type", Date)
68
+ ], AdminActionLog.prototype, "createdAt", void 0);
69
+ exports.AdminActionLog = AdminActionLog = __decorate([
70
+ (0, typeorm_1.Entity)('admin_action_log'),
71
+ (0, typeorm_1.Index)('idx_admin_action_actor_created', ['actorUserId', 'createdAt']),
72
+ (0, typeorm_1.Index)('idx_admin_action_target_created', ['targetUserId', 'createdAt']),
73
+ (0, typeorm_1.Index)('idx_admin_action_action_created', ['action', 'createdAt'])
74
+ ], AdminActionLog);
package/dist/index.d.ts CHANGED
@@ -30,6 +30,7 @@ export * from './core/TypeORM/TempoHistory';
30
30
  export * from './core/TypeORM/UsersFilters';
31
31
  export * from './core/TypeORM/KoncileOcr';
32
32
  export * from './core/TypeORM/WebhookOutput';
33
+ export * from './core/TypeORM/AdminActionLog';
33
34
  export { EnedisReportAcquisitionMethod, EnedisReportOperationType, ExtractionSens, ExtractionType, ExtractionSource, } from './core/TypeORM/EnedisReportHistory';
34
35
  export * from './core/internal/enums';
35
36
  export * from './core/enums/BuildingDataStatus';
package/dist/index.js CHANGED
@@ -49,6 +49,7 @@ __exportStar(require("./core/TypeORM/TempoHistory"), exports);
49
49
  __exportStar(require("./core/TypeORM/UsersFilters"), exports);
50
50
  __exportStar(require("./core/TypeORM/KoncileOcr"), exports);
51
51
  __exportStar(require("./core/TypeORM/WebhookOutput"), exports);
52
+ __exportStar(require("./core/TypeORM/AdminActionLog"), exports);
52
53
  // TypeORM enums
53
54
  var EnedisReportHistory_1 = require("./core/TypeORM/EnedisReportHistory");
54
55
  Object.defineProperty(exports, "EnedisReportAcquisitionMethod", { enumerable: true, get: function () { return EnedisReportHistory_1.EnedisReportAcquisitionMethod; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.104.1",
3
+ "version": "1.105.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {