@likewatt/models 1.10.1 → 1.10.4

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.
@@ -26,6 +26,7 @@ export declare class CollectiveSite {
26
26
  isVisible: boolean;
27
27
  timezone: number;
28
28
  sites: string[];
29
+ hasAnalysis: boolean;
29
30
  }
30
31
  export declare const CollectiveSiteSchema: import("mongoose").Schema<CollectiveSite, import("mongoose").Model<CollectiveSite, any, any, any, Document<unknown, any, CollectiveSite, any, {}> & CollectiveSite & Required<{
31
32
  _id: string;
@@ -171,6 +171,12 @@ __decorate([
171
171
  (0, class_validator_1.IsArray)(),
172
172
  __metadata("design:type", Array)
173
173
  ], CollectiveSite.prototype, "sites", void 0);
174
+ __decorate([
175
+ (0, swagger_1.ApiProperty)(),
176
+ (0, mongoose_1.Prop)({ required: true, default: false }),
177
+ (0, class_validator_1.IsBoolean)(),
178
+ __metadata("design:type", Boolean)
179
+ ], CollectiveSite.prototype, "hasAnalysis", void 0);
174
180
  exports.CollectiveSite = CollectiveSite = __decorate([
175
181
  (0, mongoose_1.Schema)({
176
182
  id: false,
@@ -89,6 +89,22 @@ export declare const TechnologySchema: MSchema<Technology, import("mongoose").Mo
89
89
  } & {
90
90
  __v: number;
91
91
  }>;
92
+ export declare class Pv {
93
+ id: string;
94
+ name: string;
95
+ index: number;
96
+ type?: number;
97
+ settings: Record<string, unknown>;
98
+ }
99
+ export declare const PvSchema: MSchema<Pv, import("mongoose").Model<Pv, any, any, any, Document<unknown, any, Pv, any, {}> & Pv & {
100
+ _id: import("mongoose").Types.ObjectId;
101
+ } & {
102
+ __v: number;
103
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Pv, Document<unknown, {}, import("mongoose").FlatRecord<Pv>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Pv> & {
104
+ _id: import("mongoose").Types.ObjectId;
105
+ } & {
106
+ __v: number;
107
+ }>;
92
108
  export declare class ConfigScenario {
93
109
  debtDuration?: number;
94
110
  debtRatio?: number;
@@ -148,6 +164,7 @@ export declare class Scenario {
148
164
  sellingPriceInflation?: number;
149
165
  siteId?: string;
150
166
  technologies?: Technology[];
167
+ pvs?: Pv[];
151
168
  version?: number;
152
169
  _createdAt: Date;
153
170
  }
@@ -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.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.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");
@@ -212,6 +212,47 @@ exports.Technology = Technology = __decorate([
212
212
  (0, mongoose_1.Schema)({ _id: false })
213
213
  ], Technology);
214
214
  exports.TechnologySchema = mongoose_1.SchemaFactory.createForClass(Technology);
215
+ let Pv = class Pv {
216
+ };
217
+ exports.Pv = Pv;
218
+ __decorate([
219
+ (0, swagger_1.ApiProperty)({ example: 'pv1' }),
220
+ (0, mongoose_1.Prop)({ required: true }),
221
+ (0, class_validator_1.IsString)(),
222
+ __metadata("design:type", String)
223
+ ], Pv.prototype, "id", void 0);
224
+ __decorate([
225
+ (0, swagger_1.ApiProperty)({ example: 'pv 1' }),
226
+ (0, mongoose_1.Prop)({ required: true }),
227
+ (0, class_validator_1.IsString)(),
228
+ __metadata("design:type", String)
229
+ ], Pv.prototype, "name", void 0);
230
+ __decorate([
231
+ (0, swagger_1.ApiProperty)({ example: 0 }),
232
+ (0, mongoose_1.Prop)({ required: false }),
233
+ (0, class_validator_1.IsNumber)(),
234
+ __metadata("design:type", Number)
235
+ ], Pv.prototype, "index", void 0);
236
+ __decorate([
237
+ (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
238
+ (0, mongoose_1.Prop)({ type: Number }),
239
+ (0, class_validator_1.IsOptional)(),
240
+ (0, class_validator_1.IsNumber)(),
241
+ __metadata("design:type", Number)
242
+ ], Pv.prototype, "type", void 0);
243
+ __decorate([
244
+ (0, swagger_1.ApiProperty)({
245
+ example: { power: 100, orientation: 'south', tilt: 30 },
246
+ required: false,
247
+ }),
248
+ (0, mongoose_1.Prop)({ type: mongoose_2.Schema.Types.Mixed, required: false }),
249
+ (0, class_validator_1.IsObject)(),
250
+ __metadata("design:type", Object)
251
+ ], Pv.prototype, "settings", void 0);
252
+ exports.Pv = Pv = __decorate([
253
+ (0, mongoose_1.Schema)({ _id: false })
254
+ ], Pv);
255
+ exports.PvSchema = mongoose_1.SchemaFactory.createForClass(Pv);
215
256
  let ConfigScenario = class ConfigScenario {
216
257
  };
217
258
  exports.ConfigScenario = ConfigScenario;
@@ -518,6 +559,12 @@ __decorate([
518
559
  (0, class_validator_1.IsArray)(),
519
560
  __metadata("design:type", Array)
520
561
  ], Scenario.prototype, "technologies", void 0);
562
+ __decorate([
563
+ (0, swagger_1.ApiProperty)({ type: [Pv] }),
564
+ (0, mongoose_1.Prop)({ type: [exports.PvSchema], required: true }),
565
+ (0, class_validator_1.IsArray)(),
566
+ __metadata("design:type", Array)
567
+ ], Scenario.prototype, "pvs", void 0);
521
568
  __decorate([
522
569
  (0, swagger_1.ApiPropertyOptional)({ example: 1 }),
523
570
  (0, mongoose_1.Prop)(),
@@ -94,6 +94,8 @@ export declare class Site {
94
94
  timezone: number;
95
95
  TMYstatus?: number;
96
96
  comments?: Comments;
97
+ hasConsoData: boolean;
98
+ hasAnalysis: boolean;
97
99
  }
98
100
  export type SiteDocument = Site & Document;
99
101
  export declare const SiteSchema: import("mongoose").Schema<Site, import("mongoose").Model<Site, any, any, any, Document<unknown, any, Site, any, {}> & Site & Required<{
package/dist/core/Site.js CHANGED
@@ -547,6 +547,18 @@ __decorate([
547
547
  (0, class_validator_1.IsArray)(),
548
548
  __metadata("design:type", comments_1.Comments)
549
549
  ], Site.prototype, "comments", void 0);
550
+ __decorate([
551
+ (0, swagger_1.ApiProperty)(),
552
+ (0, mongoose_1.Prop)({ required: true, default: false }),
553
+ (0, class_validator_1.IsBoolean)(),
554
+ __metadata("design:type", Boolean)
555
+ ], Site.prototype, "hasConsoData", void 0);
556
+ __decorate([
557
+ (0, swagger_1.ApiProperty)(),
558
+ (0, mongoose_1.Prop)({ required: true, default: false }),
559
+ (0, class_validator_1.IsBoolean)(),
560
+ __metadata("design:type", Boolean)
561
+ ], Site.prototype, "hasAnalysis", void 0);
550
562
  exports.Site = Site = __decorate([
551
563
  (0, mongoose_1.Schema)({
552
564
  id: false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.10.1",
3
+ "version": "1.10.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {