@golemio/energetics 1.12.2-dev.2727447026 → 1.12.2-dev.2739893110
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 +0 -13
- package/dist/output-gateway/constants/Links.d.ts +0 -1
- package/dist/output-gateway/constants/Links.js +1 -2
- package/dist/output-gateway/constants/Links.js.map +1 -1
- package/dist/output-gateway/index.js +1 -8
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/ioc/Di.js +1 -9
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +0 -4
- package/dist/output-gateway/ioc/ModuleContainerToken.js +0 -4
- package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -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 +2 -41
- package/docs/openapi-output.yaml +1 -260
- package/package.json +1 -1
- package/db/example/06_eno.sql +0 -25
- package/db/example/07_enapo_om_detail.sql +0 -131
- package/db/migrations/postgresql/20260729100000-enapo-gid-mapping-om-detail.js +0 -53
- package/db/migrations/postgresql/20260730120000-enapo-om-detail-porsenna.js +0 -53
- package/db/migrations/postgresql/sqls/20260729100000-enapo-gid-mapping-om-detail-down.sql +0 -3
- package/db/migrations/postgresql/sqls/20260729100000-enapo-gid-mapping-om-detail-up.sql +0 -179
- package/db/migrations/postgresql/sqls/20260730120000-enapo-om-detail-porsenna-down.sql +0 -132
- package/db/migrations/postgresql/sqls/20260730120000-enapo-om-detail-porsenna-up.sql +0 -287
- package/db/scripts/ded_gid_mapping_mock_import.sql +0 -48
- package/dist/output-gateway/controllers/v2/EnoBuildingsController.d.ts +0 -11
- package/dist/output-gateway/controllers/v2/EnoBuildingsController.js +0 -53
- package/dist/output-gateway/controllers/v2/EnoBuildingsController.js.map +0 -1
- package/dist/output-gateway/helpers/objectMappers.d.ts +0 -10
- package/dist/output-gateway/helpers/objectMappers.js +0 -37
- package/dist/output-gateway/helpers/objectMappers.js.map +0 -1
- package/dist/output-gateway/models/EnoBuildingDetailViewModel.d.ts +0 -35
- package/dist/output-gateway/models/EnoBuildingDetailViewModel.js +0 -43
- package/dist/output-gateway/models/EnoBuildingDetailViewModel.js.map +0 -1
- package/dist/output-gateway/models/EnoConsumptionPointViewModel.d.ts +0 -105
- package/dist/output-gateway/models/EnoConsumptionPointViewModel.js +0 -118
- package/dist/output-gateway/models/EnoConsumptionPointViewModel.js.map +0 -1
- package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.d.ts +0 -27
- package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.js +0 -41
- package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.js.map +0 -1
- package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.d.ts +0 -30
- package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.js +0 -3
- package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.js.map +0 -1
- package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.d.ts +0 -104
- package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.js +0 -3
- package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.js.map +0 -1
- package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.d.ts +0 -22
- package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.js +0 -3
- package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.js.map +0 -1
- package/dist/output-gateway/repositories/AbstractNumericParsingRepository.d.ts +0 -12
- package/dist/output-gateway/repositories/AbstractNumericParsingRepository.js +0 -41
- package/dist/output-gateway/repositories/AbstractNumericParsingRepository.js.map +0 -1
- package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.d.ts +0 -8
- package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.js +0 -62
- package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.js.map +0 -1
- package/dist/output-gateway/repositories/EnoBuildingDetailRepository.d.ts +0 -18
- package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js +0 -100
- package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js.map +0 -1
- package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.d.ts +0 -8
- package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.js +0 -51
- package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.js.map +0 -1
- package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.d.ts +0 -8
- package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.js +0 -51
- package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.js.map +0 -1
- package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.d.ts +0 -8
- package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.js +0 -52
- package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.js.map +0 -1
- package/dist/output-gateway/repositories/PpasInvoiceChildRepository.d.ts +0 -13
- package/dist/output-gateway/repositories/PpasInvoiceChildRepository.js +0 -39
- package/dist/output-gateway/repositories/PpasInvoiceChildRepository.js.map +0 -1
- package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.d.ts +0 -22
- package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.js +0 -3
- package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.js.map +0 -1
- package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.d.ts +0 -106
- package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.js +0 -3
- package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.js.map +0 -1
- package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.d.ts +0 -9
- package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js +0 -40
- package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js.map +0 -1
- package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.d.ts +0 -14
- package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js +0 -149
- package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js.map +0 -1
- package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.d.ts +0 -17
- package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.js +0 -63
- package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.js.map +0 -1
- package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.d.ts +0 -11
- package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.js +0 -3
- package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.js.map +0 -1
|
@@ -9,16 +9,3 @@ truncate organizations;
|
|
|
9
9
|
truncate access_limitation;
|
|
10
10
|
truncate enapo_measurements;
|
|
11
11
|
truncate enapo_pre_metadata_history;
|
|
12
|
-
truncate enapo_gid_mapping;
|
|
13
|
-
truncate eno_budova;
|
|
14
|
-
truncate eno_adresa;
|
|
15
|
-
truncate enapo_ppas_distribution_invoice;
|
|
16
|
-
truncate enapo_ppas_distribution_invoice_device;
|
|
17
|
-
truncate enapo_ppas_distribution_invoice_price;
|
|
18
|
-
truncate enapo_ppas_commercial_invoice;
|
|
19
|
-
truncate enapo_ppas_commercial_invoice_installations;
|
|
20
|
-
truncate enapo_ppas_commercial_invoice_device;
|
|
21
|
-
truncate enapo_ppas_commercial_invoice_price;
|
|
22
|
-
truncate enapo_porsenna_buildings;
|
|
23
|
-
truncate enapo_porsenna_devices;
|
|
24
|
-
truncate enapo_porsenna_consumption;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export declare const ORGANIZATION_PATH = "energetics/organizations";
|
|
2
2
|
export declare const BUILDING_PATH = "energetics/buildings";
|
|
3
|
-
export declare const DED_BUILDING_PATH = "energetics/ded/buildings";
|
|
4
3
|
export declare const DEVICES_PATH = "energetics/devices";
|
|
5
4
|
export declare const MEASUREMENTS_PATH = "energetics/measurements";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MEASUREMENTS_PATH = exports.DEVICES_PATH = exports.
|
|
3
|
+
exports.MEASUREMENTS_PATH = exports.DEVICES_PATH = exports.BUILDING_PATH = exports.ORGANIZATION_PATH = void 0;
|
|
4
4
|
exports.ORGANIZATION_PATH = `energetics/organizations`;
|
|
5
5
|
exports.BUILDING_PATH = `energetics/buildings`;
|
|
6
|
-
exports.DED_BUILDING_PATH = `energetics/ded/buildings`;
|
|
7
6
|
exports.DEVICES_PATH = `energetics/devices`;
|
|
8
7
|
exports.MEASUREMENTS_PATH = `energetics/measurements`;
|
|
9
8
|
//# sourceMappingURL=Links.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Links.js","sourceRoot":"","sources":["../../../src/output-gateway/constants/Links.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAC/C,QAAA,aAAa,GAAG,sBAAsB,CAAC;AACvC,QAAA,
|
|
1
|
+
{"version":3,"file":"Links.js","sourceRoot":"","sources":["../../../src/output-gateway/constants/Links.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG,0BAA0B,CAAC;AAC/C,QAAA,aAAa,GAAG,sBAAsB,CAAC;AACvC,QAAA,YAAY,GAAG,oBAAoB,CAAC;AACpC,QAAA,iBAAiB,GAAG,yBAAyB,CAAC"}
|
|
@@ -4,15 +4,8 @@ exports.routers = void 0;
|
|
|
4
4
|
const ModuleContainerToken_1 = require("./ioc/ModuleContainerToken");
|
|
5
5
|
const Di_1 = require("./ioc/Di");
|
|
6
6
|
const v2BuildingsRouter = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.V2BuildingsRouter);
|
|
7
|
-
const v2EnoBuildingsRouter = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.V2EnoBuildingsRouter);
|
|
8
7
|
const v2OrganizationsRouter = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.V2OrganizationsRouter);
|
|
9
8
|
const v2DevicesRouter = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.V2DevicesRouter);
|
|
10
9
|
const v2MeasurementsRouter = Di_1.OGEnergeticsContainer.resolve(ModuleContainerToken_1.ModuleContainerToken.V2MeasurementsRouter);
|
|
11
|
-
exports.routers = [
|
|
12
|
-
v2BuildingsRouter,
|
|
13
|
-
v2EnoBuildingsRouter,
|
|
14
|
-
v2OrganizationsRouter,
|
|
15
|
-
v2DevicesRouter,
|
|
16
|
-
v2MeasurementsRouter,
|
|
17
|
-
];
|
|
10
|
+
exports.routers = [v2BuildingsRouter, v2OrganizationsRouter, v2DevicesRouter, v2MeasurementsRouter];
|
|
18
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;AAAA,qEAAoE;AACpE,iCAAmD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":";;;AAAA,qEAAoE;AACpE,iCAAmD;AAMnD,MAAM,iBAAiB,GAAG,0BAAqB,CAAC,OAAO,CAAoB,2CAAoB,CAAC,iBAAiB,CAAC,CAAC;AACnH,MAAM,qBAAqB,GAAG,0BAAqB,CAAC,OAAO,CAAwB,2CAAoB,CAAC,qBAAqB,CAAC,CAAC;AAC/H,MAAM,eAAe,GAAG,0BAAqB,CAAC,OAAO,CAAwB,2CAAoB,CAAC,eAAe,CAAC,CAAC;AACnH,MAAM,oBAAoB,GAAG,0BAAqB,CAAC,OAAO,CAAuB,2CAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE/G,QAAA,OAAO,GAAqB,CAAC,iBAAiB,EAAE,qBAAqB,EAAE,eAAe,EAAE,oBAAoB,CAAC,CAAC"}
|
|
@@ -25,10 +25,6 @@ const V2BuildingsRouter_1 = require("../routers/v2/V2BuildingsRouter");
|
|
|
25
25
|
const AccessLimitationRepository_1 = require("../repositories/AccessLimitationRepository");
|
|
26
26
|
const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
|
|
27
27
|
const BuildingsController_1 = require("../controllers/v2/BuildingsController");
|
|
28
|
-
const EnoBuildingDetailRepository_1 = require("../repositories/EnoBuildingDetailRepository");
|
|
29
|
-
const EnoBuildingDetailTransformation_1 = require("../transformations/EnoBuildingDetailTransformation");
|
|
30
|
-
const EnoBuildingsController_1 = require("../controllers/v2/EnoBuildingsController");
|
|
31
|
-
const V2EnoBuildingsRouter_1 = require("../routers/v2/V2EnoBuildingsRouter");
|
|
32
28
|
//#region Initialization
|
|
33
29
|
const energeticsContainer = ioc_1.OutputGatewayContainer.createChildContainer();
|
|
34
30
|
exports.OGEnergeticsContainer = energeticsContainer;
|
|
@@ -38,8 +34,7 @@ energeticsContainer
|
|
|
38
34
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.OrganizationDtoTransformation, OrganizationDtoTransformation_1.OrganizationDtoTransformation)
|
|
39
35
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.OrganizationDetailDtoTransformation, OrganizationDetailDtoTransformation_1.OrganizationDetailDtoTransformation)
|
|
40
36
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.DeviceDtoTransformation, DeviceDtoTransformation_1.DeviceDtoTransformation)
|
|
41
|
-
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.BuildingTransformationFull, BuildingTransformationFull_1.BuildingTransformationFull)
|
|
42
|
-
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.EnoBuildingDetailTransformation, EnoBuildingDetailTransformation_1.EnoBuildingDetailTransformation);
|
|
37
|
+
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.BuildingTransformationFull, BuildingTransformationFull_1.BuildingTransformationFull);
|
|
43
38
|
//#endregion
|
|
44
39
|
//#region Repositories
|
|
45
40
|
energeticsContainer
|
|
@@ -49,7 +44,6 @@ energeticsContainer
|
|
|
49
44
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.OrganizationResponsibleUsersRepository, OrganizationResponsibleUsersRepository_1.OrganizationResponsibleUsersRepository)
|
|
50
45
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.DevicesRepository, DevicesRepository_1.DevicesRepository)
|
|
51
46
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.MeasurementRepository, MeasurementRepository_1.MeasurementRepository)
|
|
52
|
-
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.EnoBuildingDetailRepository, EnoBuildingDetailRepository_1.EnoBuildingDetailRepository)
|
|
53
47
|
.register(ModuleContainerToken_1.ModuleContainerToken.AccessLimitationRepository, {
|
|
54
48
|
useFactory: (0, tsyringe_1.instanceCachingFactory)((c) => new AccessLimitationRepository_1.AccessLimitationRepository(c.resolve(CoreToken_1.CoreToken.PostgresConnector), c.resolve(CoreToken_1.CoreToken.Logger))),
|
|
55
49
|
});
|
|
@@ -57,7 +51,6 @@ energeticsContainer
|
|
|
57
51
|
//#region Controllers
|
|
58
52
|
energeticsContainer
|
|
59
53
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.BuildingsController, BuildingsController_1.BuildingsController)
|
|
60
|
-
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.EnoBuildingsController, EnoBuildingsController_1.EnoBuildingsController)
|
|
61
54
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2OrganizationsController, V2OrganizationsController_1.V2OrganizationsController)
|
|
62
55
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2DevicesController, V2DevicesController_1.V2DevicesController)
|
|
63
56
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2MeasurementsController, V2MeasurementsController_1.V2MeasurementsController);
|
|
@@ -65,7 +58,6 @@ energeticsContainer
|
|
|
65
58
|
//#region Routers
|
|
66
59
|
energeticsContainer
|
|
67
60
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2BuildingsRouter, V2BuildingsRouter_1.V2BuildingsRouter)
|
|
68
|
-
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2EnoBuildingsRouter, V2EnoBuildingsRouter_1.V2EnoBuildingsRouter)
|
|
69
61
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2OrganizationsRouter, V2OrganizationsRouter_1.V2OrganizationsRouter)
|
|
70
62
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2DevicesRouter, V2DevicesRouter_1.V2DevicesRouter)
|
|
71
63
|
.registerSingleton(ModuleContainerToken_1.ModuleContainerToken.V2MeasurementsRouter, V2MeasurementsRouter_1.V2MeasurementsRouter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,iEAAoE;AACpE,iEAAiG;AACjG,+DAA+E;AAC/E,qFAAmF;AACnF,2FAAyF;AACzF,mHAAiH;AACjH,2FAAyF;AACzF,qGAAmG;AACnG,yEAAuE;AACvE,+EAA6E;AAC7E,+EAA6E;AAC7E,mEAAiE;AACjE,oGAAkG;AAClG,gHAA8G;AAC9G,wFAAsF;AACtF,8FAA4F;AAC5F,kEAAgE;AAChE,iFAA+E;AAC/E,6EAA2E;AAC3E,yFAAuF;AACvF,uEAAqE;AACrE,2FAAyF;AACzF,wEAAqE;AACrE,+EAA6E;
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":";;;AAAA,iEAAoE;AACpE,iEAAiG;AACjG,+DAA+E;AAC/E,qFAAmF;AACnF,2FAAyF;AACzF,mHAAiH;AACjH,2FAAyF;AACzF,qGAAmG;AACnG,yEAAuE;AACvE,+EAA6E;AAC7E,+EAA6E;AAC7E,mEAAiE;AACjE,oGAAkG;AAClG,gHAA8G;AAC9G,wFAAsF;AACtF,8FAA4F;AAC5F,kEAAgE;AAChE,iFAA+E;AAC/E,6EAA2E;AAC3E,yFAAuF;AACvF,uEAAqE;AACrE,2FAAyF;AACzF,wEAAqE;AACrE,+EAA6E;AAE7E,wBAAwB;AACxB,MAAM,mBAAmB,GAAwB,4BAAsB,CAAC,oBAAoB,EAAE,CAAC;AAoD/D,oDAAqB;AAnDrD,YAAY;AAEZ,yBAAyB;AACzB,mBAAmB;KACd,iBAAiB,CAAC,2CAAoB,CAAC,6BAA6B,EAAE,6DAA6B,CAAC;KACpG,iBAAiB,CAAC,2CAAoB,CAAC,mCAAmC,EAAE,yEAAmC,CAAC;KAChH,iBAAiB,CAAC,2CAAoB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC;KACxF,iBAAiB,CAAC,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC,CAAC;AACpG,YAAY;AAEZ,sBAAsB;AACtB,mBAAmB;KACd,iBAAiB,CAA6B,2CAAoB,CAAC,0BAA0B,EAAE,uDAA0B,CAAC;KAC1H,iBAAiB,CAA0B,2CAAoB,CAAC,uBAAuB,EAAE,iDAAuB,CAAC;KACjH,iBAAiB,CACd,2CAAoB,CAAC,+BAA+B,EACpD,iEAA+B,CAClC;KACA,iBAAiB,CACd,2CAAoB,CAAC,sCAAsC,EAC3D,+EAAsC,CACzC;KACA,iBAAiB,CAAoB,2CAAoB,CAAC,iBAAiB,EAAE,qCAAiB,CAAC;KAC/F,iBAAiB,CAAwB,2CAAoB,CAAC,qBAAqB,EAAE,6CAAqB,CAAC;KAC3G,QAAQ,CAA6B,2CAAoB,CAAC,0BAA0B,EAAE;IACnF,UAAU,EAAE,IAAA,iCAAsB,EAC9B,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,uDAA0B,CAAC,CAAC,CAAC,OAAO,CAAC,qBAAS,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,qBAAS,CAAC,MAAM,CAAC,CAAC,CAC7G;CACJ,CAAC,CAAC;AACP,YAAY;AAEZ,qBAAqB;AACrB,mBAAmB;KACd,iBAAiB,CAAsB,2CAAoB,CAAC,mBAAmB,EAAE,yCAAmB,CAAC;KACrG,iBAAiB,CAA4B,2CAAoB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC;KACvH,iBAAiB,CAAsB,2CAAoB,CAAC,mBAAmB,EAAE,yCAAmB,CAAC;KACrG,iBAAiB,CAA2B,2CAAoB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC;AAC1H,YAAY;AAEZ,iBAAiB;AACjB,mBAAmB;KACd,iBAAiB,CAAoB,2CAAoB,CAAC,iBAAiB,EAAE,qCAAiB,CAAC;KAC/F,iBAAiB,CAAwB,2CAAoB,CAAC,qBAAqB,EAAE,6CAAqB,CAAC;KAC3G,iBAAiB,CAAkB,2CAAoB,CAAC,eAAe,EAAE,iCAAe,CAAC;KACzF,iBAAiB,CAAuB,2CAAoB,CAAC,oBAAoB,EAAE,2CAAoB,CAAC,CAAC;AAC9G,YAAY;AAEZ,iBAAiB;AACjB,mBAAmB,CAAC,iBAAiB,CAAmB,2CAAoB,CAAC,gBAAgB,EAAE,mCAAgB,CAAC,CAAC"}
|
|
@@ -4,7 +4,6 @@ declare const ModuleContainerToken: {
|
|
|
4
4
|
OrganizationDetailDtoTransformation: symbol;
|
|
5
5
|
DeviceDtoTransformation: symbol;
|
|
6
6
|
BuildingTransformationFull: symbol;
|
|
7
|
-
EnoBuildingDetailTransformation: symbol;
|
|
8
7
|
/** repositories */
|
|
9
8
|
PrimaryBuildingsRepository: symbol;
|
|
10
9
|
OrganizationsRepository: symbol;
|
|
@@ -12,17 +11,14 @@ declare const ModuleContainerToken: {
|
|
|
12
11
|
OrganizationResponsibleUsersRepository: symbol;
|
|
13
12
|
DevicesRepository: symbol;
|
|
14
13
|
MeasurementRepository: symbol;
|
|
15
|
-
EnoBuildingDetailRepository: symbol;
|
|
16
14
|
AccessLimitationRepository: symbol;
|
|
17
15
|
/** controllers */
|
|
18
16
|
BuildingsController: symbol;
|
|
19
|
-
EnoBuildingsController: symbol;
|
|
20
17
|
V2OrganizationsController: symbol;
|
|
21
18
|
V2DevicesController: symbol;
|
|
22
19
|
V2MeasurementsController: symbol;
|
|
23
20
|
/** routers */
|
|
24
21
|
V2BuildingsRouter: symbol;
|
|
25
|
-
V2EnoBuildingsRouter: symbol;
|
|
26
22
|
V2OrganizationsRouter: symbol;
|
|
27
23
|
V2DevicesRouter: symbol;
|
|
28
24
|
V2MeasurementsRouter: symbol;
|
|
@@ -7,7 +7,6 @@ const ModuleContainerToken = {
|
|
|
7
7
|
OrganizationDetailDtoTransformation: Symbol("OrganizationDetailDtoTransformation"),
|
|
8
8
|
DeviceDtoTransformation: Symbol("DeviceDtoTransformation"),
|
|
9
9
|
BuildingTransformationFull: Symbol("BuildingTransformationFull"),
|
|
10
|
-
EnoBuildingDetailTransformation: Symbol("EnoBuildingDetailTransformation"),
|
|
11
10
|
/** repositories */
|
|
12
11
|
PrimaryBuildingsRepository: Symbol("PrimaryBuildingsRepository"),
|
|
13
12
|
OrganizationsRepository: Symbol("OrganizationsRepository"),
|
|
@@ -15,17 +14,14 @@ const ModuleContainerToken = {
|
|
|
15
14
|
OrganizationResponsibleUsersRepository: Symbol("OrganizationResponsibleUsersRepository"),
|
|
16
15
|
DevicesRepository: Symbol("DevicesRepository"),
|
|
17
16
|
MeasurementRepository: Symbol("MeasurementRepository"),
|
|
18
|
-
EnoBuildingDetailRepository: Symbol("EnoBuildingDetailRepository"),
|
|
19
17
|
AccessLimitationRepository: Symbol(),
|
|
20
18
|
/** controllers */
|
|
21
19
|
BuildingsController: Symbol("BuildingController"),
|
|
22
|
-
EnoBuildingsController: Symbol("EnoBuildingsController"),
|
|
23
20
|
V2OrganizationsController: Symbol("V2OrganizationsController"),
|
|
24
21
|
V2DevicesController: Symbol("V2DevicesController"),
|
|
25
22
|
V2MeasurementsController: Symbol("V2MeasurementsController"),
|
|
26
23
|
/** routers */
|
|
27
24
|
V2BuildingsRouter: Symbol("V2BuildingsRouter"),
|
|
28
|
-
V2EnoBuildingsRouter: Symbol("V2EnoBuildingsRouter"),
|
|
29
25
|
V2OrganizationsRouter: Symbol("V2OrganizationsRouter"),
|
|
30
26
|
V2DevicesRouter: Symbol("V2DevicesRouter"),
|
|
31
27
|
V2MeasurementsRouter: Symbol("V2MeasurementsRouter"),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,sBAAsB;IACtB,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,mCAAmC,EAAE,MAAM,CAAC,qCAAqC,CAAC;IAClF,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE
|
|
1
|
+
{"version":3,"file":"ModuleContainerToken.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/ModuleContainerToken.ts"],"names":[],"mappings":";;;AAAA,MAAM,oBAAoB,GAAG;IACzB,sBAAsB;IACtB,6BAA6B,EAAE,MAAM,CAAC,+BAA+B,CAAC;IACtE,mCAAmC,EAAE,MAAM,CAAC,qCAAqC,CAAC;IAClF,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,mBAAmB;IACnB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,uBAAuB,EAAE,MAAM,CAAC,yBAAyB,CAAC;IAC1D,+BAA+B,EAAE,MAAM,CAAC,iCAAiC,CAAC;IAC1E,sCAAsC,EAAE,MAAM,CAAC,wCAAwC,CAAC;IACxF,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,0BAA0B,EAAE,MAAM,EAAE;IACpC,kBAAkB;IAClB,mBAAmB,EAAE,MAAM,CAAC,oBAAoB,CAAC;IACjD,yBAAyB,EAAE,MAAM,CAAC,2BAA2B,CAAC;IAC9D,mBAAmB,EAAE,MAAM,CAAC,qBAAqB,CAAC;IAClD,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,cAAc;IACd,iBAAiB,EAAE,MAAM,CAAC,mBAAmB,CAAC;IAC9C,qBAAqB,EAAE,MAAM,CAAC,uBAAuB,CAAC;IACtD,eAAe,EAAE,MAAM,CAAC,iBAAiB,CAAC;IAC1C,oBAAoB,EAAE,MAAM,CAAC,sBAAsB,CAAC;IACpD,cAAc;IACd,gBAAgB,EAAE,MAAM,CAAC,0BAA0B,CAAC;CACvD,CAAC;AAEO,oDAAoB"}
|
|
@@ -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;
|
|
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: {
|
|
42
|
+
popis: { type: "string" },
|
|
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,
|
|
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;YACzB,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`
|
|
@@ -811,27 +811,12 @@ Task stahuje data o měřidlech a spotřebách z Porsenna API (e-Manazer).
|
|
|
811
811
|
- zdrojový soubor: [openapi-output.yaml](./openapi-output.yaml)
|
|
812
812
|
- rabin: https://rabin.golemio.cz/v2/docs/openapi/
|
|
813
813
|
- golem: https://api.golemio.cz/v2/docs/openapi/
|
|
814
|
-
- přístup je řízen pomocí interního parametru `accessLimit`, který
|
|
814
|
+
- přístup je řízen pomocí interního parametru `accessLimit`, který musí být vždy nastaven a omezen z permission proxy
|
|
815
815
|
- 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
816
|
- pokud je `accessLimit` nastaven na `admin`, tak se vždy dotazuje na všechny organizace
|
|
817
|
-
- `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
|
|
818
817
|
|
|
819
818
|
### API
|
|
820
819
|
|
|
821
|
-
Přehled endpointů a parametru `accessLimit`:
|
|
822
|
-
|
|
823
|
-
| Endpoint | Datová doména (tabulky) | `accessLimit` |
|
|
824
|
-
| --------------------------------------------- | ---------------------------------------- | ---------------------------------------------- |
|
|
825
|
-
| `/v2/energetics/buildings` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
826
|
-
| `/v2/energetics/buildings/:id` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
827
|
-
| `/v2/energetics/organizations` | OICT Energetika (`organizations*`) | povinný |
|
|
828
|
-
| `/v2/energetics/organizations/:id` | OICT Energetika (`organizations*`) | povinný |
|
|
829
|
-
| `/v2/energetics/devices` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
830
|
-
| `/v2/energetics/devices/:id` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
831
|
-
| `/v2/energetics/measurements` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
832
|
-
| `/v2/energetics/measurements/monthly-reading` | OICT Energetika (`consumption_energy_*`) | povinný |
|
|
833
|
-
| `/v2/energetics/ded/buildings/:gid` | DeD / ENAPO (`enapo_*`, `eno_*`) | nepoužívá se — parametr je odmítnut s HTTP 400 |
|
|
834
|
-
|
|
835
820
|
#### _/v2/energetics/buildings_
|
|
836
821
|
|
|
837
822
|
#### _/v2/energetics/buildings/:id_
|
|
@@ -863,27 +848,3 @@ Přehled endpointů a parametru `accessLimit`:
|
|
|
863
848
|
|
|
864
849
|
- zdrojové tabulky
|
|
865
850
|
- consumption_energy_measurements
|
|
866
|
-
|
|
867
|
-
#### _/v2/energetics/ded/buildings/:gid_
|
|
868
|
-
|
|
869
|
-
- detail budovy (ENO) s odběrnými místy (OM) a technickými parametry pro DeD
|
|
870
|
-
- 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
|
|
871
|
-
- zdrojové tabulky a pohledy
|
|
872
|
-
- `v_enapo_building_detail` — pohled nad `eno_budova` (dedup přes `zdroj` pomocí `DISTINCT ON (gid)`)
|
|
873
|
-
- `eno_adresa` — všechny adresy budovy (deduplikované podle `popis`)
|
|
874
|
-
- `v_enapo_building_consumption_points` — pohled nad `enapo_gid_mapping` obohacený o:
|
|
875
|
-
- `enapo_pre_metadata_history` — poslední měsíc metadat PRE (jen EAN / elektřina)
|
|
876
|
-
- `enapo_ppas_distribution_invoice` — poslední nestornovaná distribuční faktura (jen EIC / plyn, join přes `eic`)
|
|
877
|
-
- `enapo_ppas_commercial_invoice(_installations)` — poslední nestornovaná obchodní faktura (jen EIC / plyn, join přes `eic`)
|
|
878
|
-
- `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`
|
|
879
|
-
- `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
|
|
880
|
-
- `enapo_ppas_distribution_invoice_device` / `_price`, `enapo_ppas_commercial_invoice_device` / `_price` — dotahované podle id faktury
|
|
881
|
-
- mapovací tabulka `enapo_gid_mapping`
|
|
882
|
-
- vlastní kontrakt modulu; aktuálně plněná mock daty (`link_source = 'mock'`)
|
|
883
|
-
- 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'`)
|
|
884
|
-
- sloupec `is_active` v pohledu je odvozený z `valid_to` (NULL nebo v budoucnu = aktivní); expirovaná mapování se vracejí s příznakem
|
|
885
|
-
- struktura odpovědi
|
|
886
|
-
- 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
|
|
887
|
-
- 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
|
|
888
|
-
- 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í
|
|
889
|
-
- budoucí komodity (teplo, voda) se přidají jako nové klíče bez breaking change
|
package/docs/openapi-output.yaml
CHANGED
|
@@ -15,18 +15,7 @@ servers:
|
|
|
15
15
|
description: Main (production) server
|
|
16
16
|
tags:
|
|
17
17
|
- name: ⚡ Energetics (v2)
|
|
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.
|
|
18
|
+
description: 💡 Organizations & measurement devices
|
|
30
19
|
paths:
|
|
31
20
|
/v2/energetics/buildings:
|
|
32
21
|
get:
|
|
@@ -84,55 +73,6 @@ paths:
|
|
|
84
73
|
schema:
|
|
85
74
|
$ref: "#/components/schemas/EnergeticsBuildingFull"
|
|
86
75
|
|
|
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
|
-
|
|
136
76
|
/v2/energetics/devices:
|
|
137
77
|
get:
|
|
138
78
|
tags:
|
|
@@ -505,205 +445,6 @@ components:
|
|
|
505
445
|
type: string
|
|
506
446
|
|
|
507
447
|
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 devices and prices
|
|
660
|
-
properties:
|
|
661
|
-
invoice:
|
|
662
|
-
type: object
|
|
663
|
-
additionalProperties: true
|
|
664
|
-
devices:
|
|
665
|
-
type: array
|
|
666
|
-
items:
|
|
667
|
-
type: object
|
|
668
|
-
additionalProperties: true
|
|
669
|
-
prices:
|
|
670
|
-
type: array
|
|
671
|
-
items:
|
|
672
|
-
type: object
|
|
673
|
-
additionalProperties: true
|
|
674
|
-
commercial:
|
|
675
|
-
type: object
|
|
676
|
-
nullable: true
|
|
677
|
-
description: Latest non-canceled PPAS commercial invoice with its installation, devices and prices
|
|
678
|
-
properties:
|
|
679
|
-
invoice:
|
|
680
|
-
type: object
|
|
681
|
-
additionalProperties: true
|
|
682
|
-
installation:
|
|
683
|
-
type: object
|
|
684
|
-
additionalProperties: true
|
|
685
|
-
devices:
|
|
686
|
-
type: array
|
|
687
|
-
items:
|
|
688
|
-
type: object
|
|
689
|
-
additionalProperties: true
|
|
690
|
-
prices:
|
|
691
|
-
type: array
|
|
692
|
-
items:
|
|
693
|
-
type: object
|
|
694
|
-
additionalProperties: true
|
|
695
|
-
heat:
|
|
696
|
-
type: object
|
|
697
|
-
description: Heat-specific data (present only for commodity = heat, omitted otherwise; Porsenna-sourced)
|
|
698
|
-
properties:
|
|
699
|
-
porsenna:
|
|
700
|
-
$ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
|
|
701
|
-
water:
|
|
702
|
-
type: object
|
|
703
|
-
description: Water-specific data (present only for commodity = water, omitted otherwise; Porsenna-sourced)
|
|
704
|
-
properties:
|
|
705
|
-
porsenna:
|
|
706
|
-
$ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
|
|
707
448
|
EnergeticsBuildingShort:
|
|
708
449
|
type: object
|
|
709
450
|
properties:
|
package/package.json
CHANGED
package/db/example/06_eno.sql
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
INSERT INTO eno_budova (gid, zdroj, nazev, oznaceni, druh_vytapeni, pripojka_elektro, pripojka_voda, pripojka_kanalizace,
|
|
2
|
-
budova_rozdelena_byt_nebyt, celkova_plocha_budova, zastavena_plocha, obestaveny_prostor,
|
|
3
|
-
pocet_byt, pocet_nebyt_budova, pocet_nadzem_podlazi, pocet_podzem_podlazi, pocet_podkrovi, vytah,
|
|
4
|
-
czcc, id_cuzk, id_objekt, kod_vyuziti, nazev_vyuziti, kod_ochrana, nazev_ochrana, platnost_od) VALUES
|
|
5
|
-
('GID100', 'mhmp', 'ZŠ Testovací', 'ZŠT', 'ústřední dálkové', 'ano', 'ano', 'ano',
|
|
6
|
-
'ne', 1200.5, 450.0, 5200.0,
|
|
7
|
-
0, 12, 3, 1, 0, true,
|
|
8
|
-
112, 100000001, 1001, '7', 'budova pro vzdělávání', NULL, NULL, '2020-01-01'),
|
|
9
|
-
('GID100', 'stat', 'ZŠ Testovací (stat)', 'ZŠT', 'ústřední dálkové', 'ano', 'ano', 'ano',
|
|
10
|
-
'ne', 1200.5, 450.0, 5200.0,
|
|
11
|
-
0, 12, 3, 1, 0, true,
|
|
12
|
-
112, 100000001, 1001, '7', 'budova pro vzdělávání', NULL, NULL, '2020-01-01'),
|
|
13
|
-
('GID200', 'mhmp', 'MŠ Vedlejší', 'MŠV', 'plynová kotelna', 'ano', 'ano', 'ne',
|
|
14
|
-
'ne', 480.0, 220.0, 1600.0,
|
|
15
|
-
0, 5, 2, 0, 1, false,
|
|
16
|
-
112, 100000002, 1002, '7', 'budova pro vzdělávání', NULL, NULL, '2021-06-15');
|
|
17
|
-
|
|
18
|
-
INSERT INTO eno_adresa (gid, gid_typ, poradi, zdroj, id, popis, hlavni) VALUES
|
|
19
|
-
('GID100', 'budova', 1, 'mhmp', 501, 'Testovací 123/4, 100 00 Praha 10', true),
|
|
20
|
-
('GID100', 'budova', 2, 'mhmp', 502, 'Testovací 125/6, 100 00 Praha 10', false),
|
|
21
|
-
('GID100', 'budova', 1, 'stat', 501, 'Testovací 123/4, 100 00 Praha 10', true),
|
|
22
|
-
('GID100', 'budova', 3, 'mhmp', 504, NULL, false),
|
|
23
|
-
('GID100', 'budova', 4, 'mhmp', 505, NULL, false),
|
|
24
|
-
('GID200', 'budova', 1, 'mhmp', 503, 'Vedlejší 7, 100 00 Praha 10', true),
|
|
25
|
-
('GIDADDR1', 'stavba', 1, 'mhmp', 506, 'Stavební 9, 100 00 Praha 10', true);
|