@likewatt/models 1.0.10

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.
Files changed (38) hide show
  1. package/README.md +9 -0
  2. package/dist/core/CollectiveSite.d.ts +33 -0
  3. package/dist/core/CollectiveSite.js +140 -0
  4. package/dist/core/Scenario.d.ts +68 -0
  5. package/dist/core/Scenario.js +197 -0
  6. package/dist/core/Site.d.ts +55 -0
  7. package/dist/core/Site.js +250 -0
  8. package/dist/core/TypeORM/OkwindHistory.d.ts +8 -0
  9. package/dist/core/TypeORM/OkwindHistory.js +43 -0
  10. package/dist/core/TypeORM/Optimization.d.ts +13 -0
  11. package/dist/core/TypeORM/Optimization.js +63 -0
  12. package/dist/core/TypeORM/PvgisHistory.d.ts +8 -0
  13. package/dist/core/TypeORM/PvgisHistory.js +43 -0
  14. package/dist/core/TypeORM/TempoHistory.d.ts +7 -0
  15. package/dist/core/TypeORM/TempoHistory.js +39 -0
  16. package/dist/core/TypeORM/UsersFilters.d.ts +7 -0
  17. package/dist/core/TypeORM/UsersFilters.js +39 -0
  18. package/dist/core/TypeORM/WebhookOutput.d.ts +9 -0
  19. package/dist/core/TypeORM/WebhookOutput.js +51 -0
  20. package/dist/core/TypeORM/analysis.d.ts +12 -0
  21. package/dist/core/TypeORM/analysis.js +59 -0
  22. package/dist/core/User.d.ts +69 -0
  23. package/dist/core/User.js +388 -0
  24. package/dist/core/internal/customer-infos.model.d.ts +17 -0
  25. package/dist/core/internal/customer-infos.model.js +58 -0
  26. package/dist/core/internal/energy-price.model.d.ts +19 -0
  27. package/dist/core/internal/energy-price.model.js +70 -0
  28. package/dist/core/internal/enums.d.ts +15 -0
  29. package/dist/core/internal/enums.js +20 -0
  30. package/dist/core/internal/off-peak-hour.model.d.ts +14 -0
  31. package/dist/core/internal/off-peak-hour.model.js +40 -0
  32. package/dist/core/internal/peak-hour.model.d.ts +13 -0
  33. package/dist/core/internal/peak-hour.model.js +34 -0
  34. package/dist/core/internal/subscription-rate.model.d.ts +16 -0
  35. package/dist/core/internal/subscription-rate.model.js +52 -0
  36. package/dist/index.d.ts +17 -0
  37. package/dist/index.js +37 -0
  38. package/package.json +36 -0
