@likewatt/models 1.108.3 → 1.109.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.
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Postes tarifaires de fourniture extraits d'une facture par l'OCR Koncile.
3
+ *
4
+ * Liste fermée : les templates Koncile renomment systématiquement les synonymes
5
+ * rencontrés sur les factures (HPE, « HP Hiver », Pointe…) vers l'un de ces
6
+ * libellés. Les suffixes marquent la saison — HS = haute saison (hiver),
7
+ * BS = basse saison (été).
8
+ */
9
+ export declare enum InvoicePricingPeriod {
10
+ BASE = "BASE",
11
+ HP = "HP",
12
+ HC = "HC",
13
+ HPHS = "HPHS",
14
+ HCHS = "HCHS",
15
+ HPBS = "HPBS",
16
+ HCBS = "HCBS"
17
+ }
18
+ /** Saison tarifaire d'une facture saisonnière. */
19
+ export declare enum InvoiceSeason {
20
+ HIGH = "HIGH",
21
+ LOW = "LOW"
22
+ }
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InvoiceSeason = exports.InvoicePricingPeriod = void 0;
4
+ /**
5
+ * Postes tarifaires de fourniture extraits d'une facture par l'OCR Koncile.
6
+ *
7
+ * Liste fermée : les templates Koncile renomment systématiquement les synonymes
8
+ * rencontrés sur les factures (HPE, « HP Hiver », Pointe…) vers l'un de ces
9
+ * libellés. Les suffixes marquent la saison — HS = haute saison (hiver),
10
+ * BS = basse saison (été).
11
+ */
12
+ var InvoicePricingPeriod;
13
+ (function (InvoicePricingPeriod) {
14
+ InvoicePricingPeriod["BASE"] = "BASE";
15
+ InvoicePricingPeriod["HP"] = "HP";
16
+ InvoicePricingPeriod["HC"] = "HC";
17
+ InvoicePricingPeriod["HPHS"] = "HPHS";
18
+ InvoicePricingPeriod["HCHS"] = "HCHS";
19
+ InvoicePricingPeriod["HPBS"] = "HPBS";
20
+ InvoicePricingPeriod["HCBS"] = "HCBS";
21
+ })(InvoicePricingPeriod || (exports.InvoicePricingPeriod = InvoicePricingPeriod = {}));
22
+ /** Saison tarifaire d'une facture saisonnière. */
23
+ var InvoiceSeason;
24
+ (function (InvoiceSeason) {
25
+ InvoiceSeason["HIGH"] = "HIGH";
26
+ InvoiceSeason["LOW"] = "LOW";
27
+ })(InvoiceSeason || (exports.InvoiceSeason = InvoiceSeason = {}));
@@ -1,4 +1,5 @@
1
1
  import { InvoiceRatesOption } from '../enums/InvoiceRatesOption';
2
+ import { InvoicePricingPeriod, InvoiceSeason } from '../enums/InvoicePricingPeriod';
2
3
  import { EnergyPrice } from './energy-price.model';
3
4
  import { EnergyPriceTempo } from './energy-price-tempo.model';
