@golemio/fypr 1.12.1-dev.2832960889 → 2.0.0-dev.2871273577

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 (271) hide show
  1. package/README.md +11 -0
  2. package/dist/helpers/errors/ErrorHelper.d.ts +2 -2
  3. package/dist/helpers/errors/ErrorHelper.js +4 -7
  4. package/dist/helpers/errors/ErrorHelper.js.map +1 -1
  5. package/dist/index.d.ts +3 -3
  6. package/dist/index.js +3 -39
  7. package/dist/index.js.map +1 -1
  8. package/dist/integration-engine/data-sources/AbstractDBFYPRDataSourceFactory.d.ts +2 -2
  9. package/dist/integration-engine/data-sources/AbstractDBFYPRDataSourceFactory.js +7 -10
  10. package/dist/integration-engine/data-sources/AbstractDBFYPRDataSourceFactory.js.map +1 -1
  11. package/dist/integration-engine/data-sources/DBFYPRDisplayCasesDataSourceFactory.d.ts +3 -3
  12. package/dist/integration-engine/data-sources/DBFYPRDisplayCasesDataSourceFactory.js +10 -13
  13. package/dist/integration-engine/data-sources/DBFYPRDisplayCasesDataSourceFactory.js.map +1 -1
  14. package/dist/integration-engine/data-sources/DBFYPRInformationPanelsDataSourceFactory.d.ts +3 -3
  15. package/dist/integration-engine/data-sources/DBFYPRInformationPanelsDataSourceFactory.js +10 -13
  16. package/dist/integration-engine/data-sources/DBFYPRInformationPanelsDataSourceFactory.js.map +1 -1
  17. package/dist/integration-engine/data-sources/DBFYPRObelisksDataSourceFactory.d.ts +3 -3
  18. package/dist/integration-engine/data-sources/DBFYPRObelisksDataSourceFactory.js +10 -13
  19. package/dist/integration-engine/data-sources/DBFYPRObelisksDataSourceFactory.js.map +1 -1
  20. package/dist/integration-engine/data-sources/DBFYPRSignpostsDataSourceFactory.d.ts +3 -3
  21. package/dist/integration-engine/data-sources/DBFYPRSignpostsDataSourceFactory.js +10 -13
  22. package/dist/integration-engine/data-sources/DBFYPRSignpostsDataSourceFactory.js.map +1 -1
  23. package/dist/integration-engine/data-sources/DBFYPRTotemsDataSourceFactory.d.ts +3 -3
  24. package/dist/integration-engine/data-sources/DBFYPRTotemsDataSourceFactory.js +10 -13
  25. package/dist/integration-engine/data-sources/DBFYPRTotemsDataSourceFactory.js.map +1 -1
  26. package/dist/integration-engine/data-sources/DCIPStatusOverviewDataSourceFactory.d.ts +3 -3
  27. package/dist/integration-engine/data-sources/DCIPStatusOverviewDataSourceFactory.js +13 -15
  28. package/dist/integration-engine/data-sources/DCIPStatusOverviewDataSourceFactory.js.map +1 -1
  29. package/dist/integration-engine/data-sources/protocol-strategies/StrapiPaginatedHTTPProtocolStrategy.d.ts +3 -3
  30. package/dist/integration-engine/data-sources/protocol-strategies/StrapiPaginatedHTTPProtocolStrategy.js +12 -15
  31. package/dist/integration-engine/data-sources/protocol-strategies/StrapiPaginatedHTTPProtocolStrategy.js.map +1 -1
  32. package/dist/integration-engine/helpers/StrapiPaginationHelper.js +5 -8
  33. package/dist/integration-engine/helpers/StrapiPaginationHelper.js.map +1 -1
  34. package/dist/integration-engine/index.d.ts +1 -1
  35. package/dist/integration-engine/index.js +2 -5
  36. package/dist/integration-engine/index.js.map +1 -1
  37. package/dist/integration-engine/ioc/Di.d.ts +1 -1
  38. package/dist/integration-engine/ioc/Di.js +63 -66
  39. package/dist/integration-engine/ioc/Di.js.map +1 -1
  40. package/dist/integration-engine/ioc/FYPRIEContainerTokens.js +1 -4
  41. package/dist/integration-engine/ioc/FYPRIEContainerTokens.js.map +1 -1
  42. package/dist/integration-engine/repositories/AbstractFyprRepository.d.ts +7 -7
  43. package/dist/integration-engine/repositories/AbstractFyprRepository.js +11 -13
  44. package/dist/integration-engine/repositories/AbstractFyprRepository.js.map +1 -1
  45. package/dist/integration-engine/repositories/DeviceStatusRepository.d.ts +7 -7
  46. package/dist/integration-engine/repositories/DeviceStatusRepository.js +22 -23
  47. package/dist/integration-engine/repositories/DeviceStatusRepository.js.map +1 -1
  48. package/dist/integration-engine/repositories/DisplayCaseRepository.d.ts +8 -8
  49. package/dist/integration-engine/repositories/DisplayCaseRepository.js +17 -19
  50. package/dist/integration-engine/repositories/DisplayCaseRepository.js.map +1 -1
  51. package/dist/integration-engine/repositories/InformationPanelPresetsRepository.d.ts +6 -6
  52. package/dist/integration-engine/repositories/InformationPanelPresetsRepository.js +28 -28
  53. package/dist/integration-engine/repositories/InformationPanelPresetsRepository.js.map +1 -1
  54. package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.d.ts +6 -6
  55. package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.js +24 -24
  56. package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.js.map +1 -1
  57. package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.d.ts +6 -6
  58. package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.js +24 -24
  59. package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.js.map +1 -1
  60. package/dist/integration-engine/repositories/InformationPanelRepository.d.ts +8 -8
  61. package/dist/integration-engine/repositories/InformationPanelRepository.js +17 -19
  62. package/dist/integration-engine/repositories/InformationPanelRepository.js.map +1 -1
  63. package/dist/integration-engine/repositories/ObeliskRepository.d.ts +8 -8
  64. package/dist/integration-engine/repositories/ObeliskRepository.js +17 -19
  65. package/dist/integration-engine/repositories/ObeliskRepository.js.map +1 -1
  66. package/dist/integration-engine/repositories/SignpostRepository.d.ts +8 -8
  67. package/dist/integration-engine/repositories/SignpostRepository.js +17 -19
  68. package/dist/integration-engine/repositories/SignpostRepository.js.map +1 -1
  69. package/dist/integration-engine/repositories/TotemRepository.d.ts +8 -8
  70. package/dist/integration-engine/repositories/TotemRepository.js +17 -19
  71. package/dist/integration-engine/repositories/TotemRepository.js.map +1 -1
  72. package/dist/integration-engine/transformations/AbstractElementTransformation.d.ts +3 -3
  73. package/dist/integration-engine/transformations/AbstractElementTransformation.js +2 -6
  74. package/dist/integration-engine/transformations/AbstractElementTransformation.js.map +1 -1
  75. package/dist/integration-engine/transformations/DisplayCasesTransformation.d.ts +3 -3
  76. package/dist/integration-engine/transformations/DisplayCasesTransformation.js +6 -9
  77. package/dist/integration-engine/transformations/DisplayCasesTransformation.js.map +1 -1
  78. package/dist/integration-engine/transformations/InformationPanelsTransformation.d.ts +3 -3
  79. package/dist/integration-engine/transformations/InformationPanelsTransformation.js +6 -9
  80. package/dist/integration-engine/transformations/InformationPanelsTransformation.js.map +1 -1
  81. package/dist/integration-engine/transformations/ObelisksTransformation.d.ts +3 -3
  82. package/dist/integration-engine/transformations/ObelisksTransformation.js +6 -9
  83. package/dist/integration-engine/transformations/ObelisksTransformation.js.map +1 -1
  84. package/dist/integration-engine/transformations/SignpostsTransformation.d.ts +3 -3
  85. package/dist/integration-engine/transformations/SignpostsTransformation.js +6 -9
  86. package/dist/integration-engine/transformations/SignpostsTransformation.js.map +1 -1
  87. package/dist/integration-engine/transformations/TotemsTransformation.d.ts +3 -3
  88. package/dist/integration-engine/transformations/TotemsTransformation.js +6 -9
  89. package/dist/integration-engine/transformations/TotemsTransformation.js.map +1 -1
  90. package/dist/integration-engine/workers/FYPRWorker.d.ts +2 -2
  91. package/dist/integration-engine/workers/FYPRWorker.js +14 -18
  92. package/dist/integration-engine/workers/FYPRWorker.js.map +1 -1
  93. package/dist/integration-engine/workers/constants.js +1 -4
  94. package/dist/integration-engine/workers/constants.js.map +1 -1
  95. package/dist/integration-engine/workers/tasks/AbstractUpdateElementsTask.d.ts +5 -5
  96. package/dist/integration-engine/workers/tasks/AbstractUpdateElementsTask.js +8 -11
  97. package/dist/integration-engine/workers/tasks/AbstractUpdateElementsTask.js.map +1 -1
  98. package/dist/integration-engine/workers/tasks/FetchDBFYPRTask.d.ts +7 -7
  99. package/dist/integration-engine/workers/tasks/FetchDBFYPRTask.js +31 -33
  100. package/dist/integration-engine/workers/tasks/FetchDBFYPRTask.js.map +1 -1
  101. package/dist/integration-engine/workers/tasks/FetchDCIPStatusTask.d.ts +3 -3
  102. package/dist/integration-engine/workers/tasks/FetchDCIPStatusTask.js +18 -20
  103. package/dist/integration-engine/workers/tasks/FetchDCIPStatusTask.js.map +1 -1
  104. package/dist/integration-engine/workers/tasks/UpdateDisplayCasesTask.d.ts +7 -7
  105. package/dist/integration-engine/workers/tasks/UpdateDisplayCasesTask.js +17 -19
  106. package/dist/integration-engine/workers/tasks/UpdateDisplayCasesTask.js.map +1 -1
  107. package/dist/integration-engine/workers/tasks/UpdateInformationPanelsTask.d.ts +7 -7
  108. package/dist/integration-engine/workers/tasks/UpdateInformationPanelsTask.js +17 -19
  109. package/dist/integration-engine/workers/tasks/UpdateInformationPanelsTask.js.map +1 -1
  110. package/dist/integration-engine/workers/tasks/UpdateObelisksTask.d.ts +7 -7
  111. package/dist/integration-engine/workers/tasks/UpdateObelisksTask.js +17 -19
  112. package/dist/integration-engine/workers/tasks/UpdateObelisksTask.js.map +1 -1
  113. package/dist/integration-engine/workers/tasks/UpdatePresetsTask.d.ts +5 -5
  114. package/dist/integration-engine/workers/tasks/UpdatePresetsTask.js +29 -30
  115. package/dist/integration-engine/workers/tasks/UpdatePresetsTask.js.map +1 -1
  116. package/dist/integration-engine/workers/tasks/UpdateSignpostsTask.d.ts +7 -7
  117. package/dist/integration-engine/workers/tasks/UpdateSignpostsTask.js +17 -19
  118. package/dist/integration-engine/workers/tasks/UpdateSignpostsTask.js.map +1 -1
  119. package/dist/integration-engine/workers/tasks/UpdateTotemsTask.d.ts +7 -7
  120. package/dist/integration-engine/workers/tasks/UpdateTotemsTask.js +17 -19
  121. package/dist/integration-engine/workers/tasks/UpdateTotemsTask.js.map +1 -1
  122. package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.d.ts +6 -6
  123. package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js +25 -25
  124. package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js.map +1 -1
  125. package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.d.ts +1 -1
  126. package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.js +11 -14
  127. package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.js.map +1 -1
  128. package/dist/output-gateway/fypr/data-access/FyprElementRepository.d.ts +5 -5
  129. package/dist/output-gateway/fypr/data-access/FyprElementRepository.js +9 -12
  130. package/dist/output-gateway/fypr/data-access/FyprElementRepository.js.map +1 -1
  131. package/dist/output-gateway/fypr/routers/index.d.ts +2 -2
  132. package/dist/output-gateway/fypr/routers/index.js +2 -7
  133. package/dist/output-gateway/fypr/routers/index.js.map +1 -1
  134. package/dist/output-gateway/fypr/routers/middlewares/cacheMiddleware.d.ts +3 -3
  135. package/dist/output-gateway/fypr/routers/middlewares/cacheMiddleware.js +1 -4
  136. package/dist/output-gateway/fypr/routers/middlewares/cacheMiddleware.js.map +1 -1
  137. package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.d.ts +3 -3
  138. package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js +41 -43
  139. package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js.map +1 -1
  140. package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.d.ts +3 -3
  141. package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.js +15 -18
  142. package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.js.map +1 -1
  143. package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.d.ts +1 -1
  144. package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js +1 -5
  145. package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js.map +1 -1
  146. package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.d.ts +3 -3
  147. package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js +9 -12
  148. package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js.map +1 -1
  149. package/dist/output-gateway/index.d.ts +1 -1
  150. package/dist/output-gateway/index.js +2 -5
  151. package/dist/output-gateway/index.js.map +1 -1
  152. package/dist/output-gateway/interfaces/IOGInformationPanel.d.ts +2 -2
  153. package/dist/output-gateway/interfaces/IOGInformationPanel.js +1 -2
  154. package/dist/output-gateway/interfaces/IOGInformationPanelScopes.d.ts +2 -2
  155. package/dist/output-gateway/interfaces/IOGInformationPanelScopes.js +1 -2
  156. package/dist/output-gateway/ioc/Di.d.ts +1 -1
  157. package/dist/output-gateway/ioc/Di.js +20 -23
  158. package/dist/output-gateway/ioc/Di.js.map +1 -1
  159. package/dist/output-gateway/ioc/FYPROGContainerTokens.js +1 -4
  160. package/dist/output-gateway/ioc/FYPROGContainerTokens.js.map +1 -1
  161. package/dist/output-gateway/shared/constants/element-kinds.d.ts +2 -1
  162. package/dist/output-gateway/shared/constants/element-kinds.js +1 -5
  163. package/dist/output-gateway/shared/constants/element-kinds.js.map +1 -1
  164. package/dist/output-gateway/shared/constants/index.d.ts +1 -1
  165. package/dist/output-gateway/shared/constants/index.js +1 -17
  166. package/dist/output-gateway/shared/constants/index.js.map +1 -1
  167. package/dist/schema-definitions/FyprElementTypes.d.ts +5 -5
  168. package/dist/schema-definitions/FyprElementTypes.js +1 -2
  169. package/dist/schema-definitions/const.js +11 -14
  170. package/dist/schema-definitions/const.js.map +1 -1
  171. package/dist/schema-definitions/data-sources/DBFYPRDisplayCasesJSONSchema.d.ts +2 -2
  172. package/dist/schema-definitions/data-sources/DBFYPRDisplayCasesJSONSchema.js +22 -25
  173. package/dist/schema-definitions/data-sources/DBFYPRDisplayCasesJSONSchema.js.map +1 -1
  174. package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.d.ts +2 -2
  175. package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.js +15 -18
  176. package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.js.map +1 -1
  177. package/dist/schema-definitions/data-sources/DBFYPRInformationPanelsJSONSchema.d.ts +2 -2
  178. package/dist/schema-definitions/data-sources/DBFYPRInformationPanelsJSONSchema.js +83 -86
  179. package/dist/schema-definitions/data-sources/DBFYPRInformationPanelsJSONSchema.js.map +1 -1
  180. package/dist/schema-definitions/data-sources/DBFYPRObelisksJSONSchema.d.ts +2 -2
  181. package/dist/schema-definitions/data-sources/DBFYPRObelisksJSONSchema.js +17 -20
  182. package/dist/schema-definitions/data-sources/DBFYPRObelisksJSONSchema.js.map +1 -1
  183. package/dist/schema-definitions/data-sources/DBFYPRSignpostsJSONSchema.d.ts +2 -2
  184. package/dist/schema-definitions/data-sources/DBFYPRSignpostsJSONSchema.js +19 -22
  185. package/dist/schema-definitions/data-sources/DBFYPRSignpostsJSONSchema.js.map +1 -1
  186. package/dist/schema-definitions/data-sources/DBFYPRTotemsJSONSchema.d.ts +2 -2
  187. package/dist/schema-definitions/data-sources/DBFYPRTotemsJSONSchema.js +55 -58
  188. package/dist/schema-definitions/data-sources/DBFYPRTotemsJSONSchema.js.map +1 -1
  189. package/dist/schema-definitions/data-sources/DCIPStatusOverviewJSONSchema.d.ts +2 -2
  190. package/dist/schema-definitions/data-sources/DCIPStatusOverviewJSONSchema.js +3 -6
  191. package/dist/schema-definitions/data-sources/DCIPStatusOverviewJSONSchema.js.map +1 -1
  192. package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.d.ts +2 -2
  193. package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.js +1 -4
  194. package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.js.map +1 -1
  195. package/dist/schema-definitions/data-sources/index.js +11 -14
  196. package/dist/schema-definitions/data-sources/index.js.map +1 -1
  197. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRDisplayCase.d.ts +1 -1
  198. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRDisplayCase.js +1 -2
  199. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRElement.d.ts +1 -1
  200. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRElement.js +1 -2
  201. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRInformationPanel.d.ts +1 -1
  202. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRInformationPanel.js +1 -2
  203. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRObelisk.d.ts +1 -1
  204. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRObelisk.js +1 -2
  205. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRSignpost.d.ts +1 -1
  206. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRSignpost.js +1 -2
  207. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRTotem.d.ts +1 -1
  208. package/dist/schema-definitions/data-sources/interfaces/IDBFYPRTotem.js +1 -2
  209. package/dist/schema-definitions/data-sources/interfaces/IDCIPStatusOverview.d.ts +1 -1
  210. package/dist/schema-definitions/data-sources/interfaces/IDCIPStatusOverview.js +1 -2
  211. package/dist/schema-definitions/data-sources/interfaces/IGolemioPresetsResponse.js +1 -2
  212. package/dist/schema-definitions/index.d.ts +4 -3
  213. package/dist/schema-definitions/index.js +29 -33
  214. package/dist/schema-definitions/index.js.map +1 -1
  215. package/dist/schema-definitions/models/AbstractElementModel.d.ts +6 -3
  216. package/dist/schema-definitions/models/AbstractElementModel.js +39 -42
  217. package/dist/schema-definitions/models/AbstractElementModel.js.map +1 -1
  218. package/dist/schema-definitions/models/DeviceStatusModel.d.ts +5 -2
  219. package/dist/schema-definitions/models/DeviceStatusModel.js +7 -10
  220. package/dist/schema-definitions/models/DeviceStatusModel.js.map +1 -1
  221. package/dist/schema-definitions/models/DisplayCaseModel.d.ts +4 -4
  222. package/dist/schema-definitions/models/DisplayCaseModel.js +46 -49
  223. package/dist/schema-definitions/models/DisplayCaseModel.js.map +1 -1
  224. package/dist/schema-definitions/models/InformationPanelModel.d.ts +4 -4
  225. package/dist/schema-definitions/models/InformationPanelModel.js +177 -180
  226. package/dist/schema-definitions/models/InformationPanelModel.js.map +1 -1
  227. package/dist/schema-definitions/models/InformationPanelPresetsModel.d.ts +6 -3
  228. package/dist/schema-definitions/models/InformationPanelPresetsModel.js +13 -16
  229. package/dist/schema-definitions/models/InformationPanelPresetsModel.js.map +1 -1
  230. package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.d.ts +5 -2
  231. package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.js +8 -11
  232. package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.js.map +1 -1
  233. package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.d.ts +6 -3
  234. package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.js +10 -13
  235. package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.js.map +1 -1
  236. package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.d.ts +6 -3
  237. package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.js +7 -10
  238. package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.js.map +1 -1
  239. package/dist/schema-definitions/models/ObeliskModel.d.ts +4 -4
  240. package/dist/schema-definitions/models/ObeliskModel.js +36 -39
  241. package/dist/schema-definitions/models/ObeliskModel.js.map +1 -1
  242. package/dist/schema-definitions/models/SignpostModel.d.ts +4 -4
  243. package/dist/schema-definitions/models/SignpostModel.js +40 -43
  244. package/dist/schema-definitions/models/SignpostModel.js.map +1 -1
  245. package/dist/schema-definitions/models/TotemModel.d.ts +4 -4
  246. package/dist/schema-definitions/models/TotemModel.js +110 -113
  247. package/dist/schema-definitions/models/TotemModel.js.map +1 -1
  248. package/dist/schema-definitions/models/interfaces/IDeviceStatus.d.ts +1 -1
  249. package/dist/schema-definitions/models/interfaces/IDeviceStatus.js +1 -2
  250. package/dist/schema-definitions/models/interfaces/IDisplayCase.d.ts +1 -1
  251. package/dist/schema-definitions/models/interfaces/IDisplayCase.js +1 -2
  252. package/dist/schema-definitions/models/interfaces/IElement.d.ts +1 -1
  253. package/dist/schema-definitions/models/interfaces/IElement.js +1 -2
  254. package/dist/schema-definitions/models/interfaces/IInformationPanel.d.ts +1 -1
  255. package/dist/schema-definitions/models/interfaces/IInformationPanel.js +1 -2
  256. package/dist/schema-definitions/models/interfaces/IInformationPanelPreset.js +1 -2
  257. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetRoute.js +1 -2
  258. package/dist/schema-definitions/models/interfaces/IInformationPanelPresetStop.js +1 -2
  259. package/dist/schema-definitions/models/interfaces/IObelisk.d.ts +1 -1
  260. package/dist/schema-definitions/models/interfaces/IObelisk.js +1 -2
  261. package/dist/schema-definitions/models/interfaces/IPresetRouteAgg.js +1 -2
  262. package/dist/schema-definitions/models/interfaces/ISignpost.d.ts +1 -1
  263. package/dist/schema-definitions/models/interfaces/ISignpost.js +1 -2
  264. package/dist/schema-definitions/models/interfaces/ITotem.d.ts +1 -1
  265. package/dist/schema-definitions/models/interfaces/ITotem.js +1 -2
  266. package/dist/schema-definitions/models/interfaces/fyprElementStates.js +1 -4
  267. package/dist/schema-definitions/models/interfaces/fyprElementStates.js.map +1 -1
  268. package/dist/schema-definitions/translation/index.d.ts +1 -1
  269. package/dist/schema-definitions/translation/index.js +13 -19
  270. package/dist/schema-definitions/translation/index.js.map +1 -1
  271. package/package.json +42 -15
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateObelisksTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/UpdateObelisksTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2EAAsE;AACtE,yFAAoF;AACpF,gHAAsF;AAGtF,mFAAkF;AAClF,iEAAwE;AACxE,6EAA0E;AAC1E,4EAAuE;AAGhE,IAAM,kBAAkB,GAAxB,MAAM,kBAAmB,SAAQ,uDAAoD;IAIxF,YAEI,cAAsC,EACW,UAA6B;QAE9E,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QARb,cAAS,GAAG,gBAAgB,CAAC;QAC7B,WAAM,GAAG,IAAI,uCAAmB,CAAC,wBAAwB,EAAE,mDAAwB,CAAC,CAAC;IAQ9G,CAAC;CACJ,CAAA;AAXY,gDAAkB;6BAAlB,kBAAkB;IAD9B,IAAA,qBAAU,GAAE;IAMJ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import { InformationPanelPresetsRepository } from "../../repositories/InformationPanelPresetsRepository";
2
- import { InformationPanelPresetsRoutesRepository } from "../../repositories/InformationPanelPresetsRoutesRepository";
3
- import { InformationPanelPresetsStopsRepository } from "../../repositories/InformationPanelPresetsStopsRepository";
4
- import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
5
- import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine";
1
+ import { InformationPanelPresetsRepository } from "#ie/repositories/InformationPanelPresetsRepository";
2
+ import { InformationPanelPresetsRoutesRepository } from "#ie/repositories/InformationPanelPresetsRoutesRepository";
3
+ import { InformationPanelPresetsStopsRepository } from "#ie/repositories/InformationPanelPresetsStopsRepository";
4
+ import type { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig.js";
5
+ import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine/index.js";
6
6
  export declare class UpdatePresetsTask extends AbstractEmptyTask {
7
7
  private readonly presetsRepository;
8
8
  private readonly presetsStopsRepository;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,29 +10,29 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.UpdatePresetsTask = void 0;
16
- const ErrorHelper_1 = require("../../../helpers/errors/ErrorHelper");
17
- const InformationPanelPresetsRepository_1 = require("../../repositories/InformationPanelPresetsRepository");
18
- const InformationPanelPresetsRoutesRepository_1 = require("../../repositories/InformationPanelPresetsRoutesRepository");
19
- const InformationPanelPresetsStopsRepository_1 = require("../../repositories/InformationPanelPresetsStopsRepository");
20
- const FYPRIEContainerTokens_1 = require("../../ioc/FYPRIEContainerTokens");
21
- const GolemioPresetsJSONSchema_1 = require("../../../schema-definitions/data-sources/GolemioPresetsJSONSchema");
22
- const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
23
- const integration_engine_1 = require("@golemio/core/dist/integration-engine");
24
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
25
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
26
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
27
- const constants_1 = require("../constants");
28
- let UpdatePresetsTask = class UpdatePresetsTask extends integration_engine_1.AbstractEmptyTask {
13
+ import { ErrorHelper } from "#helpers/errors/ErrorHelper";
14
+ import { InformationPanelPresetsRepository } from "#ie/repositories/InformationPanelPresetsRepository";
15
+ import { InformationPanelPresetsRoutesRepository } from "#ie/repositories/InformationPanelPresetsRoutesRepository";
16
+ import { InformationPanelPresetsStopsRepository } from "#ie/repositories/InformationPanelPresetsStopsRepository";
17
+ import { fyprIEContainerTokens } from "#ie/ioc/FYPRIEContainerTokens";
18
+ import { golemioPresetsJSONSchema } from "#sch/data-sources/GolemioPresetsJSONSchema";
19
+ import { CoreToken } from "@golemio/core/dist/helpers/ioc/CoreToken.js";
20
+ import { AbstractEmptyTask } from "@golemio/core/dist/integration-engine/index.js";
21
+ import GolemioErrors from "@golemio/core/dist/shared/golemio-errors.js";
22
+ import { inject, injectable } from "@golemio/core/dist/shared/tsyringe.js";
23
+ import GolemioValidator from "@golemio/core/dist/shared/golemio-validator.js";
24
+ import { FYPR_WORKER_NAME } from "../constants.js";
25
+ const { DatasourceError, GeneralError } = GolemioErrors;
26
+ const { JSONSchemaValidator } = GolemioValidator;
27
+ let UpdatePresetsTask = class UpdatePresetsTask extends AbstractEmptyTask {
29
28
  constructor(config, presetsRepository, presetsStopsRepository, presetsRoutesRepository) {
30
- super(constants_1.FYPR_WORKER_NAME.toLowerCase());
29
+ super(FYPR_WORKER_NAME.toLowerCase());
31
30
  this.presetsRepository = presetsRepository;
32
31
  this.presetsStopsRepository = presetsStopsRepository;
33
32
  this.presetsRoutesRepository = presetsRoutesRepository;
34
33
  this.queueName = "updatePresetsWithRoutes";
35
34
  this.queueTtl = 59 * 60 * 1000;
36
- this.presetsValidator = new golemio_validator_1.JSONSchemaValidator("golemioPresetsValidation", GolemioPresetsJSONSchema_1.golemioPresetsJSONSchema);
35
+ this.presetsValidator = new JSONSchemaValidator("golemioPresetsValidation", golemioPresetsJSONSchema);
37
36
  this.apiKey = config.getValue("env.GOLEMIO_API_KEY", "");
38
37
  this.presetUrl = config.getValue("module.fypr.ropidPresetsApi.url", "");
39
38
  }
@@ -70,7 +69,7 @@ let UpdatePresetsTask = class UpdatePresetsTask extends integration_engine_1.Abs
70
69
  await this.presetsRoutesRepository.updateList(routes);
71
70
  }
72
71
  catch (err) {
73
- throw ErrorHelper_1.ErrorHelper.ensureGolemioError(err, new golemio_errors_1.GeneralError("UpdatePresetsTask process error", this.constructor.name, err));
72
+ throw ErrorHelper.ensureGolemioError(err, new GeneralError("UpdatePresetsTask process error", this.constructor.name, err));
74
73
  }
75
74
  }
76
75
  async fetchPresets() {
@@ -86,19 +85,19 @@ let UpdatePresetsTask = class UpdatePresetsTask extends integration_engine_1.Abs
86
85
  return data;
87
86
  }
88
87
  catch (err) {
89
- throw new golemio_errors_1.DatasourceError("Error while fetching presets data", this.constructor.name, err);
88
+ throw new DatasourceError("Error while fetching presets data", this.constructor.name, err);
90
89
  }
91
90
  }
92
91
  };
