@golemio/energetics 1.5.2 → 1.5.3-dev.2164524892

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 (217) hide show
  1. package/db/migrations/postgresql/20250213141826-add-device-serial-id.js +53 -0
  2. package/db/migrations/postgresql/20251110125059-eno-integration.js +53 -0
  3. package/db/migrations/postgresql/sqls/20250213141826-add-device-serial-id-down.sql +1 -0
  4. package/db/migrations/postgresql/sqls/20250213141826-add-device-serial-id-up.sql +1 -0
  5. package/db/migrations/postgresql/sqls/20251110125059-eno-integration-down.sql +10 -0
  6. package/db/migrations/postgresql/sqls/20251110125059-eno-integration-up.sql +170 -0
  7. package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.d.ts +3 -2
  8. package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.js +2 -1
  9. package/dist/integration-engine/commodity-providers/transformations/AveMeasurementTransformation.js.map +1 -1
  10. package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.d.ts +2 -0
  11. package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.js +1 -0
  12. package/dist/integration-engine/commodity-providers/transformations/CemMeasurementTransformation.js.map +1 -1
  13. package/dist/integration-engine/commodity-providers/transformations/PreElectroTransformation.js +1 -0
  14. package/dist/integration-engine/commodity-providers/transformations/PreElectroTransformation.js.map +1 -1
  15. package/dist/integration-engine/commodity-providers/transformations/PreMeasurementTransformation.js +1 -0
  16. package/dist/integration-engine/commodity-providers/transformations/PreMeasurementTransformation.js.map +1 -1
  17. package/dist/integration-engine/commodity-providers/transformations/PtasWebMeasurementTransformation.js +1 -0
  18. package/dist/integration-engine/commodity-providers/transformations/PtasWebMeasurementTransformation.js.map +1 -1
  19. package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js +2 -1
  20. package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasEEMeasurementsTask.js.map +1 -1
  21. package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js +2 -1
  22. package/dist/integration-engine/commodity-providers/workers/tasks/FetchPpasMeasurementsTask.js.map +1 -1
  23. package/dist/integration-engine/commodity-providers/workers/tasks/FetchPreMeasurementDataTask.js +1 -1
  24. package/dist/integration-engine/commodity-providers/workers/tasks/FetchPreMeasurementDataTask.js.map +1 -1
  25. package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js +3 -1
  26. package/dist/integration-engine/commodity-providers/workers/tasks/FetchVeoliaMeasurementsTask.js.map +1 -1
  27. package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.d.ts +10 -0
  28. package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.js +82 -0
  29. package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.js.map +1 -0
  30. package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.d.ts +13 -0
  31. package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.js +45 -0
  32. package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.js.map +1 -0
  33. package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.d.ts +11 -0
  34. package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.js +17 -0
  35. package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.js.map +1 -0
  36. package/dist/integration-engine/enapo/interfaces/eno/IEnoBuildingInfo.d.ts +10 -0
  37. package/dist/integration-engine/enapo/interfaces/eno/IEnoBuildingInfo.js +3 -0
  38. package/dist/integration-engine/enapo/interfaces/eno/IEnoBuildingInfo.js.map +1 -0
  39. package/dist/integration-engine/enapo/ioc/Di.js +34 -2
  40. package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
  41. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +16 -0
  42. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +18 -0
  43. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
  44. package/dist/integration-engine/enapo/repositories/eno/EnoAddressRepository.d.ts +5 -0
  45. package/dist/integration-engine/enapo/repositories/eno/EnoAddressRepository.js +32 -0
  46. package/dist/integration-engine/enapo/repositories/eno/EnoAddressRepository.js.map +1 -0
  47. package/dist/integration-engine/enapo/repositories/eno/EnoBuildingRepository.d.ts +5 -0
  48. package/dist/integration-engine/enapo/repositories/eno/EnoBuildingRepository.js +32 -0
  49. package/dist/integration-engine/enapo/repositories/eno/EnoBuildingRepository.js.map +1 -0
  50. package/dist/integration-engine/enapo/repositories/eno/EnoEJRepository.d.ts +5 -0
  51. package/dist/integration-engine/enapo/repositories/eno/EnoEJRepository.js +32 -0
  52. package/dist/integration-engine/enapo/repositories/eno/EnoEJRepository.js.map +1 -0
  53. package/dist/integration-engine/enapo/repositories/eno/EnoLocationRepository.d.ts +5 -0
  54. package/dist/integration-engine/enapo/repositories/eno/EnoLocationRepository.js +32 -0
  55. package/dist/integration-engine/enapo/repositories/eno/EnoLocationRepository.js.map +1 -0
  56. package/dist/integration-engine/enapo/repositories/eno/EnoManagerRepository.d.ts +5 -0
  57. package/dist/integration-engine/enapo/repositories/eno/EnoManagerRepository.js +32 -0
  58. package/dist/integration-engine/enapo/repositories/eno/EnoManagerRepository.js.map +1 -0
  59. package/dist/integration-engine/enapo/repositories/eno/EnoOrganizationRepository.d.ts +5 -0
  60. package/dist/integration-engine/enapo/repositories/eno/EnoOrganizationRepository.js +32 -0
  61. package/dist/integration-engine/enapo/repositories/eno/EnoOrganizationRepository.js.map +1 -0
  62. package/dist/integration-engine/enapo/repositories/eno/EnoPropertyRepository.d.ts +5 -0
  63. package/dist/integration-engine/enapo/repositories/eno/EnoPropertyRepository.js +32 -0
  64. package/dist/integration-engine/enapo/repositories/eno/EnoPropertyRepository.js.map +1 -0
  65. package/dist/integration-engine/enapo/repositories/eno/EnoRemovedGIDRepository.d.ts +5 -0
  66. package/dist/integration-engine/enapo/repositories/eno/EnoRemovedGIDRepository.js +32 -0
  67. package/dist/integration-engine/enapo/repositories/eno/EnoRemovedGIDRepository.js.map +1 -0
  68. package/dist/integration-engine/enapo/repositories/eno/EnoStructureTypeRepository.d.ts +5 -0
  69. package/dist/integration-engine/enapo/repositories/eno/EnoStructureTypeRepository.js +32 -0
  70. package/dist/integration-engine/enapo/repositories/eno/EnoStructureTypeRepository.js.map +1 -0
  71. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.d.ts +13 -0
  72. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.js +101 -0
  73. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.js.map +1 -0
  74. package/dist/integration-engine/enapo/transformations/eno/EnoEJTransformation.d.ts +7 -0
  75. package/dist/integration-engine/enapo/transformations/eno/EnoEJTransformation.js +42 -0
  76. package/dist/integration-engine/enapo/transformations/eno/EnoEJTransformation.js.map +1 -0
  77. package/dist/integration-engine/enapo/transformations/eno/EnoManagerTransformation.d.ts +7 -0
  78. package/dist/integration-engine/enapo/transformations/eno/EnoManagerTransformation.js +50 -0
  79. package/dist/integration-engine/enapo/transformations/eno/EnoManagerTransformation.js.map +1 -0
  80. package/dist/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.d.ts +7 -0
  81. package/dist/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.js +31 -0
  82. package/dist/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.js.map +1 -0
  83. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.d.ts +7 -0
  84. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.js +32 -0
  85. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.js.map +1 -0
  86. package/dist/integration-engine/enapo/workers/EnapoWorker.js +2 -0
  87. package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
  88. package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.d.ts +5 -0
  89. package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.js +3 -0
  90. package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.js.map +1 -0
  91. package/dist/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.d.ts +3 -0
  92. package/dist/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.js +3 -0
  93. package/dist/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.js.map +1 -0
  94. package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.d.ts +6 -0
  95. package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.js +30 -0
  96. package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.js.map +1 -0
  97. package/dist/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.d.ts +4 -0
  98. package/dist/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.js +22 -0
  99. package/dist/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.js.map +1 -0
  100. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.d.ts +33 -0
  101. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js +139 -0
  102. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js.map +1 -0
  103. package/dist/integration-engine/enapo/workers/task/EnoLookupTask.d.ts +34 -0
  104. package/dist/integration-engine/enapo/workers/task/EnoLookupTask.js +125 -0
  105. package/dist/integration-engine/enapo/workers/task/EnoLookupTask.js.map +1 -0
  106. package/dist/schema-definitions/datasources/StaticMeterSettingsJsonSchema.js +4 -3
  107. package/dist/schema-definitions/datasources/StaticMeterSettingsJsonSchema.js.map +1 -1
  108. package/dist/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.d.ts +5 -0
  109. package/dist/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.js +108 -0
  110. package/dist/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.js.map +1 -0
  111. package/dist/schema-definitions/datasources/eno/EnoEJInputJsonSchema.d.ts +5 -0
  112. package/dist/schema-definitions/datasources/eno/EnoEJInputJsonSchema.js +45 -0
  113. package/dist/schema-definitions/datasources/eno/EnoEJInputJsonSchema.js.map +1 -0
  114. package/dist/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.d.ts +4 -0
  115. package/dist/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.js +16 -0
  116. package/dist/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.js.map +1 -0
  117. package/dist/schema-definitions/datasources/eno/EnoManagerInputJsonSchema.d.ts +5 -0
  118. package/dist/schema-definitions/datasources/eno/EnoManagerInputJsonSchema.js +50 -0
  119. package/dist/schema-definitions/datasources/eno/EnoManagerInputJsonSchema.js.map +1 -0
  120. package/dist/schema-definitions/datasources/eno/EnoOrganizationInputJsonSchema.d.ts +5 -0
  121. package/dist/schema-definitions/datasources/eno/EnoOrganizationInputJsonSchema.js +28 -0
  122. package/dist/schema-definitions/datasources/eno/EnoOrganizationInputJsonSchema.js.map +1 -0
  123. package/dist/schema-definitions/datasources/eno/EnoStructureTypeInputJsonSchema.d.ts +5 -0
  124. package/dist/schema-definitions/datasources/eno/EnoStructureTypeInputJsonSchema.js +29 -0
  125. package/dist/schema-definitions/datasources/eno/EnoStructureTypeInputJsonSchema.js.map +1 -0
  126. package/dist/schema-definitions/datasources/eno/interfaces/IAddressInput.d.ts +5 -0
  127. package/dist/schema-definitions/datasources/eno/interfaces/IAddressInput.js +3 -0
  128. package/dist/schema-definitions/datasources/eno/interfaces/IAddressInput.js.map +1 -0
  129. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInfoInput.d.ts +10 -0
  130. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInfoInput.js +3 -0
  131. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInfoInput.js.map +1 -0
  132. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInput.d.ts +29 -0
  133. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInput.js +3 -0
  134. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInput.js.map +1 -0
  135. package/dist/schema-definitions/datasources/eno/interfaces/IEJInput.d.ts +19 -0
  136. package/dist/schema-definitions/datasources/eno/interfaces/IEJInput.js +3 -0
  137. package/dist/schema-definitions/datasources/eno/interfaces/IEJInput.js.map +1 -0
  138. package/dist/schema-definitions/datasources/eno/interfaces/ILocationInput.d.ts +5 -0
  139. package/dist/schema-definitions/datasources/eno/interfaces/ILocationInput.js +3 -0
  140. package/dist/schema-definitions/datasources/eno/interfaces/ILocationInput.js.map +1 -0
  141. package/dist/schema-definitions/datasources/eno/interfaces/IManagerInput.d.ts +27 -0
  142. package/dist/schema-definitions/datasources/eno/interfaces/IManagerInput.js +3 -0
  143. package/dist/schema-definitions/datasources/eno/interfaces/IManagerInput.js.map +1 -0
  144. package/dist/schema-definitions/datasources/eno/interfaces/IOrganizationInput.d.ts +8 -0
  145. package/dist/schema-definitions/datasources/eno/interfaces/IOrganizationInput.js +3 -0
  146. package/dist/schema-definitions/datasources/eno/interfaces/IOrganizationInput.js.map +1 -0
  147. package/dist/schema-definitions/datasources/eno/interfaces/IPropertyInput.d.ts +16 -0
  148. package/dist/schema-definitions/datasources/eno/interfaces/IPropertyInput.js +3 -0
  149. package/dist/schema-definitions/datasources/eno/interfaces/IPropertyInput.js.map +1 -0
  150. package/dist/schema-definitions/datasources/eno/interfaces/IStructureTypeInput.d.ts +9 -0
  151. package/dist/schema-definitions/datasources/eno/interfaces/IStructureTypeInput.js +3 -0
  152. package/dist/schema-definitions/datasources/eno/interfaces/IStructureTypeInput.js.map +1 -0
  153. package/dist/schema-definitions/datasources/interfaces/IStaticMeterSettings.d.ts +3 -2
  154. package/dist/schema-definitions/models/MeasurementsModel.d.ts +1 -0
  155. package/dist/schema-definitions/models/MeasurementsModel.js +15 -1
  156. package/dist/schema-definitions/models/MeasurementsModel.js.map +1 -1
  157. package/dist/schema-definitions/models/eno/AddressModel.d.ts +15 -0
  158. package/dist/schema-definitions/models/eno/AddressModel.js +48 -0
  159. package/dist/schema-definitions/models/eno/AddressModel.js.map +1 -0
  160. package/dist/schema-definitions/models/eno/BuildingModel.d.ts +36 -0
  161. package/dist/schema-definitions/models/eno/BuildingModel.js +90 -0
  162. package/dist/schema-definitions/models/eno/BuildingModel.js.map +1 -0
  163. package/dist/schema-definitions/models/eno/EJLookupModel.d.ts +25 -0
  164. package/dist/schema-definitions/models/eno/EJLookupModel.js +81 -0
  165. package/dist/schema-definitions/models/eno/EJLookupModel.js.map +1 -0
  166. package/dist/schema-definitions/models/eno/LocationModel.d.ts +15 -0
  167. package/dist/schema-definitions/models/eno/LocationModel.js +48 -0
  168. package/dist/schema-definitions/models/eno/LocationModel.js.map +1 -0
  169. package/dist/schema-definitions/models/eno/ManagerLookupModel.d.ts +33 -0
  170. package/dist/schema-definitions/models/eno/ManagerLookupModel.js +89 -0
  171. package/dist/schema-definitions/models/eno/ManagerLookupModel.js.map +1 -0
  172. package/dist/schema-definitions/models/eno/OrganizationLookupModel.d.ts +14 -0
  173. package/dist/schema-definitions/models/eno/OrganizationLookupModel.js +40 -0
  174. package/dist/schema-definitions/models/eno/OrganizationLookupModel.js.map +1 -0
  175. package/dist/schema-definitions/models/eno/PropertyModel.d.ts +25 -0
  176. package/dist/schema-definitions/models/eno/PropertyModel.js +87 -0
  177. package/dist/schema-definitions/models/eno/PropertyModel.js.map +1 -0
  178. package/dist/schema-definitions/models/eno/RemovedGIDModel.d.ts +11 -0
  179. package/dist/schema-definitions/models/eno/RemovedGIDModel.js +35 -0
  180. package/dist/schema-definitions/models/eno/RemovedGIDModel.js.map +1 -0
  181. package/dist/schema-definitions/models/eno/StructureTypeModel.d.ts +15 -0
  182. package/dist/schema-definitions/models/eno/StructureTypeModel.js +42 -0
  183. package/dist/schema-definitions/models/eno/StructureTypeModel.js.map +1 -0
  184. package/dist/schema-definitions/models/eno/helpers/EnumGIDTypes.d.ts +4 -0
  185. package/dist/schema-definitions/models/eno/helpers/EnumGIDTypes.js +9 -0
  186. package/dist/schema-definitions/models/eno/helpers/EnumGIDTypes.js.map +1 -0
  187. package/dist/schema-definitions/models/eno/interfaces/IAddress.d.ts +9 -0
  188. package/dist/schema-definitions/models/eno/interfaces/IAddress.js +3 -0
  189. package/dist/schema-definitions/models/eno/interfaces/IAddress.js.map +1 -0
  190. package/dist/schema-definitions/models/eno/interfaces/IBuilding.d.ts +30 -0
  191. package/dist/schema-definitions/models/eno/interfaces/IBuilding.js +3 -0
  192. package/dist/schema-definitions/models/eno/interfaces/IBuilding.js.map +1 -0
  193. package/dist/schema-definitions/models/eno/interfaces/IEJLookup.d.ts +19 -0
  194. package/dist/schema-definitions/models/eno/interfaces/IEJLookup.js +3 -0
  195. package/dist/schema-definitions/models/eno/interfaces/IEJLookup.js.map +1 -0
  196. package/dist/schema-definitions/models/eno/interfaces/ILocation.d.ts +9 -0
  197. package/dist/schema-definitions/models/eno/interfaces/ILocation.js +3 -0
  198. package/dist/schema-definitions/models/eno/interfaces/ILocation.js.map +1 -0
  199. package/dist/schema-definitions/models/eno/interfaces/IManagerLookup.d.ts +27 -0
  200. package/dist/schema-definitions/models/eno/interfaces/IManagerLookup.js +3 -0
  201. package/dist/schema-definitions/models/eno/interfaces/IManagerLookup.js.map +1 -0
  202. package/dist/schema-definitions/models/eno/interfaces/IOrganizationLookup.d.ts +8 -0
  203. package/dist/schema-definitions/models/eno/interfaces/IOrganizationLookup.js +3 -0
  204. package/dist/schema-definitions/models/eno/interfaces/IOrganizationLookup.js.map +1 -0
  205. package/dist/schema-definitions/models/eno/interfaces/IProperty.d.ts +19 -0
  206. package/dist/schema-definitions/models/eno/interfaces/IProperty.js +3 -0
  207. package/dist/schema-definitions/models/eno/interfaces/IProperty.js.map +1 -0
  208. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.d.ts +5 -0
  209. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.js +3 -0
  210. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.js.map +1 -0
  211. package/dist/schema-definitions/models/eno/interfaces/IStructureTypeLookup.d.ts +9 -0
  212. package/dist/schema-definitions/models/eno/interfaces/IStructureTypeLookup.js +3 -0
  213. package/dist/schema-definitions/models/eno/interfaces/IStructureTypeLookup.js.map +1 -0
  214. package/dist/schema-definitions/models/interfaces/IMeasurementDto.d.ts +1 -0
  215. package/docs/asyncapi.yaml +88 -0
  216. package/docs/implementation_documentation.md +98 -3
  217. package/package.json +3 -2
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.EnoLookupTaskInputSchema = void 0;
13
+ const EnoOperationEnum_1 = require("../../datasources/eno/EnoOperationEnum");
14
+ const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
15
+ class EnoLookupTaskInputSchema {
16
+ }
17
+ exports.EnoLookupTaskInputSchema = EnoLookupTaskInputSchema;
18
+ __decorate([
19
+ (0, class_validator_1.IsEnum)(EnoOperationEnum_1.EnoOperationLookupEnum),
20
+ __metadata("design:type", String)
21
+ ], EnoLookupTaskInputSchema.prototype, "type", void 0);
22
+ //# sourceMappingURL=EnoLookupTaskInputSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoLookupTaskInputSchema.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6EAAoF;AACpF,+EAAmE;AAGnE,MAAa,wBAAwB;CAGpC;AAHD,4DAGC;AADG;IADC,IAAA,wBAAM,EAAC,yCAAsB,CAAC;;sDACjB"}
@@ -0,0 +1,33 @@
1
+ import { EnoDatasourceFactory } from "../../datasources/eno/EnoDatasourceFactory";
2
+ import { EnoAddressRepository } from "../../repositories/eno/EnoAddressRepository";
3
+ import { EnoBuildingRepository } from "../../repositories/eno/EnoBuildingRepository";
4
+ import { EnoLocationRepository } from "../../repositories/eno/EnoLocationRepository";
5
+ import { EnoPropertyRepository } from "../../repositories/eno/EnoPropertyRepository";
6
+ import { EnoRemovedGIDRepository } from "../../repositories/eno/EnoRemovedGIDRepository";
7
+ import { ILogger } from "@golemio/core/dist/helpers";
8
+ import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
9
+ import { AbstractTask } from "@golemio/core/dist/integration-engine/workers/AbstractTask";
10
+ import { IEnoBuildingTaskInput } from "../interfaces/IEnoBuildingTaskInput";
11
+ import { EnoBuildingTaskInputSchema } from "../schema/EnoBuildingTaskInputSchema";
12
+ import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
13
+ export declare class EnoBuildingTask extends AbstractTask<IEnoBuildingTaskInput> {
14
+ private enoDatasourceFactory;
15
+ private enoBuildingRepository;
16
+ private enoPropertyRepository;
17
+ private enoLocationRepository;
18
+ private enoAddressRepository;
19
+ private enoRemovedGIDRepository;
20
+ private logger;
21
+ protected dbConnector: IDatabaseConnector;
22
+ private simpleConfig;
23
+ protected schema: typeof EnoBuildingTaskInputSchema;
24
+ queueName: string;
25
+ queueTtl: number;
26
+ private removedBuldingsStartDate;
27
+ private readonly ORGANIZATION_ID;
28
+ constructor(enoDatasourceFactory: EnoDatasourceFactory, enoBuildingRepository: EnoBuildingRepository, enoPropertyRepository: EnoPropertyRepository, enoLocationRepository: EnoLocationRepository, enoAddressRepository: EnoAddressRepository, enoRemovedGIDRepository: EnoRemovedGIDRepository, logger: ILogger, dbConnector: IDatabaseConnector, simpleConfig: ISimpleConfig);
29
+ execute(data: IEnoBuildingTaskInput): Promise<void>;
30
+ private saveData;
31
+ private getCurrentBuildingList;
32
+ private getRemovedBuildingList;
33
+ }
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EnoBuildingTask = void 0;
16
+ const constants_1 = require("../../constants");
17
+ const EnoDatasourceFactory_1 = require("../../datasources/eno/EnoDatasourceFactory");
18
+ const EnoOperationEnum_1 = require("../../datasources/eno/EnoOperationEnum");
19
+ const EnapoWorkerContainerToken_1 = require("../../ioc/EnapoWorkerContainerToken");
20
+ const EnoAddressRepository_1 = require("../../repositories/eno/EnoAddressRepository");
21
+ const EnoBuildingRepository_1 = require("../../repositories/eno/EnoBuildingRepository");
22
+ const EnoLocationRepository_1 = require("../../repositories/eno/EnoLocationRepository");
23
+ const EnoPropertyRepository_1 = require("../../repositories/eno/EnoPropertyRepository");
24
+ const EnoRemovedGIDRepository_1 = require("../../repositories/eno/EnoRemovedGIDRepository");
25
+ const EnoBuildingTransformation_1 = require("../../transformations/eno/EnoBuildingTransformation");
26
+ const EnumGIDTypes_1 = require("../../../../schema-definitions/models/eno/helpers/EnumGIDTypes");
27
+ const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
28
+ const AbstractTask_1 = require("@golemio/core/dist/integration-engine/workers/AbstractTask");
29
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
30
+ const luxon_1 = require("@golemio/core/dist/shared/luxon");
31
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
32
+ const EnoBuildingTaskInputSchema_1 = require("../schema/EnoBuildingTaskInputSchema");
33
+ let EnoBuildingTask = exports.EnoBuildingTask = class EnoBuildingTask extends AbstractTask_1.AbstractTask {
34
+ constructor(enoDatasourceFactory, enoBuildingRepository, enoPropertyRepository, enoLocationRepository, enoAddressRepository, enoRemovedGIDRepository, logger, dbConnector, simpleConfig) {
35
+ super(constants_1.ENAPO_WORKER_NAME);
36
+ this.enoDatasourceFactory = enoDatasourceFactory;
37
+ this.enoBuildingRepository = enoBuildingRepository;
38
+ this.enoPropertyRepository = enoPropertyRepository;
39
+ this.enoLocationRepository = enoLocationRepository;
40
+ this.enoAddressRepository = enoAddressRepository;
41
+ this.enoRemovedGIDRepository = enoRemovedGIDRepository;
42
+ this.logger = logger;
43
+ this.dbConnector = dbConnector;
44
+ this.simpleConfig = simpleConfig;
45
+ this.schema = EnoBuildingTaskInputSchema_1.EnoBuildingTaskInputSchema;
46
+ this.queueName = "processEnoBuildings";
47
+ this.queueTtl = 60 * 60 * 1000;
48
+ this.ORGANIZATION_ID = 1;
49
+ this.removedBuldingsStartDate = this.simpleConfig.getValue("module.energetics.eno.removedBuldingsStartDate", "2025-01-01T00:00:00+01:00");
50
+ }
51
+ async execute(data) {
52
+ try {
53
+ const datasource = this.enoDatasourceFactory.getDatasource(EnoDatasourceFactory_1.ENO_ENDPOINT.BUILDINGS, data.source);
54
+ const listGID = data.type === "current"
55
+ ? await this.getCurrentBuildingList(datasource, data)
56
+ : await this.getRemovedBuildingList(datasource, data);
57
+ if (!listGID || (Array.isArray(listGID.return) && listGID.return.length === 0)) {
58
+ this.logger.info(`No buildings found for source: ${data.source} type: ${data.type} ${data.daysBack ? data.daysBack + " days back incremenetal synchronization" : "full synchronization"}`);
59
+ return;
60
+ }
61
+ const buildingDetails = await datasource.getData(EnoOperationEnum_1.EnoOperationBuildingEnum.DETAIL, "", {
62
+ idOrganizace: 1,
63
+ seznamGID: listGID.return,
64
+ });
65
+ if (buildingDetails) {
66
+ const transformation = new EnoBuildingTransformation_1.EnoBuildingTransformation(data.source);
67
+ const transformedData = transformation.transformArray(buildingDetails.return);
68
+ await this.saveData(transformedData);
69
+ }
70
+ }
71
+ catch (err) {
72
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
73
+ throw err;
74
+ }
75
+ throw new golemio_errors_1.GeneralError("Failed to save ENO building data", this.constructor.name, err);
76
+ }
77
+ }
78
+ async saveData(transformedData) {
79
+ const buildings = transformedData.map((el) => el.bulding);
80
+ const property = transformedData.map((el) => el.property);
81
+ const address = transformedData.flatMap((el) => el.address);
82
+ const location = transformedData.flatMap((el) => el.location);
83
+ const transaction = await this.dbConnector.getConnection().transaction();
84
+ try {
85
+ await this.enoBuildingRepository.bulkSave(buildings, undefined, undefined, undefined, transaction);
86
+ await this.enoAddressRepository.bulkSave(address, undefined, undefined, undefined, transaction);
87
+ await this.enoPropertyRepository.bulkSave(property, undefined, undefined, undefined, transaction);
88
+ await this.enoLocationRepository.bulkSave(location, undefined, undefined, undefined, transaction);
89
+ await transaction.commit();
90
+ }
91
+ catch (err) {
92
+ await transaction.rollback();
93
+ throw err;
94
+ }
95
+ }
96
+ async getCurrentBuildingList(datasource, data) {
97
+ const listGID = await datasource.getData(EnoOperationEnum_1.EnoOperationBuildingEnum.LIST_BY_ORG, "", {
98
+ idOrganizace: this.ORGANIZATION_ID,
99
+ ...(data.daysBack ? { datum: luxon_1.DateTime.now().minus({ days: data.daysBack }).toISO() } : {}),
100
+ });
101
+ return listGID;
102
+ }
103
+ async getRemovedBuildingList(datasource, data) {
104
+ const listRemovedBuildingGID = await datasource.getData(EnoOperationEnum_1.EnoOperationBuildingEnum.REMOVED_LIST, "", {
105
+ idOrganizace: this.ORGANIZATION_ID,
106
+ datum: data.daysBack ? luxon_1.DateTime.now().minus({ days: data.daysBack }).toISO() : this.removedBuldingsStartDate,
107
+ });
108
+ if (listRemovedBuildingGID) {
109
+ const removedGids = listRemovedBuildingGID.return.map((gid) => {
110
+ return {
111
+ gid: gid,
112
+ gid_typ: EnumGIDTypes_1.EnumGidTypes.BUILDING,
113
+ zdroj: data.source,
114
+ };
115
+ });
116
+ await this.enoRemovedGIDRepository.bulkSave(removedGids);
117
+ }
118
+ return listRemovedBuildingGID;
119
+ }
120
+ };
121
+ exports.EnoBuildingTask = EnoBuildingTask = __decorate([
122
+ (0, tsyringe_1.injectable)(),
123
+ __param(0, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoDatasourceFactory)),
124
+ __param(1, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoBuildingRepository)),
125
+ __param(2, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoPropertyRepository)),
126
+ __param(3, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoLocationRepository)),
127
+ __param(4, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoAddressRepository)),
128
+ __param(5, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoRemovedGIDRepository)),
129
+ __param(6, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.Logger)),
130
+ __param(7, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.PostgresConnector)),
131
+ __param(8, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
132
+ __metadata("design:paramtypes", [EnoDatasourceFactory_1.EnoDatasourceFactory,
133
+ EnoBuildingRepository_1.EnoBuildingRepository,
134
+ EnoPropertyRepository_1.EnoPropertyRepository,
135
+ EnoLocationRepository_1.EnoLocationRepository,
136
+ EnoAddressRepository_1.EnoAddressRepository,
137
+ EnoRemovedGIDRepository_1.EnoRemovedGIDRepository, Object, Object, Object])
138
+ ], EnoBuildingTask);
139
+ //# sourceMappingURL=EnoBuildingTask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoBuildingTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/task/EnoBuildingTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAwD;AAExD,qFAAoG;AACpG,6EAAsF;AAEtF,mFAAoF;AACpF,sFAAuF;AACvF,wFAAyF;AACzF,wFAAyF;AACzF,wFAAyF;AACzF,4FAA6F;AAC7F,mGAAoG;AAEpG,iGAAoE;AAIpE,wEAAqE;AACrE,6FAA0F;AAC1F,6EAA8F;AAC9F,2DAA2D;AAC3D,iEAAwE;AAExE,qFAAkF;AAI3E,IAAM,eAAe,6BAArB,MAAM,eAAgB,SAAQ,2BAAmC;IAOpE,YAC4D,oBAAkD,EACjD,qBAAoD,EACpD,qBAAoD,EACpD,qBAAoD,EACrD,oBAAkD,EAC/C,uBAAwD,EACzF,MAAuB,EACZ,WAAyC,EAC9C,YAAmC;QAEnE,KAAK,CAAC,6BAAiB,CAAC,CAAC;QAVuC,yBAAoB,GAApB,oBAAoB,CAAsB;QACzC,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,0BAAqB,GAArB,qBAAqB,CAAuB;QAC5C,0BAAqB,GAArB,qBAAqB,CAAuB;QAC7C,yBAAoB,GAApB,oBAAoB,CAAsB;QACvC,4BAAuB,GAAvB,uBAAuB,CAAyB;QACjF,WAAM,GAAN,MAAM,CAAS;QACF,gBAAW,GAAX,WAAW,CAAoB;QACtC,iBAAY,GAAZ,YAAY,CAAe;Q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Factory";
2
+ import { EnoEJRepository } from "../../repositories/eno/EnoEJRepository";
3
+ import { EnoManagerRepository } from "../../repositories/eno/EnoManagerRepository";
4
+ import { EnoOrganizationRepository } from "../../repositories/eno/EnoOrganizationRepository";
5
+ import { EnoStructureTypeRepository } from "../../repositories/eno/EnoStructureTypeRepository";
6
+ import { EnoEJTransformation } from "../../transformations/eno/EnoEJTransformation";
7
+ import { EnoManagerTransformation } from "../../transformations/eno/EnoManagerTransformation";
8
+ import { EnoOrganizationTransformation } from "../../transformations/eno/EnoOrganizationTransformation";
9
+ import { EnoStructureTypeTransformation } from "../../transformations/eno/EnoStructureTypeTransformation";
10
+ import { AbstractTask } from "@golemio/core/dist/integration-engine/workers/AbstractTask";
11
+ import { IEnoLookupTaskInput } from "../interfaces/IEnoLookupTaskInput";
12
+ import { EnoLookupTaskInputSchema } from "../schema/EnoLookupTaskInputSchema";
13
+ export declare class EnoLookupTask extends AbstractTask<IEnoLookupTaskInput> {
14
+ private enoDatasourceFactory;
15
+ private enoStructureTypeTransformation;
16
+ private enoOrganizationTransformation;
17
+ private enoManagerTransformation;
18
+ private enoEJTransformation;
19
+ private enoStructureTypeRepository;
20
+ private enoOrganizationRepository;
21
+ private enoManagerRepository;
22
+ private enoEJRepository;
23
+ queueName: string;
24
+ queueTtl: number;
25
+ schema: typeof EnoLookupTaskInputSchema;
26
+ private enoDatasource;
27
+ constructor(enoDatasourceFactory: EnoDatasourceFactory, enoStructureTypeTransformation: EnoStructureTypeTransformation, enoOrganizationTransformation: EnoOrganizationTransformation, enoManagerTransformation: EnoManagerTransformation, enoEJTransformation: EnoEJTransformation, enoStructureTypeRepository: EnoStructureTypeRepository, enoOrganizationRepository: EnoOrganizationRepository, enoManagerRepository: EnoManagerRepository, enoEJRepository: EnoEJRepository);
28
+ execute(data: IEnoLookupTaskInput): Promise<void>;
29
+ private updateStructureType;
30
+ private updateOrganization;
31
+ private updateManager;
32
+ private updateEJ;
33
+ private getUpdateMethodDelegate;
34
+ }
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
8
+ var __metadata = (this && this.__metadata) || function (k, v) {
9
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
+ };
11
+ var __param = (this && this.__param) || function (paramIndex, decorator) {
12
+ return function (target, key) { decorator(target, key, paramIndex); }
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.EnoLookupTask = void 0;
16
+ const constants_1 = require("../../constants");
17
+ const EnoDatasourceFactory_1 = require("../../datasources/eno/EnoDatasourceFactory");
18
+ const EnoOperationEnum_1 = require("../../datasources/eno/EnoOperationEnum");
19
+ const EnapoWorkerContainerToken_1 = require("../../ioc/EnapoWorkerContainerToken");
20
+ const EnoEJRepository_1 = require("../../repositories/eno/EnoEJRepository");
21
+ const EnoManagerRepository_1 = require("../../repositories/eno/EnoManagerRepository");
22
+ const EnoOrganizationRepository_1 = require("../../repositories/eno/EnoOrganizationRepository");
23
+ const EnoStructureTypeRepository_1 = require("../../repositories/eno/EnoStructureTypeRepository");
24
+ const EnoEJTransformation_1 = require("../../transformations/eno/EnoEJTransformation");
25
+ const EnoManagerTransformation_1 = require("../../transformations/eno/EnoManagerTransformation");
26
+ const EnoOrganizationTransformation_1 = require("../../transformations/eno/EnoOrganizationTransformation");
27
+ const EnoStructureTypeTransformation_1 = require("../../transformations/eno/EnoStructureTypeTransformation");
28
+ const AbstractTask_1 = require("@golemio/core/dist/integration-engine/workers/AbstractTask");
29
+ const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
30
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
31
+ const EnoLookupTaskInputSchema_1 = require("../schema/EnoLookupTaskInputSchema");
32
+ let EnoLookupTask = exports.EnoLookupTask = class EnoLookupTask extends AbstractTask_1.AbstractTask {
33
+ constructor(enoDatasourceFactory, enoStructureTypeTransformation, enoOrganizationTransformation, enoManagerTransformation, enoEJTransformation, enoStructureTypeRepository, enoOrganizationRepository, enoManagerRepository, enoEJRepository) {
34
+ super(constants_1.ENAPO_WORKER_NAME);
35
+ this.enoDatasourceFactory = enoDatasourceFactory;
36
+ this.enoStructureTypeTransformation = enoStructureTypeTransformation;
37
+ this.enoOrganizationTransformation = enoOrganizationTransformation;
38
+ this.enoManagerTransformation = enoManagerTransformation;
39
+ this.enoEJTransformation = enoEJTransformation;
40
+ this.enoStructureTypeRepository = enoStructureTypeRepository;
41
+ this.enoOrganizationRepository = enoOrganizationRepository;
42
+ this.enoManagerRepository = enoManagerRepository;
43
+ this.enoEJRepository = enoEJRepository;
44
+ this.queueName = "processEnoLookup";
45
+ this.queueTtl = 60 * 60 * 1000;
46
+ this.schema = EnoLookupTaskInputSchema_1.EnoLookupTaskInputSchema;
47
+ this.updateStructureType = async () => {
48
+ const result = await this.enoDatasource.getData(EnoOperationEnum_1.EnoOperationLookupEnum.STRUCTURE_TYPE);
49
+ if (result) {
50
+ const transformed = this.enoStructureTypeTransformation.transformArray(result.return);
51
+ await this.enoStructureTypeRepository.bulkSave(transformed);
52
+ }
53
+ };
54
+ this.updateOrganization = async () => {
55
+ const result = await this.enoDatasource.getData(EnoOperationEnum_1.EnoOperationLookupEnum.ORGANIZATION);
56
+ if (result) {
57
+ const transformed = this.enoOrganizationTransformation.transformArray(result.return);
58
+ await this.enoOrganizationRepository.bulkSave(transformed);
59
+ }
60
+ };
61
+ this.updateManager = async () => {
62
+ const result = await this.enoDatasource.getData(EnoOperationEnum_1.EnoOperationLookupEnum.MANAGER);
63
+ if (result) {
64
+ const transformed = this.enoManagerTransformation.transformArray(result.return);
65
+ await this.enoManagerRepository.bulkSave(transformed);
66
+ }
67
+ };
68
+ this.updateEJ = async () => {
69
+ const result = await this.enoDatasource.getData(EnoOperationEnum_1.EnoOperationLookupEnum.EJ);
70
+ if (result) {
71
+ const transformed = this.enoEJTransformation.transformArray(result.return);
72
+ await this.enoEJRepository.bulkSave(transformed);
73
+ }
74
+ };
75
+ this.enoDatasource = enoDatasourceFactory.getDatasource(EnoDatasourceFactory_1.ENO_ENDPOINT.LOOKUPS, "mhmp");
76
+ }
77
+ async execute(data) {
78
+ try {
79
+ const updateMethod = this.getUpdateMethodDelegate(data.type);
80
+ await updateMethod();
81
+ }
82
+ catch (err) {
83
+ if (err instanceof golemio_errors_1.AbstractGolemioError) {
84
+ throw err;
85
+ }
86
+ throw new golemio_errors_1.GeneralError("Failed to save ENO lookup data", this.constructor.name, err);
87
+ }
88
+ }
89
+ getUpdateMethodDelegate(type) {
90
+ switch (type) {
91
+ case EnoOperationEnum_1.EnoOperationLookupEnum.STRUCTURE_TYPE:
92
+ return this.updateStructureType;
93
+ case EnoOperationEnum_1.EnoOperationLookupEnum.ORGANIZATION:
94
+ return this.updateOrganization;
95
+ case EnoOperationEnum_1.EnoOperationLookupEnum.MANAGER:
96
+ return this.updateManager;
97
+ case EnoOperationEnum_1.EnoOperationLookupEnum.EJ:
98
+ return this.updateEJ;
99
+ default:
100
+ throw new golemio_errors_1.GeneralError(`Eno unknown lookup type ${type}`, this.constructor.name);
101
+ }
102
+ }
103
+ };
104
+ exports.EnoLookupTask = EnoLookupTask = __decorate([
105
+ (0, tsyringe_1.injectable)(),
106
+ __param(0, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoDatasourceFactory)),
107
+ __param(1, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoStructureTypeTransformation)),
108
+ __param(2, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoOrganizationTransformation)),
109
+ __param(3, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoManagerTransformation)),
110
+ __param(4, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoEJTransformation)),
111
+ __param(5, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoStructureTypeRepository)),
112
+ __param(6, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoOrganizationRepository)),
113
+ __param(7, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoManagerRepository)),
114
+ __param(8, (0, tsyringe_1.inject)(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoEJRepository)),
115
+ __metadata("design:paramtypes", [EnoDatasourceFactory_1.EnoDatasourceFactory,
116
+ EnoStructureTypeTransformation_1.EnoStructureTypeTransformation,
117
+ EnoOrganizationTransformation_1.EnoOrganizationTransformation,
118
+ EnoManagerTransformation_1.EnoManagerTransformation,
119
+ EnoEJTransformation_1.EnoEJTransformation,
120
+ EnoStructureTypeRepository_1.EnoStructureTypeRepository,
121
+ EnoOrganizationRepository_1.EnoOrganizationRepository,
122
+ EnoManagerRepository_1.EnoManagerRepository,
123
+ EnoEJRepository_1.EnoEJRepository])
124
+ ], EnoLookupTask);
125
+ //# sourceMappingURL=EnoLookupTask.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoLookupTask.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/task/EnoLookupTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+CAAwD;AAExD,qFAAoG;AACpG,6EAAoF;AACpF,mFAAoF;AACpF,4EAA6E;AAC7E,sFAAuF;AACvF,gGAAiG;AACjG,kGAAmG;AACnG,uFAAwF;AACxF,iGAAkG;AAClG,2G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AC,oBAAoB,CAAC,CAAA;IAEtD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,eAAe,CAAC,CAAA;qCAfoC,2CAAoB;QAElE,+DAA8B;QAE/B,6DAA6B;QAElC,mDAAwB;QAE7B,yCAAmB;QAEZ,uDAA0B;QAE3B,qDAAyB;QAE9B,2CAAoB;QAEzB,iCAAe;GAvBnC,aAAa,CAwFzB"}
@@ -11,14 +11,15 @@ exports.staticMeterSettingsJsonSchema = {
11
11
  items: {
12
12
  type: "object",
13
13
  properties: {
14
- MeterSerialNumber: { type: "string" },
15
14
  Name: { type: "string" },
16
15
  Addr: { type: "string" },
17
- Meter: { type: "string" },
16
+ Meter: { type: "string", nullable: true },
18
17
  Type: { type: "string" },
19
18
  Var: { type: "string" },
19
+ MeId: { type: "number", nullable: true },
20
+ EIC: { type: "string", nullable: true },
20
21
  },
21
- required: ["Name", "Addr", "Meter", "Type", "Var"],
22
+ required: ["Name", "Addr", "Type", "Var"],
22
23
  },
23
24
  },
