@golemio/energetics 1.5.3-dev.2115789253 → 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 (187) hide show
  1. package/db/migrations/postgresql/20251110125059-eno-integration.js +53 -0
  2. package/db/migrations/postgresql/sqls/20251110125059-eno-integration-down.sql +10 -0
  3. package/db/migrations/postgresql/sqls/20251110125059-eno-integration-up.sql +170 -0
  4. package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.d.ts +10 -0
  5. package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.js +82 -0
  6. package/dist/integration-engine/enapo/datasources/eno/EnoDatasource.js.map +1 -0
  7. package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.d.ts +13 -0
  8. package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.js +45 -0
  9. package/dist/integration-engine/enapo/datasources/eno/EnoDatasourceFactory.js.map +1 -0
  10. package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.d.ts +11 -0
  11. package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.js +17 -0
  12. package/dist/integration-engine/enapo/datasources/eno/EnoOperationEnum.js.map +1 -0
  13. package/dist/integration-engine/enapo/interfaces/eno/IEnoBuildingInfo.d.ts +10 -0
  14. package/dist/integration-engine/enapo/interfaces/eno/IEnoBuildingInfo.js +3 -0
  15. package/dist/integration-engine/enapo/interfaces/eno/IEnoBuildingInfo.js.map +1 -0
  16. package/dist/integration-engine/enapo/ioc/Di.js +34 -2
  17. package/dist/integration-engine/enapo/ioc/Di.js.map +1 -1
  18. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.d.ts +16 -0
  19. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js +18 -0
  20. package/dist/integration-engine/enapo/ioc/EnapoWorkerContainerToken.js.map +1 -1
  21. package/dist/integration-engine/enapo/repositories/eno/EnoAddressRepository.d.ts +5 -0
  22. package/dist/integration-engine/enapo/repositories/eno/EnoAddressRepository.js +32 -0
  23. package/dist/integration-engine/enapo/repositories/eno/EnoAddressRepository.js.map +1 -0
  24. package/dist/integration-engine/enapo/repositories/eno/EnoBuildingRepository.d.ts +5 -0
  25. package/dist/integration-engine/enapo/repositories/eno/EnoBuildingRepository.js +32 -0
  26. package/dist/integration-engine/enapo/repositories/eno/EnoBuildingRepository.js.map +1 -0
  27. package/dist/integration-engine/enapo/repositories/eno/EnoEJRepository.d.ts +5 -0
  28. package/dist/integration-engine/enapo/repositories/eno/EnoEJRepository.js +32 -0
  29. package/dist/integration-engine/enapo/repositories/eno/EnoEJRepository.js.map +1 -0
  30. package/dist/integration-engine/enapo/repositories/eno/EnoLocationRepository.d.ts +5 -0
  31. package/dist/integration-engine/enapo/repositories/eno/EnoLocationRepository.js +32 -0
  32. package/dist/integration-engine/enapo/repositories/eno/EnoLocationRepository.js.map +1 -0
  33. package/dist/integration-engine/enapo/repositories/eno/EnoManagerRepository.d.ts +5 -0
  34. package/dist/integration-engine/enapo/repositories/eno/EnoManagerRepository.js +32 -0
  35. package/dist/integration-engine/enapo/repositories/eno/EnoManagerRepository.js.map +1 -0
  36. package/dist/integration-engine/enapo/repositories/eno/EnoOrganizationRepository.d.ts +5 -0
  37. package/dist/integration-engine/enapo/repositories/eno/EnoOrganizationRepository.js +32 -0
  38. package/dist/integration-engine/enapo/repositories/eno/EnoOrganizationRepository.js.map +1 -0
  39. package/dist/integration-engine/enapo/repositories/eno/EnoPropertyRepository.d.ts +5 -0
  40. package/dist/integration-engine/enapo/repositories/eno/EnoPropertyRepository.js +32 -0
  41. package/dist/integration-engine/enapo/repositories/eno/EnoPropertyRepository.js.map +1 -0
  42. package/dist/integration-engine/enapo/repositories/eno/EnoRemovedGIDRepository.d.ts +5 -0
  43. package/dist/integration-engine/enapo/repositories/eno/EnoRemovedGIDRepository.js +32 -0
  44. package/dist/integration-engine/enapo/repositories/eno/EnoRemovedGIDRepository.js.map +1 -0
  45. package/dist/integration-engine/enapo/repositories/eno/EnoStructureTypeRepository.d.ts +5 -0
  46. package/dist/integration-engine/enapo/repositories/eno/EnoStructureTypeRepository.js +32 -0
  47. package/dist/integration-engine/enapo/repositories/eno/EnoStructureTypeRepository.js.map +1 -0
  48. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.d.ts +13 -0
  49. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.js +101 -0
  50. package/dist/integration-engine/enapo/transformations/eno/EnoBuildingTransformation.js.map +1 -0
  51. package/dist/integration-engine/enapo/transformations/eno/EnoEJTransformation.d.ts +7 -0
  52. package/dist/integration-engine/enapo/transformations/eno/EnoEJTransformation.js +42 -0
  53. package/dist/integration-engine/enapo/transformations/eno/EnoEJTransformation.js.map +1 -0
  54. package/dist/integration-engine/enapo/transformations/eno/EnoManagerTransformation.d.ts +7 -0
  55. package/dist/integration-engine/enapo/transformations/eno/EnoManagerTransformation.js +50 -0
  56. package/dist/integration-engine/enapo/transformations/eno/EnoManagerTransformation.js.map +1 -0
  57. package/dist/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.d.ts +7 -0
  58. package/dist/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.js +31 -0
  59. package/dist/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.js.map +1 -0
  60. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.d.ts +7 -0
  61. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.js +32 -0
  62. package/dist/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.js.map +1 -0
  63. package/dist/integration-engine/enapo/workers/EnapoWorker.js +2 -0
  64. package/dist/integration-engine/enapo/workers/EnapoWorker.js.map +1 -1
  65. package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.d.ts +5 -0
  66. package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.js +3 -0
  67. package/dist/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.js.map +1 -0
  68. package/dist/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.d.ts +3 -0
  69. package/dist/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.js +3 -0
  70. package/dist/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.js.map +1 -0
  71. package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.d.ts +6 -0
  72. package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.js +30 -0
  73. package/dist/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.js.map +1 -0
  74. package/dist/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.d.ts +4 -0
  75. package/dist/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.js +22 -0
  76. package/dist/integration-engine/enapo/workers/schema/EnoLookupTaskInputSchema.js.map +1 -0
  77. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.d.ts +33 -0
  78. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js +139 -0
  79. package/dist/integration-engine/enapo/workers/task/EnoBuildingTask.js.map +1 -0
  80. package/dist/integration-engine/enapo/workers/task/EnoLookupTask.d.ts +34 -0
  81. package/dist/integration-engine/enapo/workers/task/EnoLookupTask.js +125 -0
  82. package/dist/integration-engine/enapo/workers/task/EnoLookupTask.js.map +1 -0
  83. package/dist/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.d.ts +5 -0
  84. package/dist/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.js +108 -0
  85. package/dist/schema-definitions/datasources/eno/EnoBuldingInfoJsonSchema.js.map +1 -0
  86. package/dist/schema-definitions/datasources/eno/EnoEJInputJsonSchema.d.ts +5 -0
  87. package/dist/schema-definitions/datasources/eno/EnoEJInputJsonSchema.js +45 -0
  88. package/dist/schema-definitions/datasources/eno/EnoEJInputJsonSchema.js.map +1 -0
  89. package/dist/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.d.ts +4 -0
  90. package/dist/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.js +16 -0
  91. package/dist/schema-definitions/datasources/eno/EnoGIDListInputJsonSchema.js.map +1 -0
  92. package/dist/schema-definitions/datasources/eno/EnoManagerInputJsonSchema.d.ts +5 -0
  93. package/dist/schema-definitions/datasources/eno/EnoManagerInputJsonSchema.js +50 -0
  94. package/dist/schema-definitions/datasources/eno/EnoManagerInputJsonSchema.js.map +1 -0
  95. package/dist/schema-definitions/datasources/eno/EnoOrganizationInputJsonSchema.d.ts +5 -0
  96. package/dist/schema-definitions/datasources/eno/EnoOrganizationInputJsonSchema.js +28 -0
  97. package/dist/schema-definitions/datasources/eno/EnoOrganizationInputJsonSchema.js.map +1 -0
  98. package/dist/schema-definitions/datasources/eno/EnoStructureTypeInputJsonSchema.d.ts +5 -0
  99. package/dist/schema-definitions/datasources/eno/EnoStructureTypeInputJsonSchema.js +29 -0
  100. package/dist/schema-definitions/datasources/eno/EnoStructureTypeInputJsonSchema.js.map +1 -0
  101. package/dist/schema-definitions/datasources/eno/interfaces/IAddressInput.d.ts +5 -0
  102. package/dist/schema-definitions/datasources/eno/interfaces/IAddressInput.js +3 -0
  103. package/dist/schema-definitions/datasources/eno/interfaces/IAddressInput.js.map +1 -0
  104. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInfoInput.d.ts +10 -0
  105. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInfoInput.js +3 -0
  106. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInfoInput.js.map +1 -0
  107. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInput.d.ts +29 -0
  108. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInput.js +3 -0
  109. package/dist/schema-definitions/datasources/eno/interfaces/IBuildingInput.js.map +1 -0
  110. package/dist/schema-definitions/datasources/eno/interfaces/IEJInput.d.ts +19 -0
  111. package/dist/schema-definitions/datasources/eno/interfaces/IEJInput.js +3 -0
  112. package/dist/schema-definitions/datasources/eno/interfaces/IEJInput.js.map +1 -0
  113. package/dist/schema-definitions/datasources/eno/interfaces/ILocationInput.d.ts +5 -0
  114. package/dist/schema-definitions/datasources/eno/interfaces/ILocationInput.js +3 -0
  115. package/dist/schema-definitions/datasources/eno/interfaces/ILocationInput.js.map +1 -0
  116. package/dist/schema-definitions/datasources/eno/interfaces/IManagerInput.d.ts +27 -0
  117. package/dist/schema-definitions/datasources/eno/interfaces/IManagerInput.js +3 -0
  118. package/dist/schema-definitions/datasources/eno/interfaces/IManagerInput.js.map +1 -0
  119. package/dist/schema-definitions/datasources/eno/interfaces/IOrganizationInput.d.ts +8 -0
  120. package/dist/schema-definitions/datasources/eno/interfaces/IOrganizationInput.js +3 -0
  121. package/dist/schema-definitions/datasources/eno/interfaces/IOrganizationInput.js.map +1 -0
  122. package/dist/schema-definitions/datasources/eno/interfaces/IPropertyInput.d.ts +16 -0
  123. package/dist/schema-definitions/datasources/eno/interfaces/IPropertyInput.js +3 -0
  124. package/dist/schema-definitions/datasources/eno/interfaces/IPropertyInput.js.map +1 -0
  125. package/dist/schema-definitions/datasources/eno/interfaces/IStructureTypeInput.d.ts +9 -0
  126. package/dist/schema-definitions/datasources/eno/interfaces/IStructureTypeInput.js +3 -0
  127. package/dist/schema-definitions/datasources/eno/interfaces/IStructureTypeInput.js.map +1 -0
  128. package/dist/schema-definitions/models/eno/AddressModel.d.ts +15 -0
  129. package/dist/schema-definitions/models/eno/AddressModel.js +48 -0
  130. package/dist/schema-definitions/models/eno/AddressModel.js.map +1 -0
  131. package/dist/schema-definitions/models/eno/BuildingModel.d.ts +36 -0
  132. package/dist/schema-definitions/models/eno/BuildingModel.js +90 -0
  133. package/dist/schema-definitions/models/eno/BuildingModel.js.map +1 -0
  134. package/dist/schema-definitions/models/eno/EJLookupModel.d.ts +25 -0
  135. package/dist/schema-definitions/models/eno/EJLookupModel.js +81 -0
  136. package/dist/schema-definitions/models/eno/EJLookupModel.js.map +1 -0
  137. package/dist/schema-definitions/models/eno/LocationModel.d.ts +15 -0
  138. package/dist/schema-definitions/models/eno/LocationModel.js +48 -0
  139. package/dist/schema-definitions/models/eno/LocationModel.js.map +1 -0
  140. package/dist/schema-definitions/models/eno/ManagerLookupModel.d.ts +33 -0
  141. package/dist/schema-definitions/models/eno/ManagerLookupModel.js +89 -0
  142. package/dist/schema-definitions/models/eno/ManagerLookupModel.js.map +1 -0
  143. package/dist/schema-definitions/models/eno/OrganizationLookupModel.d.ts +14 -0
  144. package/dist/schema-definitions/models/eno/OrganizationLookupModel.js +40 -0
  145. package/dist/schema-definitions/models/eno/OrganizationLookupModel.js.map +1 -0
  146. package/dist/schema-definitions/models/eno/PropertyModel.d.ts +25 -0
  147. package/dist/schema-definitions/models/eno/PropertyModel.js +87 -0
  148. package/dist/schema-definitions/models/eno/PropertyModel.js.map +1 -0
  149. package/dist/schema-definitions/models/eno/RemovedGIDModel.d.ts +11 -0
  150. package/dist/schema-definitions/models/eno/RemovedGIDModel.js +35 -0
  151. package/dist/schema-definitions/models/eno/RemovedGIDModel.js.map +1 -0
  152. package/dist/schema-definitions/models/eno/StructureTypeModel.d.ts +15 -0
  153. package/dist/schema-definitions/models/eno/StructureTypeModel.js +42 -0
  154. package/dist/schema-definitions/models/eno/StructureTypeModel.js.map +1 -0
  155. package/dist/schema-definitions/models/eno/helpers/EnumGIDTypes.d.ts +4 -0
  156. package/dist/schema-definitions/models/eno/helpers/EnumGIDTypes.js +9 -0
  157. package/dist/schema-definitions/models/eno/helpers/EnumGIDTypes.js.map +1 -0
  158. package/dist/schema-definitions/models/eno/interfaces/IAddress.d.ts +9 -0
  159. package/dist/schema-definitions/models/eno/interfaces/IAddress.js +3 -0
  160. package/dist/schema-definitions/models/eno/interfaces/IAddress.js.map +1 -0
  161. package/dist/schema-definitions/models/eno/interfaces/IBuilding.d.ts +30 -0
  162. package/dist/schema-definitions/models/eno/interfaces/IBuilding.js +3 -0
  163. package/dist/schema-definitions/models/eno/interfaces/IBuilding.js.map +1 -0
  164. package/dist/schema-definitions/models/eno/interfaces/IEJLookup.d.ts +19 -0
  165. package/dist/schema-definitions/models/eno/interfaces/IEJLookup.js +3 -0
  166. package/dist/schema-definitions/models/eno/interfaces/IEJLookup.js.map +1 -0
  167. package/dist/schema-definitions/models/eno/interfaces/ILocation.d.ts +9 -0
  168. package/dist/schema-definitions/models/eno/interfaces/ILocation.js +3 -0
  169. package/dist/schema-definitions/models/eno/interfaces/ILocation.js.map +1 -0
  170. package/dist/schema-definitions/models/eno/interfaces/IManagerLookup.d.ts +27 -0
  171. package/dist/schema-definitions/models/eno/interfaces/IManagerLookup.js +3 -0
  172. package/dist/schema-definitions/models/eno/interfaces/IManagerLookup.js.map +1 -0
  173. package/dist/schema-definitions/models/eno/interfaces/IOrganizationLookup.d.ts +8 -0
  174. package/dist/schema-definitions/models/eno/interfaces/IOrganizationLookup.js +3 -0
  175. package/dist/schema-definitions/models/eno/interfaces/IOrganizationLookup.js.map +1 -0
  176. package/dist/schema-definitions/models/eno/interfaces/IProperty.d.ts +19 -0
  177. package/dist/schema-definitions/models/eno/interfaces/IProperty.js +3 -0
  178. package/dist/schema-definitions/models/eno/interfaces/IProperty.js.map +1 -0
  179. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.d.ts +5 -0
  180. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.js +3 -0
  181. package/dist/schema-definitions/models/eno/interfaces/IRemovedGID.js.map +1 -0
  182. package/dist/schema-definitions/models/eno/interfaces/IStructureTypeLookup.d.ts +9 -0
  183. package/dist/schema-definitions/models/eno/interfaces/IStructureTypeLookup.js +3 -0
  184. package/dist/schema-definitions/models/eno/interfaces/IStructureTypeLookup.js.map +1 -0
  185. package/docs/asyncapi.yaml +88 -0
  186. package/docs/implementation_documentation.md +98 -3
  187. package/package.json +3 -2