93
- exports.UpdatePresetsTask = UpdatePresetsTask;
94
- exports.UpdatePresetsTask = UpdatePresetsTask = __decorate([
95
- (0, tsyringe_1.injectable)(),
96
- __param(0, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
97
- __param(1, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.InformationPanelPresetsRepository)),
98
- __param(2, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.InformationPanelPresetsStopsRepository)),
99
- __param(3, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.InformationPanelPresetsRoutesRepository)),
100
- __metadata("design:paramtypes", [Object, InformationPanelPresetsRepository_1.InformationPanelPresetsRepository,
101
- InformationPanelPresetsStopsRepository_1.InformationPanelPresetsStopsRepository,
102
- InformationPanelPresetsRoutesRepository_1.InformationPanelPresetsRoutesRepository])
92
+ UpdatePresetsTask = __decorate([
93
+ injectable(),
94
+ __param(0, inject(CoreToken.SimpleConfig)),
95
+ __param(1, inject(fyprIEContainerTokens.InformationPanelPresetsRepository)),
96
+ __param(2, inject(fyprIEContainerTokens.InformationPanelPresetsStopsRepository)),
97
+ __param(3, inject(fyprIEContainerTokens.InformationPanelPresetsRoutesRepository)),
98
+ __metadata("design:paramtypes", [Object, InformationPanelPresetsRepository,
99
+ InformationPanelPresetsStopsRepository,
100
+ InformationPanelPresetsRoutesRepository])
103
101
  ], UpdatePresetsTask);
102
+ export { UpdatePresetsTask };
104
103
  //# sourceMappingURL=UpdatePresetsTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UpdatePresetsTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/UpdatePresetsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,qEAA0D;AAC1D,4GAAuG;AACvG,wHAAmH;AACnH,sHAAiH;AACjH,2EAAsE;AACtE,gHAAsF;AAKtF,wEAAqE;AACrE,8EAA0E;AAC1E,6EAAyF;AACzF,iEAAwE;AACxE,mFAAkF;AAClF,4CAAgD;AAGzC,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,sCAAiB;IAQpD,YACoC,MAAqB,EAErD,iBAAqE,EAErE,sBAA+E,EAE/E,uBAAiF;QAEjF,KAAK,CAAC,4BAAgB,CAAC,WAAW,EAAE,CAAC,CAAC;QANrB,sBAAiB,GAAjB,iBAAiB,C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AE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAClF,CAAC;QACN,CAAC;IACL,CAAC;IAEO,KAAK,CAAC,YAAY;QACtB,IAAI,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE;gBACzC,OAAO,EAAE,EAAE,gBAAgB,EAAE,IAAI,CAAC,MAAM,EAAE;aAC7C,CAAC,CAAC;YACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;gBACf,MAAM,IAAI,KAAK,CAAC,wBAAwB,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;YAC/D,CAAC;YACD,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACnC,MAAM,IAAI,CAAC,gBAAgB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC3C,OAAO,IAAiC,CAAC;QAC7C,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACX,MAAM,IAAI,eAAe,CAAC,mCAAmC,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;QAC/F,CAAC;IACL,CAAC;CACJ,CAAA;AArFY,iBAAiB;IAD7B,UAAU,EAAE;IAUJ,WAAA,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;IAC9B,WAAA,MAAM,CAAC,qBAAqB,CAAC,iCAAiC,CAAC,CAAA;IAE/D,WAAA,MAAM,CAAC,qBAAqB,CAAC,sCAAsC,CAAC,CAAA;IAEpE,WAAA,MAAM,CAAC,qBAAqB,CAAC,uCAAuC,CAAC,CAAA;6CAHlC,iCAAiC;QAE5B,sCAAsC;QAErC,uCAAuC;GAf5E,iBAAiB,CAqF7B"}
