@golemio/energetics 1.12.2-dev.2739893110 → 1.12.2-dev.2740931754
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/db/example/00_clear_test_data.sql +14 -0
- package/db/example/06_eno.sql +25 -0
- package/db/example/07_enapo_om_detail.sql +140 -0
- package/db/migrations/postgresql/20260805090000-ppas-distribution-installation.js +47 -0
- package/db/migrations/postgresql/20260807090000-enapo-gid-mapping-om-detail.js +53 -0
- package/db/migrations/postgresql/20260807091000-enapo-om-detail-porsenna.js +53 -0
- package/db/migrations/postgresql/sqls/20260805090000-ppas-distribution-installation-down.sql +86 -0
- package/db/migrations/postgresql/sqls/20260805090000-ppas-distribution-installation-up.sql +124 -0
- package/db/migrations/postgresql/sqls/20260807090000-enapo-gid-mapping-om-detail-down.sql +3 -0
- package/db/migrations/postgresql/sqls/20260807090000-enapo-gid-mapping-om-detail-up.sql +182 -0
- package/db/migrations/postgresql/sqls/20260807091000-enapo-om-detail-porsenna-down.sql +135 -0
- package/db/migrations/postgresql/sqls/20260807091000-enapo-om-detail-porsenna-up.sql +292 -0
- package/db/scripts/ded_gid_mapping_mock_import.sql +48 -0
- package/dist/integration-engine/enapo/datasources/ppas/distribution/PpasDistributionDatasource.js +2 -5
- package/dist/integration-engine/enapo/datasources/ppas/distribution/PpasDistributionDatasource.js.map +1 -1
- package/dist/integration-engine/enapo/ioc/Di.js +2 -0
- package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +1 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +1 -0
- package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
- package/dist/integration-engine/enapo/repositories/ppas/PpasDistributionInvoiceInstallationRepository.d.ts +7 -0
- package/dist/integration-engine/enapo/repositories/ppas/PpasDistributionInvoiceInstallationRepository.js +36 -0
- package/dist/integration-engine/enapo/repositories/ppas/PpasDistributionInvoiceInstallationRepository.js.map +1 -0
- package/dist/integration-engine/enapo/transformations/ppas/PpasDistributionTransformation.d.ts +7 -0
- package/dist/integration-engine/enapo/transformations/ppas/PpasDistributionTransformation.js +133 -122
- package/dist/integration-engine/enapo/transformations/ppas/PpasDistributionTransformation.js.map +1 -1
- package/dist/integration-engine/enapo/workers/task/EnapoPpasDistributionTask.d.ts +3 -1
- package/dist/integration-engine/enapo/workers/task/EnapoPpasDistributionTask.js +10 -5
- package/dist/integration-engine/enapo/workers/task/EnapoPpasDistributionTask.js.map +1 -1
- package/dist/output-gateway/constants/Links.d.ts +1 -0
- package/dist/output-gateway/constants/Links.js +2 -1
- package/dist/output-gateway/constants/Links.js.map +1 -1
- package/dist/output-gateway/controllers/v2/EnoBuildingsController.d.ts +11 -0
- package/dist/output-gateway/controllers/v2/EnoBuildingsController.js +53 -0
- package/dist/output-gateway/controllers/v2/EnoBuildingsController.js.map +1 -0
- package/dist/output-gateway/helpers/objectMappers.d.ts +10 -0
- package/dist/output-gateway/helpers/objectMappers.js +37 -0
- package/dist/output-gateway/helpers/objectMappers.js.map +1 -0
- package/dist/output-gateway/index.js +8 -1
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +9 -1
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +4 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js +4 -0
- package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -1
- package/dist/output-gateway/models/EnoBuildingDetailViewModel.d.ts +35 -0
- package/dist/output-gateway/models/EnoBuildingDetailViewModel.js +43 -0
- package/dist/output-gateway/models/EnoBuildingDetailViewModel.js.map +1 -0
- package/dist/output-gateway/models/EnoConsumptionPointViewModel.d.ts +106 -0
- package/dist/output-gateway/models/EnoConsumptionPointViewModel.js +119 -0
- package/dist/output-gateway/models/EnoConsumptionPointViewModel.js.map +1 -0
- package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.d.ts +27 -0
- package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.js +41 -0
- package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.d.ts +30 -0
- package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.js +3 -0
- package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.d.ts +106 -0
- package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.js +3 -0
- package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.js.map +1 -0
- package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.d.ts +22 -0
- package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.js +3 -0
- package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.js.map +1 -0
- package/dist/output-gateway/repositories/AbstractNumericParsingRepository.d.ts +12 -0
- package/dist/output-gateway/repositories/AbstractNumericParsingRepository.js +41 -0
- package/dist/output-gateway/repositories/AbstractNumericParsingRepository.js.map +1 -0
- package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.d.ts +8 -0
- package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.js +62 -0
- package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.js.map +1 -0
- package/dist/output-gateway/repositories/EnoBuildingDetailRepository.d.ts +18 -0
- package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js +100 -0
- package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js.map +1 -0
- package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.d.ts +8 -0
- package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.js +51 -0
- package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.js.map +1 -0
- package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.d.ts +8 -0
- package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.js +51 -0
- package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.js.map +1 -0
- package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.d.ts +8 -0
- package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.js +52 -0
- package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.js.map +1 -0
- package/dist/output-gateway/repositories/PpasInvoiceChildRepository.d.ts +13 -0
- package/dist/output-gateway/repositories/PpasInvoiceChildRepository.js +39 -0
- package/dist/output-gateway/repositories/PpasInvoiceChildRepository.js.map +1 -0
- package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.d.ts +22 -0
- package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.js +3 -0
- package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.js.map +1 -0
- package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.d.ts +108 -0
- package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.js +3 -0
- package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.js.map +1 -0
- package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.d.ts +9 -0
- package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js +40 -0
- package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js.map +1 -0
- package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.d.ts +14 -0
- package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js +150 -0
- package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js.map +1 -0
- package/dist/schema-definitions/datasources/enapo/ppas/distribution/IPpasDistributionInvoiceDetailInput.d.ts +10 -10
- package/dist/schema-definitions/datasources/enapo/ppas/distribution/IPpasDistributionInvoiceListInput.d.ts +1 -1
- package/dist/schema-definitions/datasources/enapo/ppas/distribution/PpasDistributionSchema.d.ts +1 -3
- package/dist/schema-definitions/datasources/enapo/ppas/distribution/PpasDistributionSchema.js +57 -72
- package/dist/schema-definitions/datasources/enapo/ppas/distribution/PpasDistributionSchema.js.map +1 -1
- package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.d.ts +17 -0
- package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.js +63 -0
- package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.js.map +1 -0
- package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.d.ts +11 -0
- package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.js +3 -0
- package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.js.map +1 -0
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceDeviceModel.d.ts +9 -8
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceDeviceModel.js +10 -8
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceDeviceModel.js.map +1 -1
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceInstallationModel.d.ts +26 -0
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceInstallationModel.js +56 -0
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceInstallationModel.js.map +1 -0
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceModel.d.ts +1 -17
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceModel.js +1 -33
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceModel.js.map +1 -1
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.d.ts +2 -1
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.js +5 -3
- package/dist/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.js.map +1 -1
- package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoice.d.ts +1 -17
- package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoiceDevice.d.ts +9 -7
- package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoiceInstallation.d.ts +20 -0
- package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoiceInstallation.js +3 -0
- package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoiceInstallation.js.map +1 -0
- package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoicePrice.d.ts +3 -1
- package/dist/schema-definitions/models/eno/AddressModel.d.ts +1 -1
- package/dist/schema-definitions/models/eno/AddressModel.js +1 -1
- package/dist/schema-definitions/models/eno/AddressModel.js.map +1 -1
- package/dist/schema-definitions/models/eno/interfaces/IAddress.d.ts +1 -1
- package/docs/implementation_documentation.md +43 -2
- package/docs/openapi-output.yaml +263 -1
- package/package.json +1 -1
|
@@ -8,6 +8,7 @@ exports.PpasDistributionInvoicePriceModel = PpasDistributionInvoicePriceModel;
|
|
|
8
8
|
PpasDistributionInvoicePriceModel.TABLE_NAME = "enapo_ppas_distribution_invoice_price";
|
|
9
9
|
PpasDistributionInvoicePriceModel.attributeModel = {
|
|
10
10
|
invoice_id: { type: sequelize_1.DataTypes.STRING, primaryKey: true },
|
|
11
|
+
place_id: { type: sequelize_1.DataTypes.STRING, primaryKey: true },
|
|
11
12
|
customer_id: { type: sequelize_1.DataTypes.STRING, primaryKey: true },
|
|
12
13
|
date_from: { type: sequelize_1.DataTypes.DATEONLY, primaryKey: true },
|
|
13
14
|
date_to: { type: sequelize_1.DataTypes.DATEONLY, primaryKey: true },
|
|
@@ -17,7 +18,7 @@ PpasDistributionInvoicePriceModel.attributeModel = {
|
|
|
17
18
|
quantity: { type: sequelize_1.DataTypes.DECIMAL },
|
|
18
19
|
unit: { type: sequelize_1.DataTypes.STRING },
|
|
19
20
|
unit_price: { type: sequelize_1.DataTypes.DECIMAL },
|
|
20
|
-
time_slot: { type: sequelize_1.DataTypes.
|
|
21
|
+
time_slot: { type: sequelize_1.DataTypes.DECIMAL },
|
|
21
22
|
price_netto: { type: sequelize_1.DataTypes.DECIMAL },
|
|
22
23
|
price_type: { type: sequelize_1.DataTypes.STRING, primaryKey: true },
|
|
23
24
|
currency: { type: sequelize_1.DataTypes.STRING },
|
|
@@ -29,6 +30,7 @@ PpasDistributionInvoicePriceModel.jsonSchema = {
|
|
|
29
30
|
type: "object",
|
|
30
31
|
properties: {
|
|
31
32
|
invoice_id: { type: "string" },
|
|
33
|
+
place_id: { type: "string" },
|
|
32
34
|
customer_id: { type: "string" },
|
|
33
35
|
date_from: { type: "string" },
|
|
34
36
|
date_to: { type: "string" },
|
|
@@ -38,13 +40,13 @@ PpasDistributionInvoicePriceModel.jsonSchema = {
|
|
|
38
40
|
quantity: { type: "number" },
|
|
39
41
|
unit: { type: "string" },
|
|
40
42
|
unit_price: { type: "number" },
|
|
41
|
-
time_slot: { type: "number" },
|
|
43
|
+
time_slot: { oneOf: [{ type: "number" }, { type: "null", nullable: true }] },
|
|
42
44
|
price_netto: { type: "number" },
|
|
43
45
|
price_type: { type: "string" },
|
|
44
46
|
currency: { type: "string" },
|
|
45
47
|
tax_rate: { type: "number" },
|
|
46
48
|
},
|
|
47
|
-
required: ["invoice_id", "customer_id", "date_from", "date_to", "kind", "price_type"],
|
|
49
|
+
required: ["invoice_id", "place_id", "customer_id", "date_from", "date_to", "kind", "price_type"],
|
|
48
50
|
},
|
|
49
51
|
};
|
|
50
52
|
//# sourceMappingURL=PpasDistributionInvoicePriceModel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PpasDistributionInvoicePriceModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.ts"],"names":[],"mappings":";;;AAAA,mEAAwF;AAIxF,MAAa,iCACT,SAAQ,iBAAoC;;AADhD,
|
|
1
|
+
{"version":3,"file":"PpasDistributionInvoicePriceModel.js","sourceRoot":"","sources":["../../../../../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.ts"],"names":[],"mappings":"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"}
|
|
@@ -12,7 +12,7 @@ export interface IPpasDistributionInvoice {
|
|
|
12
12
|
customer_address_city_part: string;
|
|
13
13
|
customer_address_post_code: string;
|
|
14
14
|
customer_address_country: string;
|
|
15
|
-
customer_address_ruian_id: number;
|
|
15
|
+
customer_address_ruian_id: number | null;
|
|
16
16
|
facts_doc_date: string;
|
|
17
17
|
facts_net_date: string;
|
|
18
18
|
facts_billing_transaction: string;
|
|
@@ -21,20 +21,4 @@ export interface IPpasDistributionInvoice {
|
|
|
21
21
|
facts_price_brutto: number;
|
|
22
22
|
is_canceled?: boolean;
|
|
23
23
|
canceled_reason?: string;
|
|
24
|
-
eic: string;
|
|
25
|
-
place_id: string;
|
|
26
|
-
installations_billing_class: string;
|
|
27
|
-
installations_measurement_type: string;
|
|
28
|
-
installations_contract_contract_id: string | null;
|
|
29
|
-
installations_contract_move_in_date: string;
|
|
30
|
-
installations_contract_move_out_date: string;
|
|
31
|
-
installations_tdd_class: string;
|
|
32
|
-
installations_address_street: string;
|
|
33
|
-
installations_address_house_number: string | null;
|
|
34
|
-
installations_address_house_org_number: string | null;
|
|
35
|
-
installations_address_city: string;
|
|
36
|
-
installations_address_city_part: string;
|
|
37
|
-
installations_address_post_code: string;
|
|
38
|
-
installations_address_country: string;
|
|
39
|
-
installations_address_ruian_id: number;
|
|
40
24
|
}
|
package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoiceDevice.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
export interface IPpasDistributionInvoiceDevice {
|
|
2
2
|
device_serial_number: string;
|
|
3
3
|
invoice_id: string;
|
|
4
|
+
/** One invoice can bill several installations, so invoice_id alone no longer identifies a device. */
|
|
5
|
+
place_id: string;
|
|
4
6
|
date_from: string;
|
|
5
7
|
date_to: string;
|
|
6
8
|
reading_type: string;
|
|
7
9
|
type: string;
|
|
8
10
|
kind: string;
|
|
9
|
-
reading_from: number;
|
|
10
|
-
reading_to: number;
|
|
11
|
-
consumption: number;
|
|
11
|
+
reading_from: number | null;
|
|
12
|
+
reading_to: number | null;
|
|
13
|
+
consumption: number | null;
|
|
12
14
|
unit: string;
|
|
13
15
|
meter_reading_type: string | null;
|
|
14
|
-
gas_consumption_kwh: number;
|
|
15
|
-
volume_coefficient: number;
|
|
16
|
-
combustion_heat: number;
|
|
17
|
-
normometers_nm3: number;
|
|
16
|
+
gas_consumption_kwh: number | null;
|
|
17
|
+
volume_coefficient: number | null;
|
|
18
|
+
combustion_heat: number | null;
|
|
19
|
+
normometers_nm3: number | null;
|
|
18
20
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface IPpasDistributionInvoiceInstallation {
|
|
2
|
+
invoice_id: string;
|
|
3
|
+
customer_id: string;
|
|
4
|
+
place_id: string;
|
|
5
|
+
eic: string;
|
|
6
|
+
billing_class: string;
|
|
7
|
+
measurement_type: string;
|
|
8
|
+
contract_contract_id: string | null;
|
|
9
|
+
contract_move_in_date: string;
|
|
10
|
+
contract_move_out_date: string;
|
|
11
|
+
tdd_class: string;
|
|
12
|
+
address_street: string;
|
|
13
|
+
address_house_number: string | null;
|
|
14
|
+
address_house_org_number: string | null;
|
|
15
|
+
address_city: string;
|
|
16
|
+
address_city_part: string;
|
|
17
|
+
address_post_code: string;
|
|
18
|
+
address_country: string;
|
|
19
|
+
address_ruian_id: number | null;
|
|
20
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPpasDistributionInvoiceInstallation.js","sourceRoot":"","sources":["../../../../../../src/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoiceInstallation.ts"],"names":[],"mappings":""}
|
package/dist/schema-definitions/models/enapo/ppas/interfaces/IPpasDistributionInvoicePrice.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export interface IPpasDistributionInvoicePrice {
|
|
2
2
|
invoice_id: string;
|
|
3
|
+
/** Without it two installations on one invoice collide on the primary key and overwrite each other. */
|
|
4
|
+
place_id: string;
|
|
3
5
|
date_from: string;
|
|
4
6
|
date_to: string;
|
|
5
7
|
kind: string;
|
|
@@ -8,7 +10,7 @@ export interface IPpasDistributionInvoicePrice {
|
|
|
8
10
|
quantity: number;
|
|
9
11
|
unit: string;
|
|
10
12
|
unit_price: number;
|
|
11
|
-
time_slot: number;
|
|
13
|
+
time_slot: number | null;
|
|
12
14
|
price_netto: number;
|
|
13
15
|
currency: string;
|
|
14
16
|
tax_rate: number;
|
|
@@ -8,7 +8,7 @@ export declare class AddressModel extends Model<IAddress> implements IAddress {
|
|
|
8
8
|
poradi: number;
|
|
9
9
|
zdroj: string;
|
|
10
10
|
id: number;
|
|
11
|
-
popis: string;
|
|
11
|
+
popis: string | null;
|
|
12
12
|
hlavni: boolean;
|
|
13
13
|
static attributeModel: ModelAttributes<AddressModel, IAddress>;
|
|
14
14
|
static jsonSchema: JSONSchemaType<IAddress[]>;
|
|
@@ -39,7 +39,7 @@ AddressModel.jsonSchema = {
|
|
|
39
39
|
poradi: { type: "number" },
|
|
40
40
|
zdroj: { type: "string" },
|
|
41
41
|
id: { type: "number" },
|
|
42
|
-
popis: { type: "string" },
|
|
42
|
+
popis: { oneOf: [{ type: "string" }, { type: "null", nullable: true }] },
|
|
43
43
|
hlavni: { type: "boolean" },
|
|
44
44
|
},
|
|
45
45
|
required: ["gid", "gid_typ", "poradi", "zdroj"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddressModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/eno/AddressModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AAGxF,MAAa,YAAa,SAAQ,iBAAe;;AAAjD,oCAmDC;AAlD0B,uBAAU,GAAG,YAAY,CAAC;AAUnC,2BAAc,GAA4C;IACpE,GAAG,EAAE;QACD,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,KAAK,EAAE;QACH,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,KAAK,EAAE,qBAAS,CAAC,IAAI;IACrB,MAAM,EAAE,qBAAS,CAAC,OAAO;CAC5B,CAAC;AAEY,uBAAU,GAA+B;IACnD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"AddressModel.js","sourceRoot":"","sources":["../../../../src/schema-definitions/models/eno/AddressModel.ts"],"names":[],"mappings":";;;AACA,mEAAwF;AAGxF,MAAa,YAAa,SAAQ,iBAAe;;AAAjD,oCAmDC;AAlD0B,uBAAU,GAAG,YAAY,CAAC;AAUnC,2BAAc,GAA4C;IACpE,GAAG,EAAE;QACD,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,OAAO,EAAE;QACL,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,MAAM,EAAE;QACJ,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,KAAK,EAAE;QACH,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,qBAAS,CAAC,IAAI;KACvB;IACD,EAAE,EAAE;QACA,IAAI,EAAE,qBAAS,CAAC,MAAM;KACzB;IACD,KAAK,EAAE,qBAAS,CAAC,IAAI;IACrB,MAAM,EAAE,qBAAS,CAAC,OAAO;CAC5B,CAAC;AAEY,uBAAU,GAA+B;IACnD,IAAI,EAAE,OAAO;IACb,KAAK,EAAE;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACvB,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC1B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACzB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YACtB,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,EAAE;YACxE,MAAM,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC9B;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC;KAClD;CACJ,CAAC"}
|
|
@@ -512,7 +512,7 @@ Task zpracovává zasílaná data o spotřebě elektřiny. Data jsou nám zasíl
|
|
|
512
512
|
- v případě, že se u measurementů vyskytnou dvě hodnoty ve stejném čase, tak se hodnoty sečtou viz [sumDuplicates](../src/integration-engine/commodity-providers/helper/PreMeasurementFilter.ts)
|
|
513
513
|
- device_serial_number is extracted from raw_data `meter_replaced` value
|
|
514
514
|
- default time for meter change is set to static value `10:00` Europe/Prague time
|
|
515
|
-
- If change occurs e.g. `"meter_replaced": "2025-06-19|54292510|55505332|2025-06-30|55505332|96933662"` measurements before 19.6.2025 will have serial number `54292510`
|
|
515
|
+
- If change occurs e.g. `"meter_replaced": "2025-06-19|54292510|55505332|2025-06-30|55505332|96933662"` measurements before 19.6.2025 will have serial number `54292510` measurements after `2025-06-19 10:00` will have serial number `55505332` and measurements after `2025-06-30 10:00` will have serial number `96933662`
|
|
516
516
|
- [DeviceSerialNumberExtractor](../src/integration-engine/enapo/transformations/pre/helpers/DeviceSerialNumberExtractor.ts)
|
|
517
517
|
- data modely
|
|
518
518
|
- [EnapoMeasurementsModel](../src/schema-definitions/models/enapo/EnapoMeasurementsModel.ts) tabulka `enapo_measurements`
|
|
@@ -691,6 +691,7 @@ Task stahuje fakturační data distribuce od PPAS včetně informací o fakturá
|
|
|
691
691
|
- parametry: `{ from?, to? }`
|
|
692
692
|
- `from` - datum od (formát YYYY-MM-DD), volitelné - výchozí: dnes - 3 dny
|
|
693
693
|
- `to` - datum do (formát YYYY-MM-DD), volitelné - výchozí: dnes
|
|
694
|
+
- zdrojové API povoluje rozsah maximálně 366 dní, delší rozsah vrací chybu 400 - pro dotažení historie je nutné poslat zprávu pro každý rok zvlášť
|
|
694
695
|
- validační schéma: [EnapoPpasDistributionParamsSchema](../src/integration-engine/enapo/workers/schema/EnapoPpasDistributionParamsSchema.ts)
|
|
695
696
|
- závislé fronty (do kterých jsou odesílány zprávy z metody workeru)
|
|
696
697
|
- žádné
|
|
@@ -705,6 +706,7 @@ Task stahuje fakturační data distribuce od PPAS včetně informací o fakturá
|
|
|
705
706
|
- Rozlišuje mezi standardní cenou STANDARD a korekcí CORRECTION
|
|
706
707
|
- data modely
|
|
707
708
|
- [PpasDistributionInvoiceModel](../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceModel.ts) tabulka `ppas_distribution_invoice` - hlavičky faktur
|
|
709
|
+
- [PpasDistributionInvoiceInstallationModel](../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceInstallationModel.ts) tabulka `enapo_ppas_distribution_installation` - odběrná místa faktury
|
|
708
710
|
- [PpasDistributionInvoiceDeviceModel](../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoiceDeviceModel.ts) tabulka `ppas_distribution_invoice_device` - zařízení a odečty
|
|
709
711
|
- [PpasDistributionInvoicePriceModel](../src/schema-definitions/models/enapo/ppas/PpasDistributionInvoicePriceModel.ts) tabulka `ppas_distribution_invoice_price` - cenové položky
|
|
710
712
|
|
|
@@ -811,12 +813,27 @@ Task stahuje data o měřidlech a spotřebách z Porsenna API (e-Manazer).
|
|
|
811
813
|
- zdrojový soubor: [openapi-output.yaml](./openapi-output.yaml)
|
|
812
814
|
- rabin: https://rabin.golemio.cz/v2/docs/openapi/
|
|
813
815
|
- golem: https://api.golemio.cz/v2/docs/openapi/
|
|
814
|
-
- přístup je řízen pomocí interního parametru `accessLimit`, který
|
|
816
|
+
- přístup je řízen pomocí interního parametru `accessLimit`, který nastavuje permission proxy (klient ho neposílá)
|
|
815
817
|
- při obdržení dotazu na API se stáhnou povolené organizace z tabulky `access_limit` a omezí se podle toho dotazy do databáze
|
|
816
818
|
- pokud je `accessLimit` nastaven na `admin`, tak se vždy dotazuje na všechny organizace
|
|
819
|
+
- `accessLimit` vyžadují všechny endpointy nad původní datovou doménou OICT Energetika (tabulky `organizations*` a `consumption_energy_*`), kde jsou data vázaná na organizace; endpointy projektu ENAPO (aktuální oficiální zkratka **DeD** — v URL se používá `/ded/`, tabulky si ponechávají prefix `enapo_` / `eno_`) parametr nepoužívají vůbec — data nejsou vázaná na organizace a validace `checkErrors` (`checkExact`) parametr odmítne jako nedeklarovaný s HTTP 400
|
|
817
820
|
|
|
818
821
|
### API
|
|
819
822
|
|
|
823
|
+
Přehled endpointů a parametru `accessLimit`:
|
|
824
|
+
|
|
825
|
+
| Endpoint | Datová doména (tabulky) | `accessLimit` |
|
|
826
|
+
| --------------------------------------------- | ---------------------------------------- | ---------------------------------------------- |
|
|
827
|
+
| `/v2/energetics/buildings` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
828
|
+
| `/v2/energetics/buildings/:id` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
829
|
+
| `/v2/energetics/organizations` | OICT Energetika (`organizations*`) | povinný |
|
|
830
|
+
| `/v2/energetics/organizations/:id` | OICT Energetika (`organizations*`) | povinný |
|
|
831
|
+
| `/v2/energetics/devices` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
832
|
+
| `/v2/energetics/devices/:id` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
833
|
+
| `/v2/energetics/measurements` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
834
|
+
| `/v2/energetics/measurements/monthly-reading` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
835
|
+
| `/v2/energetics/ded/buildings/:gid` | DeD / ENAPO (`enapo_*`, `eno_*`) | nepoužívá se — parametr je odmítnut s HTTP 400 |
|
|
836
|
+
|
|
820
837
|
#### _/v2/energetics/buildings_
|
|
821
838
|
|
|
822
839
|
#### _/v2/energetics/buildings/:id_
|
|
@@ -848,3 +865,27 @@ Task stahuje data o měřidlech a spotřebách z Porsenna API (e-Manazer).
|
|
|
848
865
|
|
|
849
866
|
- zdrojové tabulky
|
|
850
867
|
- consumption_energy_measurements
|
|
868
|
+
|
|
869
|
+
#### _/v2/energetics/ded/buildings/:gid_
|
|
870
|
+
|
|
871
|
+
- detail budovy (ENO) s odběrnými místy (OM) a technickými parametry pro DeD
|
|
872
|
+
- přístup: bez `accessLimit` — endpoint čte výhradně tabulky ENAPO (`enapo_*`, `eno_*`), které nejsou vázané na organizace z domény OICT Energetika, takže se nefiltruje přes tabulku `access_limit`; parametr `accessLimit` (ani žádný jiný query parametr) endpoint nepřijímá a vrací pro něj 400
|
|
873
|
+
- zdrojové tabulky a pohledy
|
|
874
|
+
- `v_enapo_building_detail` — pohled nad `eno_budova` (dedup přes `zdroj` pomocí `DISTINCT ON (gid)`)
|
|
875
|
+
- `eno_adresa` — všechny adresy budovy (deduplikované podle `popis`)
|
|
876
|
+
- `v_enapo_building_consumption_points` — pohled nad `enapo_gid_mapping` obohacený o:
|
|
877
|
+
- `enapo_pre_metadata_history` — poslední měsíc metadat PRE (jen EAN / elektřina)
|
|
878
|
+
- `enapo_ppas_distribution_invoice(_installation)` — poslední nestornovaná distribuční faktura (jen EIC / plyn, join přes `eic` v tabulce instalací)
|
|
879
|
+
- `enapo_ppas_commercial_invoice(_installations)` — poslední nestornovaná obchodní faktura (jen EIC / plyn, join přes `eic`)
|
|
880
|
+
- `UNION ALL` větev pro OM známá pouze z Porsenny (e-manažer): hlavní měřidla (`level = main`) z `enapo_porsenna_devices`, jejichž `identifier` není namapován na daný GID v `enapo_gid_mapping`; `commodity` z typu měřidla (v reálných datech existují pouze `electricity_meter` / `gasometer` / `heat_meter` / `water_meter`), `id_type` odvozen přímo z komodity (elektřina → ean, plyn → eic, teplo a voda → `om` — standardní identifikátor nemají), `link_source = 'porsenna'`, `is_active` z `disabled_at`
|
|
881
|
+
- `v_enapo_building_porsenna_devices` — měřidla Porsenny s budovou (`enapo_porsenna_devices` × `enapo_porsenna_buildings` přes `(source, building_id)`); slouží pro obohacení OM o blok `porsenna` (měřidlo + podružná měřidla + roční spotřeby z `enapo_porsenna_consumption`) a pro blok `energy_management` na úrovni budovy
|
|
882
|
+
- `enapo_ppas_distribution_invoice_device` / `_price`, `enapo_ppas_commercial_invoice_device` / `_price` — dotahované podle id faktury a filtrované podle `place_id` instalace (jedna faktura může účtovat více OM, bez filtru by se řádky mísily)
|
|
883
|
+
- mapovací tabulka `enapo_gid_mapping`
|
|
884
|
+
- vlastní kontrakt modulu; aktuálně plněná mock daty (`link_source = 'mock'`)
|
|
885
|
+
- v budoucnu ji bude plnit synchronizační task z dbt výstupu datového týmu (`tmp.ded_gid_mapping`, `link_source = 'energobroker_kod_eno'`)
|
|
886
|
+
- sloupec `is_active` v pohledu je odvozený z `valid_to` (NULL nebo v budoucnu = aktivní); expirovaná mapování se vracejí s příznakem
|
|
887
|
+
- struktura odpovědi
|
|
888
|
+
- komoditně specifická data jsou vnořená pod klíči `electricity` / `gas` u každého OM; v odpovědi je pouze klíč odpovídající poli `commodity`, ostatní jsou zcela vynechány
|
|
889
|
+
- detail existuje, pokud pro GID máme jakákoli data — zná ho alespoň jeden zdroj (`eno_budova`, `eno_adresa`, `enapo_gid_mapping`, nebo Porsenna): pokud GID není v `eno_budova`, ale má adresy, namapovaná OM či měřidla, vrací se 200 s `building: null` a chybějící části jako `null` / prázdná pole (cca 29 % GIDů z mapování nemá záznam v ENO); 404 pouze pokud GID nezná žádný zdroj
|
|
890
|
+
- OM známé z obou zdrojů (mapování i Porsenna) je v odpovědi jednou — data Porsenny jsou vnořená jako blok `porsenna` v příslušném komoditním klíči; duplicitní záznamy nevznikají
|
|
891
|
+
- budoucí komodity (teplo, voda) se přidají jako nové klíče bez breaking change
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -15,7 +15,18 @@ servers:
|
|
|
15
15
|
description: Main (production) server
|
|
16
16
|
tags:
|
|
17
17
|
- name: ⚡ Energetics (v2)
|
|
18
|
-
description:
|
|
18
|
+
description: >-
|
|
19
|
+
💡 Organizations & measurement devices — the original OICT Energetika data domain
|
|
20
|
+
(`organizations*` and `consumption_energy_*` tables). All endpoints in this group are
|
|
21
|
+
organization-scoped and require the internal `accessLimit` query parameter, which is set
|
|
22
|
+
by the permission proxy (never by the client).
|
|
23
|
+
- name: 🗺️ Energetics DeD (v2)
|
|
24
|
+
description: >-
|
|
25
|
+
🏢 DeD — city-wide energy management overview for Prague buildings. A separate data
|
|
26
|
+
domain from ⚡ Energetics: ENO buildings, consumption points (OM), PRE/PPAS enrichment
|
|
27
|
+
and Porsenna e-manazer devices. Data is not organization-scoped, so these endpoints do
|
|
28
|
+
not use the `accessLimit` parameter at all — sending it (or any other unknown query
|
|
29
|
+
parameter) is rejected with HTTP 400.
|
|
19
30
|
paths:
|
|
20
31
|
/v2/energetics/buildings:
|
|
21
32
|
get:
|
|
@@ -73,6 +84,55 @@ paths:
|
|
|
73
84
|
schema:
|
|
74
85
|
$ref: "#/components/schemas/EnergeticsBuildingFull"
|
|
75
86
|
|
|
87
|
+
/v2/energetics/ded/buildings/{gid}:
|
|
88
|
+
get:
|
|
89
|
+
tags:
|
|
90
|
+
- 🗺️ Energetics DeD (v2)
|
|
91
|
+
summary: ENO building detail with consumption points (OM) and technical parameters
|
|
92
|
+
description: >-
|
|
93
|
+
Returns the ENO building (eno_budova) identified by GID together with its addresses and all
|
|
94
|
+
consumption points mapped to it. Commodity-specific data is nested under the
|
|
95
|
+
`electricity`/`gas`/`heat`/`water` keys of each consumption point; only the key matching the
|
|
96
|
+
`commodity` field is present, the others are omitted entirely.
|
|
97
|
+
|
|
98
|
+
Consumption points come from two independent sources: the energobroker mapping (EAN/EIC,
|
|
99
|
+
enriched with PRE metadata and PPAS invoices) and Porsenna e-manazer devices
|
|
100
|
+
(`link_source: porsenna`) — heat and water meters, plus any EAN/EIC the mapping lacks.
|
|
101
|
+
An OM known to both sources is returned once, with the Porsenna data nested as a `porsenna`
|
|
102
|
+
sub-block (device, sub-meters, yearly consumption) inside its commodity block. Buildings
|
|
103
|
+
tracked in Porsenna also carry an `energy_management` summary.
|
|
104
|
+
|
|
105
|
+
The endpoint returns whatever data exists for the GID: if there is any building record,
|
|
106
|
+
address, or consumption point, the response is 200 with the missing parts as `null` or
|
|
107
|
+
empty arrays (e.g. `building: null` when only consumption points or addresses are known).
|
|
108
|
+
404 is returned only when no source holds any data for the GID.
|
|
109
|
+
parameters:
|
|
110
|
+
- in: path
|
|
111
|
+
name: gid
|
|
112
|
+
required: true
|
|
113
|
+
schema:
|
|
114
|
+
type: string
|
|
115
|
+
example: GID100
|
|
116
|
+
responses:
|
|
117
|
+
"200":
|
|
118
|
+
description: OK
|
|
119
|
+
headers:
|
|
120
|
+
Cache-Control:
|
|
121
|
+
description: Cache control directive for caching proxies
|
|
122
|
+
schema:
|
|
123
|
+
type: string
|
|
124
|
+
example: public, s-maxage=21600, stale-while-revalidate=60
|
|
125
|
+
content:
|
|
126
|
+
application/json:
|
|
127
|
+
schema:
|
|
128
|
+
$ref: "#/components/schemas/EnergeticsEnoBuildingDetail"
|
|
129
|
+
"401":
|
|
130
|
+
$ref: "#/components/responses/UnauthorizedError"
|
|
131
|
+
"404":
|
|
132
|
+
$ref: "#/components/responses/NotFoundError"
|
|
133
|
+
"500":
|
|
134
|
+
$ref: "#/components/responses/ServerError"
|
|
135
|
+
|
|
76
136
|
/v2/energetics/devices:
|
|
77
137
|
get:
|
|
78
138
|
tags:
|
|
@@ -445,6 +505,208 @@ components:
|
|
|
445
505
|
type: string
|
|
446
506
|
|
|
447
507
|
schemas:
|
|
508
|
+
EnergeticsEnoBuildingDetail:
|
|
509
|
+
type: object
|
|
510
|
+
properties:
|
|
511
|
+
gid:
|
|
512
|
+
type: string
|
|
513
|
+
example: GID100
|
|
514
|
+
building:
|
|
515
|
+
type: object
|
|
516
|
+
nullable: true
|
|
517
|
+
description: >-
|
|
518
|
+
All available eno_budova attributes (Czech identifiers mirror the upstream ENO source).
|
|
519
|
+
Null when the GID has no ENO building record and is known only through the
|
|
520
|
+
consumption-point mapping.
|
|
521
|
+
properties:
|
|
522
|
+
zdroj:
|
|
523
|
+
type: string
|
|
524
|
+
nullable: true
|
|
525
|
+
nazev:
|
|
526
|
+
type: string
|
|
527
|
+
nullable: true
|
|
528
|
+
oznaceni:
|
|
529
|
+
type: string
|
|
530
|
+
nullable: true
|
|
531
|
+
druh_vytapeni:
|
|
532
|
+
type: string
|
|
533
|
+
nullable: true
|
|
534
|
+
pripojka_elektro:
|
|
535
|
+
type: string
|
|
536
|
+
nullable: true
|
|
537
|
+
pripojka_voda:
|
|
538
|
+
type: string
|
|
539
|
+
nullable: true
|
|
540
|
+
pripojka_kanalizace:
|
|
541
|
+
type: string
|
|
542
|
+
nullable: true
|
|
543
|
+
additionalProperties: true
|
|
544
|
+
addresses:
|
|
545
|
+
type: array
|
|
546
|
+
items:
|
|
547
|
+
type: object
|
|
548
|
+
properties:
|
|
549
|
+
popis:
|
|
550
|
+
type: string
|
|
551
|
+
nullable: true
|
|
552
|
+
hlavni:
|
|
553
|
+
type: boolean
|
|
554
|
+
nullable: true
|
|
555
|
+
poradi:
|
|
556
|
+
type: number
|
|
557
|
+
energy_management:
|
|
558
|
+
type: object
|
|
559
|
+
nullable: true
|
|
560
|
+
description: Porsenna (e-manazer) tracking summary; null when the building is not tracked there
|
|
561
|
+
properties:
|
|
562
|
+
source:
|
|
563
|
+
type: string
|
|
564
|
+
example: porsenna_p7
|
|
565
|
+
building_name:
|
|
566
|
+
type: string
|
|
567
|
+
nullable: true
|
|
568
|
+
address:
|
|
569
|
+
type: string
|
|
570
|
+
nullable: true
|
|
571
|
+
devices_total:
|
|
572
|
+
type: number
|
|
573
|
+
devices_active:
|
|
574
|
+
type: number
|
|
575
|
+
consumption_points:
|
|
576
|
+
type: array
|
|
577
|
+
items:
|
|
578
|
+
$ref: "#/components/schemas/EnergeticsEnoConsumptionPoint"
|
|
579
|
+
EnergeticsEnoPorsennaBlock:
|
|
580
|
+
type: object
|
|
581
|
+
description: Porsenna (e-manazer) device detail with sub-meters and yearly consumption aggregates
|
|
582
|
+
properties:
|
|
583
|
+
device:
|
|
584
|
+
type: object
|
|
585
|
+
additionalProperties: true
|
|
586
|
+
sub_devices:
|
|
587
|
+
type: array
|
|
588
|
+
items:
|
|
589
|
+
type: object
|
|
590
|
+
additionalProperties: true
|
|
591
|
+
yearly_consumption:
|
|
592
|
+
type: array
|
|
593
|
+
items:
|
|
594
|
+
type: object
|
|
595
|
+
properties:
|
|
596
|
+
period:
|
|
597
|
+
type: string
|
|
598
|
+
example: "2024"
|
|
599
|
+
value:
|
|
600
|
+
type: number
|
|
601
|
+
unit:
|
|
602
|
+
type: string
|
|
603
|
+
example: GJ
|
|
604
|
+
days_covered:
|
|
605
|
+
type: number
|
|
606
|
+
nullable: true
|
|
607
|
+
EnergeticsEnoConsumptionPoint:
|
|
608
|
+
type: object
|
|
609
|
+
properties:
|
|
610
|
+
place_id:
|
|
611
|
+
type: string
|
|
612
|
+
example: 27ZG100Z0000192O
|
|
613
|
+
id_type:
|
|
614
|
+
type: string
|
|
615
|
+
enum: [ean, eic, om]
|
|
616
|
+
commodity:
|
|
617
|
+
type: string
|
|
618
|
+
enum: [electricity, gas, heat, water]
|
|
619
|
+
is_first_gid:
|
|
620
|
+
type: boolean
|
|
621
|
+
is_active:
|
|
622
|
+
type: boolean
|
|
623
|
+
description: Derived from valid_to (null or in the future means the mapping is active)
|
|
624
|
+
link_source:
|
|
625
|
+
type: string
|
|
626
|
+
example: mock
|
|
627
|
+
valid_from:
|
|
628
|
+
type: string
|
|
629
|
+
format: date
|
|
630
|
+
nullable: true
|
|
631
|
+
valid_to:
|
|
632
|
+
type: string
|
|
633
|
+
format: date
|
|
634
|
+
nullable: true
|
|
635
|
+
address:
|
|
636
|
+
type: string
|
|
637
|
+
nullable: true
|
|
638
|
+
description: Consumption point address from the best available source
|
|
639
|
+
electricity:
|
|
640
|
+
type: object
|
|
641
|
+
description: Electricity-specific data (present only for commodity = electricity, omitted otherwise)
|
|
642
|
+
properties:
|
|
643
|
+
metadata:
|
|
644
|
+
type: object
|
|
645
|
+
nullable: true
|
|
646
|
+
description: Latest available month of PRE metadata for the EAN
|
|
647
|
+
additionalProperties: true
|
|
648
|
+
porsenna:
|
|
649
|
+
$ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
|
|
650
|
+
gas:
|
|
651
|
+
type: object
|
|
652
|
+
description: Gas-specific data (present only for commodity = gas, omitted otherwise)
|
|
653
|
+
properties:
|
|
654
|
+
porsenna:
|
|
655
|
+
$ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
|
|
656
|
+
distribution:
|
|
657
|
+
type: object
|
|
658
|
+
nullable: true
|
|
659
|
+
description: Latest non-canceled PPAS distribution invoice with its installation, devices and prices
|
|
660
|
+
properties:
|
|
661
|
+
invoice:
|
|
662
|
+
type: object
|
|
663
|
+
additionalProperties: true
|
|
664
|
+
installation:
|
|
665
|
+
type: object
|
|
666
|
+
additionalProperties: true
|
|
667
|
+
devices:
|
|
668
|
+
type: array
|
|
669
|
+
items:
|
|
670
|
+
type: object
|
|
671
|
+
additionalProperties: true
|
|
672
|
+
prices:
|
|
673
|
+
type: array
|
|
674
|
+
items:
|
|
675
|
+
type: object
|
|
676
|
+
additionalProperties: true
|
|
677
|
+
commercial:
|
|
678
|
+
type: object
|
|
679
|
+
nullable: true
|
|
680
|
+
description: Latest non-canceled PPAS commercial invoice with its installation, devices and prices
|
|
681
|
+
properties:
|
|
682
|
+
invoice:
|
|
683
|
+
type: object
|
|
684
|
+
additionalProperties: true
|
|
685
|
+
installation:
|
|
686
|
+
type: object
|
|
687
|
+
additionalProperties: true
|
|
688
|
+
devices:
|
|
689
|
+
type: array
|
|
690
|
+
items:
|
|
691
|
+
type: object
|
|
692
|
+
additionalProperties: true
|
|
693
|
+
prices:
|
|
694
|
+
type: array
|
|
695
|
+
items:
|
|
696
|
+
type: object
|
|
697
|
+
additionalProperties: true
|
|
698
|
+
heat:
|
|
699
|
+
type: object
|
|
700
|
+
description: Heat-specific data (present only for commodity = heat, omitted otherwise; Porsenna-sourced)
|
|
701
|
+
properties:
|
|
702
|
+
porsenna:
|
|
703
|
+
$ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
|
|
704
|
+
water:
|
|
705
|
+
type: object
|
|
706
|
+
description: Water-specific data (present only for commodity = water, omitted otherwise; Porsenna-sourced)
|
|
707
|
+
properties:
|
|
708
|
+
porsenna:
|
|
709
|
+
$ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
|
|
448
710
|
EnergeticsBuildingShort:
|
|
449
711
|
type: object
|
|
450
712
|
properties:
|