@likewatt/models 1.0.49 → 1.0.56

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.
@@ -53,7 +53,7 @@ __decorate([
53
53
  ], CollectiveSite.prototype, "type", void 0);
54
54
  __decorate([
55
55
  (0, swagger_1.ApiProperty)(),
56
- (0, mongoose_1.Prop)({ required: false }),
56
+ (0, mongoose_1.Prop)({ type: String, required: false }),
57
57
  (0, class_validator_1.IsOptional)(),
58
58
  (0, class_validator_1.IsString)(),
59
59
  __metadata("design:type", String)
@@ -90,14 +90,14 @@ __decorate([
90
90
  ], CollectiveSite.prototype, "currency", void 0);
91
91
  __decorate([
92
92
  (0, swagger_1.ApiProperty)(),
93
- (0, mongoose_1.Prop)({ required: false, default: null }),
93
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: null }),
94
94
  (0, class_validator_1.IsOptional)(),
95
95
  (0, class_validator_1.IsBoolean)(),
96
96
  __metadata("design:type", Boolean)
97
97
  ], CollectiveSite.prototype, "autoCO2", void 0);
98
98
  __decorate([
99
99
  (0, swagger_1.ApiProperty)(),
100
- (0, mongoose_1.Prop)({ required: false, default: null }),
100
+ (0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
101
101
  (0, class_validator_1.IsOptional)(),
102
102
  (0, class_validator_1.IsNumber)(),
103
103
  __metadata("design:type", Number)
@@ -246,19 +246,19 @@ let ConfigSite = class ConfigSite {
246
246
  exports.ConfigSite = ConfigSite;
247
247
  __decorate([
248
248
  (0, swagger_1.ApiProperty)({ example: 'REFERENCE' }),
249
- (0, mongoose_1.Prop)({ required: true }),
249
+ (0, mongoose_1.Prop)({ required: false }),
250
250
  (0, class_validator_1.IsString)(),
251
251
  __metadata("design:type", String)
252
252
  ], ConfigSite.prototype, "consumptionReference", void 0);
253
253
  __decorate([
254
254
  (0, swagger_1.ApiProperty)({ type: [DemandMultiplierSlot] }),
255
- (0, mongoose_1.Prop)({ type: [exports.DemandMultiplierSlotSchema], required: true }),
255
+ (0, mongoose_1.Prop)({ type: [exports.DemandMultiplierSlotSchema], required: false }),
256
256
  (0, class_validator_1.IsArray)(),
257
257
  __metadata("design:type", Array)
258
258
  ], ConfigSite.prototype, "demandMultiplierSlots", void 0);
259
259
  __decorate([
260
260
  (0, swagger_1.ApiProperty)({ type: [RateOfGrowth] }),
261
- (0, mongoose_1.Prop)({ type: [exports.RateOfGrowthSchema], required: true }),
261
+ (0, mongoose_1.Prop)({ type: [exports.RateOfGrowthSchema], required: false }),
262
262
  (0, class_validator_1.IsArray)(),
263
263
  __metadata("design:type", Array)
264
264
  ], ConfigSite.prototype, "rateOfGrowth", void 0);
@@ -13,7 +13,7 @@ import { WindTurbineParams } from './internal/wind-turbine-params';
13
13
  import { ElectrolyseParams } from './internal/electrolyse-params';
14
14
  import { ECSParams } from './internal/ecs-params';
15
15
  import { H2StorageParams } from './internal/h2-storage-params';
16
- import { RateOfGrowth } from './Scenario';
16
+ import { ConfigSite } from './Scenario';
17
17
  import { ScenarioParams } from './internal/scenario-params';
18
18
  import { StationParams } from './internal/station-params';
19
19
  import { ThermalStorageParams } from './internal/thermal-storage-params';
@@ -42,20 +42,7 @@ export declare class ScenarioDefaultValue {
42
42
  paramsStation: StationParams;
43
43
  paramsScenario: ScenarioParams;
44
44
  financingType: FinancingType;
45
- scenarioConfigSite?: {
46
- rateOfGrowth: RateOfGrowth[];
47
- demandMultiplierSlots: Array<{
48
- months: Array<{
49
- month: number;
50
- year: number;
51
- }>;
52
- id: string;
53
- days: number[];
54
- startHour: number;
55
- endHour: number;
56
- demandMultiplier: number;
57
- }>;
58
- };
45
+ configSite?: ConfigSite;
59
46
  name?: string;
60
47
  description?: string;
61
48
  isActive?: boolean;
@@ -28,6 +28,7 @@ const wind_turbine_params_1 = require("./internal/wind-turbine-params");
28
28
  const electrolyse_params_1 = require("./internal/electrolyse-params");
29
29
  const ecs_params_1 = require("./internal/ecs-params");
30
30
  const h2_storage_params_1 = require("./internal/h2-storage-params");
31
+ const Scenario_1 = require("./Scenario");
31
32
  const scenario_params_1 = require("./internal/scenario-params");
32
33
  const station_params_1 = require("./internal/station-params");
33
34
  const thermal_storage_params_1 = require("./internal/thermal-storage-params");
@@ -168,11 +169,11 @@ __decorate([
168
169
  ], ScenarioDefaultValue.prototype, "financingType", void 0);
169
170
  __decorate([
170
171
  (0, swagger_1.ApiPropertyOptional)(),
171
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed }),
172
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false }),
172
173
  (0, class_validator_1.IsOptional)(),
173
174
  (0, class_validator_1.IsObject)(),
174
- __metadata("design:type", Object)
175
- ], ScenarioDefaultValue.prototype, "scenarioConfigSite", void 0);
175
+ __metadata("design:type", Scenario_1.ConfigSite)
176
+ ], ScenarioDefaultValue.prototype, "configSite", void 0);
176
177
  __decorate([
177
178
  (0, swagger_1.ApiPropertyOptional)(),
178
179
  (0, mongoose_1.Prop)(),
@@ -12,6 +12,7 @@ import { ConsumptionIndexes } from './internal/consumption-indexes';
12
12
  import { EnergyPriceTempo } from './internal/energy-price-tempo.model';
13
13
  export declare class Site {
14
14
  readonly _id: Types.ObjectId;
15
+ id: string;
15
16
  country: string;
16
17
  energyPrices: EnergyPrice[];
17
18
  purchaseAreaOfTension: string;
@@ -21,7 +22,7 @@ export declare class Site {
21
22
  type: SiteType;
22
23
  purchaseMeterOwner: string;
23
24
  purchaseContractType: string;
24
- description?: string | undefined;
25
+ description?: string;
25
26
  subscriptionRates: number;
26
27
  address: string;
27
28
  ratesOption: string;
@@ -56,9 +57,9 @@ export declare class Site {
56
57
  _step3At: Date;
57
58
  analysisId: string;
58
59
  analysisYear: number;
59
- autoCO2?: boolean | null;
60
60
  buildingData: BuildingData;
61
- co2rate?: number | null;
61
+ autoCO2?: boolean;
62
+ co2rate?: number;
62
63
  connectingPower: string;
63
64
  consentFileUrl: string;
64
65
  consumptionIndexes: ConsumptionIndexes;
package/dist/core/Site.js CHANGED
@@ -37,6 +37,15 @@ __decorate([
37
37
  }),
38
38
  __metadata("design:type", mongoose_2.Types.ObjectId)
39
39
  ], Site.prototype, "_id", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({
42
+ description: 'Identifiant dupliqué pour lapi python',
43
+ example: '2M61PGSm7lRpqXeaDacbAYOLTYG3',
44
+ type: String,
45
+ readOnly: false,
46
+ }),
47
+ __metadata("design:type", String)
48
+ ], Site.prototype, "id", void 0);
40
49
  __decorate([
41
50
  (0, swagger_1.ApiProperty)(),
42
51
  (0, mongoose_1.Prop)({ required: true }),
@@ -92,11 +101,11 @@ __decorate([
92
101
  __metadata("design:type", String)
93
102
  ], Site.prototype, "purchaseContractType", void 0);
94
103
  __decorate([
95
- (0, swagger_1.ApiProperty)({ required: false }),
96
- (0, mongoose_1.Prop)({ required: false }),
104
+ (0, swagger_1.ApiProperty)(),
105
+ (0, mongoose_1.Prop)({ type: String, required: false }),
97
106
  (0, class_validator_1.IsOptional)(),
98
107
  (0, class_validator_1.IsString)(),
99
- __metadata("design:type", Object)
108
+ __metadata("design:type", String)
100
109
  ], Site.prototype, "description", void 0);
101
110
  __decorate([
102
111
  (0, mongoose_1.Prop)({ required: true }),
@@ -304,24 +313,24 @@ __decorate([
304
313
  (0, class_validator_1.IsNumber)(),
305
314
  __metadata("design:type", Number)
306
315
  ], Site.prototype, "analysisYear", void 0);
307
- __decorate([
308
- (0, swagger_1.ApiProperty)({ required: false, nullable: true }),
309
- (0, mongoose_1.Prop)({ required: false, default: null }),
310
- (0, class_validator_1.IsOptional)(),
311
- (0, class_validator_1.IsBoolean)(),
312
- __metadata("design:type", Object)
313
- ], Site.prototype, "autoCO2", void 0);
314
316
  __decorate([
315
317
  (0, swagger_1.ApiProperty)({ type: building_data_1.BuildingData }),
316
318
  (0, mongoose_1.Prop)({ type: building_data_1.BuildingData, required: true }),
317
319
  __metadata("design:type", building_data_1.BuildingData)
318
320
  ], Site.prototype, "buildingData", void 0);
319
321
  __decorate([
320
- (0, swagger_1.ApiProperty)({ required: false, nullable: true }),
321
- (0, mongoose_1.Prop)({ required: false, default: null }),
322
+ (0, swagger_1.ApiProperty)(),
323
+ (0, mongoose_1.Prop)({ type: Boolean, required: false, default: null }),
324
+ (0, class_validator_1.IsOptional)(),
325
+ (0, class_validator_1.IsBoolean)(),
326
+ __metadata("design:type", Boolean)
327
+ ], Site.prototype, "autoCO2", void 0);
328
+ __decorate([
329
+ (0, swagger_1.ApiProperty)(),
330
+ (0, mongoose_1.Prop)({ type: Number, required: false, default: null }),
322
331
  (0, class_validator_1.IsOptional)(),
323
332
  (0, class_validator_1.IsNumber)(),
324
- __metadata("design:type", Object)
333
+ __metadata("design:type", Number)
325
334
  ], Site.prototype, "co2rate", void 0);
326
335
  __decorate([
327
336
  (0, swagger_1.ApiProperty)(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.0.49",
3
+ "version": "1.0.56",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {