@likewatt/models 1.0.62 → 1.0.64

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.
@@ -131,7 +131,7 @@ export declare class Scenario {
131
131
  readonly _id: Types.ObjectId;
132
132
  color?: string;
133
133
  configScenario: ConfigScenario;
134
- configSite?: ConfigSite;
134
+ configSite?: Record<string, ConfigSite>;
135
135
  error?: boolean;
136
136
  isDefaultScenario?: boolean;
137
137
  leasingLifespan?: number;
@@ -195,8 +195,9 @@ __decorate([
195
195
  __decorate([
196
196
  (0, swagger_1.ApiProperty)({
197
197
  example: { power: 100, orientation: 'south', tilt: 30 },
198
+ required: false,
198
199
  }),
199
- (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 }),
200
201
  (0, class_validator_1.IsObject)(),
201
202
  __metadata("design:type", Object)
202
203
  ], Technology.prototype, "settings", void 0);
@@ -342,8 +343,9 @@ __decorate([
342
343
  __decorate([
343
344
  (0, swagger_1.ApiProperty)({
344
345
  example: { power: 100, orientation: 'south', tilt: 30 },
346
+ required: false,
345
347
  }),
346
- (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: true }),
348
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false }),
347
349
  (0, class_validator_1.IsObject)(),
348
350
  __metadata("design:type", Object)
349
351
  ], ConfigSite.prototype, "settings", void 0);
@@ -376,15 +378,37 @@ __decorate([
376
378
  __metadata("design:type", ConfigScenario)
377
379
  ], Scenario.prototype, "configScenario", void 0);
378
380
  __decorate([
379
- (0, swagger_1.ApiPropertyOptional)({ type: ConfigSite }),
381
+ (0, swagger_1.ApiPropertyOptional)({
382
+ type: 'object',
383
+ additionalProperties: {
384
+ type: 'object',
385
+ properties: {
386
+ ACI: { type: 'boolean' },
387
+ consumptionReference: { type: 'string' },
388
+ counterNumber: { type: 'number' },
389
+ demandMultiplier: { type: 'number' },
390
+ // ... other ConfigSite properties
391
+ },
392
+ },
393
+ example: {
394
+ '4a5de046-4e95-4456-9c9d-b03772f736d7': {
395
+ ACI: true,
396
+ consumptionReference: 'REFERENCE',
397
+ counterNumber: 0,
398
+ demandMultiplier: 1,
399
+ demandMultiplierSlots: [{}],
400
+ demandMultiplierUnit: 'POWER',
401
+ },
402
+ },
403
+ }),
380
404
  (0, mongoose_1.Prop)({
381
- type: exports.ConfigSiteSchema, // Use the schema, not Mixed
382
- required: true, // Make configSite required
383
- default: {}, // But default to empty object
405
+ type: mongoose_2.Schema.Types.Mixed,
406
+ required: false,
407
+ default: {},
384
408
  }),
385
409
  (0, class_validator_1.IsOptional)(),
386
410
  (0, class_validator_1.IsObject)(),
387
- __metadata("design:type", ConfigSite)
411
+ __metadata("design:type", Object)
388
412
  ], Scenario.prototype, "configSite", void 0);
389
413
  __decorate([
390
414
  (0, swagger_1.ApiPropertyOptional)({ example: true }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.0.62",
3
+ "version": "1.0.64",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {