@golemio/energetics 1.12.2-dev.2740928370 → 1.12.2-dev.2741327856

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.
Files changed (137) hide show
  1. package/db/example/00_clear_test_data.sql +19 -0
  2. package/db/example/06_eno.sql +36 -0
  3. package/db/example/07_enapo_om_detail.sql +140 -0
  4. package/db/example/08_ded_search.sql +25 -0
  5. package/db/migrations/postgresql/20260807090000-enapo-gid-mapping-om-detail.js +53 -0
  6. package/db/migrations/postgresql/20260807091000-enapo-om-detail-porsenna.js +53 -0
  7. package/db/migrations/postgresql/20260807092000-ded-building-search.js +53 -0
  8. package/db/migrations/postgresql/sqls/20260807090000-enapo-gid-mapping-om-detail-down.sql +3 -0
  9. package/db/migrations/postgresql/sqls/20260807090000-enapo-gid-mapping-om-detail-up.sql +182 -0
  10. package/db/migrations/postgresql/sqls/20260807091000-enapo-om-detail-porsenna-down.sql +135 -0
  11. package/db/migrations/postgresql/sqls/20260807091000-enapo-om-detail-porsenna-up.sql +292 -0
  12. package/db/migrations/postgresql/sqls/20260807092000-ded-building-search-down.sql +41 -0
  13. package/db/migrations/postgresql/sqls/20260807092000-ded-building-search-up.sql +262 -0
  14. package/db/scripts/ded_gid_mapping_mock_import.sql +107 -0
  15. package/dist/integration-engine/enapo/ioc/Di.js +5 -1
  16. package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
  17. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +2 -0
  18. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +2 -0
  19. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
  20. package/dist/integration-engine/enapo/repositories/DedSearchIndexRepository.d.ts +7 -0
  21. package/dist/integration-engine/enapo/repositories/DedSearchIndexRepository.js +50 -0
  22. package/dist/integration-engine/enapo/repositories/DedSearchIndexRepository.js.map +1 -0
  23. package/dist/integration-engine/enapo/repositories/interfaces/IDedSearchIndexRepository.d.ts +7 -0
  24. package/dist/integration-engine/enapo/repositories/interfaces/IDedSearchIndexRepository.js +3 -0
  25. package/dist/integration-engine/enapo/repositories/interfaces/IDedSearchIndexRepository.js.map +1 -0
  26. package/dist/integration-engine/enapo/workers/EnapoWorker.js +1 -0
  27. package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
  28. package/dist/integration-engine/enapo/workers/task/DedSearchIndexRefreshTask.d.ts +21 -0
  29. package/dist/integration-engine/enapo/workers/task/DedSearchIndexRefreshTask.js +58 -0
  30. package/dist/integration-engine/enapo/workers/task/DedSearchIndexRefreshTask.js.map +1 -0
  31. package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.d.ts +13 -1
  32. package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.js +25 -2
  33. package/dist/integration-engine/enapo/workers/task/EnoGeometryTask.js.map +1 -1
  34. package/dist/output-gateway/constants/DedSearchWeights.d.ts +60 -0
  35. package/dist/output-gateway/constants/DedSearchWeights.js +42 -0
  36. package/dist/output-gateway/constants/DedSearchWeights.js.map +1 -0
  37. package/dist/output-gateway/constants/Links.d.ts +1 -0
  38. package/dist/output-gateway/constants/Links.js +2 -1
  39. package/dist/output-gateway/constants/Links.js.map +1 -1
  40. package/dist/output-gateway/controllers/v2/EnoBuildingsController.d.ts +16 -0
  41. package/dist/output-gateway/controllers/v2/EnoBuildingsController.js +80 -0
  42. package/dist/output-gateway/controllers/v2/EnoBuildingsController.js.map +1 -0
  43. package/dist/output-gateway/helpers/objectMappers.d.ts +10 -0
  44. package/dist/output-gateway/helpers/objectMappers.js +37 -0
  45. package/dist/output-gateway/helpers/objectMappers.js.map +1 -0
  46. package/dist/output-gateway/index.js +8 -1
  47. package/dist/output-gateway/index.js.map +1 -1
  48. package/dist/output-gateway/ioc/Di.js +13 -1
  49. package/dist/output-gateway/ioc/Di.js.map +1 -1
  50. package/dist/output-gateway/ioc/ModuleContainerToken.d.ts +6 -0
  51. package/dist/output-gateway/ioc/ModuleContainerToken.js +6 -0
  52. package/dist/output-gateway/ioc/ModuleContainerToken.js.map +1 -1
  53. package/dist/output-gateway/models/DedBuildingSearchViewModel.d.ts +30 -0
  54. package/dist/output-gateway/models/DedBuildingSearchViewModel.js +38 -0
  55. package/dist/output-gateway/models/DedBuildingSearchViewModel.js.map +1 -0
  56. package/dist/output-gateway/models/EnoBuildingDetailViewModel.d.ts +49 -0
  57. package/dist/output-gateway/models/EnoBuildingDetailViewModel.js +57 -0
  58. package/dist/output-gateway/models/EnoBuildingDetailViewModel.js.map +1 -0
  59. package/dist/output-gateway/models/EnoConsumptionPointViewModel.d.ts +106 -0
  60. package/dist/output-gateway/models/EnoConsumptionPointViewModel.js +119 -0
  61. package/dist/output-gateway/models/EnoConsumptionPointViewModel.js.map +1 -0
  62. package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.d.ts +27 -0
  63. package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.js +41 -0
  64. package/dist/output-gateway/models/EnoPorsennaDeviceViewModel.js.map +1 -0
  65. package/dist/output-gateway/models/interfaces/IDedBuildingSearchView.d.ts +24 -0
  66. package/dist/output-gateway/models/interfaces/IDedBuildingSearchView.js +3 -0
  67. package/dist/output-gateway/models/interfaces/IDedBuildingSearchView.js.map +1 -0
  68. package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.d.ts +44 -0
  69. package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.js +3 -0
  70. package/dist/output-gateway/models/interfaces/IEnoBuildingDetailView.js.map +1 -0
  71. package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.d.ts +106 -0
  72. package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.js +3 -0
  73. package/dist/output-gateway/models/interfaces/IEnoConsumptionPointView.js.map +1 -0
  74. package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.d.ts +22 -0
  75. package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.js +3 -0
  76. package/dist/output-gateway/models/interfaces/IEnoPorsennaDeviceView.js.map +1 -0
  77. package/dist/output-gateway/repositories/AbstractNumericParsingRepository.d.ts +12 -0
  78. package/dist/output-gateway/repositories/AbstractNumericParsingRepository.js +41 -0
  79. package/dist/output-gateway/repositories/AbstractNumericParsingRepository.js.map +1 -0
  80. package/dist/output-gateway/repositories/DedBuildingSearchRepository.d.ts +16 -0
  81. package/dist/output-gateway/repositories/DedBuildingSearchRepository.js +250 -0
  82. package/dist/output-gateway/repositories/DedBuildingSearchRepository.js.map +1 -0
  83. package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.d.ts +8 -0
  84. package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.js +62 -0
  85. package/dist/output-gateway/repositories/EnoBuildingAddressesRepository.js.map +1 -0
  86. package/dist/output-gateway/repositories/EnoBuildingDetailRepository.d.ts +18 -0
  87. package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js +100 -0
  88. package/dist/output-gateway/repositories/EnoBuildingDetailRepository.js.map +1 -0
  89. package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.d.ts +8 -0
  90. package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.js +51 -0
  91. package/dist/output-gateway/repositories/EnoConsumptionPointsRepository.js.map +1 -0
  92. package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.d.ts +8 -0
  93. package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.js +51 -0
  94. package/dist/output-gateway/repositories/EnoPorsennaDevicesRepository.js.map +1 -0
  95. package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.d.ts +8 -0
  96. package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.js +52 -0
  97. package/dist/output-gateway/repositories/PorsennaConsumptionsRepository.js.map +1 -0
  98. package/dist/output-gateway/repositories/PpasInvoiceChildRepository.d.ts +13 -0
  99. package/dist/output-gateway/repositories/PpasInvoiceChildRepository.js +39 -0
  100. package/dist/output-gateway/repositories/PpasInvoiceChildRepository.js.map +1 -0
  101. package/dist/output-gateway/repositories/interfaces/IDedBuildingSearchRow.d.ts +14 -0
  102. package/dist/output-gateway/repositories/interfaces/IDedBuildingSearchRow.js +3 -0
  103. package/dist/output-gateway/repositories/interfaces/IDedBuildingSearchRow.js.map +1 -0
  104. package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.d.ts +22 -0
  105. package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.js +3 -0
  106. package/dist/output-gateway/repositories/interfaces/IEnoBuildingDetailAggregate.js.map +1 -0
  107. package/dist/output-gateway/routers/interfaces/IDedBuildingSearchResponse.d.ts +50 -0
  108. package/dist/output-gateway/routers/interfaces/IDedBuildingSearchResponse.js +3 -0
  109. package/dist/output-gateway/routers/interfaces/IDedBuildingSearchResponse.js.map +1 -0
  110. package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.d.ts +130 -0
  111. package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.js +3 -0
  112. package/dist/output-gateway/routers/interfaces/IEnoBuildingDetailResponse.js.map +1 -0
  113. package/dist/output-gateway/routers/interfaces/IEnoRegistrationUnit.d.ts +11 -0
  114. package/dist/output-gateway/routers/interfaces/IEnoRegistrationUnit.js +3 -0
  115. package/dist/output-gateway/routers/interfaces/IEnoRegistrationUnit.js.map +1 -0
  116. package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.d.ts +11 -0
  117. package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js +45 -0
  118. package/dist/output-gateway/routers/v2/V2EnoBuildingsRouter.js.map +1 -0
  119. package/dist/output-gateway/transformations/DedBuildingSearchTransformation.d.ts +11 -0
  120. package/dist/output-gateway/transformations/DedBuildingSearchTransformation.js +57 -0
  121. package/dist/output-gateway/transformations/DedBuildingSearchTransformation.js.map +1 -0
  122. package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.d.ts +18 -0
  123. package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js +193 -0
  124. package/dist/output-gateway/transformations/EnoBuildingDetailTransformation.js.map +1 -0
  125. package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.d.ts +17 -0
  126. package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.js +63 -0
  127. package/dist/schema-definitions/models/enapo/EnapoGidMappingModel.js.map +1 -0
  128. package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.d.ts +11 -0
  129. package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.js +3 -0
  130. package/dist/schema-definitions/models/enapo/interfaces/IEnapoGidMapping.js.map +1 -0
  131. package/dist/schema-definitions/models/eno/AddressModel.d.ts +1 -1
  132. package/dist/schema-definitions/models/eno/AddressModel.js +1 -1
  133. package/dist/schema-definitions/models/eno/AddressModel.js.map +1 -1
  134. package/dist/schema-definitions/models/eno/interfaces/IAddress.d.ts +1 -1
  135. package/docs/implementation_documentation.md +90 -2
  136. package/docs/openapi-output.yaml +554 -1
  137. package/package.json +1 -1
