@likewatt/models 1.0.23 → 1.0.25
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/CollectiveSite.d.ts +8 -8
- package/dist/core/CollectiveSite.js +11 -6
- package/dist/core/Scenario.d.ts +1 -1
- package/dist/core/Scenario.js +7 -2
- package/dist/core/Site.d.ts +6 -6
- package/dist/core/Site.js +12 -10
- package/dist/core/User.d.ts +6 -6
- package/dist/core/User.js +45 -43
- package/dist/core/internal/folder.model.d.ts +13 -0
- package/dist/core/internal/folder.model.js +34 -0
- package/package.json +1 -1
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { Document } from 'mongoose';
|
|
1
|
+
import { Document, Types } from 'mongoose';
|
|
2
2
|
import { SiteType } from './internal/enums';
|
|
3
3
|
export type CollectiveSiteDocument = CollectiveSite & Document;
|
|
4
4
|
export declare class CollectiveSite {
|
|
5
|
+
readonly _id: Types.ObjectId;
|
|
5
6
|
_createdAt: string;
|
|
6
7
|
_lastModified: string;
|
|
7
8
|
addressGeocode: number[];
|
|
@@ -11,7 +12,6 @@ export declare class CollectiveSite {
|
|
|
11
12
|
initialOwner: string;
|
|
12
13
|
name: string;
|
|
13
14
|
addressDepartementNum: number;
|
|
14
|
-
id: string;
|
|
15
15
|
addressZipCode: string;
|
|
16
16
|
addressCity: string;
|
|
17
17
|
addressDepartement: string;
|
|
@@ -21,12 +21,12 @@ export declare class CollectiveSite {
|
|
|
21
21
|
timezone: number;
|
|
22
22
|
sites: string[];
|
|
23
23
|
}
|
|
24
|
-
export declare const CollectiveSiteSchema: import("mongoose").Schema<CollectiveSite, import("mongoose").Model<CollectiveSite, any, any, any, Document<unknown, any, CollectiveSite, any> & CollectiveSite & {
|
|
25
|
-
_id:
|
|
26
|
-
} & {
|
|
24
|
+
export declare const CollectiveSiteSchema: import("mongoose").Schema<CollectiveSite, import("mongoose").Model<CollectiveSite, any, any, any, Document<unknown, any, CollectiveSite, any> & CollectiveSite & Required<{
|
|
25
|
+
_id: Types.ObjectId;
|
|
26
|
+
}> & {
|
|
27
27
|
__v: number;
|
|
28
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CollectiveSite, Document<unknown, {}, import("mongoose").FlatRecord<CollectiveSite>, {}> & import("mongoose").FlatRecord<CollectiveSite> & {
|
|
29
|
-
_id:
|
|
30
|
-
} & {
|
|
28
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CollectiveSite, Document<unknown, {}, import("mongoose").FlatRecord<CollectiveSite>, {}> & import("mongoose").FlatRecord<CollectiveSite> & Required<{
|
|
29
|
+
_id: Types.ObjectId;
|
|
30
|
+
}> & {
|
|
31
31
|
__v: number;
|
|
32
32
|
}>;
|
|
@@ -12,11 +12,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.CollectiveSiteSchema = exports.CollectiveSite = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const mongoose_2 = require("mongoose");
|
|
15
16
|
const class_validator_1 = require("class-validator");
|
|
16
17
|
const enums_1 = require("./internal/enums");
|
|
17
18
|
let CollectiveSite = class CollectiveSite {
|
|
18
19
|
};
|
|
19
20
|
exports.CollectiveSite = CollectiveSite;
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, swagger_1.ApiProperty)({
|
|
23
|
+
description: 'Identifiant unique MongoDB',
|
|
24
|
+
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
25
|
+
type: mongoose_2.Types.ObjectId,
|
|
26
|
+
readOnly: true,
|
|
27
|
+
}),
|
|
28
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
29
|
+
], CollectiveSite.prototype, "_id", void 0);
|
|
20
30
|
__decorate([
|
|
21
31
|
(0, swagger_1.ApiProperty)(),
|
|
22
32
|
(0, mongoose_1.Prop)({ required: true }),
|
|
@@ -71,12 +81,6 @@ __decorate([
|
|
|
71
81
|
(0, class_validator_1.IsNumber)(),
|
|
72
82
|
__metadata("design:type", Number)
|
|
73
83
|
], CollectiveSite.prototype, "addressDepartementNum", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
(0, swagger_1.ApiProperty)(),
|
|
76
|
-
(0, mongoose_1.Prop)({ required: true }),
|
|
77
|
-
(0, class_validator_1.IsString)(),
|
|
78
|
-
__metadata("design:type", String)
|
|
79
|
-
], CollectiveSite.prototype, "id", void 0);
|
|
80
84
|
__decorate([
|
|
81
85
|
(0, swagger_1.ApiProperty)(),
|
|
82
86
|
(0, mongoose_1.Prop)({ required: true }),
|
|
@@ -127,6 +131,7 @@ __decorate([
|
|
|
127
131
|
], CollectiveSite.prototype, "sites", void 0);
|
|
128
132
|
exports.CollectiveSite = CollectiveSite = __decorate([
|
|
129
133
|
(0, mongoose_1.Schema)({
|
|
134
|
+
id: false,
|
|
130
135
|
toJSON: { virtuals: true, versionKey: false },
|
|
131
136
|
toObject: { virtuals: true, versionKey: false },
|
|
132
137
|
})
|
package/dist/core/Scenario.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const ConfigSiteSchema: MSchema<ConfigSite, import("mongoose").Mo
|
|
|
46
46
|
__v: number;
|
|
47
47
|
}>;
|
|
48
48
|
export declare class Scenario {
|
|
49
|
-
_id: Types.ObjectId;
|
|
49
|
+
readonly _id: Types.ObjectId;
|
|
50
50
|
discountRate?: number;
|
|
51
51
|
objectives: Objective[];
|
|
52
52
|
name: string;
|
package/dist/core/Scenario.js
CHANGED
|
@@ -131,8 +131,12 @@ let Scenario = class Scenario {
|
|
|
131
131
|
};
|
|
132
132
|
exports.Scenario = Scenario;
|
|
133
133
|
__decorate([
|
|
134
|
-
(0, swagger_1.ApiProperty)({
|
|
135
|
-
|
|
134
|
+
(0, swagger_1.ApiProperty)({
|
|
135
|
+
description: 'Identifiant unique MongoDB',
|
|
136
|
+
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
137
|
+
type: mongoose_2.Types.ObjectId,
|
|
138
|
+
readOnly: true,
|
|
139
|
+
}),
|
|
136
140
|
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
137
141
|
], Scenario.prototype, "_id", void 0);
|
|
138
142
|
__decorate([
|
|
@@ -190,6 +194,7 @@ __decorate([
|
|
|
190
194
|
], Scenario.prototype, "createdAt", void 0);
|
|
191
195
|
exports.Scenario = Scenario = __decorate([
|
|
192
196
|
(0, mongoose_1.Schema)({
|
|
197
|
+
id: false,
|
|
193
198
|
toJSON: { virtuals: true, versionKey: false },
|
|
194
199
|
toObject: { virtuals: true, versionKey: false },
|
|
195
200
|
})
|
package/dist/core/Site.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { DataSourceHistory } from './internal/data-source-history';
|
|
|
11
11
|
import { ConsumptionIndexes } from './internal/consumption-indexes';
|
|
12
12
|
import { EnergyPriceTempo } from './internal/energy-price-tempo.model';
|
|
13
13
|
export declare class Site {
|
|
14
|
+
readonly _id: Types.ObjectId;
|
|
14
15
|
country: string;
|
|
15
16
|
energyPrices: EnergyPrice[];
|
|
16
17
|
purchaseAreaOfTension: string;
|
|
@@ -29,7 +30,6 @@ export declare class Site {
|
|
|
29
30
|
isC_AND_I: boolean;
|
|
30
31
|
appUrl: string;
|
|
31
32
|
addressDepartementNum: number;
|
|
32
|
-
id: string;
|
|
33
33
|
addressZipCode: string;
|
|
34
34
|
subscribedPowers: EnergyPrice[];
|
|
35
35
|
addressCity: string;
|
|
@@ -42,7 +42,7 @@ export declare class Site {
|
|
|
42
42
|
scenario?: Types.ObjectId;
|
|
43
43
|
user: string;
|
|
44
44
|
profile: Profiles;
|
|
45
|
-
collectiveSiteId?:
|
|
45
|
+
collectiveSiteId?: Types.ObjectId;
|
|
46
46
|
folder?: string;
|
|
47
47
|
initialOwner: string;
|
|
48
48
|
isExtractingData?: boolean;
|
|
@@ -96,12 +96,12 @@ export declare class Site {
|
|
|
96
96
|
TMYstatus: number;
|
|
97
97
|
}
|
|
98
98
|
export type SiteDocument = Site & Document;
|
|
99
|
-
export declare const SiteSchema: import("mongoose").Schema<Site, import("mongoose").Model<Site, any, any, any, Document<unknown, any, Site, any> & Site & {
|
|
99
|
+
export declare const SiteSchema: import("mongoose").Schema<Site, import("mongoose").Model<Site, any, any, any, Document<unknown, any, Site, any> & Site & Required<{
|
|
100
100
|
_id: Types.ObjectId;
|
|
101
|
-
} & {
|
|
101
|
+
}> & {
|
|
102
102
|
__v: number;
|
|
103
|
-
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Site, Document<unknown, {}, import("mongoose").FlatRecord<Site>, {}> & import("mongoose").FlatRecord<Site> & {
|
|
103
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Site, Document<unknown, {}, import("mongoose").FlatRecord<Site>, {}> & import("mongoose").FlatRecord<Site> & Required<{
|
|
104
104
|
_id: Types.ObjectId;
|
|
105
|
-
} & {
|
|
105
|
+
}> & {
|
|
106
106
|
__v: number;
|
|
107
107
|
}>;
|
package/dist/core/Site.js
CHANGED
|
@@ -28,6 +28,15 @@ const energy_price_tempo_model_1 = require("./internal/energy-price-tempo.model"
|
|
|
28
28
|
let Site = class Site {
|
|
29
29
|
};
|
|
30
30
|
exports.Site = Site;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, swagger_1.ApiProperty)({
|
|
33
|
+
description: 'Identifiant unique MongoDB',
|
|
34
|
+
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
35
|
+
type: mongoose_2.Types.ObjectId,
|
|
36
|
+
readOnly: true,
|
|
37
|
+
}),
|
|
38
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
39
|
+
], Site.prototype, "_id", void 0);
|
|
31
40
|
__decorate([
|
|
32
41
|
(0, swagger_1.ApiProperty)(),
|
|
33
42
|
(0, mongoose_1.Prop)({ required: true }),
|
|
@@ -135,13 +144,6 @@ __decorate([
|
|
|
135
144
|
(0, class_validator_1.IsNumber)(),
|
|
136
145
|
__metadata("design:type", Number)
|
|
137
146
|
], Site.prototype, "addressDepartementNum", void 0);
|
|
138
|
-
__decorate([
|
|
139
|
-
(0, swagger_1.ApiPropertyOptional)(),
|
|
140
|
-
(0, mongoose_1.Prop)(),
|
|
141
|
-
(0, class_validator_1.IsOptional)(),
|
|
142
|
-
(0, class_validator_1.IsString)(),
|
|
143
|
-
__metadata("design:type", String)
|
|
144
|
-
], Site.prototype, "id", void 0);
|
|
145
147
|
__decorate([
|
|
146
148
|
(0, swagger_1.ApiProperty)(),
|
|
147
149
|
(0, mongoose_1.Prop)({ required: true }),
|
|
@@ -217,10 +219,9 @@ __decorate([
|
|
|
217
219
|
], Site.prototype, "profile", void 0);
|
|
218
220
|
__decorate([
|
|
219
221
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
220
|
-
(0, mongoose_1.Prop)(),
|
|
222
|
+
(0, mongoose_1.Prop)({ type: mongoose_2.Types.ObjectId, ref: 'CollectiveSite' }),
|
|
221
223
|
(0, class_validator_1.IsOptional)(),
|
|
222
|
-
(
|
|
223
|
-
__metadata("design:type", String)
|
|
224
|
+
__metadata("design:type", mongoose_2.Types.ObjectId)
|
|
224
225
|
], Site.prototype, "collectiveSiteId", void 0);
|
|
225
226
|
__decorate([
|
|
226
227
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
@@ -529,6 +530,7 @@ __decorate([
|
|
|
529
530
|
], Site.prototype, "TMYstatus", void 0);
|
|
530
531
|
exports.Site = Site = __decorate([
|
|
531
532
|
(0, mongoose_1.Schema)({
|
|
533
|
+
id: false,
|
|
532
534
|
toJSON: { virtuals: true, versionKey: false },
|
|
533
535
|
toObject: { virtuals: true, versionKey: false },
|
|
534
536
|
})
|
package/dist/core/User.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Document } from 'mongoose';
|
|
1
|
+
import { Document, Types } from 'mongoose';
|
|
2
2
|
/**
|
|
3
3
|
* Sous-schéma pour les tags liés au site de l’utilisateur.
|
|
4
4
|
*/
|
|
@@ -6,11 +6,11 @@ export declare class SiteTag {
|
|
|
6
6
|
hasConsumerTag: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare const SiteTagSchema: import("mongoose").Schema<SiteTag, import("mongoose").Model<SiteTag, any, any, any, Document<unknown, any, SiteTag, any> & SiteTag & {
|
|
9
|
-
_id:
|
|
9
|
+
_id: Types.ObjectId;
|
|
10
10
|
} & {
|
|
11
11
|
__v: number;
|
|
12
12
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SiteTag, Document<unknown, {}, import("mongoose").FlatRecord<SiteTag>, {}> & import("mongoose").FlatRecord<SiteTag> & {
|
|
13
|
-
_id:
|
|
13
|
+
_id: Types.ObjectId;
|
|
14
14
|
} & {
|
|
15
15
|
__v: number;
|
|
16
16
|
}>;
|
|
@@ -22,7 +22,7 @@ export declare const SiteTagSchema: import("mongoose").Schema<SiteTag, import("m
|
|
|
22
22
|
* - class-validator rules : validation runtime
|
|
23
23
|
*/
|
|
24
24
|
export declare class User {
|
|
25
|
-
_id:
|
|
25
|
+
_id: Types.ObjectId;
|
|
26
26
|
email: string;
|
|
27
27
|
password: string;
|
|
28
28
|
firstname: string;
|
|
@@ -59,11 +59,11 @@ export declare class User {
|
|
|
59
59
|
}
|
|
60
60
|
export type UserDocument = User & Document;
|
|
61
61
|
export declare const UserSchema: import("mongoose").Schema<User, import("mongoose").Model<User, any, any, any, Document<unknown, any, User, any> & User & Required<{
|
|
62
|
-
_id:
|
|
62
|
+
_id: Types.ObjectId;
|
|
63
63
|
}> & {
|
|
64
64
|
__v: number;
|
|
65
65
|
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, User, Document<unknown, {}, import("mongoose").FlatRecord<User>, {}> & import("mongoose").FlatRecord<User> & Required<{
|
|
66
|
-
_id:
|
|
66
|
+
_id: Types.ObjectId;
|
|
67
67
|
}> & {
|
|
68
68
|
__v: number;
|
|
69
69
|
}>;
|
package/dist/core/User.js
CHANGED
|
@@ -10,8 +10,9 @@ var __metadata = (this && this.__metadata) || function (k, v) {
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.UserSchema = exports.User = exports.SiteTagSchema = exports.SiteTag = void 0;
|
|
13
|
+
const mongoose_1 = require("mongoose");
|
|
13
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
14
|
-
const
|
|
15
|
+
const mongoose_2 = require("@nestjs/mongoose");
|
|
15
16
|
const class_validator_1 = require("class-validator");
|
|
16
17
|
/**
|
|
17
18
|
* Sous-schéma pour les tags liés au site de l’utilisateur.
|
|
@@ -24,14 +25,14 @@ __decorate([
|
|
|
24
25
|
description: 'Indique si le site possède un tag consommateur',
|
|
25
26
|
example: true,
|
|
26
27
|
}),
|
|
27
|
-
(0,
|
|
28
|
+
(0, mongoose_2.Prop)({ type: Boolean, required: true }),
|
|
28
29
|
(0, class_validator_1.IsBoolean)(),
|
|
29
30
|
__metadata("design:type", Boolean)
|
|
30
31
|
], SiteTag.prototype, "hasConsumerTag", void 0);
|
|
31
32
|
exports.SiteTag = SiteTag = __decorate([
|
|
32
|
-
(0,
|
|
33
|
+
(0, mongoose_2.Schema)({ _id: false })
|
|
33
34
|
], SiteTag);
|
|
34
|
-
exports.SiteTagSchema =
|
|
35
|
+
exports.SiteTagSchema = mongoose_2.SchemaFactory.createForClass(SiteTag);
|
|
35
36
|
/**
|
|
36
37
|
* Représente un utilisateur dans le système.
|
|
37
38
|
* - @Schema/timestamps : gère createdAt et updatedAt automatiques
|
|
@@ -46,12 +47,10 @@ __decorate([
|
|
|
46
47
|
(0, swagger_1.ApiProperty)({
|
|
47
48
|
description: 'Identifiant unique MongoDB',
|
|
48
49
|
example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
|
|
49
|
-
type:
|
|
50
|
+
type: mongoose_1.Types.ObjectId,
|
|
50
51
|
readOnly: true,
|
|
51
52
|
}),
|
|
52
|
-
(
|
|
53
|
-
(0, class_validator_1.IsString)(),
|
|
54
|
-
__metadata("design:type", String)
|
|
53
|
+
__metadata("design:type", mongoose_1.Types.ObjectId)
|
|
55
54
|
], User.prototype, "_id", void 0);
|
|
56
55
|
__decorate([
|
|
57
56
|
(0, swagger_1.ApiProperty)({
|
|
@@ -59,7 +58,7 @@ __decorate([
|
|
|
59
58
|
example: 'firstname.lastname@email.com',
|
|
60
59
|
format: 'email',
|
|
61
60
|
}),
|
|
62
|
-
(0,
|
|
61
|
+
(0, mongoose_2.Prop)({ type: String, required: true, unique: true }),
|
|
63
62
|
(0, class_validator_1.IsEmail)(),
|
|
64
63
|
__metadata("design:type", String)
|
|
65
64
|
], User.prototype, "email", void 0);
|
|
@@ -69,7 +68,7 @@ __decorate([
|
|
|
69
68
|
writeOnly: true,
|
|
70
69
|
minLength: 8,
|
|
71
70
|
}),
|
|
72
|
-
(0,
|
|
71
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
73
72
|
(0, class_validator_1.IsString)(),
|
|
74
73
|
__metadata("design:type", String)
|
|
75
74
|
], User.prototype, "password", void 0);
|
|
@@ -78,7 +77,7 @@ __decorate([
|
|
|
78
77
|
description: 'Prénom de l’utilisateur',
|
|
79
78
|
example: 'Jean',
|
|
80
79
|
}),
|
|
81
|
-
(0,
|
|
80
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
82
81
|
(0, class_validator_1.IsString)(),
|
|
83
82
|
__metadata("design:type", String)
|
|
84
83
|
], User.prototype, "firstname", void 0);
|
|
@@ -87,7 +86,7 @@ __decorate([
|
|
|
87
86
|
description: 'Nom de famille de l’utilisateur',
|
|
88
87
|
example: 'PAUL',
|
|
89
88
|
}),
|
|
90
|
-
(0,
|
|
89
|
+
(0, mongoose_2.Prop)({ type: String, required: true }),
|
|
91
90
|
(0, class_validator_1.IsString)(),
|
|
92
91
|
__metadata("design:type", String)
|
|
93
92
|
], User.prototype, "lastname", void 0);
|
|
@@ -96,7 +95,7 @@ __decorate([
|
|
|
96
95
|
description: 'Numéro de téléphone',
|
|
97
96
|
example: '0606060606',
|
|
98
97
|
}),
|
|
99
|
-
(0,
|
|
98
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
100
99
|
(0, class_validator_1.IsOptional)(),
|
|
101
100
|
(0, class_validator_1.IsString)(),
|
|
102
101
|
__metadata("design:type", String)
|
|
@@ -106,7 +105,7 @@ __decorate([
|
|
|
106
105
|
description: 'Nom de la société',
|
|
107
106
|
example: 'LIKEWATT',
|
|
108
107
|
}),
|
|
109
|
-
(0,
|
|
108
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
110
109
|
(0, class_validator_1.IsOptional)(),
|
|
111
110
|
(0, class_validator_1.IsString)(),
|
|
112
111
|
__metadata("design:type", String)
|
|
@@ -116,7 +115,7 @@ __decorate([
|
|
|
116
115
|
description: 'Adresse postale',
|
|
117
116
|
example: '1 rue de la République',
|
|
118
117
|
}),
|
|
119
|
-
(0,
|
|
118
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
120
119
|
(0, class_validator_1.IsOptional)(),
|
|
121
120
|
(0, class_validator_1.IsString)(),
|
|
122
121
|
__metadata("design:type", String)
|
|
@@ -126,7 +125,7 @@ __decorate([
|
|
|
126
125
|
description: 'Ville de l’adresse',
|
|
127
126
|
example: 'VILLEURBANNE',
|
|
128
127
|
}),
|
|
129
|
-
(0,
|
|
128
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
130
129
|
(0, class_validator_1.IsOptional)(),
|
|
131
130
|
(0, class_validator_1.IsString)(),
|
|
132
131
|
__metadata("design:type", String)
|
|
@@ -136,7 +135,7 @@ __decorate([
|
|
|
136
135
|
description: 'Code postal',
|
|
137
136
|
example: '69100',
|
|
138
137
|
}),
|
|
139
|
-
(0,
|
|
138
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
140
139
|
(0, class_validator_1.IsOptional)(),
|
|
141
140
|
(0, class_validator_1.IsString)(),
|
|
142
141
|
__metadata("design:type", String)
|
|
@@ -146,7 +145,7 @@ __decorate([
|
|
|
146
145
|
description: 'Rôle administrateur',
|
|
147
146
|
example: true,
|
|
148
147
|
}),
|
|
149
|
-
(0,
|
|
148
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
150
149
|
(0, class_validator_1.IsBoolean)(),
|
|
151
150
|
__metadata("design:type", Boolean)
|
|
152
151
|
], User.prototype, "isAdmin", void 0);
|
|
@@ -155,7 +154,7 @@ __decorate([
|
|
|
155
154
|
description: 'Rôle manager',
|
|
156
155
|
example: false,
|
|
157
156
|
}),
|
|
158
|
-
(0,
|
|
157
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
159
158
|
(0, class_validator_1.IsBoolean)(),
|
|
160
159
|
__metadata("design:type", Boolean)
|
|
161
160
|
], User.prototype, "isManager", void 0);
|
|
@@ -164,7 +163,7 @@ __decorate([
|
|
|
164
163
|
description: 'Compte actif',
|
|
165
164
|
example: true,
|
|
166
165
|
}),
|
|
167
|
-
(0,
|
|
166
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: true }),
|
|
168
167
|
(0, class_validator_1.IsBoolean)(),
|
|
169
168
|
__metadata("design:type", Boolean)
|
|
170
169
|
], User.prototype, "active", void 0);
|
|
@@ -173,7 +172,7 @@ __decorate([
|
|
|
173
172
|
description: 'Compte de démonstration',
|
|
174
173
|
example: false,
|
|
175
174
|
}),
|
|
176
|
-
(0,
|
|
175
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
177
176
|
(0, class_validator_1.IsBoolean)(),
|
|
178
177
|
__metadata("design:type", Boolean)
|
|
179
178
|
], User.prototype, "demo", void 0);
|
|
@@ -182,7 +181,7 @@ __decorate([
|
|
|
182
181
|
description: 'E-mail vérifié',
|
|
183
182
|
example: true,
|
|
184
183
|
}),
|
|
185
|
-
(0,
|
|
184
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
186
185
|
(0, class_validator_1.IsBoolean)(),
|
|
187
186
|
__metadata("design:type", Boolean)
|
|
188
187
|
], User.prototype, "emailVerified", void 0);
|
|
@@ -191,7 +190,7 @@ __decorate([
|
|
|
191
190
|
description: 'Compte principal',
|
|
192
191
|
example: true,
|
|
193
192
|
}),
|
|
194
|
-
(0,
|
|
193
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
195
194
|
(0, class_validator_1.IsBoolean)(),
|
|
196
195
|
__metadata("design:type", Boolean)
|
|
197
196
|
], User.prototype, "principal", void 0);
|
|
@@ -200,7 +199,7 @@ __decorate([
|
|
|
200
199
|
description: 'Type de l’utilisateur',
|
|
201
200
|
example: 'CONSUMER_PLUS',
|
|
202
201
|
}),
|
|
203
|
-
(0,
|
|
202
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
204
203
|
(0, class_validator_1.IsOptional)(),
|
|
205
204
|
(0, class_validator_1.IsString)(),
|
|
206
205
|
__metadata("design:type", String)
|
|
@@ -210,7 +209,7 @@ __decorate([
|
|
|
210
209
|
description: 'Domaine d’activité',
|
|
211
210
|
example: 'BTSUP',
|
|
212
211
|
}),
|
|
213
|
-
(0,
|
|
212
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
214
213
|
(0, class_validator_1.IsOptional)(),
|
|
215
214
|
(0, class_validator_1.IsString)(),
|
|
216
215
|
__metadata("design:type", String)
|
|
@@ -220,7 +219,7 @@ __decorate([
|
|
|
220
219
|
description: 'Licence utilisateur',
|
|
221
220
|
example: 'Standard',
|
|
222
221
|
}),
|
|
223
|
-
(0,
|
|
222
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
224
223
|
(0, class_validator_1.IsOptional)(),
|
|
225
224
|
(0, class_validator_1.IsString)(),
|
|
226
225
|
__metadata("design:type", String)
|
|
@@ -230,7 +229,7 @@ __decorate([
|
|
|
230
229
|
description: 'Nombre de sites autorisés',
|
|
231
230
|
example: 50,
|
|
232
231
|
}),
|
|
233
|
-
(0,
|
|
232
|
+
(0, mongoose_2.Prop)({ type: Number, required: false }),
|
|
234
233
|
(0, class_validator_1.IsOptional)(),
|
|
235
234
|
(0, class_validator_1.IsNumber)(),
|
|
236
235
|
__metadata("design:type", Number)
|
|
@@ -240,7 +239,7 @@ __decorate([
|
|
|
240
239
|
description: 'Nombre maximum d’utilisateurs',
|
|
241
240
|
example: 1,
|
|
242
241
|
}),
|
|
243
|
-
(0,
|
|
242
|
+
(0, mongoose_2.Prop)({ type: Number, required: false }),
|
|
244
243
|
(0, class_validator_1.IsOptional)(),
|
|
245
244
|
(0, class_validator_1.IsNumber)(),
|
|
246
245
|
__metadata("design:type", Number)
|
|
@@ -250,7 +249,7 @@ __decorate([
|
|
|
250
249
|
description: 'Suivi OKD activé',
|
|
251
250
|
example: false,
|
|
252
251
|
}),
|
|
253
|
-
(0,
|
|
252
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
254
253
|
(0, class_validator_1.IsBoolean)(),
|
|
255
254
|
__metadata("design:type", Boolean)
|
|
256
255
|
], User.prototype, "trackerOkd", void 0);
|
|
@@ -259,7 +258,7 @@ __decorate([
|
|
|
259
258
|
description: 'E-mail de création envoyé',
|
|
260
259
|
example: true,
|
|
261
260
|
}),
|
|
262
|
-
(0,
|
|
261
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
263
262
|
(0, class_validator_1.IsBoolean)(),
|
|
264
263
|
__metadata("design:type", Boolean)
|
|
265
264
|
], User.prototype, "isSignUpEmailSent", void 0);
|
|
@@ -268,7 +267,7 @@ __decorate([
|
|
|
268
267
|
description: 'E-mail admin envoyé',
|
|
269
268
|
example: false,
|
|
270
269
|
}),
|
|
271
|
-
(0,
|
|
270
|
+
(0, mongoose_2.Prop)({ type: Boolean, default: false }),
|
|
272
271
|
(0, class_validator_1.IsBoolean)(),
|
|
273
272
|
__metadata("design:type", Boolean)
|
|
274
273
|
], User.prototype, "isAdminEmailSent", void 0);
|
|
@@ -277,7 +276,7 @@ __decorate([
|
|
|
277
276
|
description: 'Numéro OPTIM',
|
|
278
277
|
example: 9999,
|
|
279
278
|
}),
|
|
280
|
-
(0,
|
|
279
|
+
(0, mongoose_2.Prop)({ type: Number, required: false }),
|
|
281
280
|
(0, class_validator_1.IsOptional)(),
|
|
282
281
|
(0, class_validator_1.IsNumber)(),
|
|
283
282
|
__metadata("design:type", Number)
|
|
@@ -287,7 +286,7 @@ __decorate([
|
|
|
287
286
|
description: 'Nombre de sites actifs',
|
|
288
287
|
example: 2,
|
|
289
288
|
}),
|
|
290
|
-
(0,
|
|
289
|
+
(0, mongoose_2.Prop)({ type: Number, required: false }),
|
|
291
290
|
(0, class_validator_1.IsOptional)(),
|
|
292
291
|
(0, class_validator_1.IsNumber)(),
|
|
293
292
|
__metadata("design:type", Number)
|
|
@@ -299,7 +298,7 @@ __decorate([
|
|
|
299
298
|
isArray: true,
|
|
300
299
|
type: String,
|
|
301
300
|
}),
|
|
302
|
-
(0,
|
|
301
|
+
(0, mongoose_2.Prop)({ type: [String], default: [] }),
|
|
303
302
|
(0, class_validator_1.IsArray)(),
|
|
304
303
|
(0, class_validator_1.IsString)({ each: true }),
|
|
305
304
|
__metadata("design:type", Array)
|
|
@@ -311,7 +310,7 @@ __decorate([
|
|
|
311
310
|
isArray: true,
|
|
312
311
|
type: String,
|
|
313
312
|
}),
|
|
314
|
-
(0,
|
|
313
|
+
(0, mongoose_2.Prop)({ type: [String], default: [] }),
|
|
315
314
|
(0, class_validator_1.IsArray)(),
|
|
316
315
|
(0, class_validator_1.IsString)({ each: true }),
|
|
317
316
|
__metadata("design:type", Array)
|
|
@@ -323,7 +322,7 @@ __decorate([
|
|
|
323
322
|
isArray: true,
|
|
324
323
|
type: String,
|
|
325
324
|
}),
|
|
326
|
-
(0,
|
|
325
|
+
(0, mongoose_2.Prop)({ type: [String], default: [] }),
|
|
327
326
|
(0, class_validator_1.IsArray)(),
|
|
328
327
|
(0, class_validator_1.IsString)({ each: true }),
|
|
329
328
|
__metadata("design:type", Array)
|
|
@@ -335,7 +334,7 @@ __decorate([
|
|
|
335
334
|
isArray: true,
|
|
336
335
|
type: String,
|
|
337
336
|
}),
|
|
338
|
-
(0,
|
|
337
|
+
(0, mongoose_2.Prop)({ type: [String], default: [] }),
|
|
339
338
|
(0, class_validator_1.IsArray)(),
|
|
340
339
|
(0, class_validator_1.IsString)({ each: true }),
|
|
341
340
|
__metadata("design:type", Array)
|
|
@@ -347,7 +346,7 @@ __decorate([
|
|
|
347
346
|
isArray: true,
|
|
348
347
|
type: String,
|
|
349
348
|
}),
|
|
350
|
-
(0,
|
|
349
|
+
(0, mongoose_2.Prop)({ type: [String], default: [] }),
|
|
351
350
|
(0, class_validator_1.IsArray)(),
|
|
352
351
|
(0, class_validator_1.IsString)({ each: true }),
|
|
353
352
|
__metadata("design:type", Array)
|
|
@@ -357,7 +356,7 @@ __decorate([
|
|
|
357
356
|
description: 'Tags spécifiques au site',
|
|
358
357
|
type: () => SiteTag,
|
|
359
358
|
}),
|
|
360
|
-
(0,
|
|
359
|
+
(0, mongoose_2.Prop)({ type: exports.SiteTagSchema, _id: false }),
|
|
361
360
|
__metadata("design:type", SiteTag)
|
|
362
361
|
], User.prototype, "siteTag", void 0);
|
|
363
362
|
__decorate([
|
|
@@ -366,7 +365,7 @@ __decorate([
|
|
|
366
365
|
example: '30-04-2024',
|
|
367
366
|
type: String,
|
|
368
367
|
}),
|
|
369
|
-
(0,
|
|
368
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
370
369
|
(0, class_validator_1.IsOptional)(),
|
|
371
370
|
(0, class_validator_1.IsString)(),
|
|
372
371
|
__metadata("design:type", String)
|
|
@@ -377,12 +376,15 @@ __decorate([
|
|
|
377
376
|
example: '28/03/2025 12:16',
|
|
378
377
|
type: String,
|
|
379
378
|
}),
|
|
380
|
-
(0,
|
|
379
|
+
(0, mongoose_2.Prop)({ type: String, required: false }),
|
|
381
380
|
(0, class_validator_1.IsOptional)(),
|
|
382
381
|
(0, class_validator_1.IsString)(),
|
|
383
382
|
__metadata("design:type", String)
|
|
384
383
|
], User.prototype, "_lastConnected", void 0);
|
|
385
384
|
exports.User = User = __decorate([
|
|
386
|
-
(0,
|
|
385
|
+
(0, mongoose_2.Schema)({
|
|
386
|
+
id: false,
|
|
387
|
+
timestamps: true,
|
|
388
|
+
})
|
|
387
389
|
], User);
|
|
388
|
-
exports.UserSchema =
|
|
390
|
+
exports.UserSchema = mongoose_2.SchemaFactory.createForClass(User);
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class Folder {
|
|
2
|
+
id: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
}
|
|
5
|
+
export declare const FolderSchema: import("mongoose").Schema<Folder, import("mongoose").Model<Folder, any, any, any, import("mongoose").Document<unknown, any, Folder, any> & Folder & {
|
|
6
|
+
_id: import("mongoose").Types.ObjectId;
|
|
7
|
+
} & {
|
|
8
|
+
__v: number;
|
|
9
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Folder, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Folder>, {}> & import("mongoose").FlatRecord<Folder> & {
|
|
10
|
+
_id: import("mongoose").Types.ObjectId;
|
|
11
|
+
} & {
|
|
12
|
+
__v: number;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,34 @@
|
|
|
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.FolderSchema = exports.Folder = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
+
const class_validator_1 = require("class-validator");
|
|
16
|
+
let Folder = class Folder {
|
|
17
|
+
};
|
|
18
|
+
exports.Folder = Folder;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, swagger_1.ApiProperty)(),
|
|
21
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], Folder.prototype, "id", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, swagger_1.ApiProperty)(),
|
|
27
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], Folder.prototype, "displayName", void 0);
|
|
31
|
+
exports.Folder = Folder = __decorate([
|
|
32
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
33
|
+
], Folder);
|
|
34
|
+
exports.FolderSchema = mongoose_1.SchemaFactory.createForClass(Folder);
|