@likewatt/models 1.0.57 → 1.0.59
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/Scenario.d.ts
CHANGED
|
@@ -94,9 +94,9 @@ export declare const ConfigScenarioSchema: MSchema<ConfigScenario, import("mongo
|
|
|
94
94
|
__v: number;
|
|
95
95
|
}>;
|
|
96
96
|
export declare class ConfigSite {
|
|
97
|
-
consumptionReference
|
|
98
|
-
demandMultiplierSlots
|
|
99
|
-
rateOfGrowth
|
|
97
|
+
consumptionReference?: string;
|
|
98
|
+
demandMultiplierSlots?: DemandMultiplierSlot[];
|
|
99
|
+
rateOfGrowth?: RateOfGrowth[];
|
|
100
100
|
}
|
|
101
101
|
export declare const ConfigSiteSchema: MSchema<ConfigSite, import("mongoose").Model<ConfigSite, any, any, any, Document<unknown, any, ConfigSite, any, {}> & ConfigSite & {
|
|
102
102
|
_id: Types.ObjectId;
|
package/dist/core/Scenario.js
CHANGED
|
@@ -241,24 +241,29 @@ exports.ConfigScenario = ConfigScenario = __decorate([
|
|
|
241
241
|
(0, mongoose_1.Schema)({ _id: false })
|
|
242
242
|
], ConfigScenario);
|
|
243
243
|
exports.ConfigScenarioSchema = mongoose_1.SchemaFactory.createForClass(ConfigScenario);
|
|
244
|
+
// Nested schema - keep all fields optional
|
|
244
245
|
let ConfigSite = class ConfigSite {
|
|
245
246
|
};
|
|
246
247
|
exports.ConfigSite = ConfigSite;
|
|
247
248
|
__decorate([
|
|
248
|
-
(0, swagger_1.ApiProperty)({ example: 'REFERENCE' }),
|
|
249
|
-
(0, mongoose_1.Prop)({ required:
|
|
249
|
+
(0, swagger_1.ApiProperty)({ example: 'REFERENCE', required: false }),
|
|
250
|
+
(0, mongoose_1.Prop)({ required: false }) // Keep this
|
|
251
|
+
,
|
|
252
|
+
(0, class_validator_1.IsOptional)(),
|
|
250
253
|
(0, class_validator_1.IsString)(),
|
|
251
254
|
__metadata("design:type", String)
|
|
252
255
|
], ConfigSite.prototype, "consumptionReference", void 0);
|
|
253
256
|
__decorate([
|
|
254
|
-
(0, swagger_1.ApiProperty)({ type: [DemandMultiplierSlot] }),
|
|
255
|
-
(0, mongoose_1.Prop)({ type: [exports.DemandMultiplierSlotSchema], required:
|
|
257
|
+
(0, swagger_1.ApiProperty)({ type: [DemandMultiplierSlot], required: false }),
|
|
258
|
+
(0, mongoose_1.Prop)({ type: [exports.DemandMultiplierSlotSchema], required: false }),
|
|
259
|
+
(0, class_validator_1.IsOptional)(),
|
|
256
260
|
(0, class_validator_1.IsArray)(),
|
|
257
261
|
__metadata("design:type", Array)
|
|
258
262
|
], ConfigSite.prototype, "demandMultiplierSlots", void 0);
|
|
259
263
|
__decorate([
|
|
260
|
-
(0, swagger_1.ApiProperty)({ type: [RateOfGrowth] }),
|
|
261
|
-
(0, mongoose_1.Prop)({ type: [exports.RateOfGrowthSchema], required:
|
|
264
|
+
(0, swagger_1.ApiProperty)({ type: [RateOfGrowth], required: false }),
|
|
265
|
+
(0, mongoose_1.Prop)({ type: [exports.RateOfGrowthSchema], required: false }),
|
|
266
|
+
(0, class_validator_1.IsOptional)(),
|
|
262
267
|
(0, class_validator_1.IsArray)(),
|
|
263
268
|
__metadata("design:type", Array)
|
|
264
269
|
], ConfigSite.prototype, "rateOfGrowth", void 0);
|
|
@@ -291,8 +296,13 @@ __decorate([
|
|
|
291
296
|
__metadata("design:type", ConfigScenario)
|
|
292
297
|
], Scenario.prototype, "configScenario", void 0);
|
|
293
298
|
__decorate([
|
|
294
|
-
(0, swagger_1.
|
|
295
|
-
(0, mongoose_1.Prop)({
|
|
299
|
+
(0, swagger_1.ApiPropertyOptional)(),
|
|
300
|
+
(0, mongoose_1.Prop)({
|
|
301
|
+
type: exports.ConfigSiteSchema, // Use the schema, not Mixed
|
|
302
|
+
required: true, // Make configSite required
|
|
303
|
+
default: {}, // But default to empty object
|
|
304
|
+
}),
|
|
305
|
+
(0, class_validator_1.IsOptional)(),
|
|
296
306
|
(0, class_validator_1.IsObject)(),
|
|
297
307
|
__metadata("design:type", ConfigSite)
|
|
298
308
|
], Scenario.prototype, "configSite", void 0);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Document
|
|
1
|
+
import { Document } from 'mongoose';
|
|
2
2
|
import { DefaultPPATarif } from './internal/default-ppa-tarif';
|
|
3
3
|
import { PowerCostConfig } from './internal/power-cost-config';
|
|
4
4
|
import { BatteryParams } from './internal/battery-params';
|
|
@@ -50,7 +50,7 @@ export declare class ScenarioDefaultValue {
|
|
|
50
50
|
updatedAt?: Date;
|
|
51
51
|
}
|
|
52
52
|
export type ScenarioDefaultValueDocument = ScenarioDefaultValue & Document;
|
|
53
|
-
export declare const ScenarioDefaultValueSchema:
|
|
53
|
+
export declare const ScenarioDefaultValueSchema: import("mongoose").Schema<ScenarioDefaultValue, import("mongoose").Model<ScenarioDefaultValue, any, any, any, Document<unknown, any, ScenarioDefaultValue, any, {}> & ScenarioDefaultValue & {
|
|
54
54
|
_id: import("mongoose").Types.ObjectId;
|
|
55
55
|
} & {
|
|
56
56
|
__v: number;
|
|
@@ -12,7 +12,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.ScenarioDefaultValueSchema = exports.ScenarioDefaultValue = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const swagger_1 = require("@nestjs/swagger");
|
|
15
|
-
const mongoose_2 = require("mongoose");
|
|
16
15
|
const class_validator_1 = require("class-validator");
|
|
17
16
|
const default_ppa_tarif_1 = require("./internal/default-ppa-tarif");
|
|
18
17
|
const power_cost_config_1 = require("./internal/power-cost-config");
|
|
@@ -169,7 +168,11 @@ __decorate([
|
|
|
169
168
|
], ScenarioDefaultValue.prototype, "financingType", void 0);
|
|
170
169
|
__decorate([
|
|
171
170
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
172
|
-
(0, mongoose_1.Prop)({
|
|
171
|
+
(0, mongoose_1.Prop)({
|
|
172
|
+
type: Scenario_1.ConfigSiteSchema, // Use the schema, not Mixed
|
|
173
|
+
required: true, // Make configSite required
|
|
174
|
+
default: {}, // But default to empty object
|
|
175
|
+
}),
|
|
173
176
|
(0, class_validator_1.IsOptional)(),
|
|
174
177
|
(0, class_validator_1.IsObject)(),
|
|
175
178
|
__metadata("design:type", Scenario_1.ConfigSite)
|