@@ -15,7 +15,18 @@ servers:
15
15
  description: Main (production) server
16
16
  tags:
17
17
  - name: ⚡ Energetics (v2)
18
- description: 💡 Organizations & measurement devices
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,115 @@ paths:
73
84
  schema:
74
85
  $ref: "#/components/schemas/EnergeticsBuildingFull"
75
86
 
87
+ /v2/energetics/ded/buildings:
88
+ get:
89
+ tags:
90
+ - 🗺️ Energetics DeD (v2)
91
+ summary: Search buildings by name, address, GID, EAN, EIC or OM identifier
92
+ description: >-
93
+ Suggestion endpoint for the DeD map. A single free-text query `q` is matched against the
94
+ building name, its addresses, the GID and the identifiers of every consumption point mapped
95
+ to the building.
96
+
97
+ Matching runs in two tiers. An exact match on an EAN, EIC, OM identifier or GID is returned
98
+ on its own — fuzzy candidates are dropped entirely and `matched_exactly` is `true`. Note that
99
+ one identifier can be mapped to several buildings, so an exact match may still return more
100
+ than one result; the map should zoom automatically only when exactly one result is returned.
101
+ Otherwise results are ranked by a weighted full-text and trigram score over the name
102
+ (highest weight), the main address, the secondary addresses and the identifiers. Queries
103
+ typed without Czech diacritics match normally.
104
+
105
+ Every result carries the building outline as GeoJSON together with its bounding box and
106
+ centroid, all in WGS84 (EPSG:4326), so the map can zoom to a hit. They are `null` when the
107
+ building has no usable geometry, signalled by `geometry_source: null`.
108
+ parameters:
109
+ - in: query
110
+ name: q
111
+ required: true
112
+ description: Search text — name, address, GID, EAN, EIC or OM identifier.
113
+ schema:
114
+ type: string
115
+ minLength: 1
116
+ maxLength: 100
117
+ example: "859182400000000001"
118
+ - in: query
119
+ name: limit
120
+ required: false
121
+ description: Maximum number of suggestions returned.
122
+ schema:
123
+ type: integer
124
+ minimum: 1
125
+ maximum: 50
126
+ default: 10
127
+ responses:
128
+ "200":
129
+ description: OK
130
+ headers:
131
+ Cache-Control:
132
+ description: Cache control directive for caching proxies
133
+ schema:
134
+ type: string
135
+ example: public, s-maxage=60, stale-while-revalidate=30
136
+ content:
137
+ application/json:
138
+ schema:
139
+ $ref: "#/components/schemas/EnergeticsDedBuildingSearch"
140
+ "400":
141
+ $ref: "#/components/responses/BadRequestError"
142
+ "401":
143
+ $ref: "#/components/responses/UnauthorizedError"
144
+ "500":
145
+ $ref: "#/components/responses/ServerError"
146
+
147
+ /v2/energetics/ded/buildings/{gid}:
148
+ get:
149
+ tags:
150
+ - 🗺️ Energetics DeD (v2)
151
+ summary: ENO building detail with consumption points (OM) and technical parameters
152
+ description: >-
153
+ Returns the ENO building (eno_budova) identified by GID together with its addresses and all
154
+ consumption points mapped to it. Commodity-specific data is nested under the
155
+ `electricity`/`gas`/`heat`/`water` keys of each consumption point; only the key matching the
156
+ `commodity` field is present, the others are omitted entirely.
157
+
158
+ Consumption points come from two independent sources: the energobroker mapping (EAN/EIC,
159
+ enriched with PRE metadata and PPAS invoices) and Porsenna e-manazer devices
160
+ (`link_source: porsenna`) — heat and water meters, plus any EAN/EIC the mapping lacks.
161
+ An OM known to both sources is returned once, with the Porsenna data nested as a `porsenna`
162
+ sub-block (device, sub-meters, yearly consumption) inside its commodity block. Buildings
163
+ tracked in Porsenna also carry an `energy_management` summary.
164
+
165
+ The endpoint returns whatever data exists for the GID: if there is any building record,
166
+ address, or consumption point, the response is 200 with the missing parts as `null` or
167
+ empty arrays (e.g. `building: null` when only consumption points or addresses are known).
168
+ 404 is returned only when no source holds any data for the GID.
169
+ parameters:
170
+ - in: path
171
+ name: gid
172
+ required: true
173
+ schema:
174
+ type: string
175
+ example: GID100
176
+ responses:
177
+ "200":
178
+ description: OK
179
+ headers:
180
+ Cache-Control:
181
+ description: Cache control directive for caching proxies
182
+ schema:
183
+ type: string
184
+ example: public, s-maxage=21600, stale-while-revalidate=60
185
+ content:
186
+ application/json:
187
+ schema:
188
+ $ref: "#/components/schemas/EnergeticsEnoBuildingDetail"
189
+ "401":
190
+ $ref: "#/components/responses/UnauthorizedError"
191
+ "404":
192
+ $ref: "#/components/responses/NotFoundError"
193
+ "500":
194
+ $ref: "#/components/responses/ServerError"
195
+
76
196
  /v2/energetics/devices:
77
197
  get:
78
198
  tags:
@@ -445,6 +565,439 @@ components:
445
565
  type: string
446
566
 
447
567
  schemas:
568
+ EnergeticsDedBuildingSearch:
569
+ type: object
570
+ properties:
571
+ query:
572
+ type: string
573
+ example: "859182400000000001"
574
+ matched_exactly:
575
+ type: boolean
576
+ description: >-
577
+ True when the query resolved to an exact EAN, EIC, OM identifier or GID. In that case
578
+ the results contain only exact matches.
579
+ example: true
580
+ results:
581
+ type: array
582
+ items:
583
+ $ref: "#/components/schemas/EnergeticsDedBuildingSearchResult"
584
+ required:
585
+ - query
586
+ - matched_exactly
587
+ - results
588
+
589
+ EnergeticsDedBuildingSearchResult:
590
+ type: object
591
+ properties:
592
+ gid:
593
+ type: string
594
+ example: GID100
595
+ name:
596
+ type: string
597
+ nullable: true
598
+ example: ZŠ Testovací
599
+ designation:
600
+ type: string
601
+ nullable: true
602
+ example: ZŠT
603
+ registration_unit:
604
+ allOf:
605
+ - $ref: "#/components/schemas/EnergeticsEnoRegistrationUnit"
606
+ nullable: true
607
+ description: >-
608
+ Evidenční jednotka (eno_ciselnik_evidencni_jednotka) resolved through eno_majetek;
609
+ null when the building has no majetek record. Its name is part of the search vector.
610
+ address:
611
+ type: string
612
+ nullable: true
613
+ description: Main address of the building.
614
+ example: Testovací 123/4, 100 00 Praha 10
615
+ addresses:
616
+ type: array
617
+ description: Every distinct address of the building, the main one first.
618
+ items:
619
+ type: string
620
+ example:
621
+ - Testovací 123/4, 100 00 Praha 10
622
+ - Testovací 125/6, 100 00 Praha 10
623
+ matched_by:
624
+ type: string
625
+ enum: [ean, eic, om, gid, name, address]
626
+ example: ean
627
+ matched_value:
628
+ type: string
629
+ nullable: true
630
+ description: The identifier that matched. Null for non-exact matches.
631
+ example: "859182400000000001"
632
+ score:
633
+ type: number
634
+ description: Relevance score. Exact matches always score 1000.
635
+ example: 1000
636
+ identifiers:
637
+ type: object
638
+ properties:
639
+ ean:
640
+ type: array
641
+ items:
642
+ type: string
643
+ eic:
644
+ type: array
645
+ items:
646
+ type: string
647
+ om:
648
+ type: array
649
+ items:
650
+ type: string
651
+ geometry:
652
+ type: object
653
+ nullable: true
654
+ description: Building outline as GeoJSON geometry in WGS84 (EPSG:4326).
655
+ properties:
656
+ type:
657
+ type: string
658
+ example: MultiPolygon
659
+ coordinates:
660
+ type: array
661
+ items: {}
662
+ bbox:
663
+ type: array
664
+ nullable: true
665
+ description: "[minLon, minLat, maxLon, maxLat] in WGS84, for zooming the map."
666
+ items:
667
+ type: number
668
+ minItems: 4
669
+ maxItems: 4
670
+ example: [14.4174, 50.0863, 14.4188, 50.0873]
671
+ centroid:
672
+ type: object
673
+ nullable: true
674
+ properties:
675
+ lat:
676
+ type: number
677
+ example: 50.0868
678
+ lon:
679
+ type: number
680
+ example: 14.4181
681
+ geometry_source:
682
+ type: string
683
+ nullable: true
684
+ description: Source of the geometry, null when the building has none.
685
+ example: eno_geometrie
686
+ has_building_record:
687
+ type: boolean
688
+ description: >-
689
+ False when the GID is known only through the consumption-point mapping or Porsenna
690
+ and has no eno_budova record. Such results are ranked below described buildings.
691
+ example: true
692
+ active_points_count:
693
+ type: integer
694
+ example: 3
695
+ # Every property is emitted unconditionally by DedBuildingSearchTransformation - the
696
+ # nullable ones are present with a null value, never absent.
697
+ required:
698
+ - gid
699
+ - name
700
+ - designation
701
+ - registration_unit
702
+ - address
703
+ - addresses
704
+ - matched_by
705
+ - matched_value
706
+ - score
707
+ - identifiers
708
+ - geometry
709
+ - bbox
710
+ - centroid
711
+ - geometry_source
712
+ - has_building_record
713
+ - active_points_count
714
+
715
+ EnergeticsEnoRegistrationUnit:
716
+ type: object
717
+ description: >-
718
+ Evidenční jednotka (eno_ciselnik_evidencni_jednotka) resolved through the building's
719
+ eno_majetek record. The same shape is returned by the search and the detail endpoint.
720
+ properties:
721
+ id:
722
+ type: number
723
+ nullable: true
724
+ example: 7001
725
+ kod:
726
+ type: string
727
+ nullable: true
728
+ example: EJ-7001
729
+ nazev:
730
+ type: string
731
+ nullable: true
732
+ example: Evidenční jednotka Praha 10
733
+ typ:
734
+ type: string
735
+ nullable: true
736
+ example: škola
737
+ required:
738
+ - id
739
+ - kod
740
+ - nazev
741
+ - typ
742
+
743
+ EnergeticsEnoBuildingDetail:
744
+ type: object
745
+ properties:
746
+ gid:
747
+ type: string
748
+ example: GID100
749
+ building:
750
+ type: object
751
+ nullable: true
752
+ description: >-
753
+ All available eno_budova attributes (Czech identifiers mirror the upstream ENO source).
754
+ Null when the GID has no ENO building record and is known only through the
755
+ consumption-point mapping.
756
+ properties:
757
+ zdroj:
758
+ type: string
759
+ nullable: true
760
+ nazev:
761
+ type: string
762
+ nullable: true
763
+ oznaceni:
764
+ type: string
765
+ nullable: true
766
+ druh_vytapeni:
767
+ type: string
768
+ nullable: true
769
+ pripojka_elektro:
770
+ type: string
771
+ nullable: true
772
+ pripojka_voda:
773
+ type: string
774
+ nullable: true
775
+ pripojka_kanalizace:
776
+ type: string
777
+ nullable: true
778
+ additionalProperties: true
779
+ property:
780
+ type: object
781
+ nullable: true
782
+ description: >-
783
+ ENO lookup data (eno_ciselnik_*) resolved through the building's eno_majetek record.
784
+ Null when the building has no majetek record.
785
+ properties:
786
+ registration_unit:
787
+ allOf:
788
+ - $ref: "#/components/schemas/EnergeticsEnoRegistrationUnit"
789
+ nullable: true
790
+ description: Evidenční jednotka (eno_ciselnik_evidencni_jednotka).
791
+ managers:
792
+ type: object
793
+ description: Správci (eno_ciselnik_spravce) from the mandate and accounting-unit references.
794
+ properties:
795
+ mandate:
796
+ type: object
797
+ nullable: true
798
+ description: Správce referenced by eno_majetek.id_maj_spravce_mandatni.
799
+ properties:
800
+ id:
801
+ type: number
802
+ nullable: true
803
+ kod:
804
+ type: string
805
+ nullable: true
806
+ nazev:
807
+ type: string
808
+ nullable: true
809
+ ic:
810
+ type: string
811
+ nullable: true
812
+ dic:
813
+ type: string
814
+ nullable: true
815
+ accounting_unit:
816
+ type: object
817
+ nullable: true
818
+ description: Správce referenced by eno_majetek.id_maj_spravce_ucet_jednotka.
819
+ properties:
820
+ id:
821
+ type: number
822
+ nullable: true
823
+ kod:
824
+ type: string
825
+ nullable: true
826
+ nazev:
827
+ type: string
828
+ nullable: true
829
+ ic:
830
+ type: string
831
+ nullable: true
832
+ dic:
833
+ type: string
834
+ nullable: true
835
+ addresses:
836
+ type: array
837
+ items:
838
+ type: object
839
+ properties:
840
+ popis:
841
+ type: string
842
+ nullable: true
843
+ hlavni:
844
+ type: boolean
845
+ nullable: true
846
+ poradi:
847
+ type: number
848
+ energy_management:
849
+ type: object
850
+ nullable: true
851
+ description: Porsenna (e-manazer) tracking summary; null when the building is not tracked there
852
+ properties:
853
+ source:
854
+ type: string
855
+ example: porsenna_p7
856
+ building_name:
857
+ type: string
858
+ nullable: true
859
+ address:
860
+ type: string
861
+ nullable: true
862
+ devices_total:
863
+ type: number
864
+ devices_active:
865
+ type: number
866
+ consumption_points:
867
+ type: array
868
+ items:
869
+ $ref: "#/components/schemas/EnergeticsEnoConsumptionPoint"
870
+ EnergeticsEnoPorsennaBlock:
871
+ type: object
872
+ description: Porsenna (e-manazer) device detail with sub-meters and yearly consumption aggregates
873
+ properties:
874
+ device:
875
+ type: object
876
+ additionalProperties: true
877
+ sub_devices:
878
+ type: array
879
+ items:
880
+ type: object
881
+ additionalProperties: true
882
+ yearly_consumption:
883
+ type: array
884
+ items:
885
+ type: object
886
+ properties:
887
+ period:
888
+ type: string
889
+ example: "2024"
890
+ value:
891
+ type: number
892
+ unit:
893
+ type: string
894
+ example: GJ
895
+ days_covered:
896
+ type: number
897
+ nullable: true
898
+ EnergeticsEnoConsumptionPoint:
899
+ type: object
900
+ properties:
901
+ place_id:
902
+ type: string
903
+ example: 27ZG100Z0000192O
904
+ id_type:
905
+ type: string
906
+ enum: [ean, eic, om]
907
+ commodity:
908
+ type: string
909
+ enum: [electricity, gas, heat, water]
910
+ is_first_gid:
911
+ type: boolean
912
+ is_active:
913
+ type: boolean
914
+ description: Derived from valid_to (null or in the future means the mapping is active)
915
+ link_source:
916
+ type: string
917
+ example: mock
918
+ valid_from:
919
+ type: string
920
+ format: date
921
+ nullable: true
922
+ valid_to:
923
+ type: string
924
+ format: date
925
+ nullable: true
926
+ address:
927
+ type: string
928
+ nullable: true
929
+ description: Consumption point address from the best available source
930
+ electricity:
931
+ type: object
932
+ description: Electricity-specific data (present only for commodity = electricity, omitted otherwise)
933
+ properties:
934
+ metadata:
935
+ type: object
936
+ nullable: true
937
+ description: Latest available month of PRE metadata for the EAN
938
+ additionalProperties: true
939
+ porsenna:
940
+ $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
941
+ gas:
942
+ type: object
943
+ description: Gas-specific data (present only for commodity = gas, omitted otherwise)
944
+ properties:
945
+ porsenna:
946
+ $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
947
+ distribution:
948
+ type: object
949
+ nullable: true
950
+ description: Latest non-canceled PPAS distribution invoice with its installation, devices and prices
951
+ properties:
952
+ invoice:
953
+ type: object
954
+ additionalProperties: true
955
+ installation:
956
+ type: object
957
+ additionalProperties: true
958
+ devices:
959
+ type: array
960
+ items:
961
+ type: object
962
+ additionalProperties: true
963
+ prices:
964
+ type: array
965
+ items:
966
+ type: object
967
+ additionalProperties: true
968
+ commercial:
969
+ type: object
970
+ nullable: true
971
+ description: Latest non-canceled PPAS commercial invoice with its installation, devices and prices
972
+ properties:
973
+ invoice:
974
+ type: object
975
+ additionalProperties: true
976
+ installation:
977
+ type: object
978
+ additionalProperties: true
979
+ devices:
980
+ type: array
981
+ items:
982
+ type: object
983
+ additionalProperties: true
984
+ prices:
985
+ type: array
986
+ items:
987
+ type: object
988
+ additionalProperties: true
989
+ heat:
990
+ type: object
991
+ description: Heat-specific data (present only for commodity = heat, omitted otherwise; Porsenna-sourced)
992
+ properties:
993
+ porsenna:
994
+ $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
995
+ water:
996
+ type: object
997
+ description: Water-specific data (present only for commodity = water, omitted otherwise; Porsenna-sourced)
998
+ properties:
999
+ porsenna:
1000
+ $ref: "#/components/schemas/EnergeticsEnoPorsennaBlock"
448
1001
  EnergeticsBuildingShort:
449
1002
  type: object
450
1003
  properties:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@golemio/energetics",
3
- "version": "1.12.2-dev.2740928370",
3
+ "version": "1.12.2-dev.2741327856",
4
4
  "description": "Golemio Energetics Module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",