@@ -1,11 +1,11 @@
1
- import { SignpostsTransformation } from "../../transformations/SignpostsTransformation";
2
- import { IDBFYPRSignpost } from "../../../schema-definitions/data-sources/interfaces/IDBFYPRSignpost";
3
- import { ISignpost } from "../../../schema-definitions/models/interfaces/ISignpost";
4
- import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
5
- import { AbstractUpdateElementsTask } from "./AbstractUpdateElementsTask";
6
- import { SignpostRepository } from "../../repositories/SignpostRepository";
1
+ import { SignpostsTransformation } from "#ie/transformations/SignpostsTransformation";
2
+ import type { IDBFYPRSignpost } from "#sch/data-sources/interfaces/IDBFYPRSignpost";
3
+ import type { ISignpost } from "#sch/models/interfaces/ISignpost";
4
+ import GolemioValidator from "@golemio/core/dist/shared/golemio-validator.js";
5
+ import { AbstractUpdateElementsTask } from "./AbstractUpdateElementsTask.js";
6
+ import { SignpostRepository } from "#ie/repositories/SignpostRepository";
7
7
  export declare class UpdateSignpostsTask extends AbstractUpdateElementsTask<IDBFYPRSignpost, ISignpost> {
8
8
  readonly queueName = "updateSignposts";
9
- readonly schema: JSONSchemaValidator;
9
+ readonly schema: GolemioValidator.JSONSchemaValidator;
10
10
  constructor(transformation: SignpostsTransformation, repository: SignpostRepository);
11
11
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,28 +10,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.UpdateSignpostsTask = void 0;
16
- const FYPRIEContainerTokens_1 = require("../../ioc/FYPRIEContainerTokens");
17
- const SignpostsTransformation_1 = require("../../transformations/SignpostsTransformation");
18
- const DBFYPRSignpostsJSONSchema_1 = require("../../../schema-definitions/data-sources/DBFYPRSignpostsJSONSchema");
19
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
20
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
21
- const AbstractUpdateElementsTask_1 = require("./AbstractUpdateElementsTask");
22
- const SignpostRepository_1 = require("../../repositories/SignpostRepository");
23
- let UpdateSignpostsTask = class UpdateSignpostsTask extends AbstractUpdateElementsTask_1.AbstractUpdateElementsTask {
13
+ import { fyprIEContainerTokens } from "#ie/ioc/FYPRIEContainerTokens";
14
+ import { SignpostsTransformation } from "#ie/transformations/SignpostsTransformation";
15
+ import { dbfyprSignpostsJSONSchema } from "#sch/data-sources/DBFYPRSignpostsJSONSchema";
16
+ import GolemioValidator from "@golemio/core/dist/shared/golemio-validator.js";
17
+ import { inject, injectable } from "@golemio/core/dist/shared/tsyringe.js";
18
+ import { AbstractUpdateElementsTask } from "./AbstractUpdateElementsTask.js";
19
+ import { SignpostRepository } from "#ie/repositories/SignpostRepository";
20
+ const { JSONSchemaValidator } = GolemioValidator;
21
+ let UpdateSignpostsTask = class UpdateSignpostsTask extends AbstractUpdateElementsTask {
24
22
  constructor(transformation, repository) {
25
23
  super(transformation, repository);
26
24
  this.queueName = "updateSignposts";
27
- this.schema = new golemio_validator_1.JSONSchemaValidator("signpostsDataValidation", DBFYPRSignpostsJSONSchema_1.dbfyprSignpostsJSONSchema);
25
+ this.schema = new JSONSchemaValidator("signpostsDataValidation", dbfyprSignpostsJSONSchema);
28
26
  }
29
27
  };
30
- exports.UpdateSignpostsTask = UpdateSignpostsTask;
31
- exports.UpdateSignpostsTask = UpdateSignpostsTask = __decorate([
32
- (0, tsyringe_1.injectable)(),
33
- __param(0, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.SignpostsTransformation)),
34
- __param(1, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.SignpostRepository)),
35
- __metadata("design:paramtypes", [SignpostsTransformation_1.SignpostsTransformation,
36
- SignpostRepository_1.SignpostRepository])
28
+ UpdateSignpostsTask = __decorate([
29
+ injectable(),
30
+ __param(0, inject(fyprIEContainerTokens.SignpostsTransformation)),
31
+ __param(1, inject(fyprIEContainerTokens.SignpostRepository)),
32
+ __metadata("design:paramtypes", [SignpostsTransformation,
33
+ SignpostRepository])
37
34
  ], UpdateSignpostsTask);
35
+ export { UpdateSignpostsTask };
38
36
  //# sourceMappingURL=UpdateSignpostsTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateSignpostsTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/UpdateSignpostsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2EAAsE;AACtE,2FAAsF;AACtF,kHAAwF;AAGxF,mFAAkF;AAClF,iEAAwE;AACxE,6EAA0E;AAC1E,8EAAyE;AAGlE,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,uDAAsD;IAI3F,YAEI,cAAuC,EACW,UAA8B;QAEhF,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QARb,cAAS,GAAG,iBAAiB,CAAC;QAC9B,WAAM,GAAG,IAAI,uCAAmB,CAAC,yBAAyB,EAAE,qDAAyB,CAAC,CAAC;IAQhH,CAAC;CACJ,CAAA;AAXY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,qBAAU,GAAE;IAMJ,WAAA,IAAA,iBAAM,EAAC,6CAAqB,CAAC,uBAAuB,CAAC,CAAA;IAErD,WAAA,IAAA,iBAAM,EAAC,6CAAqB,CAAC,kBAAkB,CAAC,CAAA;qCADjC,iDAAuB;QACuB,uCAAkB;GAP3E,mBAAmB,CAW/B"}
1
+ {"version":3,"file":"UpdateSignpostsTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/UpdateSignpostsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAC;AAGxF,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAE7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAEzE,MAAM,EAAE,mBAAmB,EAAE,GAAG,gBAAgB,CAAC;AAG1C,IAAM,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,0BAAsD;IAI3F,YAEI,cAAuC,EACW,UAA8B;QAEhF,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QARb,cAAS,GAAG,iBAAiB,CAAC;QAC9B,WAAM,GAAG,IAAI,mBAAmB,CAAC,yBAAyB,EAAE,yBAAyB,CAAC,CAAC;IAQhH,CAAC;CACJ,CAAA;AAXY,mBAAmB;IAD/B,UAAU,EAAE;IAMJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,uBAAuB,CAAC,CAAA;IAErD,WAAA,MAAM,CAAC,qBAAqB,CAAC,kBAAkB,CAAC,CAAA;qCADjC,uBAAuB;QACuB,kBAAkB;GAP3E,mBAAmB,CAW/B"}
@@ -1,11 +1,11 @@
1
- import { TotemsTransformation } from "../../transformations/TotemsTransformation";
2
- import { IDBFYPRTotem } from "../../../schema-definitions/data-sources/interfaces/IDBFYPRTotem";
3
- import { ITotem } from "../../../schema-definitions/models/interfaces/ITotem";
4
- import { JSONSchemaValidator } from "@golemio/core/dist/shared/golemio-validator";
5
- import { AbstractUpdateElementsTask } from "./AbstractUpdateElementsTask";
6
- import { TotemRepository } from "../../repositories/TotemRepository";
1
+ import { TotemsTransformation } from "#ie/transformations/TotemsTransformation";
2
+ import type { IDBFYPRTotem } from "#sch/data-sources/interfaces/IDBFYPRTotem";
3
+ import type { ITotem } from "#sch/models/interfaces/ITotem";
4
+ import GolemioValidator from "@golemio/core/dist/shared/golemio-validator.js";
5
+ import { AbstractUpdateElementsTask } from "./AbstractUpdateElementsTask.js";
6
+ import { TotemRepository } from "#ie/repositories/TotemRepository";
7
7
  export declare class UpdateTotemsTask extends AbstractUpdateElementsTask<IDBFYPRTotem, ITotem> {
8
8
  readonly queueName = "updateTotems";
9
- readonly schema: JSONSchemaValidator;
9
+ readonly schema: GolemioValidator.JSONSchemaValidator;
10
10
  constructor(transformation: TotemsTransformation, repository: TotemRepository);
11
11
  }
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,28 +10,27 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.UpdateTotemsTask = void 0;
16
- const FYPRIEContainerTokens_1 = require("../../ioc/FYPRIEContainerTokens");
17
- const TotemsTransformation_1 = require("../../transformations/TotemsTransformation");
18
- const DBFYPRTotemsJSONSchema_1 = require("../../../schema-definitions/data-sources/DBFYPRTotemsJSONSchema");
19
- const golemio_validator_1 = require("@golemio/core/dist/shared/golemio-validator");
20
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
21
- const AbstractUpdateElementsTask_1 = require("./AbstractUpdateElementsTask");
22
- const TotemRepository_1 = require("../../repositories/TotemRepository");
23
- let UpdateTotemsTask = class UpdateTotemsTask extends AbstractUpdateElementsTask_1.AbstractUpdateElementsTask {
13
+ import { fyprIEContainerTokens } from "#ie/ioc/FYPRIEContainerTokens";
14
+ import { TotemsTransformation } from "#ie/transformations/TotemsTransformation";
15
+ import { dbfyprTotemsJSONSchema } from "#sch/data-sources/DBFYPRTotemsJSONSchema";
16
+ import GolemioValidator from "@golemio/core/dist/shared/golemio-validator.js";
17
+ import { inject, injectable } from "@golemio/core/dist/shared/tsyringe.js";
18
+ import { AbstractUpdateElementsTask } from "./AbstractUpdateElementsTask.js";
19
+ import { TotemRepository } from "#ie/repositories/TotemRepository";
20
+ const { JSONSchemaValidator } = GolemioValidator;
21
+ let UpdateTotemsTask = class UpdateTotemsTask extends AbstractUpdateElementsTask {
24
22
  constructor(transformation, repository) {
25
23
  super(transformation, repository);
26
24
  this.queueName = "updateTotems";
27
- this.schema = new golemio_validator_1.JSONSchemaValidator("totemsDataValidation", DBFYPRTotemsJSONSchema_1.dbfyprTotemsJSONSchema);
25
+ this.schema = new JSONSchemaValidator("totemsDataValidation", dbfyprTotemsJSONSchema);
28
26
  }
29
27
  };
30
- exports.UpdateTotemsTask = UpdateTotemsTask;
31
- exports.UpdateTotemsTask = UpdateTotemsTask = __decorate([
32
- (0, tsyringe_1.injectable)(),
33
- __param(0, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.TotemsTransformation)),
34
- __param(1, (0, tsyringe_1.inject)(FYPRIEContainerTokens_1.fyprIEContainerTokens.TotemRepository)),
35
- __metadata("design:paramtypes", [TotemsTransformation_1.TotemsTransformation,
36
- TotemRepository_1.TotemRepository])
28
+ UpdateTotemsTask = __decorate([
29
+ injectable(),
30
+ __param(0, inject(fyprIEContainerTokens.TotemsTransformation)),
31
+ __param(1, inject(fyprIEContainerTokens.TotemRepository)),
32
+ __metadata("design:paramtypes", [TotemsTransformation,
33
+ TotemRepository])
37
34
  ], UpdateTotemsTask);
35
+ export { UpdateTotemsTask };
38
36
  //# sourceMappingURL=UpdateTotemsTask.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UpdateTotemsTask.js","sourceRoot":"","sources":["../../../../src/integration-engine/workers/tasks/UpdateTotemsTask.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2EAAsE;AACtE,q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1E,KAAK,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QARb,cAAS,GAAG,cAAc,CAAC;QAC3B,WAAM,GAAG,IAAI,mBAAmB,CAAC,sBAAsB,EAAE,sBAAsB,CAAC,CAAC;IAQ1G,CAAC;CACJ,CAAA;AAXY,gBAAgB;IAD5B,UAAU,EAAE;IAMJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,CAAA;IAElD,WAAA,MAAM,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAA;qCAD9B,oBAAoB;QACuB,eAAe;GAPrE,gBAAgB,CAW5B"}
@@ -1,9 +1,9 @@
1
- import { FyprElementRepository } from "../../data-access/FyprElementRepository";
2
- import { InformationPanelOutputTransformation } from "../../transformations/InformationPanelOutputTransformation";
3
- import { FyprElementKind } from "../../../shared/constants";
4
- import { AnyFyprElement } from "../../../../schema-definitions";
5
- import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
6
- import { NextFunction, Request, RequestHandler, Response } from "@golemio/core/dist/shared/express";
1
+ import { FyprElementRepository } from "#og/fypr/data-access/FyprElementRepository";
2
+ import { InformationPanelOutputTransformation } from "#og/fypr/transformations/InformationPanelOutputTransformation";
3
+ import type { FyprElementKind } from "#og/shared/constants/index";
4
+ import type { AnyFyprElement } from "#sch/index";
5
+ import type { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig.js";
6
+ import type { NextFunction, Request, RequestHandler, Response } from "@golemio/core/dist/shared/express.js";
7
7
  export declare class V1FyprElementKindsController {
8
8
  private repositories;
9
9
  private informationPanelOutputTransformation;
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
@@ -11,23 +10,24 @@ var __metadata = (this && this.__metadata) || function (k, v) {
11
10
  var __param = (this && this.__param) || function (paramIndex, decorator) {
12
11
  return function (target, key) { decorator(target, key, paramIndex); }
13
12
  };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.V1FyprElementKindsController = void 0;
16
- const InformationPanelOutputTransformation_1 = require("../../transformations/InformationPanelOutputTransformation");
17
- const FYPROGContainerTokens_1 = require("../../../ioc/FYPROGContainerTokens");
18
- const _sch_1 = require("../../../../schema-definitions");
19
- const CoreToken_1 = require("@golemio/core/dist/helpers/ioc/CoreToken");
20
- const express_validator_1 = require("@golemio/core/dist/shared/express-validator");
21
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
22
- const sequelize_1 = require("@golemio/core/dist/shared/sequelize");
23
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
13
+ import { InformationPanelOutputTransformation } from "#og/fypr/transformations/InformationPanelOutputTransformation";
14
+ import { fyprOGContainerTokens } from "#og/ioc/FYPROGContainerTokens";
15
+ import { fyprElementKinds } from "#sch/index";
16
+ import { CoreToken } from "@golemio/core/dist/helpers/ioc/CoreToken.js";
17
+ import ExpressValidator from "@golemio/core/dist/shared/express-validator.js";
18
+ import GolemioErrors from "@golemio/core/dist/shared/golemio-errors.js";
19
+ import Sequelize from "@golemio/core/dist/shared/sequelize.js";
20
+ import { inject, injectable } from "@golemio/core/dist/shared/tsyringe.js";
21
+ const { matchedData } = ExpressValidator;
22
+ const { GeneralError } = GolemioErrors;
23
+ const { Op } = Sequelize;
24
24
  let V1FyprElementKindsController = class V1FyprElementKindsController {
25
25
  constructor(repositories, informationPanelOutputTransformation, config) {
26
26
  this.repositories = repositories;
27
27
  this.informationPanelOutputTransformation = informationPanelOutputTransformation;
28
28
  this.getAll = async (req, res, next) => {
29
29
  try {
30
- const { kind, limit, offset, jis, scopes, state, hasDeviceId } = (0, express_validator_1.matchedData)(req);
30
+ const { kind, limit, offset, jis, scopes, state, hasDeviceId } = matchedData(req);
31
31
  const effectiveLimit = req.query.limit !== undefined ? Number(limit) : this.defaultLimit;
32
32
  const where = kind === "information-panels" ? this.buildInformationPanelWhere({ jis, state, hasDeviceId }) : {};
33
33
  const embeds = scopes ? (Array.isArray(scopes) ? scopes : [scopes]) : undefined;
@@ -52,10 +52,10 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
52
52
  };
53
53
  this.getOne = async (req, res, next) => {
54
54
  try {
55
- const { kind, id } = (0, express_validator_1.matchedData)(req);
55
+ const { kind, id } = matchedData(req);
56
56
  const data = await this.getRepositoryByKind(kind).getOne(id);
57
57
  if (!data) {
58
- throw new golemio_errors_1.GeneralError("FYPR element not found.", this.constructor.name, undefined, 404);
58
+ throw new GeneralError("FYPR element not found.", this.constructor.name, undefined, 404);
59
59
  }
60
60
  // if more kinds need transformation, consider extracting to a transformation dispatcher
61
61
  switch (kind) {
@@ -75,12 +75,12 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
75
75
  getRepositoryByKind(kind) {
76
76
  const repository = this.repositories.get(kind);
77
77
  if (!repository)
78
- throw new golemio_errors_1.GeneralError("Unknown kind of FYPR element.", this.constructor.name, undefined, 400);
78
+ throw new GeneralError("Unknown kind of FYPR element.", this.constructor.name, undefined, 400);
79
79
  return repository;
80
80
  }
81
81
  getIndex(basePath) {
82
82
  const response = {
83
- links: _sch_1.fyprElementKinds.map((kind) => ({
83
+ links: fyprElementKinds.map((kind) => ({
84
84
  rel: "collection",
85
85
  name: kind,
86
86
  href: `${basePath}/${kind}`,
@@ -95,21 +95,21 @@ let V1FyprElementKindsController = class V1FyprElementKindsController {
95
95
  }
96
96
  if (filters.state !== undefined) {
97
97
  const states = Array.isArray(filters.state) ? filters.state : [filters.state];
98
- where.state = { [sequelize_1.Op.in]: states };
98
+ where.state = { [Op.in]: states };
99
99
  }
100
100
  if (filters.hasDeviceId !== undefined) {
101
- where.device_id = filters.hasDeviceId ? { [sequelize_1.Op.not]: null } : { [sequelize_1.Op.is]: null };
101
+ where.device_id = filters.hasDeviceId ? { [Op.not]: null } : { [Op.is]: null };
102
102
  }
103
103
  return where;
104
104
  }
105
105
  };
106
- exports.V1FyprElementKindsController = V1FyprElementKindsController;
107
- exports.V1FyprElementKindsController = V1FyprElementKindsController = __decorate([
108
- (0, tsyringe_1.injectable)(),
109
- __param(0, (0, tsyringe_1.inject)(FYPROGContainerTokens_1.fyprOGContainerTokens.FyprElementRepositoriesMap)),
110
- __param(1, (0, tsyringe_1.inject)(FYPROGContainerTokens_1.fyprOGContainerTokens.InformationPanelOutputTransformation)),
111
- __param(2, (0, tsyringe_1.inject)(CoreToken_1.CoreToken.SimpleConfig)),
106
+ V1FyprElementKindsController = __decorate([
107
+ injectable(),
108
+ __param(0, inject(fyprOGContainerTokens.FyprElementRepositoriesMap)),
109
+ __param(1, inject(fyprOGContainerTokens.InformationPanelOutputTransformation)),
110
+ __param(2, inject(CoreToken.SimpleConfig)),
112
111
  __metadata("design:paramtypes", [Map,
113
- InformationPanelOutputTransformation_1.InformationPanelOutputTransformation, Object])
112
+ InformationPanelOutputTransformation, Object])
114
113
  ], V1FyprElementKindsController);
114
+ export { V1FyprElementKindsController };
115
115
  //# sourceMappingURL=V1FyprElementKindsController.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,qHAAqH;AACrH,8EAAsE;AAEtE,yDAAwD;AAExD,wEAAqE;AAErE,mFAA0E;AAC1E,6EAAwE;AACxE,mEAAuE;AACvE,iEAAwE;AAGjE,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGrC,YAEI,YAAiF,EAEjF,oCAAkF,EAElF,MAAqB;QAJb,iBAAY,GAAZ,YAAY,CAA6D;QAEzE,yCAAoC,GAApC,oCAAoC,CAAsC;QAwB/E,WAAM,GAAG,KAAK,EAAE,GAAY,EAAE,GAAa,EAAE,I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AE,CAAC,CAAC,CAAC,EAAE,CAAC,cAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;QACnF,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAqBJ,CAAA;AA9FY,oEAA4B;uCAA5B,4BAA4B;IADxC,IAAA,qBAAU,GAAE;IAKJ,WAAA,IAAA,iBAAM,EAAC,6CAAqB,CAAC,0BAA0B,CAAC,CAAA;IAExD,WAAA,IAAA,iBAAM,EAAC,6CAAqB,CAAC,oCAAoC,CAAC,CAAA;IAElE,WAAA,IAAA,iBAAM,EAAC,qBAAS,CAAC,YAAY,CAAC,CAAA;qCAHT,GAAG;QAEqB,2EAAoC;GAP7E,4BAA4B,CA8FxC"}
1
+ {"version":3,"file":"V1FyprElementKindsController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,OAAO,EAAE,oCAAoC,EAAE,MAAM,+DAA+D,CAAC;AACrH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AAExE,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,aAAa,MAAM,6CAA6C,CAAC;AAExE,OAAO,SAAS,MAAM,wCAAwC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAE3E,MAAM,EAAE,WAAW,EAAE,GAAG,gBAAgB,CAAC;AACzC,MAAM,EAAE,YAAY,EAAE,GAAG,aAAa,CAAC;AACvC,MAAM,EAAE,EAAE,EAAE,GAAG,SAAS,CAAC;AAGlB,IAAM,4BAA4B,GAAlC,MAAM,4BAA4B;IAGrC,YAEI,YAAiF,EAEjF,oCAAkF,EAElF,MAAqB;QAJb,iBAAY,GAAZ,YAA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,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC;QACnF,CAAC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CAqBJ,CAAA;AA9FY,4BAA4B;IADxC,UAAU,EAAE;IAKJ,WAAA,MAAM,CAAC,qBAAqB,CAAC,0BAA0B,CAAC,CAAA;IAExD,WAAA,MAAM,CAAC,qBAAqB,CAAC,oCAAoC,CAAC,CAAA;IAElE,WAAA,MAAM,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;qCAHT,GAAG;QAEqB,oCAAoC;GAP7E,4BAA4B,CA8FxC"}
@@ -1,4 +1,4 @@
1
- import { RequestHandler } from "@golemio/core/dist/shared/express";
1
+ import type { RequestHandler } from "@golemio/core/dist/shared/express.js";
2
2
  export declare class V1FyprMetadataController {
3
3
  getMetadata(basePath: string): RequestHandler;
4
4
  }
@@ -1,27 +1,24 @@
1
- "use strict";
2
1
  var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
2
  var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
3
  if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
4
  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
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
6
  };
8
- Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.V1FyprMetadataController = void 0;
10
- const _sch_1 = require("../../../../schema-definitions");
11
- const translation_1 = require("../../../../schema-definitions/translation");
12
- const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
7
+ import { FyprElementsConfig, fyprElementKinds } from "#sch/index";
8
+ import { fyprElementTranslations } from "#sch/translation/index";
9
+ import { injectable } from "@golemio/core/dist/shared/tsyringe.js";
13
10
  let V1FyprMetadataController = class V1FyprMetadataController {
14
11
  getMetadata(basePath) {
15
- const elements = _sch_1.fyprElementKinds.reduce((acc, kind) => {
12
+ const elements = fyprElementKinds.reduce((acc, kind) => {
16
13
  acc[kind] = {
17
14
  links: [{ rel: "collection", href: `${basePath}/${kind}` }],
18
15
  translations: {
19
16
  kind: {
20
- slug_en: _sch_1.FyprElementsConfig[kind].tableName,
21
- title_cs: _sch_1.FyprElementsConfig[kind].cs,
22
- title_cs_singular: _sch_1.FyprElementsConfig[kind].cs_singular,
17
+ slug_en: FyprElementsConfig[kind].tableName,
18
+ title_cs: FyprElementsConfig[kind].cs,
19
+ title_cs_singular: FyprElementsConfig[kind].cs_singular,
23
20
  },
24
- attributes: Object.fromEntries(Object.entries(translation_1.fyprElementTranslations[kind]).map(([slugEn, entry]) => [
21
+ attributes: Object.fromEntries(Object.entries(fyprElementTranslations[kind]).map(([slugEn, entry]) => [
25
22
  slugEn,
26
23
  { slug_cs: entry.cs, title_cs: entry.title_cs },
27
24
  ])),
@@ -32,8 +29,8 @@ let V1FyprMetadataController = class V1FyprMetadataController {
32
29
  return (_req, res, _next) => res.status(200).json({ elements });
33
30
  }
34
31
  };
35
- exports.V1FyprMetadataController = V1FyprMetadataController;
36
- exports.V1FyprMetadataController = V1FyprMetadataController = __decorate([
37
- (0, tsyringe_1.injectable)()
32
+ V1FyprMetadataController = __decorate([
33
+ injectable()
38
34
  ], V1FyprMetadataController);
35
+ export { V1FyprMetadataController };
39
36
  //# sourceMappingURL=V1FyprMetadataController.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"V1FyprMetadataController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprMetadataController.ts"],"names":[],"mappings":";;;;;;;;;AAAA,yDAA4D;AAC5D,4EAA2D;AAE3D,iEAAgE;AAGzD,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IAC1B,WAAW,CAAC,QAAgB;QAC/B,MAAM,QAAQ,GAAG,uBAAgB,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE;YACnD,GAAG,CAAC,IAAI,CAAC,GAAG;gBACR,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,QAAQ,IAAI,IAAI,EAAE,EAAE,CAAC;gBAC3D,YAAY,EAAE;oBACV,IAAI,EAAE;wBACF,OAAO,EAAE,yBAAkB,CAAC,IAAI,CAAC,CAAC,SAAS;wBAC3C,QAAQ,EAAE,yBAAkB,CAAC,IAAI,CAAC,CAAC,EAAE;wBACrC,iBAAiB,EAAE,yBAAkB,CAAC,IAAI,CAAC,CAAC,WAAW;qBAC1D;oBACD,UAAU,EAAE,MAAM,CAAC,WAAW,CAC1B,MAAM,CAAC,OAAO,CAAC,qCAAuB,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC;wBACnE,MAAM;wBACN,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE;qBAClD,CAAC,CACL;iBACJ;aACJ,CAAC;YACF,OAAO,GAAG,CAAC;QACf,CAAC,EAAE,EAA6B,CAAC,CAAC;QAClC,OAAO,CAAC,IAAa,EAAE,GAAa,EAAE,KAAmB,EAAE,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;IACrG,CAAC;CACJ,CAAA;AAvBY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,qBAAU,GAAE;GACA,wBAAwB,CAuBpC"}
1
+ {"version":3,"file":"V1FyprMetadataController.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/controllers/v1/V1FyprMetadataController.ts"],"names":[],"mappings":";;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AC;CACJ,CAAA;AAvBY,wBAAwB;IADpC,UAAU,EAAE;GACA,wBAAwB,CAuBpC"}
@@ -1,8 +1,8 @@
1
- import { FyprEmbedConfig } from "../../../schema-definitions/index";
2
- import { ILogger } from "@golemio/core/dist/helpers";
3
- import { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector";
4
- import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository";
5
- import { ModelAttributes, WhereOptions } from "@golemio/core/dist/shared/sequelize";
1
+ import type { FyprEmbedConfig } from "#sch/index";
2
+ import type { ILogger } from "@golemio/core/dist/helpers/index.js";
3
+ import type { IDatabaseConnector } from "@golemio/core/dist/helpers/data-access/postgres/IDatabaseConnector.js";
4
+ import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository.js";
5
+ import type { ModelAttributes, WhereOptions } from "@golemio/core/dist/shared/sequelize.js";
6
6
  export declare class FyprElementRepository<T> extends AbstractBasicRepository {
7
7
  readonly schema = "fypr";
8
8
  readonly tableName: string;
@@ -1,12 +1,10 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.FyprElementRepository = void 0;
4
- const const_1 = require("../../../schema-definitions/const");
5
- const AbstractBasicRepository_1 = require("@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository");
6
- const golemio_errors_1 = require("@golemio/core/dist/shared/golemio-errors");
1
+ import { PG_SCHEMA } from "#sch/const";
2
+ import { AbstractBasicRepository } from "@golemio/core/dist/helpers/data-access/postgres/repositories/AbstractBasicRepository.js";
3
+ import GolemioErrors from "@golemio/core/dist/shared/golemio-errors.js";
4
+ const { GeneralError } = GolemioErrors;
7
5
  // Manually instantiated via instanceCachingFactory in Di.ts (deferred until first resolve, after connect()).
8
6
  // sequelizeModel and embedIncludes are lazy so getConnection() is safe to call at first query time.
9
- class FyprElementRepository extends AbstractBasicRepository_1.AbstractBasicRepository {
7
+ export class FyprElementRepository extends AbstractBasicRepository {
10
8
  get sequelizeModel() {
11
9
  if (!this._sequelizeModel) {
12
10
  this._sequelizeModel = this.connector
@@ -20,7 +18,7 @@ class FyprElementRepository extends AbstractBasicRepository_1.AbstractBasicRepos
20
18
  const sequelize = this.connector.getConnection();
21
19
  this._embedIncludes = Object.fromEntries(Object.entries(this.embedsConfig).map(([key, cfg]) => {
22
20
  const embedModel = sequelize.models[cfg.tableName] ??
23
- sequelize.define(cfg.tableName, cfg.attributeModel, { schema: const_1.PG_SCHEMA, timestamps: false });
21
+ sequelize.define(cfg.tableName, cfg.attributeModel, { schema: PG_SCHEMA, timestamps: false });
24
22
  if (!this.sequelizeModel.associations[cfg.as]) {
25
23
  const associationOptions = { foreignKey: cfg.foreignKey, sourceKey: cfg.sourceKey, as: cfg.as };
26
24
  if (cfg.cardinality === "one") {
@@ -39,7 +37,7 @@ class FyprElementRepository extends AbstractBasicRepository_1.AbstractBasicRepos
39
37
  }
40
38
  constructor(connector, logger, modelName, tableName, attributeModel, embeds = {}) {
41
39
  super(connector, logger);
42
- this.schema = const_1.PG_SCHEMA;
40
+ this.schema = PG_SCHEMA;
43
41
  this.modelName = modelName;
44
42
  this.tableName = tableName;
45
43
  this.attributeModel = attributeModel;
@@ -58,7 +56,7 @@ class FyprElementRepository extends AbstractBasicRepository_1.AbstractBasicRepos
58
56
  return instances.map((i) => i.toJSON());
59
57
  }
60
58
  catch (err) {
61
- throw new golemio_errors_1.GeneralError(`Database error when listing '${this.modelName}'`, this.constructor.name, err, 500);
59
+ throw new GeneralError(`Database error when listing '${this.modelName}'`, this.constructor.name, err, 500);
62
60
  }
63
61
  }
64
62
  async getOne(id) {
@@ -66,9 +64,8 @@ class FyprElementRepository extends AbstractBasicRepository_1.AbstractBasicRepos
66
64
  return await this.sequelizeModel.findByPk(id, { raw: true });
67
65
  }
68
66
  catch (err) {
69
- throw new golemio_errors_1.GeneralError(`Database error when findByPk '${this.modelName}'`, this.constructor.name, err, 500);
67
+ throw new GeneralError(`Database error when findByPk '${this.modelName}'`, this.constructor.name, err, 500);
70
68
  }
71
69
  }
72
70
  }
73
- exports.FyprElementRepository = FyprElementRepository;
74
71
  //# sourceMappingURL=FyprElementRepository.js.map