24
25
  },
@@ -1 +1 @@
1
- {"version":3,"file":"StaticMeterSettingsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/StaticMeterSettingsJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,6BAA6B,GAAyC;IAC/E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,kBAAkB,EAAE;gBAChB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,iBAAiB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACrC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACzB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;qBAC1B;oBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC;iBACrD;aACJ;SACJ;QACD,QAAQ,EAAE,CAAC,oBAAoB,CAAC;KACnC;IACD,QAAQ,EAAE,EAAE;CACf,CAAC"}
1
+ {"version":3,"file":"StaticMeterSettingsJsonSchema.js","sourceRoot":"","sources":["../../../src/schema-definitions/datasources/StaticMeterSettingsJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,6BAA6B,GAAyC;IAC/E,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE;QAClB,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,kBAAkB,EAAE;gBAChB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACH,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACR,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;wBACzC,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACxB,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACvB,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;wBACxC,GAAG,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;qBAC1C;oBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC;iBAC5C;aACJ;SACJ;QACD,QAAQ,EAAE,CAAC,oBAAoB,CAAC;KACnC;IACD,QAAQ,EAAE,EAAE;CACf,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IBuildingInfoInput } from "./interfaces/IBuildingInfoInput";
3
+ export declare const enoBuildingInfoInputJsonSchema: JSONSchemaType<{
4
+ return: IBuildingInfoInput[];
5
+ }>;
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enoBuildingInfoInputJsonSchema = void 0;
4
+ exports.enoBuildingInfoInputJsonSchema = {
5
+ type: "object",
6
+ properties: {
7
+ return: {
8
+ type: "array",
9
+ items: {
10
+ type: "object",
11
+ properties: {
12
+ adresy: {
13
+ type: "array",
14
+ items: {
15
+ type: "object",
16
+ properties: {
17
+ hlavniAdresa: { type: "boolean" },
18
+ idAdresa: { type: "integer" },
19
+ popisAdresa: { type: "string" },
20
+ },
21
+ required: [],
22
+ },
23
+ },
24
+ budova: {
25
+ type: "object",
26
+ properties: {
27
+ budovaRozdelenaBytNebyt: { type: "boolean" },
28
+ celkovaPlochaBudova: { type: "number" },
29
+ celkovaPlochaBytBudova: { type: "number" },
30
+ celkovaPlochaNebytBudova: { type: "number" },
31
+ czcc: { type: "integer" },
32
+ druhVytapeni: { type: "string" },
33
+ gid: { type: "string" },
34
+ idBudovaCuzk: { type: "integer" },
35
+ idObjekt: { type: "integer" },
36
+ kodOchranaBudova: { type: "string" },
37
+ kodVyuzitiBudova: { type: "integer" },
38
+ nazevBudova: { type: "string" },
39
+ nazevOchranaBudova: { type: "string" },
40
+ nazevVyuzitiBudova: { type: "string" },
41
+ obestavenyProstorBudova: { type: "number" },
42
+ oznaceniBudova: { type: "string" },
43
+ platnostOd: {
44
+ type: "object",
45
+ required: ["toISOString"],
46
+ },
47
+ pocetBytBudova: { type: "integer" },
48
+ pocetNadzemPodlaziBudova: { type: "integer" },
49
+ pocetNebytBudova: { type: "integer" },
50
+ pocetPodkroviBudova: { type: "integer" },
51
+ pocetPodzemPodlaziBudova: { type: "integer" },
52
+ pripojkaElektroBudova: { type: "string" },
53
+ pripojkaKanalizaceBudova: { type: "string" },
54
+ pripojkaVodaBudova: { type: "string" },
55
+ vytah: { type: "boolean" },
56
+ zastavenaPlochaBudova: { type: "number" },
57
+ },
58
+ required: ["gid"],
59
+ },
60
+ majetek: {
61
+ type: "object",
62
+ properties: {
63
+ datumNabyti: {
64
+ type: "object",
65
+ required: ["toISOString"],
66
+ },
67
+ datumPozbyti: {
68
+ type: "object",
69
+ required: ["toISOString"],
70
+ },
71
+ idMajEvidencniJednotka: { type: "integer" },
72
+ idMajSpravceMandatni: { type: "integer" },
73
+ idMajSpravceUcetJednotka: { type: "integer" },
74
+ idVlastnik: { type: "integer" },
75
+ penb: { type: "boolean" },
76
+ penbPlatnostOd: {
77
+ type: "object",
78
+ required: ["toISOString"],
79
+ },
80
+ penbPoznamka: { type: "string" },
81
+ podilMajetekCitatel: { type: "integer" },
82
+ podilMajetekJmenovatel: { type: "integer" },
83
+ VMajetku: { type: "boolean" },
84
+ VMajetkuStatu: { type: "boolean" },
85
+ VProcesuSvereni: { type: "boolean" },
86
+ },
87
+ required: [],
88
+ },
89
+ umisteni: {
90
+ type: "array",
91
+ items: {
92
+ type: "object",
93
+ properties: {
94
+ hlavniParcelaUmisteni: { type: "boolean" },
95
+ idPracelaOrig: { type: "integer" },
96
+ popisUmisteni: { type: "string" },
97
+ },
98
+ required: [],
99
+ },
100
+ },
101
+ },
102
+ required: ["budova", "majetek"],
103
+ },
104
+ },
105
+ },
106
+ required: ["return"],
107
+ };
108
+ //# sourceMappingURL=EnoBuldingInfoJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoBuldingInfoJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,8BAA8B,GAAqD;IAC5F,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,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AAC;6BAC5B;4BACD,YAAY,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;4BAChC,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;4BACxC,sBAAsB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;4BAC3C,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;4BAC7B,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;4BAClC,eAAe,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;yBACvC;wBACD,QAAQ,EAAE,EAAE;qBACf;oBACD,QAAQ,EAAE;wBACN,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE;4BACH,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACR,qBAAqB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gCAC1C,aAAa,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;gCAClC,aAAa,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;6BACpC;4BACD,QAAQ,EAAE,EAAE;yBACf;qBACJ;iBACJ;gBACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;aAClC;SACJ;KACJ;IACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IEJInput } from "./interfaces/IEJInput";
3
+ export declare const enoEJInputJsonSchema: JSONSchemaType<{
4
+ return: IEJInput[];
5
+ }>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enoEJInputJsonSchema = void 0;
4
+ exports.enoEJInputJsonSchema = {
5
+ type: "object",
6
+ properties: {
7
+ return: {
8
+ type: "array",
9
+ items: {
10
+ type: "object",
11
+ properties: {
12
+ aktivni: { type: "boolean" },
13
+ datumZalozeniEJ: {
14
+ type: "object",
15
+ required: ["toISOString"],
16
+ },
17
+ datumZruseniEJ: {
18
+ type: "object",
19
+ required: ["toISOString"],
20
+ },
21
+ druhPOEJ: { type: "string" },
22
+ guid: { type: "string", format: "uuid" },
23
+ hlavniEJ: { type: "boolean" },
24
+ icEJ: { type: "string" },
25
+ idEvidencniJednotka: { type: "integer" },
26
+ kodEJ: { type: "string" },
27
+ kodMajEvidencniJednotkaHl: { type: "string" },
28
+ kodMajEvidencniJednotkaOt: { type: "string" },
29
+ kodMajSpravceUcetJednotka: { type: "string" },
30
+ kodUcetniEJ: { type: "string" },
31
+ nazevEJ: { type: "string" },
32
+ platnostOd: {
33
+ type: "object",
34
+ required: ["toISOString"],
35
+ },
36
+ poznamkaEJ: { type: "string" },
37
+ typEJ: { type: "string" },
38
+ },
39
+ required: ["guid", "aktivni"],
40
+ },
41
+ },
42
+ },
43
+ required: ["return"],
44
+ };
45
+ //# sourceMappingURL=EnoEJInputJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoEJInputJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/eno/EnoEJInputJsonSchema.ts"],"names":[],"mappings":";;;AAGa,QAAA,oBAAoB,GAA2C;IACxE,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACR,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC5B,eAAe,EAAE;wBACb,IAAI,EAAE,QAAQ;wBACd,QAAQ,EAAE,CAAC,aAAa,CAAC;qBAC5B;oBACD,cAAc,EAAE;wBACZ,IAAI,EAAE,QAAQ;wBACd,QAAQ,EAAE,CAAC,aAAa,CAAC;qBAC5B;oBACD,QAAQ,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC5B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE;oBACxC,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBAC7B,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACxB,mBAAmB,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;oBACxC,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBACzB,yBAAyB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7C,yBAAyB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7C,yBAAyB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC7C,WAAW,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC/B,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC3B,UAAU,EAAE;wBACR,IAAI,EAAE,QAAQ;wBACd,QAAQ,EAAE,CAAC,aAAa,CAAC;qBAC5B;oBACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;oBAC9B,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;iBAC5B;gBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,SAAS,CAAC;aAChC;SACJ;KACJ;IACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ export declare const enoGIDListInputJsonSchema: JSONSchemaType<{
3
+ return: string[];
4
+ }>;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.enoGIDListInputJsonSchema = void 0;
4
+ exports.enoGIDListInputJsonSchema = {
5
+ type: "object",
6
+ properties: {
7
+ return: {
8
+ type: "array",
9
+ items: {
10
+ type: "string",
11
+ },
12
+ },
13
+ },
14
+ required: ["return"],
15
+ };
16
+ //# sourceMappingURL=EnoGIDListInputJsonSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoGIDListInputJsonSchema.js","sourceRoot":"","sources":["../../../../src/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAyC;IAC3E,IAAI,EAAE,QAAQ;IACd,UAAU,EAAE;QACR,MAAM,EAAE;YACJ,IAAI,EAAE,OAAO;YACb,KAAK,EAAE;gBACH,IAAI,EAAE,QAAQ;aACjB;SACJ;KACJ;IACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACvB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { JSONSchemaType } from "@golemio/core/dist/shared/ajv";
2
+ import { IManagerInput } from "./interfaces/IManagerInput";
3
+ export declare const enoManagerInputJsonSchema: JSONSchemaType<{
4
+ return: IManagerInput[];
5
+ }>;