@@ -0,0 +1,7 @@
1
+ import { IOrganizationInput } from "../../../../schema-definitions/datasources/eno/interfaces/IOrganizationInput";
2
+ import { IOrganizationLookup } from "../../../../schema-definitions/models/eno/interfaces/IOrganizationLookup";
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export declare class EnoOrganizationTransformation extends AbstractTransformation<IOrganizationInput, IOrganizationLookup> {
5
+ name: string;
6
+ protected transformInternal: (element: IOrganizationInput) => IOrganizationLookup;
7
+ }
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.EnoOrganizationTransformation = void 0;
10
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
11
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
12
+ let EnoOrganizationTransformation = exports.EnoOrganizationTransformation = class EnoOrganizationTransformation extends AbstractTransformation_1.AbstractTransformation {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.name = "EnoOrganizationTransformation";
16
+ this.transformInternal = (element) => {
17
+ return {
18
+ id: element.idOrganizace,
19
+ aktivni: element.aktivni,
20
+ id_maj_spravce_ucet_jednotka: element.idMajSpravceUcetJednotka,
21
+ id_nadrazena: element.idOrganizaceNadrazena,
22
+ kod: element.kodOrganizace,
23
+ platnost_od: element.platnostOd ? new Date(element.platnostOd) : null,
24
+ };
25
+ };
26
+ }
27
+ };
28
+ exports.EnoOrganizationTransformation = EnoOrganizationTransformation = __decorate([
29
+ (0, tsyringe_1.injectable)()
30
+ ], EnoOrganizationTransformation);
31
+ //# sourceMappingURL=EnoOrganizationTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoOrganizationTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/transformations/eno/EnoOrganizationTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,6BAA6B,2CAAnC,MAAM,6BAA8B,SAAQ,+CAA+D;IAA3G;;QACI,SAAI,GAAG,+BAA+B,CAAC;QAEpC,sBAAiB,GAAG,CAAC,OAA2B,EAAuB,EAAE;YAC/E,OAAO;gBACH,EAAE,EAAE,OAAO,CAAC,YAAY;gBACxB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,4BAA4B,EAAE,OAAO,CAAC,wBAAwB;gBAC9D,YAAY,EAAE,OAAO,CAAC,qBAAqB;gBAC3C,GAAG,EAAE,OAAO,CAAC,aAAa;gBAC1B,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;aACjD,CAAC;QAC7B,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;wCAbY,6BAA6B;IADzC,IAAA,qBAAU,GAAE;GACA,6BAA6B,CAazC"}
@@ -0,0 +1,7 @@
1
+ import { IStructureTypeInput } from "../../../../schema-definitions/datasources/eno/interfaces/IStructureTypeInput";
2
+ import { IStructureTypeLookup } from "../../../../schema-definitions/models/eno/interfaces/IStructureTypeLookup";
3
+ import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
4
+ export declare class EnoStructureTypeTransformation extends AbstractTransformation<IStructureTypeInput, IStructureTypeLookup> {
5
+ name: string;
6
+ protected transformInternal: (element: IStructureTypeInput) => IStructureTypeLookup;
7
+ }
@@ -0,0 +1,32 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.EnoStructureTypeTransformation = void 0;
10
+ const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
11
+ const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
12
+ let EnoStructureTypeTransformation = exports.EnoStructureTypeTransformation = class EnoStructureTypeTransformation extends AbstractTransformation_1.AbstractTransformation {
13
+ constructor() {
14
+ super(...arguments);
15
+ this.name = "EnoStructureTypeTransformation";
16
+ this.transformInternal = (element) => {
17
+ return {
18
+ guid: element.guid,
19
+ aktivni: element.aktivni,
20
+ id: element.id,
21
+ kod: element.kod,
22
+ kod_typ: element.kodTyp,
23
+ nazev: element.nazev,
24
+ platnost_od: element.platnostOd ? new Date(element.platnostOd) : null,
25
+ };
26
+ };
27
+ }
28
+ };
29
+ exports.EnoStructureTypeTransformation = EnoStructureTypeTransformation = __decorate([
30
+ (0, tsyringe_1.injectable)()
31
+ ], EnoStructureTypeTransformation);
32
+ //# sourceMappingURL=EnoStructureTypeTransformation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoStructureTypeTransformation.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/transformations/eno/EnoStructureTypeTransformation.ts"],"names":[],"mappings":";;;;;;;;;AAEA,6GAA0G;AAC1G,iEAAgE;AAGzD,IAAM,8BAA8B,4CAApC,MAAM,8BAA+B,SAAQ,+CAAiE;IAA9G;;QACI,SAAI,GAAG,gCAAgC,CAAC;QAErC,sBAAiB,GAAG,CAAC,OAA4B,EAAwB,EAAE;YACjF,OAAO;gBACH,IAAI,EAAE,OAAO,CAAC,IAAI;gBAClB,OAAO,EAAE,OAAO,CAAC,OAAO;gBACxB,EAAE,EAAE,OAAO,CAAC,EAAE;gBACd,GAAG,EAAE,OAAO,CAAC,GAAG;gBAChB,OAAO,EAAE,OAAO,CAAC,MAAM;gBACvB,KAAK,EAAE,OAAO,CAAC,KAAK;gBACpB,WAAW,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI;aAChD,CAAC;QAC9B,CAAC,CAAC;IACN,CAAC;CAAA,CAAA;yCAdY,8BAA8B;IAD1C,IAAA,qBAAU,GAAE;GACA,8BAA8B,CAc1C"}
@@ -16,6 +16,8 @@ class EnapoWorker extends integration_engine_1.AbstractWorker {
16
16
  // Register tasks
17
17
  this.registerTask(Di_1.EnapoContainer.resolve(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnapoPpasTask));
18
18
  this.registerTask(Di_1.EnapoContainer.resolve(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnapoPrediTask));
19
+ this.registerTask(Di_1.EnapoContainer.resolve(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoLookupTask));
20
+ this.registerTask(Di_1.EnapoContainer.resolve(EnapoWorkerContainerToken_1.EnapoWorkerContainerToken.EnoBuildingTask));
19
21
  }
20
22
  }
21
23
  exports.EnapoWorker = EnapoWorker;
@@ -1 +1 @@
1
- {"version":3,"file":"EnapoWorker.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/workers/EnapoWorker.ts"],"names":[],"mappings":";;;AAAA,8EAAuE;AAEvE,4CAAiD;AACjD,kCAA2C;AAC3C,gFAA6E;AAE7E,MAAa,WAAY,SAAQ,mCAAc;IAG3C;QACI,KAAK,EAAE,CAAC;QAHF,SAAI,GAAG,6BAAiB,CAAC;QAU5B,iBAAY,GAAG,CAAC,IAAW,EAAQ,EAAE;YACxC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,CAAC,CAAC;QARE,iBAAiB;QACjB,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,aAAa,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,cAAc,CAAC,CAAC,CAAC;IAC/F,CAAC;CAMJ;AAfD,kCAeC"}
1
+ {"version":3,"file":"EnapoWorker.js","sourceRoot":"","sources":["../../../../src/integration-engine/enapo/workers/EnapoWorker.ts"],"names":[],"mappings":";;;AAAA,8EAAuE;AAEvE,4CAAiD;AACjD,kCAA2C;AAC3C,gFAA6E;AAE7E,MAAa,WAAY,SAAQ,mCAAc;IAG3C;QACI,KAAK,EAAE,CAAC;QAHF,SAAI,GAAG,6BAAiB,CAAC;QAY5B,iBAAY,GAAG,CAAC,IAAW,EAAQ,EAAE;YACxC,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACzB,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC7C,CAAC,CAAC;QAVE,iBAAiB;QACjB,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,aAAa,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,cAAc,CAAC,CAAC,CAAC;QAC3F,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,aAAa,CAAC,CAAC,CAAC;QAC1F,IAAI,CAAC,YAAY,CAAC,mBAAc,CAAC,OAAO,CAAQ,qDAAyB,CAAC,eAAe,CAAC,CAAC,CAAC;IAChG,CAAC;CAMJ;AAjBD,kCAiBC"}
@@ -0,0 +1,5 @@
1
+ export interface IEnoBuildingTaskInput {
2
+ type: string;
3
+ source: string;
4
+ daysBack?: number;
5
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IEnoBuildingTaskInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEnoBuildingTaskInput.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/interfaces/IEnoBuildingTaskInput.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export interface IEnoLookupTaskInput {
2
+ type: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IEnoLookupTaskInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IEnoLookupTaskInput.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/interfaces/IEnoLookupTaskInput.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { IEnoBuildingTaskInput } from "../interfaces/IEnoBuildingTaskInput";
2
+ export declare class EnoBuildingTaskInputSchema implements IEnoBuildingTaskInput {
3
+ type: string;
4
+ source: string;
5
+ daysBack?: number;
6
+ }
@@ -0,0 +1,30 @@
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.EnoBuildingTaskInputSchema = void 0;
13
+ const class_validator_1 = require("@golemio/core/dist/shared/class-validator");
14
+ class EnoBuildingTaskInputSchema {
15
+ }
16
+ exports.EnoBuildingTaskInputSchema = EnoBuildingTaskInputSchema;
17
+ __decorate([
18
+ (0, class_validator_1.IsEnum)(["current", "removed"]),
19
+ __metadata("design:type", String)
20
+ ], EnoBuildingTaskInputSchema.prototype, "type", void 0);
21
+ __decorate([
22
+ (0, class_validator_1.IsString)(),
23
+ __metadata("design:type", String)
24
+ ], EnoBuildingTaskInputSchema.prototype, "source", void 0);
25
+ __decorate([
26
+ (0, class_validator_1.IsOptional)(),
27
+ (0, class_validator_1.IsNumber)(),
28
+ __metadata("design:type", Number)
29
+ ], EnoBuildingTaskInputSchema.prototype, "daysBack", void 0);
30
+ //# sourceMappingURL=EnoBuildingTaskInputSchema.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EnoBuildingTaskInputSchema.js","sourceRoot":"","sources":["../../../../../src/integration-engine/enapo/workers/schema/EnoBuildingTaskInputSchema.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+EAAmG;AAGnG,MAAa,0BAA0B;CAUtC;AAVD,gEAUC;AARG;IADC,IAAA,wBAAM,EAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;;wDACjB;AAGd;IADC,IAAA,0BAAQ,GAAE;;0DACK;AAIhB;IAFC,IAAA,4BAAU,GAAE;IACZ,IAAA,0BAAQ,GAAE;;4DACO"}
@@ -0,0 +1,4 @@
1
+ import { IEnoLookupTaskInput } from "../interfaces/IEnoLookupTaskInput";
2
+ export declare class EnoLookupTaskInputSchema implements IEnoLookupTaskInput {
3
+ type: string;
4
+ }
@@ -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;A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IAD3B,IAAA,qBAAU,GAAE;IASJ,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,oBAAoB,CAAC,CAAA;IACtD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,qBAAqB,CAAC,CAAA;IACvD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,qBAAqB,CAAC,CAAA;IACvD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,qBAAqB,CAAC,CAAA;IACvD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,oBAAoB,CAAC,CAAA;IACtD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,uBAAuB,CAAC,CAAA;IACzD,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,MAAM,CAAC,CAAA;IACxB,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,iBAAiB,CAAC,CAAA;IACnC,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;qCARuD,2CAAoB;QAClB,6CAAqB;QACrB,6CAAqB;QACrB,6CAAqB;QACvB,2CAAoB;QACd,iDAAuB;GAb9G,eAAe,CA0G3B"}
@@ -0,0 +1,34 @@
1
+ import { EnoDatasourceFactory } from "../../datasources/eno/EnoDatasourceFactory";
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,2GAA4G;AAC5G,6GAA8G;AAC9G,6FAA0F;AAC1F,6EAA8F;AAC9F,iEAAwE;AAExE,iFAA8E;AAGvE,IAAM,aAAa,2BAAnB,MAAM,aAAc,SAAQ,2BAAiC;IAMhE,YAC4D,oBAAkD,EAE1G,8BAAsE,EAEtE,6BAAoE,EAEpE,wBAA0D,EAE1D,mBAAgD,EAEhD,0BAA8D,EAE9D,yBAA4D,EAE5D,oBAAkD,EAElD,eAAwC;QAExC,KAAK,CAAC,6BAAiB,CAAC,CAAC;QAlBuC,yBAAoB,GAApB,oBAAoB,CAAsB;QAElG,mCAA8B,GAA9B,8BAA8B,CAAgC;QAE9D,kCAA6B,GAA7B,6BAA6B,CAA+B;QAE5D,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AO,IAAI,CAAC,aAAa,CAAC;YAC9B,KAAK,yCAAsB,CAAC,EAAE;gBAC1B,OAAO,IAAI,CAAC,QAAQ,CAAC;YACzB;gBACI,MAAM,IAAI,6BAAY,CAAC,2BAA2B,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;SACxF;IACL,CAAC;CACJ,CAAA;wBAxFY,aAAa;IADzB,IAAA,qBAAU,GAAE;IAQJ,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,oBAAoB,CAAC,CAAA;IACtD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,8BAA8B,CAAC,CAAA;IAEhE,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,6BAA6B,CAAC,CAAA;IAE/D,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,wBAAwB,CAAC,CAAA;IAE1D,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,mBAAmB,CAAC,CAAA;IAErD,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,0BAA0B,CAAC,CAAA;IAE5D,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,yBAAyB,CAAC,CAAA;IAE3D,WAAA,IAAA,iBAAM,EAAC,qDAAyB,CAAC,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"}
@@ -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
+ }>;