@likewatt/models 1.0.83 → 1.0.85
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 +15 -1
- package/dist/core/User.js +44 -10
- package/dist/frontend/User.types.d.ts +3 -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
|
|
@@ -49,6 +62,7 @@ export declare class User {
|
|
|
49
62
|
demo: boolean;
|
|
50
63
|
emailVerified: boolean;
|
|
51
64
|
principal: boolean;
|
|
65
|
+
principalUser?: string;
|
|
52
66
|
type?: string;
|
|
53
67
|
domain?: string;
|
|
54
68
|
license?: string;
|
|
@@ -59,7 +73,6 @@ export declare class User {
|
|
|
59
73
|
maxUsers?: number;
|
|
60
74
|
trackerOkd: boolean;
|
|
61
75
|
isSignUpEmailSent: boolean;
|
|
62
|
-
readOnly: boolean;
|
|
63
76
|
isAdminEmailSent: boolean;
|
|
64
77
|
automaticRenew: boolean;
|
|
65
78
|
optimNumber?: number;
|
|
@@ -70,6 +83,7 @@ export declare class User {
|
|
|
70
83
|
optim_scenario_consumer: string[];
|
|
71
84
|
synthesis_fi: string[];
|
|
72
85
|
siteTag: SiteTag;
|
|
86
|
+
rights: Rights;
|
|
73
87
|
_createdAt?: string;
|
|
74
88
|
_lastConnected?: string;
|
|
75
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
|
|
@@ -260,6 +285,16 @@ __decorate([
|
|
|
260
285
|
(0, class_validator_1.IsBoolean)(),
|
|
261
286
|
__metadata("design:type", Boolean)
|
|
262
287
|
], User.prototype, "principal", void 0);
|
|
288
|
+
__decorate([
|
|
289
|
+
(0, swagger_1.ApiProperty)({
|
|
290
|
+
description: 'Identifiant de l’utilisateur principal (si compte secondaire)',
|
|
291
|
+
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
292
|
+
}),
|
|
293
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
294
|
+
(0, class_validator_1.IsOptional)(),
|
|
295
|
+
(0, class_validator_1.IsString)(),
|
|
296
|
+
__metadata("design:type", String)
|
|
297
|
+
], User.prototype, "principalUser", void 0);
|
|
263
298
|
__decorate([
|
|
264
299
|
(0, swagger_1.ApiProperty)({
|
|
265
300
|
description: 'Type de l’utilisateur',
|
|
@@ -358,15 +393,6 @@ __decorate([
|
|
|
358
393
|
(0, class_validator_1.IsBoolean)(),
|
|
359
394
|
__metadata("design:type", Boolean)
|
|
360
395
|
], User.prototype, "isSignUpEmailSent", void 0);
|
|
361
|
-
__decorate([
|
|
362
|
-
(0, swagger_1.ApiProperty)({
|
|
363
|
-
description: 'Lecture seule (interdit de modifier les éléments)',
|
|
364
|
-
example: false,
|
|
365
|
-
}),
|
|
366
|
-
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
367
|
-
(0, class_validator_1.IsBoolean)(),
|
|
368
|
-
__metadata("design:type", Boolean)
|
|
369
|
-
], User.prototype, "readOnly", void 0);
|
|
370
396
|
__decorate([
|
|
371
397
|
(0, swagger_1.ApiProperty)({
|
|
372
398
|
description: 'E-mail admin envoyé',
|
|
@@ -473,6 +499,14 @@ __decorate([
|
|
|
473
499
|
(0, mongoose_2.Prop)({ type: exports.SiteTagSchema, _id: false }),
|
|
474
500
|
__metadata("design:type", SiteTag)
|
|
475
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);
|
|
476
510
|
__decorate([
|
|
477
511
|
(0, swagger_1.ApiProperty)({
|
|
478
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;
|
|
@@ -20,13 +21,13 @@ export interface User {
|
|
|
20
21
|
demo: boolean;
|
|
21
22
|
emailVerified: boolean;
|
|
22
23
|
principal: boolean;
|
|
24
|
+
principalUser?: string;
|
|
23
25
|
type?: string;
|
|
24
26
|
domain?: string;
|
|
25
27
|
license?: string;
|
|
26
28
|
licenseId?: string;
|
|
27
29
|
allowedNumberOfSites?: number;
|
|
28
30
|
maxUsers?: number;
|
|
29
|
-
readonly: boolean;
|
|
30
31
|
trackerOkd: boolean;
|
|
31
32
|
isSignUpEmailSent: boolean;
|
|
32
33
|
isAdminEmailSent: boolean;
|
|
@@ -38,6 +39,7 @@ export interface User {
|
|
|
38
39
|
optim_scenario_consumer: string[];
|
|
39
40
|
synthesis_fi: string[];
|
|
40
41
|
siteTag: SiteTag;
|
|
42
|
+
rights?: Rights;
|
|
41
43
|
_createdAt?: string;
|
|
42
44
|
_lastConnected?: string;
|
|
43
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; } });
|