@likewatt/models 1.0.61 → 1.0.63

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.
@@ -46,6 +46,19 @@ export declare const DemandMultiplierSlotSchema: MSchema<DemandMultiplierSlot, i
46
46
  } & {
47
47
  __v: number;
48
48
  }>;
49
+ export declare class DistributionKey {
50
+ type: string;
51
+ values: (string | number)[];
52
+ }
53
+ export declare const DistributionKeySchema: MSchema<DistributionKey, import("mongoose").Model<DistributionKey, any, any, any, Document<unknown, any, DistributionKey, any, {}> & DistributionKey & {
54
+ _id: Types.ObjectId;
55
+ } & {
56
+ __v: number;
57
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, DistributionKey, Document<unknown, {}, import("mongoose").FlatRecord<DistributionKey>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<DistributionKey> & {
58
+ _id: Types.ObjectId;
59
+ } & {
60
+ __v: number;
61
+ }>;
49
62
  export declare class RateOfGrowth {
50
63
  id: string;
51
64
  rate: number;
@@ -94,9 +107,16 @@ export declare const ConfigScenarioSchema: MSchema<ConfigScenario, import("mongo
94
107
  __v: number;
95
108
  }>;
96
109
  export declare class ConfigSite {
110
+ ACI?: boolean;
97
111
  consumptionReference?: string;
112
+ counterNumber?: number;
113
+ demandMultiplier?: number;
98
114
  demandMultiplierSlots?: DemandMultiplierSlot[];
115
+ demandMultiplierUnit?: string;
116
+ distributionKey?: DistributionKey[];
117
+ priorityStage?: number;
99
118
  rateOfGrowth?: RateOfGrowth[];
119
+ settings: Record<string, unknown>;
100
120
  }
101
121
  export declare const ConfigSiteSchema: MSchema<ConfigSite, import("mongoose").Model<ConfigSite, any, any, any, Document<unknown, any, ConfigSite, any, {}> & ConfigSite & {
102
122
  _id: Types.ObjectId;
@@ -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.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = exports.TechnologySchema = exports.Technology = exports.RateOfGrowthSchema = exports.RateOfGrowth = exports.DemandMultiplierSlotSchema = exports.DemandMultiplierSlot = exports.MonthSchema = exports.Month = exports.ObjectiveSchema = exports.Objective = void 0;
12
+ exports.ScenarioSchema = exports.Scenario = exports.ConfigSiteSchema = exports.ConfigSite = exports.ConfigScenarioSchema = exports.ConfigScenario = 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;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const mongoose_2 = require("mongoose");
15
15
  const swagger_1 = require("@nestjs/swagger");
@@ -125,6 +125,25 @@ exports.DemandMultiplierSlot = DemandMultiplierSlot = __decorate([
125
125
  (0, mongoose_1.Schema)({ _id: false })
126
126
  ], DemandMultiplierSlot);
127
127
  exports.DemandMultiplierSlotSchema = mongoose_1.SchemaFactory.createForClass(DemandMultiplierSlot);
128
+ let DistributionKey = class DistributionKey {
129
+ };
130
+ exports.DistributionKey = DistributionKey;
131
+ __decorate([
132
+ (0, swagger_1.ApiProperty)({ example: 'prorata' }),
133
+ (0, mongoose_1.Prop)({ required: false }),
134
+ (0, class_validator_1.IsString)(),
135
+ __metadata("design:type", String)
136
+ ], DistributionKey.prototype, "type", void 0);
137
+ __decorate([
138
+ (0, swagger_1.ApiProperty)({ example: [] }),
139
+ (0, mongoose_1.Prop)({ required: false }),
140
+ (0, class_validator_1.IsArray)(),
141
+ __metadata("design:type", Array)
142
+ ], DistributionKey.prototype, "values", void 0);
143
+ exports.DistributionKey = DistributionKey = __decorate([
144
+ (0, mongoose_1.Schema)({ _id: false })
145
+ ], DistributionKey);
146
+ exports.DistributionKeySchema = mongoose_1.SchemaFactory.createForClass(DistributionKey);
128
147
  let RateOfGrowth = class RateOfGrowth {
129
148
  };
130
149
  exports.RateOfGrowth = RateOfGrowth;
@@ -176,8 +195,9 @@ __decorate([
176
195
  __decorate([
177
196
  (0, swagger_1.ApiProperty)({
178
197
  example: { power: 100, orientation: 'south', tilt: 30 },
198
+ required: false,
179
199
  }),
180
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: true }),
200
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false }),
181
201
  (0, class_validator_1.IsObject)(),
182
202
  __metadata("design:type", Object)
183
203
  ], Technology.prototype, "settings", void 0);
@@ -245,6 +265,13 @@ exports.ConfigScenarioSchema = mongoose_1.SchemaFactory.createForClass(ConfigSce
245
265
  let ConfigSite = class ConfigSite {
246
266
  };
247
267
  exports.ConfigSite = ConfigSite;
268
+ __decorate([
269
+ (0, swagger_1.ApiPropertyOptional)({ example: true }),
270
+ (0, mongoose_1.Prop)(),
271
+ (0, class_validator_1.IsOptional)(),
272
+ (0, class_validator_1.IsBoolean)(),
273
+ __metadata("design:type", Boolean)
274
+ ], ConfigSite.prototype, "ACI", void 0);
248
275
  __decorate([
249
276
  (0, swagger_1.ApiProperty)({ example: 'REFERENCE', required: false }),
250
277
  (0, mongoose_1.Prop)({ required: false }),
@@ -252,6 +279,20 @@ __decorate([
252
279
  (0, class_validator_1.IsString)(),
253
280
  __metadata("design:type", String)
254
281
  ], ConfigSite.prototype, "consumptionReference", void 0);
282
+ __decorate([
283
+ (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
284
+ (0, mongoose_1.Prop)(),
285
+ (0, class_validator_1.IsOptional)(),
286
+ (0, class_validator_1.IsNumber)(),
287
+ __metadata("design:type", Number)
288
+ ], ConfigSite.prototype, "counterNumber", void 0);
289
+ __decorate([
290
+ (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
291
+ (0, mongoose_1.Prop)(),
292
+ (0, class_validator_1.IsOptional)(),
293
+ (0, class_validator_1.IsNumber)(),
294
+ __metadata("design:type", Number)
295
+ ], ConfigSite.prototype, "demandMultiplier", void 0);
255
296
  __decorate([
256
297
  (0, swagger_1.ApiProperty)({ type: [DemandMultiplierSlot], required: false }),
257
298
  (0, mongoose_1.Prop)({
@@ -263,6 +304,31 @@ __decorate([
263
304
  (0, class_validator_1.IsArray)(),
264
305
  __metadata("design:type", Array)
265
306
  ], ConfigSite.prototype, "demandMultiplierSlots", void 0);
307
+ __decorate([
308
+ (0, swagger_1.ApiProperty)({ example: 'POWER', required: false }),
309
+ (0, mongoose_1.Prop)({ required: false }),
310
+ (0, class_validator_1.IsOptional)(),
311
+ (0, class_validator_1.IsString)(),
312
+ __metadata("design:type", String)
313
+ ], ConfigSite.prototype, "demandMultiplierUnit", void 0);
314
+ __decorate([
315
+ (0, swagger_1.ApiProperty)({ type: [DistributionKey], required: false }),
316
+ (0, mongoose_1.Prop)({
317
+ type: [exports.DistributionKeySchema],
318
+ required: false,
319
+ default: undefined,
320
+ }),
321
+ (0, class_validator_1.IsOptional)(),
322
+ (0, class_validator_1.IsArray)(),
323
+ __metadata("design:type", Array)
324
+ ], ConfigSite.prototype, "distributionKey", void 0);
325
+ __decorate([
326
+ (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
327
+ (0, mongoose_1.Prop)(),
328
+ (0, class_validator_1.IsOptional)(),
329
+ (0, class_validator_1.IsNumber)(),
330
+ __metadata("design:type", Number)
331
+ ], ConfigSite.prototype, "priorityStage", void 0);
266
332
  __decorate([
267
333
  (0, swagger_1.ApiProperty)({ type: [RateOfGrowth], required: false }),
268
334
  (0, mongoose_1.Prop)({
@@ -274,6 +340,15 @@ __decorate([
274
340
  (0, class_validator_1.IsArray)(),
275
341
  __metadata("design:type", Array)
276
342
  ], ConfigSite.prototype, "rateOfGrowth", void 0);
343
+ __decorate([
344
+ (0, swagger_1.ApiProperty)({
345
+ example: { power: 100, orientation: 'south', tilt: 30 },
346
+ required: false,
347
+ }),
348
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false }),
349
+ (0, class_validator_1.IsObject)(),
350
+ __metadata("design:type", Object)
351
+ ], ConfigSite.prototype, "settings", void 0);
277
352
  exports.ConfigSite = ConfigSite = __decorate([
278
353
  (0, mongoose_1.Schema)({ _id: false })
279
354
  ], ConfigSite);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.0.61",
3
+ "version": "1.0.63",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {