@likewatt/models 1.0.84 → 1.0.86
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/dist/core/User.d.ts +14 -1
- package/dist/core/User.js +34 -10
- package/dist/frontend/User.types.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/core/User.d.ts
CHANGED
|
@@ -17,6 +17,19 @@ export declare const SiteTagSchema: import("mongoose").Schema<SiteTag, import("m
|
|
|
17
17
|
} & {
|
|
18
18
|
__v: number;
|
|
19
19
|
}>;
|
|
20
|
+
export declare class Rights {
|
|
21
|
+
deleteSite: boolean;
|
|
22
|
+
deleteSites: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const RightsSchema: import("mongoose").Schema<Rights, import("mongoose").Model<Rights, any, any, any, Document<unknown, any, Rights, any, {}> & Rights & {
|
|
25
|
+
_id: Types.ObjectId;
|
|
26
|
+
} & {
|
|
27
|
+
__v: number;
|
|
28
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Rights, Document<unknown, {}, import("mongoose").FlatRecord<Rights>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Rights> & {
|
|
29
|
+
_id: Types.ObjectId;
|
|
30
|
+
} & {
|
|
31
|
+
__v: number;
|
|
32
|
+
}>;
|
|
20
33
|
/**
|
|
21
34
|
* Représente un utilisateur dans le système.
|
|
22
35
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -60,7 +73,6 @@ export declare class User {
|
|
|
60
73
|
maxUsers?: number;
|
|
61
74
|
trackerOkd: boolean;
|
|
62
75
|
isSignUpEmailSent: boolean;
|
|
63
|
-
readOnly: boolean;
|
|
64
76
|
isAdminEmailSent: boolean;
|
|
65
77
|
automaticRenew: boolean;
|
|
66
78
|
optimNumber?: number;
|
|
@@ -71,6 +83,7 @@ export declare class User {
|
|
|
71
83
|
optim_scenario_consumer: string[];
|
|
72
84
|
synthesis_fi: string[];
|
|
73
85
|
siteTag: SiteTag;
|
|
86
|
+
rights: Rights;
|
|
74
87
|
_createdAt?: string;
|
|
75
88
|
_lastConnected?: string;
|
|
76
89
|
}
|
package/dist/core/User.js
CHANGED
|
@@ -9,7 +9,7 @@ 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.UserSchema = exports.User = exports.SiteTagSchema = exports.SiteTag = void 0;
|
|
12
|
+
exports.UserSchema = exports.User = exports.RightsSchema = exports.Rights = exports.SiteTagSchema = exports.SiteTag = void 0;
|
|
13
13
|
const mongoose_1 = require("mongoose");
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
15
|
const mongoose_2 = require("@nestjs/mongoose");
|
|
@@ -44,6 +44,31 @@ exports.SiteTag = SiteTag = __decorate([
|
|
|
44
44
|
(0, mongoose_2.Schema)({ _id: false })
|
|
45
45
|
], SiteTag);
|
|
46
46
|
exports.SiteTagSchema = mongoose_2.SchemaFactory.createForClass(SiteTag);
|
|
47
|
+
let Rights = class Rights {
|
|
48
|
+
};
|
|
49
|
+
exports.Rights = Rights;
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, swagger_1.ApiProperty)({
|
|
52
|
+
description: "Indique si l'utilisateur peut supprimer un site",
|
|
53
|
+
example: true,
|
|
54
|
+
}),
|
|
55
|
+
(0, mongoose_2.Prop)({ type: Boolean, required: true }),
|
|
56
|
+
(0, class_validator_1.IsBoolean)(),
|
|
57
|
+
__metadata("design:type", Boolean)
|
|
58
|
+
], Rights.prototype, "deleteSite", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, swagger_1.ApiProperty)({
|
|
61
|
+
description: "Indique si l'utilisateur peut supprimer des sites",
|
|
62
|
+
example: true,
|
|
63
|
+
}),
|
|
64
|
+
(0, mongoose_2.Prop)({ type: Boolean, required: true }),
|
|
65
|
+
(0, class_validator_1.IsBoolean)(),
|
|
66
|
+
__metadata("design:type", Boolean)
|
|
67
|
+
], Rights.prototype, "deleteSites", void 0);
|
|
68
|
+
exports.Rights = Rights = __decorate([
|
|
69
|
+
(0, mongoose_2.Schema)({ _id: false })
|
|
70
|
+
], Rights);
|
|
71
|
+
exports.RightsSchema = mongoose_2.SchemaFactory.createForClass(Rights);
|
|
47
72
|
/**
|
|
48
73
|
* Représente un utilisateur dans le système.
|
|
49
74
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -368,15 +393,6 @@ __decorate([
|
|
|
368
393
|
(0, class_validator_1.IsBoolean)(),
|
|
369
394
|
__metadata("design:type", Boolean)
|
|
370
395
|
], User.prototype, "isSignUpEmailSent", void 0);
|
|
371
|
-
__decorate([
|
|
372
|
-
(0, swagger_1.ApiProperty)({
|
|
373
|
-
description: 'Lecture seule (interdit de modifier les éléments)',
|
|
374
|
-
example: false,
|
|
375
|
-
}),
|
|
376
|
-
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
377
|
-
(0, class_validator_1.IsBoolean)(),
|
|
378
|
-
__metadata("design:type", Boolean)
|
|
379
|
-
], User.prototype, "readOnly", void 0);
|
|
380
396
|
__decorate([
|
|
381
397
|
(0, swagger_1.ApiProperty)({
|
|
382
398
|
description: 'E-mail admin envoyé',
|
|
@@ -483,6 +499,14 @@ __decorate([
|
|
|
483
499
|
(0, mongoose_2.Prop)({ type: exports.SiteTagSchema, _id: false }),
|
|
484
500
|
__metadata("design:type", SiteTag)
|
|
485
501
|
], User.prototype, "siteTag", void 0);
|
|
502
|
+
__decorate([
|
|
503
|
+
(0, swagger_1.ApiProperty)({
|
|
504
|
+
description: 'Droits spécifiques de l’utilisateur',
|
|
505
|
+
type: () => Rights,
|
|
506
|
+
}),
|
|
507
|
+
(0, mongoose_2.Prop)({ type: exports.RightsSchema, _id: false }),
|
|
508
|
+
__metadata("design:type", Rights)
|
|
509
|
+
], User.prototype, "rights", void 0);
|
|
486
510
|
__decorate([
|
|
487
511
|
(0, swagger_1.ApiProperty)({
|
|
488
512
|
description: 'Date interne de création (legacy)',
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Rights } from '../core/User';
|
|
1
2
|
import { Folder } from './Folder.types';
|
|
2
3
|
export interface SiteTag {
|
|
3
4
|
hasConsumerTag: boolean;
|
|
@@ -27,7 +28,6 @@ export interface User {
|
|
|
27
28
|
licenseId?: string;
|
|
28
29
|
allowedNumberOfSites?: number;
|
|
29
30
|
maxUsers?: number;
|
|
30
|
-
readonly: boolean;
|
|
31
31
|
trackerOkd: boolean;
|
|
32
32
|
isSignUpEmailSent: boolean;
|
|
33
33
|
isAdminEmailSent: boolean;
|
|
@@ -39,6 +39,7 @@ export interface User {
|
|
|
39
39
|
optim_scenario_consumer: string[];
|
|
40
40
|
synthesis_fi: string[];
|
|
41
41
|
siteTag: SiteTag;
|
|
42
|
+
rights?: Rights;
|
|
42
43
|
_createdAt?: string;
|
|
43
44
|
_lastConnected?: string;
|
|
44
45
|
createdAt?: Date | string;
|
package/dist/index.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export * from './core/TypeORM/SiteFilter';
|
|
|
18
18
|
export * from './core/TypeORM/SpotHistory';
|
|
19
19
|
export * from './core/TypeORM/TempoHistory';
|
|
20
20
|
export * from './core/TypeORM/UsersFilters';
|
|
21
|
+
export * from './core/TypeORM/WebhookOutput';
|
|
21
22
|
export { EnedisReportAcquisitionMethod, EnedisReportOperationType, } from './core/TypeORM/EnedisReportHistory';
|
|
22
23
|
export * from './core/internal/enums';
|
|
23
24
|
export * from './core/enums/FileType';
|
package/dist/index.js
CHANGED
|
@@ -59,6 +59,7 @@ __exportStar(require("./core/TypeORM/SiteFilter"), exports);
|
|
|
59
59
|
__exportStar(require("./core/TypeORM/SpotHistory"), exports);
|
|
60
60
|
__exportStar(require("./core/TypeORM/TempoHistory"), exports);
|
|
61
61
|
__exportStar(require("./core/TypeORM/UsersFilters"), exports);
|
|
62
|
+
__exportStar(require("./core/TypeORM/WebhookOutput"), exports);
|
|
62
63
|
// TypeORM enums
|
|
63
64
|
var EnedisReportHistory_1 = require("./core/TypeORM/EnedisReportHistory");
|
|
64
65
|
Object.defineProperty(exports, "EnedisReportAcquisitionMethod", { enumerable: true, get: function () { return EnedisReportHistory_1.EnedisReportAcquisitionMethod; } });
|