@likewatt/models-front 1.83.0 → 1.85.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.
@@ -3,6 +3,7 @@ import { BuildingData } from '../site/BuildingData.types';
3
3
  import { ConsumptionIndexes } from '../site/ConsumptionIndexes.types';
4
4
  import { CustomerInfos } from '../site/CustomerInfos.types';
5
5
  import { DataSourceHistory } from '../site/DataSourceHistory.types';
6
+ import { ExtractionData } from '../site/ExtractionData.types';
6
7
  import { EnergyPrice } from '../site/EnergyPrice.types';
7
8
  import { EnergyPriceTempo } from '../site/EnergyPriceTempo.types';
8
9
  import { BuildingDataStatus, Profiles, RetryHint, SiteType } from '../site/enums.types';
@@ -10,6 +11,7 @@ import { OffPeakHour } from '../site/OffPeakHour.types';
10
11
  import { PeakHour } from '../site/PeakHour.types';
11
12
  import { RestOfTheYearTarifs } from '../site/RestOfTheYearTarifs.types';
12
13
  import { Rates } from '../site/Rates.types';
14
+ import { InvoiceOcrResult } from '../site/Invoice.types';
13
15
  export interface Site {
14
16
  _id: string;
15
17
  country: string;
@@ -55,6 +57,11 @@ export interface Site {
55
57
  * UNRECOVERABLE errors.
56
58
  */
57
59
  automaticUpdateRetryExhausted?: boolean | null;
60
+ /**
61
+ * Etat d'erreur/retry d'extraction par pipeline (aujourd'hui `injection`).
62
+ * Isolé des champs `automaticUpdate*` ci-dessus, dédiés au soutirage.
63
+ */
64
+ extractionData?: ExtractionData;
58
65
  scenario?: string;
59
66
  user: string;
60
67
  profile?: Profiles;
@@ -124,4 +131,5 @@ export interface Site {
124
131
  hasAnalysis: boolean;
125
132
  hasContractData: boolean;
126
133
  scenarioOption?: string;
134
+ invoiceData?: InvoiceOcrResult;
127
135
  }
package/dist/index.d.ts CHANGED
@@ -40,6 +40,7 @@ export * from './site/ConsumptionIndexes.types';
40
40
  export * from './site/CustomerInfos.types';
41
41
  export * from './site/DataSourceHistory.types';
42
42
  export * from './site/EnergyPrice.types';
43
+ export * from './site/ExtractionData.types';
43
44
  export * from './site/EnergyPriceTempo.types';
44
45
  export * from './site/enums.types';
45
46
  export * from './site/ImageryDate.types';
@@ -51,4 +52,5 @@ export * from './site/SolarPotential.types';
51
52
  export * from './site/Rates.types';
52
53
  export * from './site/LeadsForm.types';
53
54
  export * from './core/SiteConstants';
55
+ export * from './site/Invoice.types';
54
56
  export * from './common/Comments.types';
package/dist/index.js CHANGED
@@ -59,6 +59,7 @@ __exportStar(require("./site/ConsumptionIndexes.types"), exports);
59
59
  __exportStar(require("./site/CustomerInfos.types"), exports);
60
60
  __exportStar(require("./site/DataSourceHistory.types"), exports);
61
61
  __exportStar(require("./site/EnergyPrice.types"), exports);
62
+ __exportStar(require("./site/ExtractionData.types"), exports);
62
63
  __exportStar(require("./site/EnergyPriceTempo.types"), exports);
63
64
  __exportStar(require("./site/enums.types"), exports);
64
65
  __exportStar(require("./site/ImageryDate.types"), exports);
@@ -70,5 +71,6 @@ __exportStar(require("./site/SolarPotential.types"), exports);
70
71
  __exportStar(require("./site/Rates.types"), exports);
71
72
  __exportStar(require("./site/LeadsForm.types"), exports);
72
73
  __exportStar(require("./core/SiteConstants"), exports);
74
+ __exportStar(require("./site/Invoice.types"), exports);
73
75
  // Common exports
74
76
  __exportStar(require("./common/Comments.types"), exports);
@@ -0,0 +1,24 @@
1
+ import { RetryHint } from './enums.types';
2
+ /**
3
+ * Etat d'erreur/retry d'un pipeline d'extraction Enedis pour un site.
4
+ * Mêmes champs que les colonnes legacy `automaticUpdate*` (dédiées au pipeline
5
+ * soutirage pour compat), mais isolés par pipeline sous `extractionData`.
6
+ */
7
+ export interface ExtractionPipelineState {
8
+ error?: string | null;
9
+ /**
10
+ * Code d'erreur structuré (ex. 'SGT500', 'NO_INJECTION_DATA', 'NETWORK').
11
+ * Source de vérité pour le classifier de retry côté front.
12
+ */
13
+ errorCode?: string | null;
14
+ errorHint?: RetryHint | null;
15
+ retryAt?: Date | string | null;
16
+ retryExhausted?: boolean | null;
17
+ }
18
+ /**
19
+ * Etat d'extraction par pipeline. Aujourd'hui seul `injection` est peuplé
20
+ * (le soutirage utilise encore les champs `automaticUpdate*` du site).
21
+ */
22
+ export interface ExtractionData {
23
+ injection?: ExtractionPipelineState;
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,12 @@
1
+ import { EnergyPrice } from './EnergyPrice.types';
2
+ import { EnergyPriceTempo } from './EnergyPriceTempo.types';
3
+ export type InvoiceRatesOption = 'BASE' | 'HP/HC' | 'TEMPO' | 'WE';
4
+ export interface InvoiceOcrResult {
5
+ documentId?: number;
6
+ enedisNumber?: string;
7
+ ratesOption?: InvoiceRatesOption;
8
+ energyPrices?: EnergyPrice[];
9
+ energyPricesTempo?: EnergyPriceTempo[];
10
+ energyPricesWe?: EnergyPrice[];
11
+ subscriptionRates?: number;
12
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@likewatt/models-front",
3
- "version": "1.83.0",
3
+ "version": "1.85.0",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",