@likewatt/models 1.93.1 → 1.94.0
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 +19 -2
- package/dist/core/Scenario.js +54 -7
- package/package.json +1 -1
package/dist/core/Scenario.d.ts
CHANGED
|
@@ -47,9 +47,26 @@ export declare const DemandMultiplierSlotSchema: MSchema<DemandMultiplierSlot, i
|
|
|
47
47
|
} & {
|
|
48
48
|
__v: number;
|
|
49
49
|
}>;
|
|
50
|
+
export declare class DistributionKeyValue {
|
|
51
|
+
days: number[];
|
|
52
|
+
distributionKey: number;
|
|
53
|
+
endHour?: string;
|
|
54
|
+
id: string;
|
|
55
|
+
months?: Month[];
|
|
56
|
+
startHour?: string;
|
|
57
|
+
}
|
|
58
|
+
export declare const DistributionKeyValueSchema: MSchema<DistributionKeyValue, import("mongoose").Model<DistributionKeyValue, any, any, any, Document<unknown, any, DistributionKeyValue, any, {}> & DistributionKeyValue & {
|
|
59
|
+
_id: import("mongoose").Types.ObjectId;
|
|
60
|
+
} & {
|
|
61
|
+
__v: number;
|
|
62
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DistributionKeyValue, Document<unknown, {}, import("mongoose").FlatRecord<DistributionKeyValue>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<DistributionKeyValue> & {
|
|
63
|
+
_id: import("mongoose").Types.ObjectId;
|
|
64
|
+
} & {
|
|
65
|
+
__v: number;
|
|
66
|
+
}>;
|
|
50
67
|
export declare class DistributionKey {
|
|
51
68
|
type?: string;
|
|
52
|
-
values?:
|
|
69
|
+
values?: DistributionKeyValue[];
|
|
53
70
|
}
|
|
54
71
|
export declare const DistributionKeySchema: MSchema<DistributionKey, import("mongoose").Model<DistributionKey, any, any, any, Document<unknown, any, DistributionKey, any, {}> & DistributionKey & {
|
|
55
72
|
_id: import("mongoose").Types.ObjectId;
|
|
@@ -130,7 +147,7 @@ export declare class ConfigSite {
|
|
|
130
147
|
demandMultiplier?: number;
|
|
131
148
|
demandMultiplierSlots?: DemandMultiplierSlot[];
|
|
132
149
|
demandMultiplierUnit?: string;
|
|
133
|
-
distributionKey?: DistributionKey
|
|
150
|
+
distributionKey?: DistributionKey;
|
|
134
151
|
priorityStage?: number;
|
|
135
152
|
rateOfGrowth?: RateOfGrowth[];
|
|
136
153
|
settings?: Record<string, unknown>;
|
package/dist/core/Scenario.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.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
|
|
12
|
+
exports.ScenarioTypeSchema = exports.ScenarioType = exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.PvSchema = exports.Pv = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DistributionKeySchema = exports.DistributionKey = exports.DistributionKeyValueSchema = exports.DistributionKeyValue = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
|
|
13
13
|
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
14
|
const mongoose_2 = require("mongoose");
|
|
15
15
|
const uuid_1 = require("uuid");
|
|
@@ -138,6 +138,51 @@ exports.DemandMultiplierSlot = DemandMultiplierSlot = __decorate([
|
|
|
138
138
|
(0, mongoose_1.Schema)({ _id: false })
|
|
139
139
|
], DemandMultiplierSlot);
|
|
140
140
|
exports.DemandMultiplierSlotSchema = mongoose_1.SchemaFactory.createForClass(DemandMultiplierSlot);
|
|
141
|
+
let DistributionKeyValue = class DistributionKeyValue {
|
|
142
|
+
};
|
|
143
|
+
exports.DistributionKeyValue = DistributionKeyValue;
|
|
144
|
+
__decorate([
|
|
145
|
+
(0, swagger_1.ApiProperty)({ example: [1, 2, 3, 4, 5, 6, 7] }),
|
|
146
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
147
|
+
(0, class_validator_1.IsArray)(),
|
|
148
|
+
__metadata("design:type", Array)
|
|
149
|
+
], DistributionKeyValue.prototype, "days", void 0);
|
|
150
|
+
__decorate([
|
|
151
|
+
(0, swagger_1.ApiProperty)({ example: 0 }),
|
|
152
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
153
|
+
(0, class_validator_1.IsNumber)(),
|
|
154
|
+
__metadata("design:type", Number)
|
|
155
|
+
], DistributionKeyValue.prototype, "distributionKey", void 0);
|
|
156
|
+
__decorate([
|
|
157
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '00:00' }),
|
|
158
|
+
(0, mongoose_1.Prop)(),
|
|
159
|
+
(0, class_validator_1.IsOptional)(),
|
|
160
|
+
(0, class_validator_1.IsString)(),
|
|
161
|
+
__metadata("design:type", String)
|
|
162
|
+
], DistributionKeyValue.prototype, "endHour", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
(0, swagger_1.ApiProperty)({ example: 'ee8e4d76-ed7c-4ee5-9e8f-be3584fa37f9' }),
|
|
165
|
+
(0, mongoose_1.Prop)({ required: true }),
|
|
166
|
+
(0, class_validator_1.IsString)(),
|
|
167
|
+
__metadata("design:type", String)
|
|
168
|
+
], DistributionKeyValue.prototype, "id", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
(0, swagger_1.ApiProperty)({ type: [Month] }),
|
|
171
|
+
(0, mongoose_1.Prop)({ type: [exports.MonthSchema], required: true }),
|
|
172
|
+
(0, class_validator_1.IsArray)(),
|
|
173
|
+
__metadata("design:type", Array)
|
|
174
|
+
], DistributionKeyValue.prototype, "months", void 0);
|
|
175
|
+
__decorate([
|
|
176
|
+
(0, swagger_1.ApiPropertyOptional)({ example: '00:00' }),
|
|
177
|
+
(0, mongoose_1.Prop)(),
|
|
178
|
+
(0, class_validator_1.IsOptional)(),
|
|
179
|
+
(0, class_validator_1.IsString)(),
|
|
180
|
+
__metadata("design:type", String)
|
|
181
|
+
], DistributionKeyValue.prototype, "startHour", void 0);
|
|
182
|
+
exports.DistributionKeyValue = DistributionKeyValue = __decorate([
|
|
183
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
184
|
+
], DistributionKeyValue);
|
|
185
|
+
exports.DistributionKeyValueSchema = mongoose_1.SchemaFactory.createForClass(DistributionKeyValue);
|
|
141
186
|
let DistributionKey = class DistributionKey {
|
|
142
187
|
};
|
|
143
188
|
exports.DistributionKey = DistributionKey;
|
|
@@ -149,10 +194,12 @@ __decorate([
|
|
|
149
194
|
__metadata("design:type", String)
|
|
150
195
|
], DistributionKey.prototype, "type", void 0);
|
|
151
196
|
__decorate([
|
|
152
|
-
(0, swagger_1.ApiProperty)({ example: [] }),
|
|
153
|
-
(0, mongoose_1.Prop)({ required: false }),
|
|
197
|
+
(0, swagger_1.ApiProperty)({ type: [DistributionKeyValue], example: [] }),
|
|
198
|
+
(0, mongoose_1.Prop)({ type: [exports.DistributionKeyValueSchema], required: false }),
|
|
154
199
|
(0, class_validator_1.IsOptional)(),
|
|
155
200
|
(0, class_validator_1.IsArray)(),
|
|
201
|
+
(0, class_validator_1.ValidateNested)({ each: true }),
|
|
202
|
+
(0, class_transformer_1.Type)(() => DistributionKeyValue),
|
|
156
203
|
__metadata("design:type", Array)
|
|
157
204
|
], DistributionKey.prototype, "values", void 0);
|
|
158
205
|
exports.DistributionKey = DistributionKey = __decorate([
|
|
@@ -371,15 +418,15 @@ __decorate([
|
|
|
371
418
|
__metadata("design:type", String)
|
|
372
419
|
], ConfigSite.prototype, "demandMultiplierUnit", void 0);
|
|
373
420
|
__decorate([
|
|
374
|
-
(0, swagger_1.ApiProperty)({ type:
|
|
421
|
+
(0, swagger_1.ApiProperty)({ type: DistributionKey, required: false }),
|
|
375
422
|
(0, mongoose_1.Prop)({
|
|
376
|
-
type:
|
|
423
|
+
type: exports.DistributionKeySchema,
|
|
377
424
|
required: false,
|
|
378
425
|
default: undefined,
|
|
379
426
|
}),
|
|
380
427
|
(0, class_validator_1.IsOptional)(),
|
|
381
|
-
(0, class_validator_1.
|
|
382
|
-
__metadata("design:type",
|
|
428
|
+
(0, class_validator_1.IsObject)(),
|
|
429
|
+
__metadata("design:type", DistributionKey)
|
|
383
430
|
], ConfigSite.prototype, "distributionKey", void 0);
|
|
384
431
|
__decorate([
|
|
385
432
|
(0, swagger_1.ApiPropertyOptional)({ example: 1 }),
|