@likewatt/models 1.35.0 → 1.37.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.
@@ -1,6 +1,6 @@
1
1
  import { Document } from 'mongoose';
2
2
  import { RestOfTheYearTarifs } from './internal/rest-of-the-years-tarif';
3
- import { Tarif } from './internal/tarif';
3
+ import { Rates } from './internal/rates';
4
4
  /**
5
5
  * Représente un utilisateur dans le système.
6
6
  * - @Schema/timestamps : gère createdAt et updatedAt automatiques
@@ -12,7 +12,7 @@ export declare class DefaultRate {
12
12
  _id: string;
13
13
  name?: string;
14
14
  userId: string;
15
- tarifs: Tarif[];
15
+ rates: Rates[];
16
16
  restOfTheYear: RestOfTheYearTarifs;
17
17
  }
18
18
  export type DefaultRateDocument = DefaultRate & Document;
@@ -15,7 +15,7 @@ const mongoose_1 = require("@nestjs/mongoose");
15
15
  const uuid_1 = require("uuid");
16
16
  const class_validator_1 = require("class-validator");
17
17
  const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
18
- const tarif_1 = require("./internal/tarif");
18
+ const rates_1 = require("./internal/rates");
19
19
  /**
20
20
  * Représente un utilisateur dans le système.
21
21
  * - @Schema/timestamps : gère createdAt et updatedAt automatiques
@@ -58,11 +58,11 @@ __decorate([
58
58
  __metadata("design:type", String)
59
59
  ], DefaultRate.prototype, "userId", void 0);
60
60
  __decorate([
61
- (0, swagger_1.ApiProperty)({ type: [tarif_1.Tarif] }),
61
+ (0, swagger_1.ApiProperty)({ type: [rates_1.Rates] }),
62
62
  (0, mongoose_1.Prop)({ required: true }),
63
63
  (0, class_validator_1.IsArray)(),
64
64
  __metadata("design:type", Array)
65
- ], DefaultRate.prototype, "tarifs", void 0);
65
+ ], DefaultRate.prototype, "rates", void 0);
66
66
  __decorate([
67
67
  (0, swagger_1.ApiProperty)({ type: rest_of_the_years_tarif_1.RestOfTheYearTarifs }),
68
68
  (0, mongoose_1.Prop)({ required: false }),
@@ -184,6 +184,7 @@ export declare class ScenarioType extends Scenario {
184
184
  isACCScenario?: boolean;
185
185
  scenarioOption?: string;
186
186
  siteId: string;
187
+ isLeads?: boolean;
187
188
  }
188
189
  export type ScenarioTypeDocument = ScenarioType & Document;
189
190
  export declare const ScenarioTypeSchema: MSchema<ScenarioType, import("mongoose").Model<ScenarioType, any, any, any, Document<unknown, any, ScenarioType, any, {}> & ScenarioType & Required<{
@@ -632,6 +632,13 @@ __decorate([
632
632
  (0, class_validator_1.IsString)(),
633
633
  __metadata("design:type", String)
634
634
  ], ScenarioType.prototype, "siteId", void 0);
635
+ __decorate([
636
+ (0, swagger_1.ApiPropertyOptional)({ example: false }),
637
+ (0, mongoose_1.Prop)({ default: false }),
638
+ (0, class_validator_1.IsOptional)(),
639
+ (0, class_validator_1.IsBoolean)(),
640
+ __metadata("design:type", Boolean)
641
+ ], ScenarioType.prototype, "isLeads", void 0);
635
642
  exports.ScenarioType = ScenarioType = __decorate([
636
643
  (0, mongoose_1.Schema)()
637
644
  ], ScenarioType);
@@ -8,7 +8,7 @@ import { BuildingData } from './internal/building-data';
8
8
  import { RestOfTheYearTarifs } from './internal/rest-of-the-years-tarif';
9
9
  import { DataSourceHistory } from './internal/data-source-history';
10
10
  import { EnergyPriceTempo } from './internal/energy-price-tempo.model';
11
- import { Tarif } from './internal/tarif';
11
+ import { Rates } from './internal/rates';
12
12
  import { BuildingDataStatus } from './enums/BuildingDataStatus';
13
13
  import { Comments } from './internal/comments';
14
14
  export declare class Site {
@@ -89,7 +89,7 @@ export declare class Site {
89
89
  restOfTheYearTarifs: RestOfTheYearTarifs;
90
90
  siteHasData: boolean;
91
91
  tarifBuilder: boolean;
92
- tarifs: Tarif[];
92
+ rates: Rates[];
93
93
  tempoPricing: boolean;
94
94
  timezone: number;
95
95
  TMYstatus?: number;
package/dist/core/Site.js CHANGED
@@ -23,7 +23,7 @@ const building_data_1 = require("./internal/building-data");
23
23
  const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
24
24
  const data_source_history_1 = require("./internal/data-source-history");
25
25
  const energy_price_tempo_model_1 = require("./internal/energy-price-tempo.model");
26
- const tarif_1 = require("./internal/tarif");
26
+ const rates_1 = require("./internal/rates");
27
27
  const BuildingDataStatus_1 = require("./enums/BuildingDataStatus");
28
28
  const comments_1 = require("./internal/comments");
29
29
  let Site = class Site {
@@ -516,11 +516,11 @@ __decorate([
516
516
  __metadata("design:type", Boolean)
517
517
  ], Site.prototype, "tarifBuilder", void 0);
518
518
  __decorate([
519
- (0, swagger_1.ApiProperty)({ type: [tarif_1.Tarif] }),
520
- (0, mongoose_1.Prop)({ type: [tarif_1.TarifSchema], required: true }),
519
+ (0, swagger_1.ApiProperty)({ type: [rates_1.Rates] }),
520
+ (0, mongoose_1.Prop)({ type: [rates_1.RatesSchema], required: true }),
521
521
  (0, class_validator_1.IsArray)(),
522
522
  __metadata("design:type", Array)
523
- ], Site.prototype, "tarifs", void 0);
523
+ ], Site.prototype, "rates", void 0);
524
524
  __decorate([
525
525
  (0, swagger_1.ApiProperty)(),
526
526
  (0, mongoose_1.Prop)({ required: false }),
@@ -1,5 +1,5 @@
1
1
  import { ImageryDate } from './imagery-date';
2
- export declare class Tarif {
2
+ export declare class Rates {
3
3
  days: number[];
4
4
  name: string;
5
5
  endHour: number;
@@ -10,11 +10,11 @@ export declare class Tarif {
10
10
  subscribedPower: number;
11
11
  subscriptionRate: number;
12
12
  }
13
- export declare const TarifSchema: import("mongoose").Schema<Tarif, import("mongoose").Model<Tarif, any, any, any, import("mongoose").Document<unknown, any, Tarif, any, {}> & Tarif & {
13
+ export declare const RatesSchema: import("mongoose").Schema<Rates, import("mongoose").Model<Rates, any, any, any, import("mongoose").Document<unknown, any, Rates, any, {}> & Rates & {
14
14
  _id: import("mongoose").Types.ObjectId;
15
15
  } & {
16
16
  __v: number;
17
- }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Tarif, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Tarif>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Tarif> & {
17
+ }, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, Rates, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<Rates>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<Rates> & {
18
18
  _id: import("mongoose").Types.ObjectId;
19
19
  } & {
20
20
  __v: number;
@@ -9,49 +9,49 @@ 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.TarifSchema = exports.Tarif = void 0;
12
+ exports.RatesSchema = exports.Rates = void 0;
13
13
  const mongoose_1 = require("@nestjs/mongoose");
14
14
  const imagery_date_1 = require("./imagery-date");
15
- let Tarif = class Tarif {
15
+ let Rates = class Rates {
16
16
  };
17
- exports.Tarif = Tarif;
17
+ exports.Rates = Rates;
18
18
  __decorate([
19
19
  (0, mongoose_1.Prop)([Number]),
20
20
  __metadata("design:type", Array)
21
- ], Tarif.prototype, "days", void 0);
21
+ ], Rates.prototype, "days", void 0);
22
22
  __decorate([
23
23
  (0, mongoose_1.Prop)(),
24
24
  __metadata("design:type", String)
25
- ], Tarif.prototype, "name", void 0);
25
+ ], Rates.prototype, "name", void 0);
26
26
  __decorate([
27
27
  (0, mongoose_1.Prop)(),
28
28
  __metadata("design:type", Number)
29
- ], Tarif.prototype, "endHour", void 0);
29
+ ], Rates.prototype, "endHour", void 0);
30
30
  __decorate([
31
31
  (0, mongoose_1.Prop)(),
32
32
  __metadata("design:type", Number)
33
- ], Tarif.prototype, "energyRate", void 0);
33
+ ], Rates.prototype, "energyRate", void 0);
34
34
  __decorate([
35
35
  (0, mongoose_1.Prop)(),
36
36
  __metadata("design:type", String)
37
- ], Tarif.prototype, "id", void 0);
37
+ ], Rates.prototype, "id", void 0);
38
38
  __decorate([
39
39
  (0, mongoose_1.Prop)({ type: [imagery_date_1.ImageryDateSchema] }),
40
40
  __metadata("design:type", Array)
41
- ], Tarif.prototype, "months", void 0);
41
+ ], Rates.prototype, "months", void 0);
42
42
  __decorate([
43
43
  (0, mongoose_1.Prop)(),
44
44
  __metadata("design:type", Number)
45
- ], Tarif.prototype, "startHour", void 0);
45
+ ], Rates.prototype, "startHour", void 0);
46
46
  __decorate([
47
47
  (0, mongoose_1.Prop)(),
48
48
  __metadata("design:type", Number)
49
- ], Tarif.prototype, "subscribedPower", void 0);
49
+ ], Rates.prototype, "subscribedPower", void 0);
50
50
  __decorate([
51
51
  (0, mongoose_1.Prop)(),
52
52
  __metadata("design:type", Number)
53
- ], Tarif.prototype, "subscriptionRate", void 0);
54
- exports.Tarif = Tarif = __decorate([
53
+ ], Rates.prototype, "subscriptionRate", void 0);
54
+ exports.Rates = Rates = __decorate([
55
55
  (0, mongoose_1.Schema)({ _id: false })
56
- ], Tarif);
57
- exports.TarifSchema = mongoose_1.SchemaFactory.createForClass(Tarif);
56
+ ], Rates);
57
+ exports.RatesSchema = mongoose_1.SchemaFactory.createForClass(Rates);
package/dist/index.d.ts CHANGED
@@ -67,7 +67,7 @@ export * from './core/internal/peak-hour.model';
67
67
  export * from './core/internal/rest-of-the-years-tarif';
68
68
  export * from './core/internal/solar-potential';
69
69
  export * from './core/internal/subscription-rate.model';
70
- export * from './core/internal/tarif';
70
+ export * from './core/internal/rates';
71
71
  export * from './core/internal/folder.model';
72
72
  export * from './core/internal/leads-form';
73
73
  export * from './core/webhookTypes/webhook-leads-output.dto';
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ __exportStar(require("./core/internal/peak-hour.model"), exports);
91
91
  __exportStar(require("./core/internal/rest-of-the-years-tarif"), exports);
92
92
  __exportStar(require("./core/internal/solar-potential"), exports);
93
93
  __exportStar(require("./core/internal/subscription-rate.model"), exports);
94
- __exportStar(require("./core/internal/tarif"), exports);
94
+ __exportStar(require("./core/internal/rates"), exports);
95
95
  __exportStar(require("./core/internal/folder.model"), exports);
96
96
  __exportStar(require("./core/internal/leads-form"), exports);
97
97
  // Webhook types
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.35.0",
3
+ "version": "1.37.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {