@golemio/fypr 1.12.0 → 2.0.0-dev.2868130045
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/helpers/errors/ErrorHelper.d.ts +2 -2
- package/dist/helpers/errors/ErrorHelper.js +4 -7
- package/dist/helpers/errors/ErrorHelper.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -39
- package/dist/index.js.map +1 -1
- package/dist/integration-engine/data-sources/AbstractDBFYPRDataSourceFactory.d.ts +2 -2
- package/dist/integration-engine/data-sources/AbstractDBFYPRDataSourceFactory.js +7 -10
- package/dist/integration-engine/data-sources/AbstractDBFYPRDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/DBFYPRDisplayCasesDataSourceFactory.d.ts +3 -3
- package/dist/integration-engine/data-sources/DBFYPRDisplayCasesDataSourceFactory.js +10 -13
- package/dist/integration-engine/data-sources/DBFYPRDisplayCasesDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/DBFYPRInformationPanelsDataSourceFactory.d.ts +3 -3
- package/dist/integration-engine/data-sources/DBFYPRInformationPanelsDataSourceFactory.js +10 -13
- package/dist/integration-engine/data-sources/DBFYPRInformationPanelsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/DBFYPRObelisksDataSourceFactory.d.ts +3 -3
- package/dist/integration-engine/data-sources/DBFYPRObelisksDataSourceFactory.js +10 -13
- package/dist/integration-engine/data-sources/DBFYPRObelisksDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/DBFYPRSignpostsDataSourceFactory.d.ts +3 -3
- package/dist/integration-engine/data-sources/DBFYPRSignpostsDataSourceFactory.js +10 -13
- package/dist/integration-engine/data-sources/DBFYPRSignpostsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/DBFYPRTotemsDataSourceFactory.d.ts +3 -3
- package/dist/integration-engine/data-sources/DBFYPRTotemsDataSourceFactory.js +10 -13
- package/dist/integration-engine/data-sources/DBFYPRTotemsDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/DCIPStatusOverviewDataSourceFactory.d.ts +3 -3
- package/dist/integration-engine/data-sources/DCIPStatusOverviewDataSourceFactory.js +13 -15
- package/dist/integration-engine/data-sources/DCIPStatusOverviewDataSourceFactory.js.map +1 -1
- package/dist/integration-engine/data-sources/protocol-strategies/StrapiPaginatedHTTPProtocolStrategy.d.ts +3 -3
- package/dist/integration-engine/data-sources/protocol-strategies/StrapiPaginatedHTTPProtocolStrategy.js +12 -15
- package/dist/integration-engine/data-sources/protocol-strategies/StrapiPaginatedHTTPProtocolStrategy.js.map +1 -1
- package/dist/integration-engine/helpers/StrapiPaginationHelper.js +5 -8
- package/dist/integration-engine/helpers/StrapiPaginationHelper.js.map +1 -1
- package/dist/integration-engine/index.d.ts +1 -1
- package/dist/integration-engine/index.js +2 -5
- package/dist/integration-engine/index.js.map +1 -1
- package/dist/integration-engine/ioc/Di.d.ts +1 -1
- package/dist/integration-engine/ioc/Di.js +63 -66
- package/dist/integration-engine/ioc/Di.js.map +1 -1
- package/dist/integration-engine/ioc/FYPRIEContainerTokens.js +1 -4
- package/dist/integration-engine/ioc/FYPRIEContainerTokens.js.map +1 -1
- package/dist/integration-engine/repositories/AbstractFyprRepository.d.ts +7 -7
- package/dist/integration-engine/repositories/AbstractFyprRepository.js +11 -13
- package/dist/integration-engine/repositories/AbstractFyprRepository.js.map +1 -1
- package/dist/integration-engine/repositories/DeviceStatusRepository.d.ts +7 -7
- package/dist/integration-engine/repositories/DeviceStatusRepository.js +22 -23
- package/dist/integration-engine/repositories/DeviceStatusRepository.js.map +1 -1
- package/dist/integration-engine/repositories/DisplayCaseRepository.d.ts +8 -8
- package/dist/integration-engine/repositories/DisplayCaseRepository.js +17 -19
- package/dist/integration-engine/repositories/DisplayCaseRepository.js.map +1 -1
- package/dist/integration-engine/repositories/InformationPanelPresetsRepository.d.ts +6 -6
- package/dist/integration-engine/repositories/InformationPanelPresetsRepository.js +28 -28
- package/dist/integration-engine/repositories/InformationPanelPresetsRepository.js.map +1 -1
- package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.d.ts +6 -6
- package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.js +24 -24
- package/dist/integration-engine/repositories/InformationPanelPresetsRoutesRepository.js.map +1 -1
- package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.d.ts +6 -6
- package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.js +24 -24
- package/dist/integration-engine/repositories/InformationPanelPresetsStopsRepository.js.map +1 -1
- package/dist/integration-engine/repositories/InformationPanelRepository.d.ts +8 -8
- package/dist/integration-engine/repositories/InformationPanelRepository.js +17 -19
- package/dist/integration-engine/repositories/InformationPanelRepository.js.map +1 -1
- package/dist/integration-engine/repositories/ObeliskRepository.d.ts +8 -8
- package/dist/integration-engine/repositories/ObeliskRepository.js +17 -19
- package/dist/integration-engine/repositories/ObeliskRepository.js.map +1 -1
- package/dist/integration-engine/repositories/SignpostRepository.d.ts +8 -8
- package/dist/integration-engine/repositories/SignpostRepository.js +17 -19
- package/dist/integration-engine/repositories/SignpostRepository.js.map +1 -1
- package/dist/integration-engine/repositories/TotemRepository.d.ts +8 -8
- package/dist/integration-engine/repositories/TotemRepository.js +17 -19
- package/dist/integration-engine/repositories/TotemRepository.js.map +1 -1
- package/dist/integration-engine/transformations/AbstractElementTransformation.d.ts +3 -3
- package/dist/integration-engine/transformations/AbstractElementTransformation.js +2 -6
- package/dist/integration-engine/transformations/AbstractElementTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/DisplayCasesTransformation.d.ts +3 -3
- package/dist/integration-engine/transformations/DisplayCasesTransformation.js +6 -9
- package/dist/integration-engine/transformations/DisplayCasesTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/InformationPanelsTransformation.d.ts +3 -3
- package/dist/integration-engine/transformations/InformationPanelsTransformation.js +6 -9
- package/dist/integration-engine/transformations/InformationPanelsTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/ObelisksTransformation.d.ts +3 -3
- package/dist/integration-engine/transformations/ObelisksTransformation.js +6 -9
- package/dist/integration-engine/transformations/ObelisksTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/SignpostsTransformation.d.ts +3 -3
- package/dist/integration-engine/transformations/SignpostsTransformation.js +6 -9
- package/dist/integration-engine/transformations/SignpostsTransformation.js.map +1 -1
- package/dist/integration-engine/transformations/TotemsTransformation.d.ts +3 -3
- package/dist/integration-engine/transformations/TotemsTransformation.js +6 -9
- package/dist/integration-engine/transformations/TotemsTransformation.js.map +1 -1
- package/dist/integration-engine/workers/FYPRWorker.d.ts +2 -2
- package/dist/integration-engine/workers/FYPRWorker.js +14 -18
- package/dist/integration-engine/workers/FYPRWorker.js.map +1 -1
- package/dist/integration-engine/workers/constants.js +1 -4
- package/dist/integration-engine/workers/constants.js.map +1 -1
- package/dist/integration-engine/workers/tasks/AbstractUpdateElementsTask.d.ts +5 -5
- package/dist/integration-engine/workers/tasks/AbstractUpdateElementsTask.js +8 -11
- package/dist/integration-engine/workers/tasks/AbstractUpdateElementsTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/FetchDBFYPRTask.d.ts +7 -7
- package/dist/integration-engine/workers/tasks/FetchDBFYPRTask.js +31 -33
- package/dist/integration-engine/workers/tasks/FetchDBFYPRTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/FetchDCIPStatusTask.d.ts +3 -3
- package/dist/integration-engine/workers/tasks/FetchDCIPStatusTask.js +18 -20
- package/dist/integration-engine/workers/tasks/FetchDCIPStatusTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/UpdateDisplayCasesTask.d.ts +7 -7
- package/dist/integration-engine/workers/tasks/UpdateDisplayCasesTask.js +17 -19
- package/dist/integration-engine/workers/tasks/UpdateDisplayCasesTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/UpdateInformationPanelsTask.d.ts +7 -7
- package/dist/integration-engine/workers/tasks/UpdateInformationPanelsTask.js +17 -19
- package/dist/integration-engine/workers/tasks/UpdateInformationPanelsTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/UpdateObelisksTask.d.ts +7 -7
- package/dist/integration-engine/workers/tasks/UpdateObelisksTask.js +17 -19
- package/dist/integration-engine/workers/tasks/UpdateObelisksTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/UpdatePresetsTask.d.ts +5 -5
- package/dist/integration-engine/workers/tasks/UpdatePresetsTask.js +29 -30
- package/dist/integration-engine/workers/tasks/UpdatePresetsTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/UpdateSignpostsTask.d.ts +7 -7
- package/dist/integration-engine/workers/tasks/UpdateSignpostsTask.js +17 -19
- package/dist/integration-engine/workers/tasks/UpdateSignpostsTask.js.map +1 -1
- package/dist/integration-engine/workers/tasks/UpdateTotemsTask.d.ts +7 -7
- package/dist/integration-engine/workers/tasks/UpdateTotemsTask.js +17 -19
- package/dist/integration-engine/workers/tasks/UpdateTotemsTask.js.map +1 -1
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.d.ts +6 -6
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js +25 -25
- package/dist/output-gateway/fypr/controllers/v1/V1FyprElementKindsController.js.map +1 -1
- package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.d.ts +1 -1
- package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.js +11 -14
- package/dist/output-gateway/fypr/controllers/v1/V1FyprMetadataController.js.map +1 -1
- package/dist/output-gateway/fypr/data-access/FyprElementRepository.d.ts +5 -5
- package/dist/output-gateway/fypr/data-access/FyprElementRepository.js +9 -12
- package/dist/output-gateway/fypr/data-access/FyprElementRepository.js.map +1 -1
- package/dist/output-gateway/fypr/routers/index.d.ts +2 -2
- package/dist/output-gateway/fypr/routers/index.js +2 -7
- package/dist/output-gateway/fypr/routers/index.js.map +1 -1
- package/dist/output-gateway/fypr/routers/middlewares/cacheMiddleware.d.ts +3 -3
- package/dist/output-gateway/fypr/routers/middlewares/cacheMiddleware.js +1 -4
- package/dist/output-gateway/fypr/routers/middlewares/cacheMiddleware.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.d.ts +3 -3
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js +41 -43
- package/dist/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.d.ts +3 -3
- package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.js +15 -18
- package/dist/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.js.map +1 -1
- package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.d.ts +1 -1
- package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js +1 -5
- package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js.map +1 -1
- package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.d.ts +3 -3
- package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js +9 -12
- package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js.map +1 -1
- package/dist/output-gateway/index.d.ts +1 -1
- package/dist/output-gateway/index.js +2 -5
- package/dist/output-gateway/index.js.map +1 -1
- package/dist/output-gateway/interfaces/IOGInformationPanel.d.ts +2 -2
- package/dist/output-gateway/interfaces/IOGInformationPanel.js +1 -2
- package/dist/output-gateway/interfaces/IOGInformationPanelScopes.d.ts +2 -2
- package/dist/output-gateway/interfaces/IOGInformationPanelScopes.js +1 -2
- package/dist/output-gateway/ioc/Di.d.ts +1 -1
- package/dist/output-gateway/ioc/Di.js +20 -23
- package/dist/output-gateway/ioc/Di.js.map +1 -1
- package/dist/output-gateway/ioc/FYPROGContainerTokens.js +1 -4
- package/dist/output-gateway/ioc/FYPROGContainerTokens.js.map +1 -1
- package/dist/output-gateway/shared/constants/element-kinds.d.ts +2 -1
- package/dist/output-gateway/shared/constants/element-kinds.js +1 -5
- package/dist/output-gateway/shared/constants/element-kinds.js.map +1 -1
- package/dist/output-gateway/shared/constants/index.d.ts +1 -1
- package/dist/output-gateway/shared/constants/index.js +1 -17
- package/dist/output-gateway/shared/constants/index.js.map +1 -1
- package/dist/schema-definitions/FyprElementTypes.d.ts +5 -5
- package/dist/schema-definitions/FyprElementTypes.js +1 -2
- package/dist/schema-definitions/const.js +11 -14
- package/dist/schema-definitions/const.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRDisplayCasesJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRDisplayCasesJSONSchema.js +22 -25
- package/dist/schema-definitions/data-sources/DBFYPRDisplayCasesJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.js +15 -18
- package/dist/schema-definitions/data-sources/DBFYPRElementsJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRInformationPanelsJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRInformationPanelsJSONSchema.js +83 -86
- package/dist/schema-definitions/data-sources/DBFYPRInformationPanelsJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRObelisksJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRObelisksJSONSchema.js +17 -20
- package/dist/schema-definitions/data-sources/DBFYPRObelisksJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRSignpostsJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRSignpostsJSONSchema.js +19 -22
- package/dist/schema-definitions/data-sources/DBFYPRSignpostsJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/DBFYPRTotemsJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DBFYPRTotemsJSONSchema.js +55 -58
- package/dist/schema-definitions/data-sources/DBFYPRTotemsJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/DCIPStatusOverviewJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/DCIPStatusOverviewJSONSchema.js +3 -6
- package/dist/schema-definitions/data-sources/DCIPStatusOverviewJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.d.ts +2 -2
- package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.js +1 -4
- package/dist/schema-definitions/data-sources/GolemioPresetsJSONSchema.js.map +1 -1
- package/dist/schema-definitions/data-sources/index.js +11 -14
- package/dist/schema-definitions/data-sources/index.js.map +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRDisplayCase.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRDisplayCase.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRElement.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRElement.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRInformationPanel.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRInformationPanel.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRObelisk.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRObelisk.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRSignpost.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRSignpost.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRTotem.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDBFYPRTotem.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IDCIPStatusOverview.d.ts +1 -1
- package/dist/schema-definitions/data-sources/interfaces/IDCIPStatusOverview.js +1 -2
- package/dist/schema-definitions/data-sources/interfaces/IGolemioPresetsResponse.js +1 -2
- package/dist/schema-definitions/index.d.ts +4 -3
- package/dist/schema-definitions/index.js +29 -33
- package/dist/schema-definitions/index.js.map +1 -1
- package/dist/schema-definitions/models/AbstractElementModel.d.ts +6 -3
- package/dist/schema-definitions/models/AbstractElementModel.js +39 -42
- package/dist/schema-definitions/models/AbstractElementModel.js.map +1 -1
- package/dist/schema-definitions/models/DeviceStatusModel.d.ts +5 -2
- package/dist/schema-definitions/models/DeviceStatusModel.js +7 -10
- package/dist/schema-definitions/models/DeviceStatusModel.js.map +1 -1
- package/dist/schema-definitions/models/DisplayCaseModel.d.ts +4 -4
- package/dist/schema-definitions/models/DisplayCaseModel.js +46 -49
- package/dist/schema-definitions/models/DisplayCaseModel.js.map +1 -1
- package/dist/schema-definitions/models/InformationPanelModel.d.ts +4 -4
- package/dist/schema-definitions/models/InformationPanelModel.js +177 -180
- package/dist/schema-definitions/models/InformationPanelModel.js.map +1 -1
- package/dist/schema-definitions/models/InformationPanelPresetsModel.d.ts +6 -3
- package/dist/schema-definitions/models/InformationPanelPresetsModel.js +13 -16
- package/dist/schema-definitions/models/InformationPanelPresetsModel.js.map +1 -1
- package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.d.ts +5 -2
- package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.js +8 -11
- package/dist/schema-definitions/models/InformationPanelPresetsRoutesAggModel.js.map +1 -1
- package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.d.ts +6 -3
- package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.js +10 -13
- package/dist/schema-definitions/models/InformationPanelPresetsRoutesModel.js.map +1 -1
- package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.d.ts +6 -3
- package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.js +7 -10
- package/dist/schema-definitions/models/InformationPanelPresetsStopsModel.js.map +1 -1
- package/dist/schema-definitions/models/ObeliskModel.d.ts +4 -4
- package/dist/schema-definitions/models/ObeliskModel.js +36 -39
- package/dist/schema-definitions/models/ObeliskModel.js.map +1 -1
- package/dist/schema-definitions/models/SignpostModel.d.ts +4 -4
- package/dist/schema-definitions/models/SignpostModel.js +40 -43
- package/dist/schema-definitions/models/SignpostModel.js.map +1 -1
- package/dist/schema-definitions/models/TotemModel.d.ts +4 -4
- package/dist/schema-definitions/models/TotemModel.js +110 -113
- package/dist/schema-definitions/models/TotemModel.js.map +1 -1
- package/dist/schema-definitions/models/interfaces/IDeviceStatus.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/IDeviceStatus.js +1 -2
- package/dist/schema-definitions/models/interfaces/IDisplayCase.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/IDisplayCase.js +1 -2
- package/dist/schema-definitions/models/interfaces/IElement.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/IElement.js +1 -2
- package/dist/schema-definitions/models/interfaces/IInformationPanel.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/IInformationPanel.js +1 -2
- package/dist/schema-definitions/models/interfaces/IInformationPanelPreset.js +1 -2
- package/dist/schema-definitions/models/interfaces/IInformationPanelPresetRoute.js +1 -2
- package/dist/schema-definitions/models/interfaces/IInformationPanelPresetStop.js +1 -2
- package/dist/schema-definitions/models/interfaces/IObelisk.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/IObelisk.js +1 -2
- package/dist/schema-definitions/models/interfaces/IPresetRouteAgg.js +1 -2
- package/dist/schema-definitions/models/interfaces/ISignpost.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/ISignpost.js +1 -2
- package/dist/schema-definitions/models/interfaces/ITotem.d.ts +1 -1
- package/dist/schema-definitions/models/interfaces/ITotem.js +1 -2
- package/dist/schema-definitions/models/interfaces/fyprElementStates.js +1 -4
- package/dist/schema-definitions/models/interfaces/fyprElementStates.js.map +1 -1
- package/dist/schema-definitions/translation/index.d.ts +1 -1
- package/dist/schema-definitions/translation/index.js +13 -19
- package/dist/schema-definitions/translation/index.js.map +1 -1
- package/package.json +42 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FyprElementRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/data-access/FyprElementRepository.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FyprElementRepository.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/data-access/FyprElementRepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAIvC,OAAO,EAAE,uBAAuB,EAAE,MAAM,yFAAyF,CAAC;AAClI,OAAO,aAAa,MAAM,6CAA6C,CAAC;AAGxE,MAAM,EAAE,YAAY,EAAE,GAAG,aAAa,CAAC;AAEvC,6GAA6G;AAC7G,oGAAoG;AACpG,MAAM,OAAO,qBAAyB,SAAQ,uBAAuB;IASjE,IAAY,cAAc;QACtB,IAAI,CAAC,IAAI,CAAC,eAAe,EAAE,CAAC;YACxB,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,SAAS;iBAChC,aAAa,EAAE;iBACf,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QAC9E,CAAC;QACD,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAED,IAAY,aAAa;QACrB,IAAI,CAAC,IAAI,CAAC,cAAc,EAAE,CAAC;YACvB,MAAM,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,CAAC;YACjD,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,WAAW,CACpC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,EAAE,EAAE;gBACjD,MAAM,UAAU,GACZ,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,CAAC;oBAC/B,SAAS,CAAC,MAAM,CAAC,GAAG,CAAC,SAAS,EAAE,GAAG,CA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
|
|
1
|
-
export { v1FyprElementKindsRouter } from "./v1/V1FyprElementKindsRouter";
|
|
2
|
-
export { v1FyprMetadataRouter } from "./v1/V1FyprMetadataRouter";
|
|
1
|
+
export { v1FyprElementKindsRouter } from "./v1/V1FyprElementKindsRouter.js";
|
|
2
|
+
export { v1FyprMetadataRouter } from "./v1/V1FyprMetadataRouter.js";
|
|
@@ -1,8 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.v1FyprMetadataRouter = exports.v1FyprElementKindsRouter = void 0;
|
|
4
|
-
var V1FyprElementKindsRouter_1 = require("./v1/V1FyprElementKindsRouter");
|
|
5
|
-
Object.defineProperty(exports, "v1FyprElementKindsRouter", { enumerable: true, get: function () { return V1FyprElementKindsRouter_1.v1FyprElementKindsRouter; } });
|
|
6
|
-
var V1FyprMetadataRouter_1 = require("./v1/V1FyprMetadataRouter");
|
|
7
|
-
Object.defineProperty(exports, "v1FyprMetadataRouter", { enumerable: true, get: function () { return V1FyprMetadataRouter_1.v1FyprMetadataRouter; } });
|
|
1
|
+
export { v1FyprElementKindsRouter } from "./v1/V1FyprElementKindsRouter.js";
|
|
2
|
+
export { v1FyprMetadataRouter } from "./v1/V1FyprMetadataRouter.js";
|
|
8
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/routers/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/routers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AAC5E,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig";
|
|
2
|
-
import { CacheHeaderMiddleware } from "@golemio/core/dist/output-gateway/CacheHeaderMiddleware";
|
|
3
|
-
import { RequestHandler } from "@golemio/core/dist/shared/express";
|
|
1
|
+
import type { ISimpleConfig } from "@golemio/core/dist/helpers/configuration/ISimpleConfig.js";
|
|
2
|
+
import { CacheHeaderMiddleware } from "@golemio/core/dist/output-gateway/CacheHeaderMiddleware.js";
|
|
3
|
+
import type { RequestHandler } from "@golemio/core/dist/shared/express.js";
|
|
4
4
|
/**
|
|
5
5
|
* Builds a Cache-Control middleware from a `<configKeyPrefix>.maxAge` / `.staleWhileRevalidate`
|
|
6
6
|
* config pair, falling back to the given defaults. Centralized so each router's cache TTL can be
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.resolveCacheMiddleware = resolveCacheMiddleware;
|
|
4
1
|
/**
|
|
5
2
|
* Builds a Cache-Control middleware from a `<configKeyPrefix>.maxAge` / `.staleWhileRevalidate`
|
|
6
3
|
* config pair, falling back to the given defaults. Centralized so each router's cache TTL can be
|
|
7
4
|
* tuned independently of the others without re-deriving the config lookup in every router.
|
|
8
5
|
*/
|
|
9
|
-
function resolveCacheMiddleware(cacheHeaderMiddleware, config, configKeyPrefix, defaults) {
|
|
6
|
+
export function resolveCacheMiddleware(cacheHeaderMiddleware, config, configKeyPrefix, defaults) {
|
|
10
7
|
const maxAge = config.getValue(`${configKeyPrefix}.maxAge`, defaults.maxAge);
|
|
11
8
|
const staleWhileRevalidate = config.getValue(`${configKeyPrefix}.staleWhileRevalidate`, defaults.staleWhileRevalidate);
|
|
12
9
|
return cacheHeaderMiddleware.getMiddleware(maxAge, staleWhileRevalidate);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cacheMiddleware.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/middlewares/cacheMiddleware.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cacheMiddleware.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/middlewares/cacheMiddleware.ts"],"names":[],"mappings":"AAIA;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAClC,qBAA4C,EAC5C,MAAqB,EACrB,eAAuB,EACvB,QAA0D;IAE1D,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAS,GAAG,eAAe,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAW,CAAC;IAC/F,MAAM,oBAAoB,GAAG,MAAM,CAAC,QAAQ,CACxC,GAAG,eAAe,uBAAuB,EACzC,QAAQ,CAAC,oBAAoB,CACtB,CAAC;IACZ,OAAO,qBAAqB,CAAC,aAAa,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;AAC7E,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
2
|
-
import { Router } from "@golemio/core/dist/shared/express";
|
|
1
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter.js";
|
|
2
|
+
import type { Router as TRouter } from "@golemio/core/dist/shared/express.js";
|
|
3
3
|
export declare class V1FyprElementKindsRouter extends AbstractRouter {
|
|
4
|
-
router:
|
|
4
|
+
router: TRouter;
|
|
5
5
|
private cacheHeaderMiddleware;
|
|
6
6
|
private controller;
|
|
7
7
|
constructor();
|
|
@@ -1,70 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
const
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
class V1FyprElementKindsRouter extends AbstractRouter_1.AbstractRouter {
|
|
1
|
+
import { fyprOGContainer } from "#og/ioc/Di";
|
|
2
|
+
import { fyprOGContainerTokens } from "#og/ioc/FYPROGContainerTokens";
|
|
3
|
+
import { fyprElementKinds } from "#og/shared/constants/index";
|
|
4
|
+
import { resolveCacheMiddleware } from "#og/fypr/routers/middlewares/cacheMiddleware";
|
|
5
|
+
import { fyprElementStates, informationPanelScopes, SCOPE_DEVICE_STATUS } from "#sch/index";
|
|
6
|
+
import { CoreToken } from "@golemio/core/dist/helpers/ioc/CoreToken.js";
|
|
7
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter.js";
|
|
8
|
+
import { checkErrors, paginationLimitMiddleware } from "@golemio/core/dist/output-gateway/Validation.js";
|
|
9
|
+
import { ContainerToken, OutputGatewayContainer } from "@golemio/core/dist/output-gateway/ioc/index.js";
|
|
10
|
+
import Express from "@golemio/core/dist/shared/express.js";
|
|
11
|
+
import ExpressValidator from "@golemio/core/dist/shared/express-validator.js";
|
|
12
|
+
import { InformationPanelsOnlyValidator } from "#og/fypr/routers/v1/validators/InformationPanelsOnlyValidator";
|
|
13
|
+
const { Router } = Express;
|
|
14
|
+
const { param, query } = ExpressValidator;
|
|
15
|
+
export class V1FyprElementKindsRouter extends AbstractRouter {
|
|
17
16
|
constructor() {
|
|
18
17
|
super("v1", "fypr/elements");
|
|
19
|
-
this.router =
|
|
20
|
-
this.cacheHeaderMiddleware =
|
|
21
|
-
this.controller =
|
|
18
|
+
this.router = Router();
|
|
19
|
+
this.cacheHeaderMiddleware = OutputGatewayContainer.resolve(ContainerToken.CacheHeaderMiddleware);
|
|
20
|
+
this.controller = fyprOGContainer.resolve(fyprOGContainerTokens.V1FyprElementKindsController);
|
|
22
21
|
this.initRoutes();
|
|
23
22
|
}
|
|
24
23
|
initRoutes() {
|
|
25
|
-
const config =
|
|
26
|
-
const cacheMiddleware =
|
|
24
|
+
const config = OutputGatewayContainer.resolve(CoreToken.SimpleConfig);
|
|
25
|
+
const cacheMiddleware = resolveCacheMiddleware(this.cacheHeaderMiddleware, config, "module.fypr.output-gateway.elements.cache", { maxAge: 5 * 60, staleWhileRevalidate: 60 });
|
|
27
26
|
// DCIP refreshes device statuses ~1×/min, so the 5-minute default above would be too stale.
|
|
28
|
-
const deviceStatusCacheMiddleware =
|
|
27
|
+
const deviceStatusCacheMiddleware = resolveCacheMiddleware(this.cacheHeaderMiddleware, config, "module.fypr.output-gateway.deviceStatuses.cache", { maxAge: 60, staleWhileRevalidate: 30 });
|
|
29
28
|
const listCacheMiddleware = (req, res, next) => {
|
|
30
29
|
const scopes = req.query.scopes;
|
|
31
30
|
const requestsDeviceStatus = Array.isArray(scopes)
|
|
32
|
-
? scopes.includes(
|
|
33
|
-
: scopes ===
|
|
31
|
+
? scopes.includes(SCOPE_DEVICE_STATUS)
|
|
32
|
+
: scopes === SCOPE_DEVICE_STATUS;
|
|
34
33
|
(requestsDeviceStatus ? deviceStatusCacheMiddleware : cacheMiddleware)(req, res, next);
|
|
35
34
|
};
|
|
36
|
-
const kindParamMiddleware =
|
|
37
|
-
.isIn(
|
|
38
|
-
.withMessage(`kind must be one of: ${
|
|
35
|
+
const kindParamMiddleware = param("kind")
|
|
36
|
+
.isIn(fyprElementKinds)
|
|
37
|
+
.withMessage(`kind must be one of: ${fyprElementKinds.join(", ")}`);
|
|
39
38
|
this.router.get("/", cacheMiddleware, this.controller.getIndex(`/${this.version}/${this.path}`));
|
|
40
|
-
this.router.get("/:kind", kindParamMiddleware, ...this.informationPanelsQueryMiddleware(),
|
|
41
|
-
this.router.get("/:kind/:id", kindParamMiddleware,
|
|
39
|
+
this.router.get("/:kind", kindParamMiddleware, ...this.informationPanelsQueryMiddleware(), paginationLimitMiddleware("FyprElementKindsRouter"), checkErrors, listCacheMiddleware, this.controller.getAll);
|
|
40
|
+
this.router.get("/:kind/:id", kindParamMiddleware, param("id").isUUID(), checkErrors, cacheMiddleware, this.controller.getOne);
|
|
42
41
|
}
|
|
43
42
|
// Optional query filters that only apply to the information-panels listing. checkExact (in
|
|
44
43
|
// checkErrors) registers them so they pass the no-unknown-params guard once validated.
|
|
45
44
|
informationPanelsQueryMiddleware() {
|
|
46
|
-
const jis =
|
|
45
|
+
const jis = query("jis")
|
|
47
46
|
.optional()
|
|
48
|
-
.custom(
|
|
47
|
+
.custom(InformationPanelsOnlyValidator.field("jis"))
|
|
49
48
|
.bail()
|
|
50
49
|
.isBoolean({ strict: false })
|
|
51
50
|
.withMessage("jis must be a boolean")
|
|
52
51
|
.toBoolean();
|
|
53
|
-
const scopes =
|
|
52
|
+
const scopes = query("scopes")
|
|
54
53
|
.optional()
|
|
55
|
-
.custom(
|
|
54
|
+
.custom(InformationPanelsOnlyValidator.field("scopes"))
|
|
56
55
|
.bail()
|
|
57
|
-
.isIn(
|
|
58
|
-
.withMessage(`scopes must be one of: ${
|
|
59
|
-
const state =
|
|
56
|
+
.isIn(informationPanelScopes)
|
|
57
|
+
.withMessage(`scopes must be one of: ${informationPanelScopes.join(", ")}`);
|
|
58
|
+
const state = query("state")
|
|
60
59
|
.optional()
|
|
61
|
-
.custom(
|
|
60
|
+
.custom(InformationPanelsOnlyValidator.field("state"))
|
|
62
61
|
.bail()
|
|
63
|
-
.isIn(
|
|
64
|
-
.withMessage(`state must be one of: ${
|
|
65
|
-
const hasDeviceId =
|
|
62
|
+
.isIn(fyprElementStates)
|
|
63
|
+
.withMessage(`state must be one of: ${fyprElementStates.join(", ")}`);
|
|
64
|
+
const hasDeviceId = query("hasDeviceId")
|
|
66
65
|
.optional()
|
|
67
|
-
.custom(
|
|
66
|
+
.custom(InformationPanelsOnlyValidator.field("hasDeviceId"))
|
|
68
67
|
.bail()
|
|
69
68
|
.isBoolean({ strict: false })
|
|
70
69
|
.withMessage("hasDeviceId must be a boolean")
|
|
@@ -72,6 +71,5 @@ class V1FyprElementKindsRouter extends AbstractRouter_1.AbstractRouter {
|
|
|
72
71
|
return [jis, scopes, state, hasDeviceId];
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
|
-
|
|
76
|
-
exports.v1FyprElementKindsRouter = new V1FyprElementKindsRouter();
|
|
74
|
+
export const v1FyprElementKindsRouter = new V1FyprElementKindsRouter();
|
|
77
75
|
//# sourceMappingURL=V1FyprElementKindsRouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1FyprElementKindsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"V1FyprElementKindsRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprElementKindsRouter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAE5F,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAEtF,OAAO,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AACzG,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAExG,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAE3D,OAAO,gBAAgB,MAAM,gDAAgD,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,+DAA+D,CAAC;AAE/G,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;AAC3B,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,gBAAgB,CAAC;AAE1C,MAAM,OAAO,wBAAyB,SAAQ,cAAc;IAKxD;QACI,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAL1B,WAAM,GAAY,MAAM,EAAE,CAAC;QAM9B,IAAI,CAAC,qBAAqB,GAAG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,EAAE;aACV,MAAM,CAAC,8BAA8B,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;aACrD,IAAI,EAAE;aACN,IAAI,CAAC,iBAAiB,CAAC;aACvB,WAAW,CAAC,yBAAyB,iBAAiB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QAE1E,MAAM,WAAW,GAAG,KAAK,CAAC,aAAa,CAAC;aACnC,QAAQ,EAAE;aACV,MAAM,CAAC,8BAA8B,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;aAC3D,IAAI,EAAE;aACN,SAAS,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC;aAC5B,WAAW,CAAC,+BAA+B,CAAC;aAC5C,SAAS,EAAE,CAAC;QAEjB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;IAC7C,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAmB,IAAI,wBAAwB,EAAE,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
2
|
-
import { Router } from "@golemio/core/dist/shared/express";
|
|
1
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter.js";
|
|
2
|
+
import type { Router as TRouter } from "@golemio/core/dist/shared/express.js";
|
|
3
3
|
export declare class V1FyprMetadataRouter extends AbstractRouter {
|
|
4
|
-
router:
|
|
4
|
+
router: TRouter;
|
|
5
5
|
private cacheHeaderMiddleware;
|
|
6
6
|
private controller;
|
|
7
7
|
constructor();
|
|
@@ -1,27 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const express_1 = require("@golemio/core/dist/shared/express");
|
|
11
|
-
class V1FyprMetadataRouter extends AbstractRouter_1.AbstractRouter {
|
|
1
|
+
import { fyprOGContainer } from "#og/ioc/Di";
|
|
2
|
+
import { fyprOGContainerTokens } from "#og/ioc/FYPROGContainerTokens";
|
|
3
|
+
import { resolveCacheMiddleware } from "#og/fypr/routers/middlewares/cacheMiddleware";
|
|
4
|
+
import { CoreToken } from "@golemio/core/dist/helpers/ioc/CoreToken.js";
|
|
5
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter.js";
|
|
6
|
+
import { ContainerToken, OutputGatewayContainer } from "@golemio/core/dist/output-gateway/ioc/index.js";
|
|
7
|
+
import Express from "@golemio/core/dist/shared/express.js";
|
|
8
|
+
const { Router } = Express;
|
|
9
|
+
export class V1FyprMetadataRouter extends AbstractRouter {
|
|
12
10
|
constructor() {
|
|
13
11
|
super("v1", "fypr/metadata");
|
|
14
|
-
this.router =
|
|
15
|
-
this.cacheHeaderMiddleware =
|
|
16
|
-
this.controller =
|
|
12
|
+
this.router = Router();
|
|
13
|
+
this.cacheHeaderMiddleware = OutputGatewayContainer.resolve(ContainerToken.CacheHeaderMiddleware);
|
|
14
|
+
this.controller = fyprOGContainer.resolve(fyprOGContainerTokens.V1FyprMetadataController);
|
|
17
15
|
this.initRoutes();
|
|
18
16
|
}
|
|
19
17
|
initRoutes() {
|
|
20
|
-
const config =
|
|
21
|
-
const cacheMiddleware =
|
|
18
|
+
const config = OutputGatewayContainer.resolve(CoreToken.SimpleConfig);
|
|
19
|
+
const cacheMiddleware = resolveCacheMiddleware(this.cacheHeaderMiddleware, config, "module.fypr.output-gateway.elements.cache", { maxAge: 5 * 60, staleWhileRevalidate: 60 });
|
|
22
20
|
this.router.get("/", cacheMiddleware, this.controller.getMetadata(`/${this.version}/fypr/elements`));
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
|
-
|
|
26
|
-
exports.v1FyprMetadataRouter = new V1FyprMetadataRouter();
|
|
23
|
+
export const v1FyprMetadataRouter = new V1FyprMetadataRouter();
|
|
27
24
|
//# sourceMappingURL=V1FyprMetadataRouter.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"V1FyprMetadataRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"V1FyprMetadataRouter.js","sourceRoot":"","sources":["../../../../../src/output-gateway/fypr/routers/v1/V1FyprMetadataRouter.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AAEtF,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,sDAAsD,CAAC;AAEtF,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AAExG,OAAO,OAAO,MAAM,sCAAsC,CAAC;AAE3D,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC;AAE3B,MAAM,OAAO,oBAAqB,SAAQ,cAAc;IAKpD;QACI,KAAK,CAAC,IAAI,EAAE,eAAe,CAAC,CAAC;QAL1B,WAAM,GAAY,MAAM,EAAE,CAAC;QAM9B,IAAI,CAAC,qBAAqB,GAAG,sBAAsB,CAAC,OAAO,CAAwB,cAAc,CAAC,qBAAqB,CAAC,CAAC;QACzH,IAAI,CAAC,UAAU,GAAG,eAAe,CAAC,OAAO,CAA2B,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;QACpH,IAAI,CAAC,UAAU,EAAE,CAAC;IACtB,CAAC;IAES,UAAU;QAChB,MAAM,MAAM,GAAG,sBAAsB,CAAC,OAAO,CAAgB,SAAS,CAAC,YAAY,CAAC,CAAC;QACrF,MAAM,eAAe,GAAG,sBAAsB,CAC1C,IAAI,CAAC,qBAAqB,EAC1B,MAAM,EACN,2CAA2C,EAC3C,EAAE,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,oBAAoB,EAAE,EAAE,EAAE,CAC/C,CAAC;QACF,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,eAAe,EAAE,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC;IACzG,CAAC;CACJ;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAmB,IAAI,oBAAoB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CustomValidator } from "@golemio/core/dist/shared/express-validator";
|
|
1
|
+
import type { CustomValidator } from "@golemio/core/dist/shared/express-validator.js";
|
|
2
2
|
export declare class InformationPanelsOnlyValidator {
|
|
3
3
|
static field(paramName: string): CustomValidator;
|
|
4
4
|
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.InformationPanelsOnlyValidator = void 0;
|
|
4
1
|
// Filters jis/scopes/state/hasDeviceId only make sense for information-panels; reject them on other kinds.
|
|
5
|
-
class InformationPanelsOnlyValidator {
|
|
2
|
+
export class InformationPanelsOnlyValidator {
|
|
6
3
|
static field(paramName) {
|
|
7
4
|
return (_value, { req }) => {
|
|
8
5
|
if (req.params?.["kind"] !== "information-panels") {
|
|
@@ -12,5 +9,4 @@ class InformationPanelsOnlyValidator {
|
|
|
12
9
|
};
|
|
13
10
|
}
|
|
14
11
|
}
|
|
15
|
-
exports.InformationPanelsOnlyValidator = InformationPanelsOnlyValidator;
|
|
16
12
|
//# sourceMappingURL=InformationPanelsOnlyValidator.js.map
|
package/dist/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationPanelsOnlyValidator.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InformationPanelsOnlyValidator.js","sourceRoot":"","sources":["../../../../../../src/output-gateway/fypr/routers/v1/validators/InformationPanelsOnlyValidator.ts"],"names":[],"mappings":"AAEA,2GAA2G;AAC3G,MAAM,OAAO,8BAA8B;IAChC,MAAM,CAAC,KAAK,CAAC,SAAiB;QACjC,OAAO,CAAC,MAAe,EAAE,EAAE,GAAG,EAAQ,EAAW,EAAE;YAC/C,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,KAAK,oBAAoB,EAAE,CAAC;gBAChD,MAAM,IAAI,KAAK,CAAC,GAAG,SAAS,2CAA2C,CAAC,CAAC;YAC7E,CAAC;YACD,OAAO,IAAI,CAAC;QAChB,CAAC,CAAC;IACN,CAAC;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { IOGInformationPanel } from "
|
|
2
|
-
import { AnyFyprElement } from "
|
|
3
|
-
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation";
|
|
1
|
+
import type { IOGInformationPanel } from "#og/interfaces/IOGInformationPanel";
|
|
2
|
+
import type { AnyFyprElement } from "#sch/index";
|
|
3
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation.js";
|
|
4
4
|
export declare class InformationPanelOutputTransformation extends AbstractTransformation<AnyFyprElement, IOGInformationPanel> {
|
|
5
5
|
readonly name = "InformationPanelOutputTransformation";
|
|
6
6
|
transformArray: (data: AnyFyprElement[], embeds?: string[]) => IOGInformationPanel[];
|
|
@@ -1,16 +1,13 @@
|
|
|
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
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
13
|
-
let InformationPanelOutputTransformation = class InformationPanelOutputTransformation extends AbstractTransformation_1.AbstractTransformation {
|
|
7
|
+
import { SCOPE_DEVICE_STATUS, SCOPE_ROUTES } from "#sch/index";
|
|
8
|
+
import { AbstractTransformation } from "@golemio/core/dist/helpers/transformation/AbstractTransformation.js";
|
|
9
|
+
import { injectable } from "@golemio/core/dist/shared/tsyringe.js";
|
|
10
|
+
let InformationPanelOutputTransformation = class InformationPanelOutputTransformation extends AbstractTransformation {
|
|
14
11
|
constructor() {
|
|
15
12
|
super(...arguments);
|
|
16
13
|
this.name = "InformationPanelOutputTransformation";
|
|
@@ -23,7 +20,7 @@ let InformationPanelOutputTransformation = class InformationPanelOutputTransform
|
|
|
23
20
|
presets: this.convertDelimitedStringToArray(preset),
|
|
24
21
|
panel_size: this.parsePanelSize(panel_size),
|
|
25
22
|
};
|
|
26
|
-
if (embeds?.includes(
|
|
23
|
+
if (embeds?.includes(SCOPE_ROUTES) && presetsRoutesAgg?.length) {
|
|
27
24
|
result.routes = presetsRoutesAgg.map(({ route_name, note, is_testing, routes }) => ({
|
|
28
25
|
route_name,
|
|
29
26
|
note,
|
|
@@ -31,7 +28,7 @@ let InformationPanelOutputTransformation = class InformationPanelOutputTransform
|
|
|
31
28
|
routes,
|
|
32
29
|
}));
|
|
33
30
|
}
|
|
34
|
-
if (embeds?.includes(
|
|
31
|
+
if (embeds?.includes(SCOPE_DEVICE_STATUS)) {
|
|
35
32
|
result.device_status = deviceStatus
|
|
36
33
|
? {
|
|
37
34
|
last_contact: deviceStatus.last_contact ? new Date(deviceStatus.last_contact).toISOString() : null,
|
|
@@ -58,8 +55,8 @@ let InformationPanelOutputTransformation = class InformationPanelOutputTransform
|
|
|
58
55
|
return isNaN(parsed) ? null : parsed;
|
|
59
56
|
}
|
|
60
57
|
};
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
(0, tsyringe_1.injectable)()
|
|
58
|
+
InformationPanelOutputTransformation = __decorate([
|
|
59
|
+
injectable()
|
|
64
60
|
], InformationPanelOutputTransformation);
|
|
61
|
+
export { InformationPanelOutputTransformation };
|
|
65
62
|
//# sourceMappingURL=InformationPanelOutputTransformation.js.map
|
package/dist/output-gateway/fypr/transformations/InformationPanelOutputTransformation.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InformationPanelOutputTransformation.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/transformations/InformationPanelOutputTransformation.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"InformationPanelOutputTransformation.js","sourceRoot":"","sources":["../../../../src/output-gateway/fypr/transformations/InformationPanelOutputTransformation.ts"],"names":[],"mappings":";;;;;;AAEA,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAI/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,qEAAqE,CAAC;AAC7G,OAAO,EAAE,UAAU,EAAE,MAAM,uCAAuC,CAAC;AAG5D,IAAM,oCAAoC,GAA1C,MAAM,oCAAqC,SAAQ,sBAA2D;IAA9G;;QACa,SAAI,GAAG,sCAAsC,CAAC;QAE9C,mBAAc,GAAG,CAAC,IAAsB,EAAE,MAAiB,EAAyB,EAAE,CAClG,IAAI,CAAC,GAAG,CAAC,CAAC,IAAwD,EAAE,EAAE,CAClE,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC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C;QAClB,CAAC,CAAC;IAgBN,CAAC;IAdW,6BAA6B,CAAC,KAAoB;QACtD,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QACxB,MAAM,KAAK,GAAG,KAAK;aACd,KAAK,CAAC,QAAQ,CAAC;aACf,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;aACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACjC,OAAO,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3C,CAAC;IAEO,cAAc,CAAC,KAAoB;QACvC,IAAI,KAAK,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAC/B,MAAM,MAAM,GAAG,QAAQ,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QACrD,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC;IACzC,CAAC;CACJ,CAAA;AAxDY,oCAAoC;IADhD,UAAU,EAAE;GACA,oCAAoC,CAwDhD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter";
|
|
1
|
+
import { AbstractRouter } from "@golemio/core/dist/helpers/routing/AbstractRouter.js";
|
|
2
2
|
export declare const routers: AbstractRouter[];
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.routers = void 0;
|
|
4
|
-
const routers_1 = require("./fypr/routers");
|
|
5
|
-
exports.routers = [routers_1.v1FyprElementKindsRouter, routers_1.v1FyprMetadataRouter];
|
|
1
|
+
import { v1FyprElementKindsRouter, v1FyprMetadataRouter } from "#og/fypr/routers/index";
|
|
2
|
+
export const routers = [v1FyprElementKindsRouter, v1FyprMetadataRouter];
|
|
6
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/output-gateway/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAGxF,MAAM,CAAC,MAAM,OAAO,GAAqB,CAAC,wBAAwB,EAAE,oBAAoB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IInformationPanel } from "
|
|
2
|
-
import { IOGInformationPanelScopes } from "./IOGInformationPanelScopes";
|
|
1
|
+
import type { IInformationPanel } from "#sch/models/interfaces/IInformationPanel";
|
|
2
|
+
import type { IOGInformationPanelScopes } from "./IOGInformationPanelScopes.js";
|
|
3
3
|
export type IOGInformationPanel = Omit<IInformationPanel, "preset" | "panel_size"> & Partial<IOGInformationPanelScopes> & {
|
|
4
4
|
presets: string[] | null;
|
|
5
5
|
panel_size: number | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IDCIPStatusOverview } from "
|
|
2
|
-
import { IPresetRouteAgg } from "
|
|
1
|
+
import type { IDCIPStatusOverview } from "#sch/data-sources/interfaces/IDCIPStatusOverview";
|
|
2
|
+
import type { IPresetRouteAgg } from "#sch/models/interfaces/IPresetRouteAgg";
|
|
3
3
|
export type IOGPresetRoute = IPresetRouteAgg;
|
|
4
4
|
export interface IOGPresetRoutes {
|
|
5
5
|
route_name: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { DependencyContainer } from "@golemio/core/dist/shared/tsyringe";
|
|
1
|
+
import type { DependencyContainer } from "@golemio/core/dist/shared/tsyringe.js";
|
|
2
2
|
export declare const fyprOGContainer: DependencyContainer;
|
|
@@ -1,37 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const ioc_1 = require("@golemio/core/dist/output-gateway/ioc");
|
|
11
|
-
const tsyringe_1 = require("@golemio/core/dist/shared/tsyringe");
|
|
12
|
-
const FYPROGContainerTokens_1 = require("./FYPROGContainerTokens");
|
|
1
|
+
import { V1FyprElementKindsController } from "#og/fypr/controllers/v1/V1FyprElementKindsController";
|
|
2
|
+
import { InformationPanelOutputTransformation } from "#og/fypr/transformations/InformationPanelOutputTransformation";
|
|
3
|
+
import { V1FyprMetadataController } from "#og/fypr/controllers/v1/V1FyprMetadataController";
|
|
4
|
+
import { FyprElementRepository } from "#og/fypr/data-access/FyprElementRepository";
|
|
5
|
+
import { FyprElementsConfig, fyprElementKinds } from "#sch/index";
|
|
6
|
+
import { CoreToken } from "@golemio/core/dist/helpers/ioc/CoreToken.js";
|
|
7
|
+
import { OutputGatewayContainer } from "@golemio/core/dist/output-gateway/ioc/index.js";
|
|
8
|
+
import { instanceCachingFactory } from "@golemio/core/dist/shared/tsyringe.js";
|
|
9
|
+
import { fyprOGContainerTokens } from "./FYPROGContainerTokens.js";
|
|
13
10
|
//#region Initialization
|
|
14
|
-
|
|
11
|
+
export const fyprOGContainer = OutputGatewayContainer.createChildContainer();
|
|
15
12
|
//#endregion
|
|
16
13
|
//#region Repositories
|
|
17
|
-
|
|
18
|
-
useFactory:
|
|
19
|
-
const connector = c.resolve(
|
|
20
|
-
const logger = c.resolve(
|
|
14
|
+
fyprOGContainer.register(fyprOGContainerTokens.FyprElementRepositoriesMap, {
|
|
15
|
+
useFactory: instanceCachingFactory((c) => {
|
|
16
|
+
const connector = c.resolve(CoreToken.PostgresConnector);
|
|
17
|
+
const logger = c.resolve(CoreToken.Logger);
|
|
21
18
|
const map = new Map();
|
|
22
|
-
for (const kind of
|
|
23
|
-
const { modelName, tableName, attributeModel, embeds } =
|
|
24
|
-
map.set(kind, new
|
|
19
|
+
for (const kind of fyprElementKinds) {
|
|
20
|
+
const { modelName, tableName, attributeModel, embeds } = FyprElementsConfig[kind];
|
|
21
|
+
map.set(kind, new FyprElementRepository(connector, logger, modelName, tableName, attributeModel, embeds));
|
|
25
22
|
}
|
|
26
23
|
return map;
|
|
27
24
|
}),
|
|
28
25
|
});
|
|
29
26
|
//#endregion
|
|
30
27
|
//#region Transformations
|
|
31
|
-
|
|
28
|
+
fyprOGContainer.registerSingleton(fyprOGContainerTokens.InformationPanelOutputTransformation, InformationPanelOutputTransformation);
|
|
32
29
|
//#endregion
|
|
33
30
|
//#region Controllers
|
|
34
|
-
|
|
35
|
-
|
|
31
|
+
fyprOGContainer.registerSingleton(fyprOGContainerTokens.V1FyprElementKindsController, V1FyprElementKindsController);
|
|
32
|
+
fyprOGContainer.registerSingleton(fyprOGContainerTokens.V1FyprMetadataController, V1FyprMetadataController);
|
|
36
33
|
//#endregion
|
|
37
34
|
//# sourceMappingURL=Di.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Di.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/Di.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,EAAE,oCAAoC,EAAE,MAAM,+DAA+D,CAAC;AACrH,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAIlE,OAAO,EAAE,SAAS,EAAE,MAAM,6CAA6C,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gDAAgD,CAAC;AACxF,O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
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fyprOGContainerTokens = void 0;
|
|
4
|
-
exports.fyprOGContainerTokens = {
|
|
1
|
+
export const fyprOGContainerTokens = {
|
|
5
2
|
//#region Repositories
|
|
6
3
|
FyprElementRepositoriesMap: Symbol("FyprElementRepositoriesMap"),
|
|
7
4
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FYPROGContainerTokens.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/FYPROGContainerTokens.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FYPROGContainerTokens.js","sourceRoot":"","sources":["../../../src/output-gateway/ioc/FYPROGContainerTokens.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,sBAAsB;IACtB,0BAA0B,EAAE,MAAM,CAAC,4BAA4B,CAAC;IAChE,YAAY;IAEZ,yBAAyB;IACzB,oCAAoC,EAAE,MAAM,CAAC,sCAAsC,CAAC;IACpF,YAAY;IAEZ,qBAAqB;IACrB,4BAA4B,EAAE,MAAM,CAAC,8BAA8B,CAAC;IACpE,wBAAwB,EAAE,MAAM,CAAC,0BAA0B,CAAC;IAC5D,YAAY;CACf,CAAC"}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { fyprElementKinds } from "#sch/index";
|
|
2
|
+
export type { FyprElementKind } from "#sch/index";
|
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.fyprElementKinds = void 0;
|
|
4
|
-
var _sch_1 = require("../../../schema-definitions");
|
|
5
|
-
Object.defineProperty(exports, "fyprElementKinds", { enumerable: true, get: function () { return _sch_1.fyprElementKinds; } });
|
|
1
|
+
export { fyprElementKinds } from "#sch/index";
|
|
6
2
|
//# sourceMappingURL=element-kinds.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"element-kinds.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/constants/element-kinds.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"element-kinds.js","sourceRoot":"","sources":["../../../../src/output-gateway/shared/constants/element-kinds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./element-kinds";
|
|
1
|
+
export * from "./element-kinds.js";
|