@@ -0,0 +1,69 @@
1
+ import { Document } from 'mongoose';
2
+ /**
3
+ * Sous-schéma pour les tags liés au site de l’utilisateur.
4
+ */
5
+ export declare class SiteTag {
6
+ hasConsumerTag: boolean;
7
+ }
8
+ export declare const SiteTagSchema: import("mongoose").Schema<SiteTag, import("mongoose").Model<SiteTag, any, any, any, Document<unknown, any, SiteTag, any> & SiteTag & {
9
+ _id: import("mongoose").Types.ObjectId;
10
+ } & {
11
+ __v: number;
12
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, SiteTag, Document<unknown, {}, import("mongoose").FlatRecord<SiteTag>, {}> & import("mongoose").FlatRecord<SiteTag> & {
13
+ _id: import("mongoose").Types.ObjectId;
14
+ } & {
15
+ __v: number;
16
+ }>;
17
+ /**
18
+ * Représente un utilisateur dans le système.
19
+ * - @Schema/timestamps : gère createdAt et updatedAt automatiques
20
+ * - @Prop : schéma Mongoose
21
+ * - @ApiProperty : documentation Swagger
22
+ * - class-validator rules : validation runtime
23
+ */
24
+ export declare class User {
25
+ _id: string;
26
+ email: string;
27
+ password: string;
28
+ firstname: string;
29
+ lastname: string;
30
+ phone?: string;
31
+ company?: string;
32
+ address?: string;
33
+ addressCity?: string;
34
+ addressZipCode?: string;
35
+ isAdmin: boolean;
36
+ isManager: boolean;
37
+ active: boolean;
38
+ demo: boolean;
39
+ emailVerified: boolean;
40
+ principal: boolean;
41
+ type?: string;
42
+ domain?: string;
43
+ license?: string;
44
+ allowedNumberOfSites?: number;
45
+ maxUsers?: number;
46
+ trackerOkd: boolean;
47
+ isSignUpEmailSent: boolean;
48
+ isAdminEmailSent: boolean;
49
+ optimNumber?: number;
50
+ nbSitesActive?: number;
51
+ analysis_individual: string[];
52
+ analysis_collective: string[];
53
+ optim_general_consumer: string[];
54
+ optim_scenario_consumer: string[];
55
+ synthesis_fi: string[];
56
+ siteTag: SiteTag;
57
+ _createdAt?: string;
58
+ _lastConnected?: string;
59
+ }
60
+ export type UserDocument = User & Document;
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: string;
63
+ }> & {
64
+ __v: number;
65
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, User, Document<unknown, {}, import("mongoose").FlatRecord<User>, {}> & import("mongoose").FlatRecord<User> & Required<{
66
+ _id: string;
67
+ }> & {
68
+ __v: number;
69
+ }>;
@@ -0,0 +1,388 @@
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.UserSchema = exports.User = exports.SiteTagSchema = exports.SiteTag = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const mongoose_1 = require("@nestjs/mongoose");
15
+ const class_validator_1 = require("class-validator");
16
+ /**
17
+ * Sous-schéma pour les tags liés au site de l’utilisateur.
18
+ */
19
+ let SiteTag = class SiteTag {
20
+ };
21
+ exports.SiteTag = SiteTag;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({
24
+ description: 'Indique si le site possède un tag consommateur',
25
+ example: true,
26
+ }),
27
+ (0, mongoose_1.Prop)({ type: Boolean, required: true }),
28
+ (0, class_validator_1.IsBoolean)(),
29
+ __metadata("design:type", Boolean)
30
+ ], SiteTag.prototype, "hasConsumerTag", void 0);
31
+ exports.SiteTag = SiteTag = __decorate([
32
+ (0, mongoose_1.Schema)({ _id: false })
33
+ ], SiteTag);
34
+ exports.SiteTagSchema = mongoose_1.SchemaFactory.createForClass(SiteTag);
35
+ /**
36
+ * Représente un utilisateur dans le système.
37
+ * - @Schema/timestamps : gère createdAt et updatedAt automatiques
38
+ * - @Prop : schéma Mongoose
39
+ * - @ApiProperty : documentation Swagger
40
+ * - class-validator rules : validation runtime
41
+ */
42
+ let User = class User {
43
+ };
44
+ exports.User = User;
45
+ __decorate([
46
+ (0, swagger_1.ApiProperty)({
47
+ description: 'Identifiant unique MongoDB',
48
+ example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
49
+ type: String,
50
+ readOnly: true,
51
+ }),
52
+ (0, mongoose_1.Prop)({ type: String, required: true }),
53
+ (0, class_validator_1.IsString)(),
54
+ __metadata("design:type", String)
55
+ ], User.prototype, "_id", void 0);
56
+ __decorate([
57
+ (0, swagger_1.ApiProperty)({
58
+ description: 'Adresse e-mail de l’utilisateur',
59
+ example: 'moumboye.yannis@gmail.com',
60
+ format: 'email',
61
+ }),
62
+ (0, mongoose_1.Prop)({ type: String, required: true, unique: true }),
63
+ (0, class_validator_1.IsEmail)(),
64
+ __metadata("design:type", String)
65
+ ], User.prototype, "email", void 0);
66
+ __decorate([
67
+ (0, swagger_1.ApiProperty)({
68
+ description: 'Mot de passe (stocké hashé)',
69
+ writeOnly: true,
70
+ minLength: 8,
71
+ }),
72
+ (0, mongoose_1.Prop)({ type: String, required: true }),
73
+ (0, class_validator_1.IsString)(),
74
+ __metadata("design:type", String)
75
+ ], User.prototype, "password", void 0);
76
+ __decorate([
77
+ (0, swagger_1.ApiProperty)({
78
+ description: 'Prénom de l’utilisateur',
79
+ example: 'Yannis',
80
+ }),
81
+ (0, mongoose_1.Prop)({ type: String, required: true }),
82
+ (0, class_validator_1.IsString)(),
83
+ __metadata("design:type", String)
84
+ ], User.prototype, "firstname", void 0);
85
+ __decorate([
86
+ (0, swagger_1.ApiProperty)({
87
+ description: 'Nom de famille de l’utilisateur',
88
+ example: 'MOUMBOYE',
89
+ }),
90
+ (0, mongoose_1.Prop)({ type: String, required: true }),
91
+ (0, class_validator_1.IsString)(),
92
+ __metadata("design:type", String)
93
+ ], User.prototype, "lastname", void 0);
94
+ __decorate([
95
+ (0, swagger_1.ApiProperty)({
96
+ description: 'Numéro de téléphone',
97
+ example: '0625455639',
98
+ }),
99
+ (0, mongoose_1.Prop)({ type: String, required: false }),
100
+ (0, class_validator_1.IsOptional)(),
101
+ (0, class_validator_1.IsString)(),
102
+ __metadata("design:type", String)
103
+ ], User.prototype, "phone", void 0);
104
+ __decorate([
105
+ (0, swagger_1.ApiProperty)({
106
+ description: 'Nom de la société',
107
+ example: 'LIKEWATT',
108
+ }),
109
+ (0, mongoose_1.Prop)({ type: String, required: false }),
110
+ (0, class_validator_1.IsOptional)(),
111
+ (0, class_validator_1.IsString)(),
112
+ __metadata("design:type", String)
113
+ ], User.prototype, "company", void 0);
114
+ __decorate([
115
+ (0, swagger_1.ApiProperty)({
116
+ description: 'Adresse postale',
117
+ example: '61 cours Emile ZOLA',
118
+ }),
119
+ (0, mongoose_1.Prop)({ type: String, required: false }),
120
+ (0, class_validator_1.IsOptional)(),
121
+ (0, class_validator_1.IsString)(),
122
+ __metadata("design:type", String)
123
+ ], User.prototype, "address", void 0);
124
+ __decorate([
125
+ (0, swagger_1.ApiProperty)({
126
+ description: 'Ville de l’adresse',
127
+ example: 'VILLEURBANNE',
128
+ }),
129
+ (0, mongoose_1.Prop)({ type: String, required: false }),
130
+ (0, class_validator_1.IsOptional)(),
131
+ (0, class_validator_1.IsString)(),
132
+ __metadata("design:type", String)
133
+ ], User.prototype, "addressCity", void 0);
134
+ __decorate([
135
+ (0, swagger_1.ApiProperty)({
136
+ description: 'Code postal',
137
+ example: '69100',
138
+ }),
139
+ (0, mongoose_1.Prop)({ type: String, required: false }),
140
+ (0, class_validator_1.IsOptional)(),
141
+ (0, class_validator_1.IsString)(),
142
+ __metadata("design:type", String)
143
+ ], User.prototype, "addressZipCode", void 0);
144
+ __decorate([
145
+ (0, swagger_1.ApiProperty)({
146
+ description: 'Rôle administrateur',
147
+ example: true,
148
+ }),
149
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
150
+ (0, class_validator_1.IsBoolean)(),
151
+ __metadata("design:type", Boolean)
152
+ ], User.prototype, "isAdmin", void 0);
153
+ __decorate([
154
+ (0, swagger_1.ApiProperty)({
155
+ description: 'Rôle manager',
156
+ example: false,
157
+ }),
158
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
159
+ (0, class_validator_1.IsBoolean)(),
160
+ __metadata("design:type", Boolean)
161
+ ], User.prototype, "isManager", void 0);
162
+ __decorate([
163
+ (0, swagger_1.ApiProperty)({
164
+ description: 'Compte actif',
165
+ example: true,
166
+ }),
167
+ (0, mongoose_1.Prop)({ type: Boolean, default: true }),
168
+ (0, class_validator_1.IsBoolean)(),
169
+ __metadata("design:type", Boolean)
170
+ ], User.prototype, "active", void 0);
171
+ __decorate([
172
+ (0, swagger_1.ApiProperty)({
173
+ description: 'Compte de démonstration',
174
+ example: false,
175
+ }),
176
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
177
+ (0, class_validator_1.IsBoolean)(),
178
+ __metadata("design:type", Boolean)
179
+ ], User.prototype, "demo", void 0);
180
+ __decorate([
181
+ (0, swagger_1.ApiProperty)({
182
+ description: 'E-mail vérifié',
183
+ example: true,
184
+ }),
185
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
186
+ (0, class_validator_1.IsBoolean)(),
187
+ __metadata("design:type", Boolean)
188
+ ], User.prototype, "emailVerified", void 0);
189
+ __decorate([
190
+ (0, swagger_1.ApiProperty)({
191
+ description: 'Compte principal',
192
+ example: true,
193
+ }),
194
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
195
+ (0, class_validator_1.IsBoolean)(),
196
+ __metadata("design:type", Boolean)
197
+ ], User.prototype, "principal", void 0);
198
+ __decorate([
199
+ (0, swagger_1.ApiProperty)({
200
+ description: 'Type de l’utilisateur',
201
+ example: 'CONSUMER_PLUS',
202
+ }),
203
+ (0, mongoose_1.Prop)({ type: String, required: false }),
204
+ (0, class_validator_1.IsOptional)(),
205
+ (0, class_validator_1.IsString)(),
206
+ __metadata("design:type", String)
207
+ ], User.prototype, "type", void 0);
208
+ __decorate([
209
+ (0, swagger_1.ApiProperty)({
210
+ description: 'Domaine d’activité',
211
+ example: 'BTSUP',
212
+ }),
213
+ (0, mongoose_1.Prop)({ type: String, required: false }),
214
+ (0, class_validator_1.IsOptional)(),
215
+ (0, class_validator_1.IsString)(),
216
+ __metadata("design:type", String)
217
+ ], User.prototype, "domain", void 0);
218
+ __decorate([
219
+ (0, swagger_1.ApiProperty)({
220
+ description: 'Licence utilisateur',
221
+ example: 'Standard',
222
+ }),
223
+ (0, mongoose_1.Prop)({ type: String, required: false }),
224
+ (0, class_validator_1.IsOptional)(),
225
+ (0, class_validator_1.IsString)(),
226
+ __metadata("design:type", String)
227
+ ], User.prototype, "license", void 0);
228
+ __decorate([
229
+ (0, swagger_1.ApiProperty)({
230
+ description: 'Nombre de sites autorisés',
231
+ example: 50,
232
+ }),
233
+ (0, mongoose_1.Prop)({ type: Number, required: false }),
234
+ (0, class_validator_1.IsOptional)(),
235
+ (0, class_validator_1.IsNumber)(),
236
+ __metadata("design:type", Number)
237
+ ], User.prototype, "allowedNumberOfSites", void 0);
238
+ __decorate([
239
+ (0, swagger_1.ApiProperty)({
240
+ description: 'Nombre maximum d’utilisateurs',
241
+ example: 1,
242
+ }),
243
+ (0, mongoose_1.Prop)({ type: Number, required: false }),
244
+ (0, class_validator_1.IsOptional)(),
245
+ (0, class_validator_1.IsNumber)(),
246
+ __metadata("design:type", Number)
247
+ ], User.prototype, "maxUsers", void 0);
248
+ __decorate([
249
+ (0, swagger_1.ApiProperty)({
250
+ description: 'Suivi OKD activé',
251
+ example: false,
252
+ }),
253
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
254
+ (0, class_validator_1.IsBoolean)(),
255
+ __metadata("design:type", Boolean)
256
+ ], User.prototype, "trackerOkd", void 0);
257
+ __decorate([
258
+ (0, swagger_1.ApiProperty)({
259
+ description: 'E-mail de création envoyé',
260
+ example: true,
261
+ }),
262
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
263
+ (0, class_validator_1.IsBoolean)(),
264
+ __metadata("design:type", Boolean)
265
+ ], User.prototype, "isSignUpEmailSent", void 0);
266
+ __decorate([
267
+ (0, swagger_1.ApiProperty)({
268
+ description: 'E-mail admin envoyé',
269
+ example: false,
270
+ }),
271
+ (0, mongoose_1.Prop)({ type: Boolean, default: false }),
272
+ (0, class_validator_1.IsBoolean)(),
273
+ __metadata("design:type", Boolean)
274
+ ], User.prototype, "isAdminEmailSent", void 0);
275
+ __decorate([
276
+ (0, swagger_1.ApiProperty)({
277
+ description: 'Numéro OPTIM',
278
+ example: 9999,
279
+ }),
280
+ (0, mongoose_1.Prop)({ type: Number, required: false }),
281
+ (0, class_validator_1.IsOptional)(),
282
+ (0, class_validator_1.IsNumber)(),
283
+ __metadata("design:type", Number)
284
+ ], User.prototype, "optimNumber", void 0);
285
+ __decorate([
286
+ (0, swagger_1.ApiProperty)({
287
+ description: 'Nombre de sites actifs',
288
+ example: 2,
289
+ }),
290
+ (0, mongoose_1.Prop)({ type: Number, required: false }),
291
+ (0, class_validator_1.IsOptional)(),
292
+ (0, class_validator_1.IsNumber)(),
293
+ __metadata("design:type", Number)
294
+ ], User.prototype, "nbSitesActive", void 0);
295
+ __decorate([
296
+ (0, swagger_1.ApiProperty)({
297
+ description: 'Analyses individuelles disponibles',
298
+ example: ['MonthCosts', 'AnalysisIndicators'],
299
+ isArray: true,
300
+ type: String,
301
+ }),
302
+ (0, mongoose_1.Prop)({ type: [String], default: [] }),
303
+ (0, class_validator_1.IsArray)(),
304
+ (0, class_validator_1.IsString)({ each: true }),
305
+ __metadata("design:type", Array)
306
+ ], User.prototype, "analysis_individual", void 0);
307
+ __decorate([
308
+ (0, swagger_1.ApiProperty)({
309
+ description: 'Analyses collectives disponibles',
310
+ example: ['MonthCosts', 'AnalysisIndicators'],
311
+ isArray: true,
312
+ type: String,
313
+ }),
314
+ (0, mongoose_1.Prop)({ type: [String], default: [] }),
315
+ (0, class_validator_1.IsArray)(),
316
+ (0, class_validator_1.IsString)({ each: true }),
317
+ __metadata("design:type", Array)
318
+ ], User.prototype, "analysis_collective", void 0);
319
+ __decorate([
320
+ (0, swagger_1.ApiProperty)({
321
+ description: 'Optimisation générale (consumer)',
322
+ example: ['ScenarioTable', 'LineBalanceSheet'],
323
+ isArray: true,
324
+ type: String,
325
+ }),
326
+ (0, mongoose_1.Prop)({ type: [String], default: [] }),
327
+ (0, class_validator_1.IsArray)(),
328
+ (0, class_validator_1.IsString)({ each: true }),
329
+ __metadata("design:type", Array)
330
+ ], User.prototype, "optim_general_consumer", void 0);
331
+ __decorate([
332
+ (0, swagger_1.ApiProperty)({
333
+ description: 'Optimisation par scénario (consumer)',
334
+ example: ['Map', 'TechSummary'],
335
+ isArray: true,
336
+ type: String,
337
+ }),
338
+ (0, mongoose_1.Prop)({ type: [String], default: [] }),
339
+ (0, class_validator_1.IsArray)(),
340
+ (0, class_validator_1.IsString)({ each: true }),
341
+ __metadata("design:type", Array)
342
+ ], User.prototype, "optim_scenario_consumer", void 0);
343
+ __decorate([
344
+ (0, swagger_1.ApiProperty)({
345
+ description: 'Synthèse financière',
346
+ example: ['Hypothèse', 'name', 'van'],
347
+ isArray: true,
348
+ type: String,
349
+ }),
350
+ (0, mongoose_1.Prop)({ type: [String], default: [] }),
351
+ (0, class_validator_1.IsArray)(),
352
+ (0, class_validator_1.IsString)({ each: true }),
353
+ __metadata("design:type", Array)
354
+ ], User.prototype, "synthesis_fi", void 0);
355
+ __decorate([
356
+ (0, swagger_1.ApiProperty)({
357
+ description: 'Tags spécifiques au site',
358
+ type: () => SiteTag,
359
+ }),
360
+ (0, mongoose_1.Prop)({ type: exports.SiteTagSchema, _id: false }),
361
+ __metadata("design:type", SiteTag)
362
+ ], User.prototype, "siteTag", void 0);
363
+ __decorate([
364
+ (0, swagger_1.ApiProperty)({
365
+ description: 'Date interne de création (legacy)',
366
+ example: '30-04-2024',
367
+ type: String,
368
+ }),
369
+ (0, mongoose_1.Prop)({ type: String, required: false }),
370
+ (0, class_validator_1.IsOptional)(),
371
+ (0, class_validator_1.IsString)(),
372
+ __metadata("design:type", String)
373
+ ], User.prototype, "_createdAt", void 0);
374
+ __decorate([
375
+ (0, swagger_1.ApiProperty)({
376
+ description: 'Date de dernière connexion (legacy)',
377
+ example: '28/03/2025 12:16',
378
+ type: String,
379
+ }),
380
+ (0, mongoose_1.Prop)({ type: String, required: false }),
381
+ (0, class_validator_1.IsOptional)(),
382
+ (0, class_validator_1.IsString)(),
383
+ __metadata("design:type", String)
384
+ ], User.prototype, "_lastConnected", void 0);
385
+ exports.User = User = __decorate([
386
+ (0, mongoose_1.Schema)({ timestamps: true })
387
+ ], User);
388
+ exports.UserSchema = mongoose_1.SchemaFactory.createForClass(User);
@@ -0,0 +1,17 @@
1
+ export declare class CustomerInfos {
2
+ code: string;
3
+ email: string;
4
+ firstname: string;
5
+ lastname: string;
6
+ organization: string;
7
+ phone: string;
8
+ }
9
+ export declare const CustomerInfosSchema: import("mongoose").Schema<CustomerInfos, import("mongoose").Model<CustomerInfos, any, any, any, import("mongoose").Document<unknown, any, CustomerInfos, any> & CustomerInfos & {
10
+ _id: import("mongoose").Types.ObjectId;
11
+ } & {
12
+ __v: number;
13
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, CustomerInfos, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<CustomerInfos>, {}> & import("mongoose").FlatRecord<CustomerInfos> & {
14
+ _id: import("mongoose").Types.ObjectId;
15
+ } & {
16
+ __v: number;
17
+ }>;
@@ -0,0 +1,58 @@
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.CustomerInfosSchema = exports.CustomerInfos = 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 CustomerInfos = class CustomerInfos {
17
+ };
18
+ exports.CustomerInfos = CustomerInfos;
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
+ ], CustomerInfos.prototype, "code", 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
+ ], CustomerInfos.prototype, "email", void 0);
31
+ __decorate([
32
+ (0, swagger_1.ApiProperty)(),
33
+ (0, mongoose_1.Prop)({ required: true }),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], CustomerInfos.prototype, "firstname", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)(),
39
+ (0, mongoose_1.Prop)({ required: true }),
40
+ (0, class_validator_1.IsString)(),
41
+ __metadata("design:type", String)
42
+ ], CustomerInfos.prototype, "lastname", void 0);
43
+ __decorate([
44
+ (0, swagger_1.ApiProperty)(),
45
+ (0, mongoose_1.Prop)({ required: true }),
46
+ (0, class_validator_1.IsString)(),
47
+ __metadata("design:type", String)
48
+ ], CustomerInfos.prototype, "organization", void 0);
49
+ __decorate([
50
+ (0, swagger_1.ApiProperty)(),
51
+ (0, mongoose_1.Prop)({ required: true }),
52
+ (0, class_validator_1.IsString)(),
53
+ __metadata("design:type", String)
54
+ ], CustomerInfos.prototype, "phone", void 0);
55
+ exports.CustomerInfos = CustomerInfos = __decorate([
56
+ (0, mongoose_1.Schema)({ _id: false })
57
+ ], CustomerInfos);
58
+ exports.CustomerInfosSchema = mongoose_1.SchemaFactory.createForClass(CustomerInfos);
@@ -0,0 +1,19 @@
1
+ export declare class EnergyPrice {
2
+ id: string;
3
+ HCB: string;
4
+ HPH: string;
5
+ HCH: string;
6
+ HPB: string;
7
+ PTE: string;
8
+ startDate: Date;
9
+ endDate: Date;
10
+ }
11
+ export declare const EnergyPriceSchema: import("mongoose").Schema<EnergyPrice, import("mongoose").Model<EnergyPrice, any, any, any, import("mongoose").Document<unknown, any, EnergyPrice, any> & EnergyPrice & {
12
+ _id: import("mongoose").Types.ObjectId;
13
+ } & {
14
+ __v: number;
15
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, EnergyPrice, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<EnergyPrice>, {}> & import("mongoose").FlatRecord<EnergyPrice> & {
16
+ _id: import("mongoose").Types.ObjectId;
17
+ } & {
18
+ __v: number;
19
+ }>;
@@ -0,0 +1,70 @@
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.EnergyPriceSchema = exports.EnergyPrice = 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 EnergyPrice = class EnergyPrice {
17
+ };
18
+ exports.EnergyPrice = EnergyPrice;
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
+ ], EnergyPrice.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
+ ], EnergyPrice.prototype, "HCB", void 0);
31
+ __decorate([
32
+ (0, swagger_1.ApiProperty)(),
33
+ (0, mongoose_1.Prop)({ required: true }),
34
+ (0, class_validator_1.IsString)(),
35
+ __metadata("design:type", String)
36
+ ], EnergyPrice.prototype, "HPH", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)(),
39
+ (0, mongoose_1.Prop)({ required: true }),
40
+ (0, class_validator_1.IsString)(),
41
+ __metadata("design:type", String)
42
+ ], EnergyPrice.prototype, "HCH", void 0);
43
+ __decorate([
44
+ (0, swagger_1.ApiProperty)(),
45
+ (0, mongoose_1.Prop)({ required: true }),
46
+ (0, class_validator_1.IsString)(),
47
+ __metadata("design:type", String)
48
+ ], EnergyPrice.prototype, "HPB", void 0);
49
+ __decorate([
50
+ (0, swagger_1.ApiProperty)(),
51
+ (0, mongoose_1.Prop)({ required: true }),
52
+ (0, class_validator_1.IsString)(),
53
+ __metadata("design:type", String)
54
+ ], EnergyPrice.prototype, "PTE", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)(),
57
+ (0, mongoose_1.Prop)({ type: Date, required: true }),
58
+ (0, class_validator_1.IsDate)(),
59
+ __metadata("design:type", Date)
60
+ ], EnergyPrice.prototype, "startDate", void 0);
61
+ __decorate([
62
+ (0, swagger_1.ApiProperty)(),
63
+ (0, mongoose_1.Prop)({ type: Date, required: true }),
64
+ (0, class_validator_1.IsDate)(),
65
+ __metadata("design:type", Date)
66
+ ], EnergyPrice.prototype, "endDate", void 0);
67
+ exports.EnergyPrice = EnergyPrice = __decorate([
68
+ (0, mongoose_1.Schema)({ _id: false })
69
+ ], EnergyPrice);
70
+ exports.EnergyPriceSchema = mongoose_1.SchemaFactory.createForClass(EnergyPrice);
@@ -0,0 +1,15 @@
1
+ export declare enum SiteType {
2
+ CONSUMER = "CONSUMER",
3
+ PRODUCER = "PRODUCER",
4
+ CONSUMER_PLUS = "CONSUMER_PLUS"
5
+ }
6
+ export declare enum Profiles {
7
+ 'RES_BASE_INF_6' = "RES_BASE_INF_6",
8
+ 'RES_BASE_SUP_6' = "RES_BASE_SUP_6",
9
+ RES_HP_HC = "RES_HP_HC",
10
+ PRO_BASE = "PRO_BASE",
11
+ PRO_HP_HC = "PRO_HP_HC",
12
+ ENT_BT_SUP = "ENT_BT_SUP",
13
+ ENT_HTA = "ENT_HTA",
14
+ BBR = "BBR"
15
+ }
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Profiles = exports.SiteType = void 0;
4
+ var SiteType;
5
+ (function (SiteType) {
6
+ SiteType["CONSUMER"] = "CONSUMER";
7
+ SiteType["PRODUCER"] = "PRODUCER";
8
+ SiteType["CONSUMER_PLUS"] = "CONSUMER_PLUS";
9
+ })(SiteType || (exports.SiteType = SiteType = {}));
10
+ var Profiles;
11
+ (function (Profiles) {
12
+ Profiles["RES_BASE_INF_6"] = "RES_BASE_INF_6";
13
+ Profiles["RES_BASE_SUP_6"] = "RES_BASE_SUP_6";
14
+ Profiles["RES_HP_HC"] = "RES_HP_HC";
15
+ Profiles["PRO_BASE"] = "PRO_BASE";
16
+ Profiles["PRO_HP_HC"] = "PRO_HP_HC";
17
+ Profiles["ENT_BT_SUP"] = "ENT_BT_SUP";
18
+ Profiles["ENT_HTA"] = "ENT_HTA";
19
+ Profiles["BBR"] = "BBR";
20
+ })(Profiles || (exports.Profiles = Profiles = {}));
@@ -0,0 +1,14 @@
1
+ export declare class OffPeakHour {
2
+ id: string;
3
+ startTime: number;
4
+ endTime: number;
5
+ }
6
+ export declare const OffPeakHourSchema: import("mongoose").Schema<OffPeakHour, import("mongoose").Model<OffPeakHour, any, any, any, import("mongoose").Document<unknown, any, OffPeakHour, any> & OffPeakHour & {
7
+ _id: import("mongoose").Types.ObjectId;
8
+ } & {
9
+ __v: number;
10
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OffPeakHour, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OffPeakHour>, {}> & import("mongoose").FlatRecord<OffPeakHour> & {
11
+ _id: import("mongoose").Types.ObjectId;
12
+ } & {
13
+ __v: number;
14
+ }>;