4
5
  export declare class InvoiceOcrResult {
@@ -9,6 +10,21 @@ export declare class InvoiceOcrResult {
9
10
  energyPricesTempo?: EnergyPriceTempo[];
10
11
  energyPricesWe?: EnergyPrice[];
11
12
  subscriptionRates?: number;
13
+ /**
14
+ * Postes tarifaires effectivement lus sur la facture. Persisté : le front
15
+ * s'en sert, à la réouverture de la modale, pour savoir si une seconde
16
+ * facture (celle de l'autre saison) reste attendue.
17
+ */
18
+ pricingPeriods?: InvoicePricingPeriod[];
19
+ /** Vrai lorsque la facture porte au moins un poste saisonnier. */
20
+ seasonal?: boolean;
21
+ /**
22
+ * Saison absente d'une facture saisonnière. Seul cas où l'import d'une
23
+ * seconde facture est autorisé.
24
+ */
25
+ missingSeason?: InvoiceSeason;
26
+ /** Vrai lorsque tous les postes de la structure tarifaire sont couverts. */
27
+ complete?: boolean;
12
28
  }
13
29
  export declare const InvoiceOcrResultSchema: import("mongoose").Schema<InvoiceOcrResult, import("mongoose").Model<InvoiceOcrResult, any, any, any, import("mongoose").Document<unknown, any, InvoiceOcrResult, any, {}> & InvoiceOcrResult & {
14
30
  _id: import("mongoose").Types.ObjectId;
@@ -14,6 +14,7 @@ const mongoose_1 = require("@nestjs/mongoose");
14
14
  const class_validator_1 = require("class-validator");
15
15
  const class_transformer_1 = require("class-transformer");
16
16
  const InvoiceRatesOption_1 = require("../enums/InvoiceRatesOption");
17
+ const InvoicePricingPeriod_1 = require("../enums/InvoicePricingPeriod");
17
18
  const energy_price_model_1 = require("./energy-price.model");
18
19
  const energy_price_tempo_model_1 = require("./energy-price-tempo.model");
19
20
  let InvoiceOcrResult = class InvoiceOcrResult {
@@ -67,6 +68,31 @@ __decorate([
67
68
  (0, class_validator_1.IsOptional)(),
68
69
  __metadata("design:type", Number)
69
70
  ], InvoiceOcrResult.prototype, "subscriptionRates", void 0);
71
+ __decorate([
72
+ (0, mongoose_1.Prop)({ type: [String], enum: InvoicePricingPeriod_1.InvoicePricingPeriod, required: false }),
73
+ (0, class_validator_1.IsArray)(),
74
+ (0, class_validator_1.IsEnum)(InvoicePricingPeriod_1.InvoicePricingPeriod, { each: true }),
75
+ (0, class_validator_1.IsOptional)(),
76
+ __metadata("design:type", Array)
77
+ ], InvoiceOcrResult.prototype, "pricingPeriods", void 0);
78
+ __decorate([
79
+ (0, mongoose_1.Prop)({ required: false }),
80
+ (0, class_validator_1.IsBoolean)(),
81
+ (0, class_validator_1.IsOptional)(),
82
+ __metadata("design:type", Boolean)
83
+ ], InvoiceOcrResult.prototype, "seasonal", void 0);
84
+ __decorate([
85
+ (0, mongoose_1.Prop)({ type: String, enum: InvoicePricingPeriod_1.InvoiceSeason, required: false }),
86
+ (0, class_validator_1.IsEnum)(InvoicePricingPeriod_1.InvoiceSeason),
87
+ (0, class_validator_1.IsOptional)(),
88
+ __metadata("design:type", String)
89
+ ], InvoiceOcrResult.prototype, "missingSeason", void 0);
90
+ __decorate([
91
+ (0, mongoose_1.Prop)({ required: false }),
92
+ (0, class_validator_1.IsBoolean)(),
93
+ (0, class_validator_1.IsOptional)(),
94
+ __metadata("design:type", Boolean)
95
+ ], InvoiceOcrResult.prototype, "complete", void 0);
70
96
  exports.InvoiceOcrResult = InvoiceOcrResult = __decorate([
71
97
  (0, mongoose_1.Schema)({ _id: false })
72
98
  ], InvoiceOcrResult);
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from './core/enums/ImageryQuality';
40
40
  export * from './core/enums/RetryHint';
41
41
  export * from './core/enums/BannerSeverity';
42
42
  export * from './core/enums/InvoiceRatesOption';
43
+ export * from './core/enums/InvoicePricingPeriod';
43
44
  export * from './core/internal/microservice-error';
44
45
  export * from './core/internal/battery-params';
45
46
  export * from './core/internal/bounding-box';
package/dist/index.js CHANGED
@@ -66,6 +66,7 @@ __exportStar(require("./core/enums/ImageryQuality"), exports);
66
66
  __exportStar(require("./core/enums/RetryHint"), exports);
67
67
  __exportStar(require("./core/enums/BannerSeverity"), exports);
68
68
  __exportStar(require("./core/enums/InvoiceRatesOption"), exports);
69
+ __exportStar(require("./core/enums/InvoicePricingPeriod"), exports);
69
70
  // Error types
70
71
  __exportStar(require("./core/internal/microservice-error"), exports);
71
72
  // Sub-models
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models",
3
- "version": "1.108.3",
3
+ "version": "1.109.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {