@likewatt/models 1.122.0 → 1.123.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.
- package/dist/core/Site.d.ts +10 -0
- package/dist/core/Site.js +9 -0
- package/dist/core/enums/EnedisOpenData.d.ts +90 -0
- package/dist/core/enums/EnedisOpenData.js +102 -0
- package/dist/core/internal/open-data-profile.d.ts +86 -0
- package/dist/core/internal/open-data-profile.js +108 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +1 -1
package/dist/core/Site.d.ts
CHANGED
|
@@ -7,6 +7,7 @@ import { CustomerInfos } from './internal/customer-infos.model';
|
|
|
7
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
|
+
import { OpenDataProfile } from './internal/open-data-profile';
|
|
10
11
|
import { EnergyPriceTempo } from './internal/energy-price-tempo.model';
|
|
11
12
|
import { BuildingDataStatus } from './enums/BuildingDataStatus';
|
|
12
13
|
import { RetryHint } from './enums/RetryHint';
|
|
@@ -112,6 +113,15 @@ export declare class Site {
|
|
|
112
113
|
dataSourceHistory: DataSourceHistory[];
|
|
113
114
|
dataSource?: string;
|
|
114
115
|
selectedDataSource?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Trace de la récupération d'une courbe de charge depuis l'Open Data Enedis,
|
|
118
|
+
* quand `dataSource` vaut `OPENDATA`.
|
|
119
|
+
*
|
|
120
|
+
* Sous-document unique et non tableau : il décrit la récupération courante,
|
|
121
|
+
* l'historique des changements de source restant porté par
|
|
122
|
+
* `dataSourceHistory[]`. Absent sur tout site alimenté autrement.
|
|
123
|
+
*/
|
|
124
|
+
openDataProfile?: OpenDataProfile;
|
|
115
125
|
enedisData: boolean;
|
|
116
126
|
strasbourgData: boolean;
|
|
117
127
|
energyPricesTempo: EnergyPriceTempo[];
|
package/dist/core/Site.js
CHANGED
|
@@ -23,6 +23,7 @@ const customer_infos_model_1 = require("./internal/customer-infos.model");
|
|
|
23
23
|
const building_data_1 = require("./internal/building-data");
|
|
24
24
|
const rest_of_the_years_tarif_1 = require("./internal/rest-of-the-years-tarif");
|
|
25
25
|
const data_source_history_1 = require("./internal/data-source-history");
|
|
26
|
+
const open_data_profile_1 = require("./internal/open-data-profile");
|
|
26
27
|
const energy_price_tempo_model_1 = require("./internal/energy-price-tempo.model");
|
|
27
28
|
const BuildingDataStatus_1 = require("./enums/BuildingDataStatus");
|
|
28
29
|
const RetryHint_1 = require("./enums/RetryHint");
|
|
@@ -499,6 +500,14 @@ __decorate([
|
|
|
499
500
|
(0, class_validator_1.IsString)(),
|
|
500
501
|
__metadata("design:type", String)
|
|
501
502
|
], Site.prototype, "selectedDataSource", void 0);
|
|
503
|
+
__decorate([
|
|
504
|
+
(0, swagger_1.ApiPropertyOptional)({ type: open_data_profile_1.OpenDataProfile }),
|
|
505
|
+
(0, mongoose_1.Prop)({ type: open_data_profile_1.OpenDataProfileSchema, required: false }),
|
|
506
|
+
(0, class_validator_1.IsOptional)(),
|
|
507
|
+
(0, class_validator_1.ValidateNested)(),
|
|
508
|
+
(0, class_transformer_1.Type)(() => open_data_profile_1.OpenDataProfile),
|
|
509
|
+
__metadata("design:type", open_data_profile_1.OpenDataProfile)
|
|
510
|
+
], Site.prototype, "openDataProfile", void 0);
|
|
502
511
|
__decorate([
|
|
503
512
|
(0, swagger_1.ApiPropertyOptional)(),
|
|
504
513
|
(0, mongoose_1.Prop)({ required: false, default: false }),
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Profils de courbes de charge publiés par l'Open Data Enedis
|
|
3
|
+
* (`opendata.enedis.fr`, plateforme Data Fair).
|
|
4
|
+
*
|
|
5
|
+
* La valeur de chaque membre **est** le suffixe du slug du dataset :
|
|
6
|
+
* `courbes-de-charges-fictives-<valeur>`. Le nom du dataset se déduit donc de la
|
|
7
|
+
* valeur, sans table de correspondance à maintenir en parallèle.
|
|
8
|
+
*
|
|
9
|
+
* Un enum plat plutôt que le produit (catégorie × segment × code) parce que le
|
|
10
|
+
* catalogue Enedis est creux et asymétrique :
|
|
11
|
+
* - `ENT1` n'a pas la tranche 50-120 kVA (36-50, 120-250, 250-sup seulement)
|
|
12
|
+
* alors que `ENT3` a 36-120 ;
|
|
13
|
+
* - les codes NAF diffèrent d'un segment à l'autre (5510 en `pro` seulement,
|
|
14
|
+
* 4711 en `ent` seulement) tout en se recoupant sur 3600, 7010 et 8411.
|
|
15
|
+
* Un produit cartésien laisserait demander des datasets inexistants.
|
|
16
|
+
*
|
|
17
|
+
* Les 15 variantes `-gan` du portail sont volontairement absentes : elles sont
|
|
18
|
+
* titrées « – archives » (ancien modèle GAN, remplacé par diffusion latente).
|
|
19
|
+
*
|
|
20
|
+
* 34 valeurs, confrontées au catalogue réel du portail le 2026-08-19 (diff vide).
|
|
21
|
+
* Chaque dataset compte 8 736 000 lignes = 500 courbes fictives × 17 472 pas de
|
|
22
|
+
* 30 min, sur la fenêtre 2023-11-01 → 2024-10-29.
|
|
23
|
+
*/
|
|
24
|
+
export declare enum EnedisOpenDataProfile {
|
|
25
|
+
PRO_NAF3600 = "pro-naf3600",
|
|
26
|
+
PRO_NAF3700 = "pro-naf3700",
|
|
27
|
+
PRO_NAF5510 = "pro-naf5510",
|
|
28
|
+
PRO_NAF5610 = "pro-naf5610",
|
|
29
|
+
PRO_NAF6831 = "pro-naf6831",
|
|
30
|
+
PRO_NAF7010 = "pro-naf7010",
|
|
31
|
+
PRO_NAF8411 = "pro-naf8411",
|
|
32
|
+
PRO_NAF8413 = "pro-naf8413",
|
|
33
|
+
PRO_NAF8790 = "pro-naf8790",
|
|
34
|
+
ENT_NAF10 = "ent-naf10",
|
|
35
|
+
ENT_NAF55 = "ent-naf55",
|
|
36
|
+
ENT_NAF3600 = "ent-naf3600",
|
|
37
|
+
ENT_NAF4711 = "ent-naf4711",
|
|
38
|
+
ENT_NAF7010 = "ent-naf7010",
|
|
39
|
+
ENT_NAF8411 = "ent-naf8411",
|
|
40
|
+
RES1_3_6 = "res1-3-6",
|
|
41
|
+
RES11_6_9 = "res11-6-9",
|
|
42
|
+
RES11_9_18 = "res11-9-18",
|
|
43
|
+
RES2_3_6 = "res2-3-6",
|
|
44
|
+
RES2_6_9 = "res2-6-9",
|
|
45
|
+
RES2_9_12 = "res2-9-12",
|
|
46
|
+
PRO1_0_6 = "pro1-0-6",
|
|
47
|
+
PRO1_6_12 = "pro1-6-12",
|
|
48
|
+
PRO1_12_SUP = "pro1-12-sup",
|
|
49
|
+
PRO2_0_6 = "pro2-0-6",
|
|
50
|
+
PRO2_6_12 = "pro2-6-12",
|
|
51
|
+
PRO2_12_24 = "pro2-12-24",
|
|
52
|
+
PRO2_24_SUP = "pro2-24-sup",
|
|
53
|
+
ENT1_36_50 = "ent1-36-50",
|
|
54
|
+
ENT1_120_250 = "ent1-120-250",
|
|
55
|
+
ENT1_250_SUP = "ent1-250-sup",
|
|
56
|
+
ENT3_36_120 = "ent3-36-120",
|
|
57
|
+
ENT3_120_250 = "ent3-120-250",
|
|
58
|
+
ENT3_250_SUP = "ent3-250-sup"
|
|
59
|
+
}
|
|
60
|
+
/** Catégorie fonctionnelle du profil, telle que présentée à l'utilisateur. */
|
|
61
|
+
export declare enum EnedisOpenDataCategory {
|
|
62
|
+
/** Secteur d'activité (code NAF), décliné en Professionnels / Entreprises. */
|
|
63
|
+
NAF = "NAF",
|
|
64
|
+
/** Type de profil (RES/PRO/ENT) décliné par plage de puissance souscrite. */
|
|
65
|
+
PROFILE = "PROFILE"
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Segment de la catégorie NAF.
|
|
69
|
+
*
|
|
70
|
+
* Discriminant et non décoratif : 3600, 7010 et 8411 existent dans les deux
|
|
71
|
+
* segments, donc le code NAF seul ne désigne pas un dataset.
|
|
72
|
+
*/
|
|
73
|
+
export declare enum EnedisOpenDataSegment {
|
|
74
|
+
PRO = "PRO",
|
|
75
|
+
ENT = "ENT"
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Type de profil de la catégorie PROFILE. Reprend les profils Enedis déjà
|
|
79
|
+
* utilisés par les fichiers de coefficients (`SubProfiles` côté micro conso),
|
|
80
|
+
* restreint à ceux que l'Open Data publie : ni `RES5` ni `RES3-F` n'y figurent.
|
|
81
|
+
*/
|
|
82
|
+
export declare enum EnedisOpenDataProfileType {
|
|
83
|
+
RES1 = "RES1",
|
|
84
|
+
RES11 = "RES11",
|
|
85
|
+
RES2 = "RES2",
|
|
86
|
+
PRO1 = "PRO1",
|
|
87
|
+
PRO2 = "PRO2",
|
|
88
|
+
ENT1 = "ENT1",
|
|
89
|
+
ENT3 = "ENT3"
|
|
90
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EnedisOpenDataProfileType = exports.EnedisOpenDataSegment = exports.EnedisOpenDataCategory = exports.EnedisOpenDataProfile = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Profils de courbes de charge publiés par l'Open Data Enedis
|
|
6
|
+
* (`opendata.enedis.fr`, plateforme Data Fair).
|
|
7
|
+
*
|
|
8
|
+
* La valeur de chaque membre **est** le suffixe du slug du dataset :
|
|
9
|
+
* `courbes-de-charges-fictives-<valeur>`. Le nom du dataset se déduit donc de la
|
|
10
|
+
* valeur, sans table de correspondance à maintenir en parallèle.
|
|
11
|
+
*
|
|
12
|
+
* Un enum plat plutôt que le produit (catégorie × segment × code) parce que le
|
|
13
|
+
* catalogue Enedis est creux et asymétrique :
|
|
14
|
+
* - `ENT1` n'a pas la tranche 50-120 kVA (36-50, 120-250, 250-sup seulement)
|
|
15
|
+
* alors que `ENT3` a 36-120 ;
|
|
16
|
+
* - les codes NAF diffèrent d'un segment à l'autre (5510 en `pro` seulement,
|
|
17
|
+
* 4711 en `ent` seulement) tout en se recoupant sur 3600, 7010 et 8411.
|
|
18
|
+
* Un produit cartésien laisserait demander des datasets inexistants.
|
|
19
|
+
*
|
|
20
|
+
* Les 15 variantes `-gan` du portail sont volontairement absentes : elles sont
|
|
21
|
+
* titrées « – archives » (ancien modèle GAN, remplacé par diffusion latente).
|
|
22
|
+
*
|
|
23
|
+
* 34 valeurs, confrontées au catalogue réel du portail le 2026-08-19 (diff vide).
|
|
24
|
+
* Chaque dataset compte 8 736 000 lignes = 500 courbes fictives × 17 472 pas de
|
|
25
|
+
* 30 min, sur la fenêtre 2023-11-01 → 2024-10-29.
|
|
26
|
+
*/
|
|
27
|
+
var EnedisOpenDataProfile;
|
|
28
|
+
(function (EnedisOpenDataProfile) {
|
|
29
|
+
// --- Catégorie NAF, segment Professionnels (codes à 4 chiffres) ---
|
|
30
|
+
EnedisOpenDataProfile["PRO_NAF3600"] = "pro-naf3600";
|
|
31
|
+
EnedisOpenDataProfile["PRO_NAF3700"] = "pro-naf3700";
|
|
32
|
+
EnedisOpenDataProfile["PRO_NAF5510"] = "pro-naf5510";
|
|
33
|
+
EnedisOpenDataProfile["PRO_NAF5610"] = "pro-naf5610";
|
|
34
|
+
EnedisOpenDataProfile["PRO_NAF6831"] = "pro-naf6831";
|
|
35
|
+
EnedisOpenDataProfile["PRO_NAF7010"] = "pro-naf7010";
|
|
36
|
+
EnedisOpenDataProfile["PRO_NAF8411"] = "pro-naf8411";
|
|
37
|
+
EnedisOpenDataProfile["PRO_NAF8413"] = "pro-naf8413";
|
|
38
|
+
EnedisOpenDataProfile["PRO_NAF8790"] = "pro-naf8790";
|
|
39
|
+
// --- Catégorie NAF, segment Entreprises ---
|
|
40
|
+
// 10 et 55 sont des divisions NAF à 2 chiffres : aucune validation
|
|
41
|
+
// `^\d{4}$` n'est possible sur le code.
|
|
42
|
+
EnedisOpenDataProfile["ENT_NAF10"] = "ent-naf10";
|
|
43
|
+
EnedisOpenDataProfile["ENT_NAF55"] = "ent-naf55";
|
|
44
|
+
EnedisOpenDataProfile["ENT_NAF3600"] = "ent-naf3600";
|
|
45
|
+
EnedisOpenDataProfile["ENT_NAF4711"] = "ent-naf4711";
|
|
46
|
+
EnedisOpenDataProfile["ENT_NAF7010"] = "ent-naf7010";
|
|
47
|
+
EnedisOpenDataProfile["ENT_NAF8411"] = "ent-naf8411";
|
|
48
|
+
// --- Catégorie Profil (profil × plage de puissance souscrite) ---
|
|
49
|
+
EnedisOpenDataProfile["RES1_3_6"] = "res1-3-6";
|
|
50
|
+
EnedisOpenDataProfile["RES11_6_9"] = "res11-6-9";
|
|
51
|
+
EnedisOpenDataProfile["RES11_9_18"] = "res11-9-18";
|
|
52
|
+
EnedisOpenDataProfile["RES2_3_6"] = "res2-3-6";
|
|
53
|
+
EnedisOpenDataProfile["RES2_6_9"] = "res2-6-9";
|
|
54
|
+
EnedisOpenDataProfile["RES2_9_12"] = "res2-9-12";
|
|
55
|
+
EnedisOpenDataProfile["PRO1_0_6"] = "pro1-0-6";
|
|
56
|
+
EnedisOpenDataProfile["PRO1_6_12"] = "pro1-6-12";
|
|
57
|
+
EnedisOpenDataProfile["PRO1_12_SUP"] = "pro1-12-sup";
|
|
58
|
+
EnedisOpenDataProfile["PRO2_0_6"] = "pro2-0-6";
|
|
59
|
+
EnedisOpenDataProfile["PRO2_6_12"] = "pro2-6-12";
|
|
60
|
+
EnedisOpenDataProfile["PRO2_12_24"] = "pro2-12-24";
|
|
61
|
+
EnedisOpenDataProfile["PRO2_24_SUP"] = "pro2-24-sup";
|
|
62
|
+
EnedisOpenDataProfile["ENT1_36_50"] = "ent1-36-50";
|
|
63
|
+
EnedisOpenDataProfile["ENT1_120_250"] = "ent1-120-250";
|
|
64
|
+
EnedisOpenDataProfile["ENT1_250_SUP"] = "ent1-250-sup";
|
|
65
|
+
EnedisOpenDataProfile["ENT3_36_120"] = "ent3-36-120";
|
|
66
|
+
EnedisOpenDataProfile["ENT3_120_250"] = "ent3-120-250";
|
|
67
|
+
EnedisOpenDataProfile["ENT3_250_SUP"] = "ent3-250-sup";
|
|
68
|
+
})(EnedisOpenDataProfile || (exports.EnedisOpenDataProfile = EnedisOpenDataProfile = {}));
|
|
69
|
+
/** Catégorie fonctionnelle du profil, telle que présentée à l'utilisateur. */
|
|
70
|
+
var EnedisOpenDataCategory;
|
|
71
|
+
(function (EnedisOpenDataCategory) {
|
|
72
|
+
/** Secteur d'activité (code NAF), décliné en Professionnels / Entreprises. */
|
|
73
|
+
EnedisOpenDataCategory["NAF"] = "NAF";
|
|
74
|
+
/** Type de profil (RES/PRO/ENT) décliné par plage de puissance souscrite. */
|
|
75
|
+
EnedisOpenDataCategory["PROFILE"] = "PROFILE";
|
|
76
|
+
})(EnedisOpenDataCategory || (exports.EnedisOpenDataCategory = EnedisOpenDataCategory = {}));
|
|
77
|
+
/**
|
|
78
|
+
* Segment de la catégorie NAF.
|
|
79
|
+
*
|
|
80
|
+
* Discriminant et non décoratif : 3600, 7010 et 8411 existent dans les deux
|
|
81
|
+
* segments, donc le code NAF seul ne désigne pas un dataset.
|
|
82
|
+
*/
|
|
83
|
+
var EnedisOpenDataSegment;
|
|
84
|
+
(function (EnedisOpenDataSegment) {
|
|
85
|
+
EnedisOpenDataSegment["PRO"] = "PRO";
|
|
86
|
+
EnedisOpenDataSegment["ENT"] = "ENT";
|
|
87
|
+
})(EnedisOpenDataSegment || (exports.EnedisOpenDataSegment = EnedisOpenDataSegment = {}));
|
|
88
|
+
/**
|
|
89
|
+
* Type de profil de la catégorie PROFILE. Reprend les profils Enedis déjà
|
|
90
|
+
* utilisés par les fichiers de coefficients (`SubProfiles` côté micro conso),
|
|
91
|
+
* restreint à ceux que l'Open Data publie : ni `RES5` ni `RES3-F` n'y figurent.
|
|
92
|
+
*/
|
|
93
|
+
var EnedisOpenDataProfileType;
|
|
94
|
+
(function (EnedisOpenDataProfileType) {
|
|
95
|
+
EnedisOpenDataProfileType["RES1"] = "RES1";
|
|
96
|
+
EnedisOpenDataProfileType["RES11"] = "RES11";
|
|
97
|
+
EnedisOpenDataProfileType["RES2"] = "RES2";
|
|
98
|
+
EnedisOpenDataProfileType["PRO1"] = "PRO1";
|
|
99
|
+
EnedisOpenDataProfileType["PRO2"] = "PRO2";
|
|
100
|
+
EnedisOpenDataProfileType["ENT1"] = "ENT1";
|
|
101
|
+
EnedisOpenDataProfileType["ENT3"] = "ENT3";
|
|
102
|
+
})(EnedisOpenDataProfileType || (exports.EnedisOpenDataProfileType = EnedisOpenDataProfileType = {}));
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { EnedisOpenDataCategory, EnedisOpenDataProfileType, EnedisOpenDataSegment } from '../enums/EnedisOpenData';
|
|
2
|
+
/**
|
|
3
|
+
* Trace de la récupération d'une courbe de charge depuis l'Open Data Enedis.
|
|
4
|
+
*
|
|
5
|
+
* Décrit la récupération **courante** : l'historique des changements de source
|
|
6
|
+
* reste porté par `dataSourceHistory[]`, on ne double pas ce mécanisme.
|
|
7
|
+
*
|
|
8
|
+
* Les dimensions sont stockées décomposées (`segment`, `nafCode`, `profileType`,
|
|
9
|
+
* `powerRange`) plutôt que sous la seule forme du slug, pour que le front et le
|
|
10
|
+
* module d'analyse n'aient pas à le découper eux-mêmes.
|
|
11
|
+
*/
|
|
12
|
+
export declare class OpenDataProfile {
|
|
13
|
+
category: EnedisOpenDataCategory;
|
|
14
|
+
/**
|
|
15
|
+
* Segment de la catégorie NAF. Renseigné pour cette catégorie uniquement.
|
|
16
|
+
*
|
|
17
|
+
* Obligatoire dès qu'on est en NAF : 3600, 7010 et 8411 existent en `pro`
|
|
18
|
+
* comme en `ent`, donc `nafCode` seul ne désigne pas un dataset.
|
|
19
|
+
*/
|
|
20
|
+
segment?: EnedisOpenDataSegment;
|
|
21
|
+
/**
|
|
22
|
+
* Code NAF, catégorie NAF uniquement — `'10'`, `'55'`, `'3600'`…
|
|
23
|
+
*
|
|
24
|
+
* Typé chaîne et non nombre : les codes du segment Entreprises mélangent
|
|
25
|
+
* divisions à 2 chiffres (10, 55) et codes à 4 chiffres, et un `'0'` de tête
|
|
26
|
+
* ne doit pas se perdre.
|
|
27
|
+
*/
|
|
28
|
+
nafCode?: string;
|
|
29
|
+
/** Type de profil, catégorie PROFILE uniquement. */
|
|
30
|
+
profileType?: EnedisOpenDataProfileType;
|
|
31
|
+
/**
|
|
32
|
+
* Plage de puissance souscrite, catégorie PROFILE uniquement — `'3-6'`,
|
|
33
|
+
* `'6-12'`, `'250-sup'`.
|
|
34
|
+
*
|
|
35
|
+
* Conservée sous la forme littérale du slug : `-sup` correspond à la borne
|
|
36
|
+
* 25 000 kVA côté Enedis (nom du fichier source `ENT3-250-25000.csv`), qu'on
|
|
37
|
+
* ne réécrit pas pour rester alignés sur le libellé du dataset.
|
|
38
|
+
*/
|
|
39
|
+
powerRange?: string;
|
|
40
|
+
/**
|
|
41
|
+
* Slug du dataset Data Fair, clé externe **immuable**.
|
|
42
|
+
*
|
|
43
|
+
* Stocké en plus des champs décomposés : l'enum interne peut être renommé
|
|
44
|
+
* sans invalider les documents déjà écrits, et c'est le support de
|
|
45
|
+
* l'attribution exigée par la licence Ouverte / Etalab 2.0.
|
|
46
|
+
*/
|
|
47
|
+
datasetSlug: string;
|
|
48
|
+
/**
|
|
49
|
+
* Début de la fenêtre réellement couverte par la courbe.
|
|
50
|
+
*
|
|
51
|
+
* Stocké parce que l'Open Data ne publie **pas** d'année civile : la seule
|
|
52
|
+
* fenêtre disponible court du 2023-11-01 au 2024-10-29 (364 jours). Sans ces
|
|
53
|
+
* deux bornes, le front ne peut pas indiquer sur quelle période porte l'étude.
|
|
54
|
+
*/
|
|
55
|
+
periodStart?: Date;
|
|
56
|
+
/** Fin de la fenêtre réellement couverte par la courbe. */
|
|
57
|
+
periodEnd?: Date;
|
|
58
|
+
retrievedAt?: Date;
|
|
59
|
+
/**
|
|
60
|
+
* Nombre de courbes agrégées pour produire la moyenne livrée. 500 sur les
|
|
61
|
+
* 34 datasets actifs ; conservé pour garder une trace si un dataset se
|
|
62
|
+
* dégrade un jour (le lot archivé `-gan` comptait déjà un cas à 489).
|
|
63
|
+
*/
|
|
64
|
+
curveCount?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Consommation annuelle du secteur, en kWh : l'intégrale de la courbe
|
|
67
|
+
* moyenne avant toute mise à l'échelle. Sert de niveau par défaut et permet
|
|
68
|
+
* d'afficher le niveau typique à côté du niveau retenu.
|
|
69
|
+
*/
|
|
70
|
+
referenceAnnualConsumptionKwh?: number;
|
|
71
|
+
/**
|
|
72
|
+
* Consommation annuelle réellement appliquée, en kWh. Égale à la référence
|
|
73
|
+
* quand l'utilisateur n'a pas fourni de cible. Rend l'étude reproductible :
|
|
74
|
+
* c'est le seul paramètre, avec le dataset, qui détermine le CSV produit.
|
|
75
|
+
*/
|
|
76
|
+
appliedAnnualConsumptionKwh?: number;
|
|
77
|
+
}
|
|
78
|
+
export declare const OpenDataProfileSchema: import("mongoose").Schema<OpenDataProfile, import("mongoose").Model<OpenDataProfile, any, any, any, import("mongoose").Document<unknown, any, OpenDataProfile, any, {}> & OpenDataProfile & {
|
|
79
|
+
_id: import("mongoose").Types.ObjectId;
|
|
80
|
+
} & {
|
|
81
|
+
__v: number;
|
|
82
|
+
}, any>, {}, {}, {}, {}, import("mongoose").DefaultSchemaOptions, OpenDataProfile, import("mongoose").Document<unknown, {}, import("mongoose").FlatRecord<OpenDataProfile>, {}, import("mongoose").ResolveSchemaOptions<import("mongoose").DefaultSchemaOptions>> & import("mongoose").FlatRecord<OpenDataProfile> & {
|
|
83
|
+
_id: import("mongoose").Types.ObjectId;
|
|
84
|
+
} & {
|
|
85
|
+
__v: number;
|
|
86
|
+
}>;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.OpenDataProfileSchema = exports.OpenDataProfile = void 0;
|
|
13
|
+
const mongoose_1 = require("@nestjs/mongoose");
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const class_transformer_1 = require("class-transformer");
|
|
16
|
+
const EnedisOpenData_1 = require("../enums/EnedisOpenData");
|
|
17
|
+
/**
|
|
18
|
+
* Trace de la récupération d'une courbe de charge depuis l'Open Data Enedis.
|
|
19
|
+
*
|
|
20
|
+
* Décrit la récupération **courante** : l'historique des changements de source
|
|
21
|
+
* reste porté par `dataSourceHistory[]`, on ne double pas ce mécanisme.
|
|
22
|
+
*
|
|
23
|
+
* Les dimensions sont stockées décomposées (`segment`, `nafCode`, `profileType`,
|
|
24
|
+
* `powerRange`) plutôt que sous la seule forme du slug, pour que le front et le
|
|
25
|
+
* module d'analyse n'aient pas à le découper eux-mêmes.
|
|
26
|
+
*/
|
|
27
|
+
let OpenDataProfile = class OpenDataProfile {
|
|
28
|
+
};
|
|
29
|
+
exports.OpenDataProfile = OpenDataProfile;
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, mongoose_1.Prop)({ type: String, enum: EnedisOpenData_1.EnedisOpenDataCategory, required: true }),
|
|
32
|
+
(0, class_validator_1.IsEnum)(EnedisOpenData_1.EnedisOpenDataCategory),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], OpenDataProfile.prototype, "category", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, mongoose_1.Prop)({ type: String, enum: EnedisOpenData_1.EnedisOpenDataSegment, required: false }),
|
|
37
|
+
(0, class_validator_1.IsOptional)(),
|
|
38
|
+
(0, class_validator_1.IsEnum)(EnedisOpenData_1.EnedisOpenDataSegment),
|
|
39
|
+
__metadata("design:type", String)
|
|
40
|
+
], OpenDataProfile.prototype, "segment", void 0);
|
|
41
|
+
__decorate([
|
|
42
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
43
|
+
(0, class_validator_1.IsOptional)(),
|
|
44
|
+
(0, class_validator_1.IsString)(),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], OpenDataProfile.prototype, "nafCode", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, mongoose_1.Prop)({ type: String, enum: EnedisOpenData_1.EnedisOpenDataProfileType, required: false }),
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, class_validator_1.IsEnum)(EnedisOpenData_1.EnedisOpenDataProfileType),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], OpenDataProfile.prototype, "profileType", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, mongoose_1.Prop)({ type: String, required: false }),
|
|
55
|
+
(0, class_validator_1.IsOptional)(),
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], OpenDataProfile.prototype, "powerRange", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, mongoose_1.Prop)({ type: String, required: true }),
|
|
61
|
+
(0, class_validator_1.IsString)(),
|
|
62
|
+
__metadata("design:type", String)
|
|
63
|
+
], OpenDataProfile.prototype, "datasetSlug", void 0);
|
|
64
|
+
__decorate([
|
|
65
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
66
|
+
(0, class_validator_1.IsOptional)(),
|
|
67
|
+
(0, class_validator_1.IsDate)(),
|
|
68
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
69
|
+
__metadata("design:type", Date)
|
|
70
|
+
], OpenDataProfile.prototype, "periodStart", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
(0, class_validator_1.IsDate)(),
|
|
75
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
76
|
+
__metadata("design:type", Date)
|
|
77
|
+
], OpenDataProfile.prototype, "periodEnd", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, mongoose_1.Prop)({ type: Date, required: false }),
|
|
80
|
+
(0, class_validator_1.IsOptional)(),
|
|
81
|
+
(0, class_validator_1.IsDate)(),
|
|
82
|
+
(0, class_transformer_1.Type)(() => Date),
|
|
83
|
+
__metadata("design:type", Date)
|
|
84
|
+
], OpenDataProfile.prototype, "retrievedAt", void 0);
|
|
85
|
+
__decorate([
|
|
86
|
+
(0, mongoose_1.Prop)({ type: Number, required: false }),
|
|
87
|
+
(0, class_validator_1.IsOptional)(),
|
|
88
|
+
(0, class_validator_1.IsNumber)(),
|
|
89
|
+
__metadata("design:type", Number)
|
|
90
|
+
], OpenDataProfile.prototype, "curveCount", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, mongoose_1.Prop)({ type: Number, required: false }),
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
(0, class_validator_1.IsNumber)(),
|
|
95
|
+
(0, class_validator_1.IsPositive)(),
|
|
96
|
+
__metadata("design:type", Number)
|
|
97
|
+
], OpenDataProfile.prototype, "referenceAnnualConsumptionKwh", void 0);
|
|
98
|
+
__decorate([
|
|
99
|
+
(0, mongoose_1.Prop)({ type: Number, required: false }),
|
|
100
|
+
(0, class_validator_1.IsOptional)(),
|
|
101
|
+
(0, class_validator_1.IsNumber)(),
|
|
102
|
+
(0, class_validator_1.IsPositive)(),
|
|
103
|
+
__metadata("design:type", Number)
|
|
104
|
+
], OpenDataProfile.prototype, "appliedAnnualConsumptionKwh", void 0);
|
|
105
|
+
exports.OpenDataProfile = OpenDataProfile = __decorate([
|
|
106
|
+
(0, mongoose_1.Schema)({ _id: false })
|
|
107
|
+
], OpenDataProfile);
|
|
108
|
+
exports.OpenDataProfileSchema = mongoose_1.SchemaFactory.createForClass(OpenDataProfile);
|
package/dist/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export * from './core/enums/BannerSeverity';
|
|
|
46
46
|
export * from './core/enums/InvoiceRatesOption';
|
|
47
47
|
export * from './core/enums/InvoicePricingPeriod';
|
|
48
48
|
export * from './core/enums/InvoiceNetwork';
|
|
49
|
+
export * from './core/enums/EnedisOpenData';
|
|
49
50
|
export * from './core/internal/microservice-error';
|
|
50
51
|
export * from './core/internal/battery-params';
|
|
51
52
|
export * from './core/internal/bounding-box';
|
|
@@ -55,6 +56,7 @@ export * from './core/internal/chart-theme';
|
|
|
55
56
|
export * from './core/internal/conversion-params';
|
|
56
57
|
export * from './core/internal/customer-infos.model';
|
|
57
58
|
export * from './core/internal/data-source-history';
|
|
59
|
+
export * from './core/internal/open-data-profile';
|
|
58
60
|
export * from './core/internal/extraction-data.model';
|
|
59
61
|
export * from './core/internal/default-ppa-tarif';
|
|
60
62
|
export * from './core/internal/ecs-params';
|
package/dist/index.js
CHANGED
|
@@ -72,6 +72,7 @@ __exportStar(require("./core/enums/BannerSeverity"), exports);
|
|
|
72
72
|
__exportStar(require("./core/enums/InvoiceRatesOption"), exports);
|
|
73
73
|
__exportStar(require("./core/enums/InvoicePricingPeriod"), exports);
|
|
74
74
|
__exportStar(require("./core/enums/InvoiceNetwork"), exports);
|
|
75
|
+
__exportStar(require("./core/enums/EnedisOpenData"), exports);
|
|
75
76
|
// Error types
|
|
76
77
|
__exportStar(require("./core/internal/microservice-error"), exports);
|
|
77
78
|
// Sub-models
|
|
@@ -83,6 +84,7 @@ __exportStar(require("./core/internal/chart-theme"), exports);
|
|
|
83
84
|
__exportStar(require("./core/internal/conversion-params"), exports);
|
|
84
85
|
__exportStar(require("./core/internal/customer-infos.model"), exports);
|
|
85
86
|
__exportStar(require("./core/internal/data-source-history"), exports);
|
|
87
|
+
__exportStar(require("./core/internal/open-data-profile"), exports);
|
|
86
88
|
__exportStar(require("./core/internal/extraction-data.model"), exports);
|
|
87
89
|
__exportStar(require("./core/internal/default-ppa-tarif"), exports);
|
|
88
90
|
__exportStar(require("./core/internal/ecs-params"), exports);
|