From 959fc3a51f1d258994ff51fb30fb6bb44e1c4324 Mon Sep 17 00:00:00 2001 From: Aamir Shaikh Date: Mon, 2 Jan 2023 20:00:47 +0530 Subject: [PATCH 1/2] [#877] Apply UI linting to projects module --- ui/.eslintignore | 1 - ui/.prettierignore | 1 - ui/package-lock.json | 127 +- .../streampipes/platform-services/README.md | 3 +- .../platform-services/karma.conf.js | 19 +- .../platform-services/ng-package.json | 2 +- .../lib/apis/abstract-monitoring.service.ts | 38 +- .../lib/apis/adapter-monitoring.service.ts | 58 +- .../src/lib/apis/adapter.service.ts | 200 +- .../src/lib/apis/asset-management.service.ts | 59 +- .../src/lib/apis/commons.service.ts | 25 +- .../src/lib/apis/dashboard.service.ts | 258 +- .../apis/data-view-data-explorer.service.ts | 205 +- .../src/lib/apis/datalake-rest.service.ts | 359 +- .../src/lib/apis/files.service.ts | 82 +- .../src/lib/apis/functions.service.ts | 49 +- .../src/lib/apis/general-config.service.ts | 35 +- .../src/lib/apis/generic-storage.service.ts | 67 +- .../src/lib/apis/mail-config.service.ts | 47 +- .../src/lib/apis/measurement-units.service.ts | 25 +- .../src/lib/apis/permissions.service.ts | 42 +- .../apis/pipeline-canvas-metadata.service.ts | 74 +- .../apis/pipeline-element-endpoint.service.ts | 46 +- .../apis/pipeline-element-template.service.ts | 137 +- .../src/lib/apis/pipeline-element.service.ts | 129 +- .../lib/apis/pipeline-monitoring.service.ts | 54 +- .../src/lib/apis/pipeline-template.service.ts | 173 +- .../src/lib/apis/pipeline.service.ts | 4 +- .../src/lib/apis/semantic-types.service.ts | 31 +- .../src/lib/apis/shared-dashboard.service.ts | 35 +- .../src/lib/apis/user-group.service.ts | 66 +- .../src/lib/apis/user.service.ts | 129 +- .../contants/platform-services.constants.ts | 5 +- .../src/lib/model/assets/asset.model.ts | 55 +- .../model/datalake/DatalakeQueryParameters.ts | 37 +- .../src/lib/model/datalake/DateRange.ts | 2 - .../datalake/data-lake-query-config.model.ts | 72 +- .../src/lib/model/email-config.model.ts | 37 +- .../lib/model/gen/streampipes-model-client.ts | 105 +- .../src/lib/model/gen/streampipes-model.ts | 2934 ++++++++++++----- .../src/lib/model/general-config.model.ts | 16 +- .../src/lib/model/user/user.model.ts | 4 +- .../src/lib/platform-services.module.ts | 14 +- .../query/DatalakeQueryParameterBuilder.ts | 244 +- .../data-view-query-generator.service.ts | 171 +- .../platform-services/src/public-api.ts | 1 - .../streampipes/platform-services/src/test.ts | 23 +- .../platform-services/tsconfig.lib.json | 10 +- .../platform-services/tsconfig.spec.json | 13 +- ui/projects/streampipes/shared-ui/README.md | 3 +- .../streampipes/shared-ui/karma.conf.js | 18 +- .../streampipes/shared-ui/ng-package.json | 2 +- .../header-title.component.html | 4 +- .../header-title.component.scss | 9 +- .../header-title.component.ts | 19 +- .../basic-inner-panel.component.html | 21 +- .../basic-inner-panel.component.scss | 36 +- .../basic-inner-panel.component.ts | 28 +- .../basic-nav-tabs.component.html | 65 +- .../basic-nav-tabs.component.scss | 18 +- .../basic-nav-tabs.component.ts | 39 +- .../basic-view/basic-view.component.html | 38 +- .../basic-view/basic-view.component.scss | 34 +- .../basic-view/basic-view.component.ts | 33 +- .../exception-details-dialog.component.html | 39 +- .../exception-details-dialog.component.scss | 40 +- .../exception-details-dialog.component.ts | 36 +- .../sp-exception-message.component.html | 39 +- .../sp-exception-message.component.scss | 10 +- .../sp-exception-message.component.ts | 58 +- .../base-dialog/base-dialog.component.ts | 55 +- .../dialog/base-dialog/base-dialog.config.ts | 5 +- .../dialog/base-dialog/base-dialog.model.ts | 24 +- .../dialog/base-dialog/base-dialog.service.ts | 144 +- .../src/lib/dialog/base-dialog/dialog-ref.ts | 65 +- .../confirm-dialog.component.html | 19 +- .../confirm-dialog.component.scss | 2 +- .../confirm-dialog.component.ts | 27 +- .../panel-dialog/panel-dialog.component.html | 4 +- .../panel-dialog/panel-dialog.component.scss | 40 +- .../panel-dialog/panel-dialog.component.ts | 103 +- .../panel-dialog/panel-dialog.config.ts | 31 +- .../standard-dialog.component.html | 6 +- .../standard-dialog.component.scss | 52 +- .../standard-dialog.component.ts | 30 +- .../standard-dialog/standard-dialog.config.ts | 45 +- .../src/lib/models/sp-navigation.model.ts | 10 +- .../src/lib/services/breadcrumb.service.ts | 40 +- .../shared-ui/src/lib/shared-ui.module.ts | 69 +- .../streampipes/shared-ui/src/public-api.ts | 2 - .../streampipes/shared-ui/tsconfig.lib.json | 10 +- .../streampipes/shared-ui/tsconfig.spec.json | 13 +- 92 files changed, 4697 insertions(+), 3011 deletions(-) diff --git a/ui/.eslintignore b/ui/.eslintignore index 1c49c614cb..7e9d5500a1 100644 --- a/ui/.eslintignore +++ b/ui/.eslintignore @@ -18,7 +18,6 @@ dist # Remove these in the future to lint additional modules # Please also see .prettierignore -projects src/app/_enums src/app/_guards src/app/_models diff --git a/ui/.prettierignore b/ui/.prettierignore index 920a48bda7..dc346ad48b 100644 --- a/ui/.prettierignore +++ b/ui/.prettierignore @@ -18,7 +18,6 @@ dist # Remove these in the future to format additional modules # Please also see .eslintignore -projects src/app/_enums src/app/_guards src/app/_models diff --git a/ui/package-lock.json b/ui/package-lock.json index 9c4a886fd8..b3c808c5a4 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -6103,7 +6103,8 @@ "node_modules/@types/showdown": { "version": "1.9.4", "resolved": "https://registry.npmjs.org/@types/showdown/-/showdown-1.9.4.tgz", - "integrity": "sha512-50ehC3IAijfkvoNqmQ+VL73S7orOxmAK8ljQAFBv8o7G66lAZyxQj1L3BAv2dD86myLXI+sgKP1kcxAaxW356w==" + "integrity": "sha512-50ehC3IAijfkvoNqmQ+VL73S7orOxmAK8ljQAFBv8o7G66lAZyxQj1L3BAv2dD86myLXI+sgKP1kcxAaxW356w==", + "dev": true }, "node_modules/@types/sinonjs__fake-timers": { "version": "8.1.1", @@ -11018,6 +11019,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "optional": true, "dependencies": { "iconv-lite": "^0.6.2" @@ -11027,6 +11029,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -14471,7 +14474,8 @@ "node_modules/immutable": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", - "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==" + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", + "dev": true }, "node_modules/import-fresh": { "version": "3.3.0", @@ -26934,8 +26938,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "schema-utils": { "version": "3.1.1", @@ -27055,8 +27058,7 @@ "version": "15.1.0", "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-15.1.0.tgz", "integrity": "sha512-MoPeJv4a1wSoFj8fVA01hFb+QQke2t74CSVuc6o4EqkWI0tYMM1Wg19fPtTZnj4spkGA82j2mf/tazKGRe/nrw==", - "dev": true, - "requires": {} + "dev": true }, "@angular-eslint/bundled-angular-compiler": { "version": "14.4.0", @@ -29038,15 +29040,13 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/@csstools/postcss-unset-value/-/postcss-unset-value-1.0.2.tgz", "integrity": "sha512-c8J4roPBILnelAsdLr4XOAR/GsTm0GJi4XpcfvoWk3U6KiTCqiFYc63KhRMQQX35jYMp4Ao8Ij9+IZRgMfJp1g==", - "dev": true, - "requires": {} + "dev": true }, "@csstools/selector-specificity": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@csstools/selector-specificity/-/selector-specificity-2.0.2.tgz", "integrity": "sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg==", - "dev": true, - "requires": {} + "dev": true }, "@ctrl/ngx-codemirror": { "version": "5.1.1", @@ -29260,8 +29260,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "brace-expansion": { "version": "1.1.11", @@ -30163,8 +30162,7 @@ "@mapbox/mapbox-gl-supported": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@mapbox/mapbox-gl-supported/-/mapbox-gl-supported-1.5.0.tgz", - "integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==", - "requires": {} + "integrity": "sha512-/PT1P6DNf7vjEEiPkVIRJkvibbqWtqnyGaBz3nfRdcxclNSnSdaLU5tfAgcD7I8Yt5i+L19s406YLl1koLnLbg==" }, "@mapbox/point-geometry": { "version": "0.1.0", @@ -30198,8 +30196,7 @@ "version": "14.2.10", "resolved": "https://registry.npmjs.org/@ngtools/webpack/-/webpack-14.2.10.tgz", "integrity": "sha512-sLHapZLVub6mEz5b19tf1VfIV1w3tYfg7FNPLeni79aldxu1FbP1v2WmiFAnMzrswqyK0bhTtxrl+Z/CLKqyoQ==", - "dev": true, - "requires": {} + "dev": true }, "@ngx-loading-bar/core": { "version": "6.0.2", @@ -30989,7 +30986,8 @@ "@types/showdown": { "version": "1.9.4", "resolved": "https://registry.npmjs.org/@types/showdown/-/showdown-1.9.4.tgz", - "integrity": "sha512-50ehC3IAijfkvoNqmQ+VL73S7orOxmAK8ljQAFBv8o7G66lAZyxQj1L3BAv2dD86myLXI+sgKP1kcxAaxW356w==" + "integrity": "sha512-50ehC3IAijfkvoNqmQ+VL73S7orOxmAK8ljQAFBv8o7G66lAZyxQj1L3BAv2dD86myLXI+sgKP1kcxAaxW356w==", + "dev": true }, "@types/sinonjs__fake-timers": { "version": "8.1.1", @@ -31602,22 +31600,19 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-2.0.1.tgz", "integrity": "sha512-njsdJXJSiS2iNbQVS0eT8A/KPnmyH4pv1APj2K0d1wrZcBLw+yppxOy4CGqa0OxDJkzfL/XELDhD8rocnIwB5A==", - "dev": true, - "requires": {} + "dev": true }, "@webpack-cli/info": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-2.0.1.tgz", "integrity": "sha512-fE1UEWTwsAxRhrJNikE7v4EotYflkEhBL7EbajfkPlf6E37/2QshOy/D48Mw8G5XMFlQtS6YV42vtbG9zBpIQA==", - "dev": true, - "requires": {} + "dev": true }, "@webpack-cli/serve": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-2.0.1.tgz", "integrity": "sha512-0G7tNyS+yW8TdgHwZKlDWYXFA6OJQnoLCQvYKkQP0Q2X205PSQ6RNUj0M+1OB/9gRQaUZ/ccYfaxd0nhaWKfjw==", - "dev": true, - "requires": {} + "dev": true }, "@xtuc/ieee754": { "version": "1.2.0", @@ -31673,15 +31668,13 @@ "version": "1.8.0", "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.8.0.tgz", "integrity": "sha512-m7VZ3jwz4eK6A4Vtt8Ew1/mNbP24u0FhdyfA7fSvnJR6LMdfOYnmuIrrJAgrYfYJ10F/otaHTtrtrtmHdMNzEw==", - "dev": true, - "requires": {} + "dev": true }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "8.2.0", @@ -31766,8 +31759,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true, - "requires": {} + "dev": true }, "ajv-formats": { "version": "2.1.1", @@ -33891,8 +33883,7 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/css-prefers-color-scheme/-/css-prefers-color-scheme-6.0.3.tgz", "integrity": "sha512-4BqMbZksRkJQx2zAjrokiGMd07RqOa2IxIrrN10lyBe9xhn9DEvjUK79J6jkeiv9D9hQFXKb6g1jwU62jziJZA==", - "dev": true, - "requires": {} + "dev": true }, "css-select": { "version": "4.3.0", @@ -34109,8 +34100,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/cypress-file-upload/-/cypress-file-upload-5.0.8.tgz", "integrity": "sha512-+8VzNabRk3zG6x8f8BWArF/xA/W0VK4IZNx3MV0jFWrJS/qKn8eHfa5nU73P9fOQAgwHFJx7zjg4lwOnljMO8g==", - "dev": true, - "requires": {} + "dev": true }, "d": { "version": "1.0.1", @@ -34831,8 +34821,7 @@ "echarts-wordcloud": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/echarts-wordcloud/-/echarts-wordcloud-2.1.0.tgz", - "integrity": "sha512-Kt1JmbcROgb+3IMI48KZECK2AP5lG6bSsOEs+AsuwaWJxQom31RTNd6NFYI01E/YaI1PFZeueaupjlmzSQasjQ==", - "requires": {} + "integrity": "sha512-Kt1JmbcROgb+3IMI48KZECK2AP5lG6bSsOEs+AsuwaWJxQom31RTNd6NFYI01E/YaI1PFZeueaupjlmzSQasjQ==" }, "ee-first": { "version": "1.1.1", @@ -34904,6 +34893,7 @@ "version": "0.1.13", "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", + "dev": true, "optional": true, "requires": { "iconv-lite": "^0.6.2" @@ -34913,6 +34903,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, "optional": true, "requires": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -35556,8 +35547,7 @@ "version": "8.5.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.5.0.tgz", "integrity": "sha512-obmWKLUNCnhtQRKc+tmnYuQl0pFU1ibYJQ5BGhTVB08bHe9wC8qUeG7c08dj9XX+AuPj1YSGSQIHl1pnDHZR0Q==", - "dev": true, - "requires": {} + "dev": true }, "eslint-scope": { "version": "7.1.1", @@ -37528,8 +37518,7 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true, - "requires": {} + "dev": true }, "ieee754": { "version": "1.2.1", @@ -37577,7 +37566,8 @@ "immutable": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/immutable/-/immutable-4.1.0.tgz", - "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==" + "integrity": "sha512-oNkuqVTA8jqG1Q6c+UglTOD1xhC1BtjKI7XkCXRkZHrN5m18/XsnUp8Q89GkQO/z+0WjonSvl0FLhDYftp46nQ==", + "dev": true }, "import-fresh": { "version": "3.3.0", @@ -38761,8 +38751,7 @@ "version": "2.0.0", "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-2.0.0.tgz", "integrity": "sha512-SB8HNNiazAHXM1vGEzf8/tSyEhkfxuDdhYdPBX2Mwgzt0OuF2gicApQ+uvXLID/gXyJQgvrM9+1/2SxZFUUDIA==", - "dev": true, - "requires": {} + "dev": true }, "karma-source-map-support": { "version": "1.4.0", @@ -41816,15 +41805,13 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz", "integrity": "sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA==", - "dev": true, - "requires": {} + "dev": true }, "postcss-gap-properties": { "version": "3.0.5", "resolved": "https://registry.npmjs.org/postcss-gap-properties/-/postcss-gap-properties-3.0.5.tgz", "integrity": "sha512-IuE6gKSdoUNcvkGIqdtjtcMtZIFyXZhmFd5RUlg97iVEvp1BZKV5ngsAjCjrVy+14uhGBQl9tzmi1Qwq4kqVOg==", - "dev": true, - "requires": {} + "dev": true }, "postcss-image-set-function": { "version": "4.0.7", @@ -41850,8 +41837,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/postcss-initial/-/postcss-initial-4.0.1.tgz", "integrity": "sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ==", - "dev": true, - "requires": {} + "dev": true }, "postcss-lab-function": { "version": "4.2.1", @@ -41878,22 +41864,19 @@ "version": "5.0.4", "resolved": "https://registry.npmjs.org/postcss-logical/-/postcss-logical-5.0.4.tgz", "integrity": "sha512-RHXxplCeLh9VjinvMrZONq7im4wjWGlRJAqmAVLXyZaXwfDWP73/oq4NdIp+OZwhQUMj0zjqDfM5Fj7qby+B4g==", - "dev": true, - "requires": {} + "dev": true }, "postcss-media-minmax": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/postcss-media-minmax/-/postcss-media-minmax-5.0.0.tgz", "integrity": "sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ==", - "dev": true, - "requires": {} + "dev": true }, "postcss-modules-extract-imports": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true, - "requires": {} + "dev": true }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -41938,8 +41921,7 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/postcss-opacity-percentage/-/postcss-opacity-percentage-1.1.3.tgz", "integrity": "sha512-An6Ba4pHBiDtyVpSLymUUERMo2cU7s+Obz6BTrS+gxkbnSBNKSuD0AVUc+CpBMrpVPKKfoVz0WQCX+Tnst0i4A==", - "dev": true, - "requires": {} + "dev": true }, "postcss-overflow-shorthand": { "version": "3.0.4", @@ -41954,8 +41936,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/postcss-page-break/-/postcss-page-break-3.0.4.tgz", "integrity": "sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ==", - "dev": true, - "requires": {} + "dev": true }, "postcss-place": { "version": "7.0.5", @@ -42036,8 +42017,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz", "integrity": "sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw==", - "dev": true, - "requires": {} + "dev": true }, "postcss-selector-not": { "version": "6.0.1", @@ -42525,8 +42505,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -42606,14 +42585,12 @@ "react-immutable-pure-component": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/react-immutable-pure-component/-/react-immutable-pure-component-2.2.2.tgz", - "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==", - "requires": {} + "integrity": "sha512-vkgoMJUDqHZfXXnjVlG3keCxSO/U6WeDQ5/Sl0GK2cH8TOxEzQ5jXqDXHEL/jqk6fsNxV05oH5kD7VNMUE2k+A==" }, "react-inspector": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/react-inspector/-/react-inspector-6.0.1.tgz", - "integrity": "sha512-cxKSeFTf7jpSSVddm66sKdolG90qURAX3g1roTeaN6x0YEbtWc8JpmFN9+yIqLNH2uEkYerWLtJZIXRIFuBKrg==", - "requires": {} + "integrity": "sha512-cxKSeFTf7jpSSVddm66sKdolG90qURAX3g1roTeaN6x0YEbtWc8JpmFN9+yIqLNH2uEkYerWLtJZIXRIFuBKrg==" }, "react-is": { "version": "16.13.1", @@ -42738,8 +42715,7 @@ "redux-immutable": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/redux-immutable/-/redux-immutable-4.0.0.tgz", - "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==", - "requires": {} + "integrity": "sha512-SchSn/DWfGb3oAejd+1hhHx01xUoxY+V7TeK0BKqpkLKiQPVFf7DYzEaKmrEVxsWxielKfSK9/Xq66YyxgR1cg==" }, "reflect-metadata": { "version": "0.1.13", @@ -43364,8 +43340,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -44924,8 +44899,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "json-schema-traverse": { "version": "0.4.1", @@ -46396,8 +46370,7 @@ "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "requires": {} + "dev": true }, "enhanced-resolve": { "version": "5.12.0", @@ -46553,8 +46526,7 @@ "version": "8.11.0", "resolved": "https://registry.npmjs.org/ws/-/ws-8.11.0.tgz", "integrity": "sha512-HPG3wQd9sNQoT9xHyNCXoDUa+Xw/VevmY9FoHyQ+g+rrMn4j6FB4np7Z0OhdTgjx6MgQLK7jwSy1YecU1+4Asg==", - "dev": true, - "requires": {} + "dev": true } } }, @@ -46751,8 +46723,7 @@ "version": "8.2.3", "resolved": "https://registry.npmjs.org/ws/-/ws-8.2.3.tgz", "integrity": "sha512-wBuoj1BDpC6ZQ1B7DWQBYVLphPWkm8i9Y0/3YdHjHKHiohOJ1ws+3OccDWtH+PoC9DZD5WOTrJvNbWvjS6JWaA==", - "dev": true, - "requires": {} + "dev": true }, "xml": { "version": "1.0.1", diff --git a/ui/projects/streampipes/platform-services/README.md b/ui/projects/streampipes/platform-services/README.md index 34ecc241ca..92deb7de49 100644 --- a/ui/projects/streampipes/platform-services/README.md +++ b/ui/projects/streampipes/platform-services/README.md @@ -23,7 +23,8 @@ This library was generated with [Angular CLI](https://github.com/angular/angular ## Code scaffolding Run `ng generate component component-name --project platform-services` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project platform-services`. -> Note: Don't forget to add `--project platform-services` or else it will be added to the default project in your `angular.json` file. + +> Note: Don't forget to add `--project platform-services` or else it will be added to the default project in your `angular.json` file. ## Build diff --git a/ui/projects/streampipes/platform-services/karma.conf.js b/ui/projects/streampipes/platform-services/karma.conf.js index e5eebc5dfb..6eb486ae5b 100644 --- a/ui/projects/streampipes/platform-services/karma.conf.js +++ b/ui/projects/streampipes/platform-services/karma.conf.js @@ -16,7 +16,6 @@ * */ - // Karma configuration file, see link for more information // https://karma-runner.github.io/1.0/config/configuration-file.html @@ -28,7 +27,7 @@ module.exports = function (config) { require('karma-jasmine'), require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), - require('@angular-devkit/build-angular/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma'), ], client: { jasmine: { @@ -37,18 +36,18 @@ module.exports = function (config) { // for example, you can disable the random execution with `random: false` // or set a specific seed with `seed: 4321` }, - clearContext: false // leave Jasmine Spec Runner output visible in browser + clearContext: false, // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces + suppressAll: true, // removes the duplicated traces }, coverageReporter: { - dir: require('path').join(__dirname, '../../../coverage/streampipes/platform-services'), + dir: require('path').join( + __dirname, + '../../../coverage/streampipes/platform-services', + ), subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] + reporters: [{ type: 'html' }, { type: 'text-summary' }], }, reporters: ['progress', 'kjhtml'], port: 9876, @@ -57,6 +56,6 @@ module.exports = function (config) { autoWatch: true, browsers: ['Chrome'], singleRun: false, - restartOnFileChange: true + restartOnFileChange: true, }); }; diff --git a/ui/projects/streampipes/platform-services/ng-package.json b/ui/projects/streampipes/platform-services/ng-package.json index d05fbd6be4..9abc289b68 100644 --- a/ui/projects/streampipes/platform-services/ng-package.json +++ b/ui/projects/streampipes/platform-services/ng-package.json @@ -4,4 +4,4 @@ "lib": { "entryFile": "src/public-api.ts" } -} \ No newline at end of file +} diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts index 81dca975a3..bfd79f77c1 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/abstract-monitoring.service.ts @@ -21,28 +21,30 @@ import { HttpClient } from '@angular/common/http'; import { PlatformServicesCommons } from './commons.service'; export abstract class AbstractMonitoringService { + constructor( + protected http: HttpClient, + protected platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(protected http: HttpClient, - protected platformServicesCommons: PlatformServicesCommons) { - } + triggerMonitoringUpdate(): Observable { + return this.http.get(this.monitoringBasePath); + } - triggerMonitoringUpdate(): Observable { - return this.http.get(this.monitoringBasePath); - } + protected logUrl(elementId: string): string { + return `${this.monitoringUrl(elementId)}/logs`; + } - protected logUrl(elementId: string): string { - return `${this.monitoringUrl(elementId)}/logs`; - } + protected metricsUrl(elementId: string): string { + return `${this.monitoringUrl(elementId)}/metrics`; + } - protected metricsUrl(elementId: string): string { - return`${this.monitoringUrl(elementId)}/metrics`; - } + protected monitoringUrl(elementId): string { + return `${this.monitoringBasePath}/${ + this.monitoringPathAppendix + }/${encodeURIComponent(elementId)}`; + } - protected monitoringUrl(elementId): string { - return `${this.monitoringBasePath}/${this.monitoringPathAppendix}/${encodeURIComponent(elementId)}`; - } + protected abstract get monitoringBasePath(); - protected abstract get monitoringBasePath(); - - protected abstract get monitoringPathAppendix(); + protected abstract get monitoringPathAppendix(); } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts index 3a8314a0cf..a9b47a68cc 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/adapter-monitoring.service.ts @@ -19,37 +19,43 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; -import { PipelineMonitoringInfo, SpLogEntry, SpMetricsEntry } from '../model/gen/streampipes-model'; +import { + PipelineMonitoringInfo, + SpLogEntry, + SpMetricsEntry, +} from '../model/gen/streampipes-model'; import { PlatformServicesCommons } from './commons.service'; import { map } from 'rxjs/operators'; import { AbstractMonitoringService } from './abstract-monitoring.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AdapterMonitoringService extends AbstractMonitoringService { - - constructor(http: HttpClient, - platformServicesCommons: PlatformServicesCommons) { - super(http, platformServicesCommons); - } - - getLogInfoForAdapter(elementId: string): Observable { - return this.http.get(this.logUrl(elementId)) - .pipe(map(response => response as SpLogEntry[])); - } - - getMetricsInfoForAdapter(elementId: string): Observable { - return this.http.get(this.metricsUrl(elementId)) - .pipe(map(response => response as SpMetricsEntry)); - } - - protected get monitoringBasePath(): string { - return `${this.platformServicesCommons.apiBasePath}/adapter-monitoring`; - } - - protected get monitoringPathAppendix(): string { - return 'adapter'; - } - + constructor( + http: HttpClient, + platformServicesCommons: PlatformServicesCommons, + ) { + super(http, platformServicesCommons); + } + + getLogInfoForAdapter(elementId: string): Observable { + return this.http + .get(this.logUrl(elementId)) + .pipe(map(response => response as SpLogEntry[])); + } + + getMetricsInfoForAdapter(elementId: string): Observable { + return this.http + .get(this.metricsUrl(elementId)) + .pipe(map(response => response as SpMetricsEntry)); + } + + protected get monitoringBasePath(): string { + return `${this.platformServicesCommons.apiBasePath}/adapter-monitoring`; + } + + protected get monitoringPathAppendix(): string { + return 'adapter'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/adapter.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/adapter.service.ts index e89b8ef26e..217e7c06c3 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/adapter.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/adapter.service.ts @@ -22,108 +22,104 @@ import { map } from 'rxjs/operators'; import { Observable } from 'rxjs'; import { PlatformServicesCommons } from './commons.service'; -import { AdapterDescription, AdapterDescriptionUnion, Message } from '../model/gen/streampipes-model'; +import { + AdapterDescription, + AdapterDescriptionUnion, + Message, +} from '../model/gen/streampipes-model'; -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) export class AdapterService { - - constructor( - private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } - - get connectPath() { - return `${this.platformServicesCommons.apiBasePath}/connect`; - } - - getAdapterDescriptions(): Observable { - return this.requestAdapterDescriptions('/master/description/adapters'); - } - - getAdapters(): Observable { - return this.requestAdapterDescriptions('/master/adapters'); - } - - getAdapter(id: string): Observable { - return this.http - .get( - this.connectPath + - `/master/adapters/${id}` - ) - .pipe(map(response => AdapterDescription.fromDataUnion(response as any))); - } - - deleteAdapterDescription(adapterId: string): Observable { - return this.http.delete(`${this.connectPath}/master/description/${adapterId}`); - } - - requestAdapterDescriptions(path: string): Observable { - return this.http - .get( - this.connectPath + - path - ) - .pipe(map(response => { - return (response as any[]).map(p => AdapterDescription.fromDataUnion(p)); - })); - } - - stopAdapter(adapter: AdapterDescriptionUnion): Observable { - return this.http.post(this.adapterMasterUrl - + adapter.elementId - + '/stop', {}) - .pipe(map(response => Message.fromData(response as any))); - } - - startAdapter(adapter: AdapterDescriptionUnion): Observable { - return this.http.post(this.adapterMasterUrl - + adapter.elementId - + '/start', {}) - .pipe(map(response => Message.fromData(response as any))); - } - - addAdapter(adapter: AdapterDescription): Observable { - return this.http - .post(`${this.connectPath}/master/adapters`, - adapter - ) - .pipe(map(response => Message.fromData(response as any))); - } - - updateAdapter(adapter: AdapterDescription): Observable { - return this.http - .put(`${this.connectPath}/master/adapters`, - adapter - ) - .pipe(map(response => Message.fromData(response as any))); - } - - get adapterMasterUrl() { - return `${this.connectPath}/master/adapters/`; - } - - deleteAdapter(adapter: AdapterDescription): Observable { - return this.deleteRequest(adapter, '/master/adapters/'); - } - - getAdapterCategories(): Observable { - return this.http.get( - `${this.baseUrl}/api/v2/categories/adapter`); - } - - private deleteRequest(adapter: AdapterDescription, url: string) { - return this.http.delete( - this.connectPath + - url + - adapter.elementId - ); - } - - getAssetUrl(appId) { - return `${this.connectPath}/master/description/${appId}/assets`; - } - - private get baseUrl() { - return '/streampipes-backend'; - } + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} + + get connectPath() { + return `${this.platformServicesCommons.apiBasePath}/connect`; + } + + getAdapterDescriptions(): Observable { + return this.requestAdapterDescriptions('/master/description/adapters'); + } + + getAdapters(): Observable { + return this.requestAdapterDescriptions('/master/adapters'); + } + + getAdapter(id: string): Observable { + return this.http + .get(this.connectPath + `/master/adapters/${id}`) + .pipe( + map(response => + AdapterDescription.fromDataUnion(response as any), + ), + ); + } + + deleteAdapterDescription(adapterId: string): Observable { + return this.http.delete( + `${this.connectPath}/master/description/${adapterId}`, + ); + } + + requestAdapterDescriptions( + path: string, + ): Observable { + return this.http.get(this.connectPath + path).pipe( + map(response => { + return (response as any[]).map(p => + AdapterDescription.fromDataUnion(p), + ); + }), + ); + } + + stopAdapter(adapter: AdapterDescriptionUnion): Observable { + return this.http + .post(this.adapterMasterUrl + adapter.elementId + '/stop', {}) + .pipe(map(response => Message.fromData(response as any))); + } + + startAdapter(adapter: AdapterDescriptionUnion): Observable { + return this.http + .post(this.adapterMasterUrl + adapter.elementId + '/start', {}) + .pipe(map(response => Message.fromData(response as any))); + } + + addAdapter(adapter: AdapterDescription): Observable { + return this.http + .post(`${this.connectPath}/master/adapters`, adapter) + .pipe(map(response => Message.fromData(response as any))); + } + + updateAdapter(adapter: AdapterDescription): Observable { + return this.http + .put(`${this.connectPath}/master/adapters`, adapter) + .pipe(map(response => Message.fromData(response as any))); + } + + get adapterMasterUrl() { + return `${this.connectPath}/master/adapters/`; + } + + deleteAdapter(adapter: AdapterDescription): Observable { + return this.deleteRequest(adapter, '/master/adapters/'); + } + + getAdapterCategories(): Observable { + return this.http.get(`${this.baseUrl}/api/v2/categories/adapter`); + } + + private deleteRequest(adapter: AdapterDescription, url: string) { + return this.http.delete(this.connectPath + url + adapter.elementId); + } + + getAssetUrl(appId) { + return `${this.connectPath}/master/description/${appId}/assets`; + } + + private get baseUrl() { + return '/streampipes-backend'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/asset-management.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/asset-management.service.ts index 5cf4ce2a28..72d9d31070 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/asset-management.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/asset-management.service.ts @@ -22,36 +22,35 @@ import { PlatformServicesCommons } from './commons.service'; import { Observable } from 'rxjs'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class AssetManagementService { - - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } - - createAsset(asset: any): Observable { - return this.http.post(this.assetBasePath, asset); - } - - getAllAssets(): Observable { - return this.http.get(this.assetBasePath); - } - - getAsset(assetId: string): Observable { - return this.http.get(`${this.assetBasePath}/${assetId}`); - } - - updateAsset(asset: any): Observable { - return this.http.put(`${this.assetBasePath}/${asset._id}`, asset); - } - - deleteAsset(assetId: string, rev: string): Observable { - return this.http.delete(`${this.assetBasePath}/${assetId}/${rev}`); - } - - private get assetBasePath() { - return this.platformServicesCommons.apiBasePath + '/assets'; - } - + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} + + createAsset(asset: any): Observable { + return this.http.post(this.assetBasePath, asset); + } + + getAllAssets(): Observable { + return this.http.get(this.assetBasePath); + } + + getAsset(assetId: string): Observable { + return this.http.get(`${this.assetBasePath}/${assetId}`); + } + + updateAsset(asset: any): Observable { + return this.http.put(`${this.assetBasePath}/${asset._id}`, asset); + } + + deleteAsset(assetId: string, rev: string): Observable { + return this.http.delete(`${this.assetBasePath}/${assetId}/${rev}`); + } + + private get assetBasePath() { + return this.platformServicesCommons.apiBasePath + '/assets'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/commons.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/commons.service.ts index 23f1ed36ef..692cf2f16e 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/commons.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/commons.service.ts @@ -19,23 +19,20 @@ import { Injectable } from '@angular/core'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PlatformServicesCommons { + constructor() {} - constructor() { } + get basePath(): string { + return '/streampipes-backend'; + } - get basePath(): string { - return '/streampipes-backend'; - } - - get apiBasePath() { - return this.basePath + '/api/v2'; - } - - get unauthenticatedBasePath() { - return this.basePath + '/api/v2'; - } + get apiBasePath() { + return this.basePath + '/api/v2'; + } + get unauthenticatedBasePath() { + return this.basePath + '/api/v2'; + } } - diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/dashboard.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/dashboard.service.ts index e06d5486b3..f46ed1d04b 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/dashboard.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/dashboard.service.ts @@ -22,115 +22,161 @@ import { map } from 'rxjs/operators'; import { Observable } from 'rxjs'; import { MeasurementUnit } from '../model/measurement-unit/MeasurementUnit'; import { PlatformServicesCommons } from './commons.service'; -import { DashboardWidgetModel, Pipeline, VisualizablePipeline } from '../model/gen/streampipes-model'; +import { + DashboardWidgetModel, + Pipeline, + VisualizablePipeline, +} from '../model/gen/streampipes-model'; import { Dashboard } from '../model/dashboard/dashboard.model'; - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DashboardService { - - - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } - - getPipelineById(id: string): Observable { - return this.http.get(this.pipelinesUrl + '/' + id).pipe(map(data => { - return Pipeline.fromData(data as any); - })); - } - - getVisualizablePipelines(): Observable { - return this.http - .get(this.visualizablePipelineUrl) - .pipe(map(data => { - return (data as []).map(p => VisualizablePipeline.fromData(p as VisualizablePipeline)); - })); - } - - getVisualizablePipelineByPipelineIdAndVisualizationName(pipelineId: string, visualizationName: string): Observable { - return this.http - .get(this.visualizablePipelineUrl + '/' + pipelineId + '/' + visualizationName) - .pipe(map(data => { - return VisualizablePipeline.fromData(data as VisualizablePipeline); - })); - } - - getDashboards(): Observable { - return this.http.get(this.dashboardUrl).pipe(map(data => { - return data as Dashboard[]; - })); - } - - getDashboard(dashboardId: string): Observable { - return this.http.get(this.dashboardUrl + '/' + dashboardId).pipe(map(data => { - return data as Dashboard; - })); - } - - getMeasurementUnitInfo(measurementUnitResource: string): Observable { - return this.http.get(this.measurementUnitsUrl + '/' + encodeURIComponent(measurementUnitResource)).pipe(map(data => { - return data as MeasurementUnit; - })); - } - - updateDashboard(dashboard: Dashboard): Observable { - return this.http.put(this.dashboardUrl + '/' + dashboard._id, dashboard).pipe(map(data => { - return data as Dashboard; - })); - } - - deleteDashboard(dashboard: Dashboard): Observable { - return this.http.delete(this.dashboardUrl + '/' + dashboard._id); - } - - saveDashboard(dashboard: Dashboard): Observable { - return this.http.post(this.dashboardUrl, dashboard); - } - - private get baseUrl() { - return this.platformServicesCommons.apiBasePath; - } - - private get measurementUnitsUrl() { - return this.baseUrl + '/measurement-units'; - } - - private get dashboardUrl() { - return this.baseUrl + '/dashboard/dashboards'; - } - - private get pipelinesUrl() { - return this.baseUrl + '/pipelines'; - } - - private get dashboardWidgetUrl() { - return this.baseUrl + '/dashboard/widgets'; - } - - private get visualizablePipelineUrl() { - return this.baseUrl + '/dashboard/pipelines'; - } - - getWidget(widgetId: string): Observable { - return this.http.get(this.dashboardWidgetUrl + '/' + widgetId).pipe(map(d => { - return DashboardWidgetModel.fromData(d as DashboardWidgetModel); - })); - } - - saveWidget(widget: DashboardWidgetModel): Observable { - return this.http.post(this.dashboardWidgetUrl, widget).pipe(map(response => { - return DashboardWidgetModel.fromData(response as DashboardWidgetModel); - })); - } - - deleteWidget(widgetId: string): Observable { - return this.http.delete(this.dashboardWidgetUrl + '/' + widgetId); - } - - updateWidget(widget: DashboardWidgetModel): Observable { - return this.http.put(this.dashboardWidgetUrl + '/' + widget._id, widget); - } + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} + + getPipelineById(id: string): Observable { + return this.http.get(this.pipelinesUrl + '/' + id).pipe( + map(data => { + return Pipeline.fromData(data as any); + }), + ); + } + + getVisualizablePipelines(): Observable { + return this.http.get(this.visualizablePipelineUrl).pipe( + map(data => { + return (data as []).map(p => + VisualizablePipeline.fromData(p as VisualizablePipeline), + ); + }), + ); + } + + getVisualizablePipelineByPipelineIdAndVisualizationName( + pipelineId: string, + visualizationName: string, + ): Observable { + return this.http + .get( + this.visualizablePipelineUrl + + '/' + + pipelineId + + '/' + + visualizationName, + ) + .pipe( + map(data => { + return VisualizablePipeline.fromData( + data as VisualizablePipeline, + ); + }), + ); + } + + getDashboards(): Observable { + return this.http.get(this.dashboardUrl).pipe( + map(data => { + return data as Dashboard[]; + }), + ); + } + + getDashboard(dashboardId: string): Observable { + return this.http.get(this.dashboardUrl + '/' + dashboardId).pipe( + map(data => { + return data as Dashboard; + }), + ); + } + + getMeasurementUnitInfo( + measurementUnitResource: string, + ): Observable { + return this.http + .get( + this.measurementUnitsUrl + + '/' + + encodeURIComponent(measurementUnitResource), + ) + .pipe( + map(data => { + return data as MeasurementUnit; + }), + ); + } + + updateDashboard(dashboard: Dashboard): Observable { + return this.http + .put(this.dashboardUrl + '/' + dashboard._id, dashboard) + .pipe( + map(data => { + return data as Dashboard; + }), + ); + } + + deleteDashboard(dashboard: Dashboard): Observable { + return this.http.delete(this.dashboardUrl + '/' + dashboard._id); + } + + saveDashboard(dashboard: Dashboard): Observable { + return this.http.post(this.dashboardUrl, dashboard); + } + + private get baseUrl() { + return this.platformServicesCommons.apiBasePath; + } + + private get measurementUnitsUrl() { + return this.baseUrl + '/measurement-units'; + } + + private get dashboardUrl() { + return this.baseUrl + '/dashboard/dashboards'; + } + + private get pipelinesUrl() { + return this.baseUrl + '/pipelines'; + } + + private get dashboardWidgetUrl() { + return this.baseUrl + '/dashboard/widgets'; + } + + private get visualizablePipelineUrl() { + return this.baseUrl + '/dashboard/pipelines'; + } + + getWidget(widgetId: string): Observable { + return this.http.get(this.dashboardWidgetUrl + '/' + widgetId).pipe( + map(d => { + return DashboardWidgetModel.fromData(d as DashboardWidgetModel); + }), + ); + } + + saveWidget(widget: DashboardWidgetModel): Observable { + return this.http.post(this.dashboardWidgetUrl, widget).pipe( + map(response => { + return DashboardWidgetModel.fromData( + response as DashboardWidgetModel, + ); + }), + ); + } + + deleteWidget(widgetId: string): Observable { + return this.http.delete(this.dashboardWidgetUrl + '/' + widgetId); + } + + updateWidget(widget: DashboardWidgetModel): Observable { + return this.http.put( + this.dashboardWidgetUrl + '/' + widget._id, + widget, + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/data-view-data-explorer.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/data-view-data-explorer.service.ts index 3c721f0743..11a22dae9b 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/data-view-data-explorer.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/data-view-data-explorer.service.ts @@ -22,93 +22,130 @@ import { map } from 'rxjs/operators'; import { Dashboard } from '../model/dashboard/dashboard.model'; import { Injectable } from '@angular/core'; import { DatalakeRestService } from './datalake-rest.service'; -import { DataExplorerWidgetModel, DataLakeMeasure } from '../model/gen/streampipes-model'; +import { + DataExplorerWidgetModel, + DataLakeMeasure, +} from '../model/gen/streampipes-model'; import { SharedDatalakeRestService } from './shared-dashboard.service'; - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DataViewDataExplorerService { - - constructor(private http: HttpClient, - private dataLakeRestService: DatalakeRestService, - private sharedDatalakeRestService: SharedDatalakeRestService) { - } - - getVisualizableData(): Observable { - return this.dataLakeRestService.getAllMeasurementSeries().pipe(map(data => { - return (data as any[]).map(d => DataLakeMeasure.fromData(d as DataLakeMeasure)); - })); - } - - getDataViews(): Observable { - return this.sharedDatalakeRestService.getDashboards(this.dashboardUrl); - } - - getDataView(dataViewId: string): Observable { - return this.http.get(this.dashboardUrl + '/' + dataViewId).pipe(map(data => { - return data as Dashboard; - })); - } - - updateDashboard(dashboard: Dashboard): Observable { - return this.sharedDatalakeRestService.updateDashboard(this.dashboardUrl, dashboard); - } - - deleteDashboard(dashboard: Dashboard): Observable { - return this.sharedDatalakeRestService.deleteDashboard(this.dashboardUrl, dashboard); - } - - saveDataView(dataViewDashboard: Dashboard): Observable { - return this.sharedDatalakeRestService.saveDashboard(this.dashboardUrl, dataViewDashboard); - } - - private get baseUrl() { - return '/streampipes-backend'; - } - - private get persistedDataStreamsUrl() { - return `${this.baseUrl}/api/v3/datalake/pipelines`; - } - - private get dashboardUrl() { - return `${this.baseUrl}/api/v3/datalake/dashboard`; - } - - private get dashboardWidgetUrl() { - return `${this.baseUrl}/api/v3/datalake/dashboard/widgets`; - } - - getWidget(widgetId: string): Observable { - return this.http.get(this.dashboardWidgetUrl + '/' + widgetId).pipe(map(response => { - return DataExplorerWidgetModel.fromData(response as DataExplorerWidgetModel); - })); - } - - saveWidget(widget: DataExplorerWidgetModel): Observable { - return this.http.post(this.dashboardWidgetUrl, widget).pipe(map(response => { - return DataExplorerWidgetModel.fromData(response as DataExplorerWidgetModel); - })); - } - - deleteWidget(widgetId: string): Observable { - return this.http.delete(this.dashboardWidgetUrl + '/' + widgetId); - } - - updateWidget(widget: DataExplorerWidgetModel): Observable { - return this.http.put(this.dashboardWidgetUrl + '/' + widget._id, widget); - } - - getPersistedDataStream(pipelineId: string, measureName: string): Observable { - return this.http.get(`${this.persistedDataStreamsUrl}/${pipelineId}/${measureName}`) - .pipe(map(response => DataLakeMeasure.fromData(response as any))); - } - - getAllPersistedDataStreams(): Observable { - return this.http.get(this.persistedDataStreamsUrl) - .pipe(map(response => { - return (response as any[]).map(p => DataLakeMeasure.fromData(p)); - })); - } + constructor( + private http: HttpClient, + private dataLakeRestService: DatalakeRestService, + private sharedDatalakeRestService: SharedDatalakeRestService, + ) {} + + getVisualizableData(): Observable { + return this.dataLakeRestService.getAllMeasurementSeries().pipe( + map(data => { + return (data as any[]).map(d => + DataLakeMeasure.fromData(d as DataLakeMeasure), + ); + }), + ); + } + + getDataViews(): Observable { + return this.sharedDatalakeRestService.getDashboards(this.dashboardUrl); + } + + getDataView(dataViewId: string): Observable { + return this.http.get(this.dashboardUrl + '/' + dataViewId).pipe( + map(data => { + return data as Dashboard; + }), + ); + } + + updateDashboard(dashboard: Dashboard): Observable { + return this.sharedDatalakeRestService.updateDashboard( + this.dashboardUrl, + dashboard, + ); + } + + deleteDashboard(dashboard: Dashboard): Observable { + return this.sharedDatalakeRestService.deleteDashboard( + this.dashboardUrl, + dashboard, + ); + } + + saveDataView(dataViewDashboard: Dashboard): Observable { + return this.sharedDatalakeRestService.saveDashboard( + this.dashboardUrl, + dataViewDashboard, + ); + } + + private get baseUrl() { + return '/streampipes-backend'; + } + + private get persistedDataStreamsUrl() { + return `${this.baseUrl}/api/v3/datalake/pipelines`; + } + + private get dashboardUrl() { + return `${this.baseUrl}/api/v3/datalake/dashboard`; + } + + private get dashboardWidgetUrl() { + return `${this.baseUrl}/api/v3/datalake/dashboard/widgets`; + } + + getWidget(widgetId: string): Observable { + return this.http.get(this.dashboardWidgetUrl + '/' + widgetId).pipe( + map(response => { + return DataExplorerWidgetModel.fromData( + response as DataExplorerWidgetModel, + ); + }), + ); + } + + saveWidget( + widget: DataExplorerWidgetModel, + ): Observable { + return this.http.post(this.dashboardWidgetUrl, widget).pipe( + map(response => { + return DataExplorerWidgetModel.fromData( + response as DataExplorerWidgetModel, + ); + }), + ); + } + + deleteWidget(widgetId: string): Observable { + return this.http.delete(this.dashboardWidgetUrl + '/' + widgetId); + } + + updateWidget(widget: DataExplorerWidgetModel): Observable { + return this.http.put( + this.dashboardWidgetUrl + '/' + widget._id, + widget, + ); + } + + getPersistedDataStream( + pipelineId: string, + measureName: string, + ): Observable { + return this.http + .get(`${this.persistedDataStreamsUrl}/${pipelineId}/${measureName}`) + .pipe(map(response => DataLakeMeasure.fromData(response as any))); + } + + getAllPersistedDataStreams(): Observable { + return this.http.get(this.persistedDataStreamsUrl).pipe( + map(response => { + return (response as any[]).map(p => + DataLakeMeasure.fromData(p), + ); + }), + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts index 8af4cc50f1..428c543e44 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts @@ -19,190 +19,243 @@ import { Injectable } from '@angular/core'; import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'; import { Observable, of } from 'rxjs'; -import { DataLakeMeasure, PageResult, SpQueryResult } from '../model/gen/streampipes-model'; +import { + DataLakeMeasure, + PageResult, + SpQueryResult, +} from '../model/gen/streampipes-model'; import { map } from 'rxjs/operators'; import { DatalakeQueryParameters } from '../model/datalake/DatalakeQueryParameters'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DatalakeRestService { - constructor(private http: HttpClient) { - } - - private get baseUrl() { - return '/streampipes-backend'; - } - - public get dataLakeUrl() { - return this.baseUrl + '/api/v4' + '/datalake'; - } - - public get dataLakeMeasureUrl() { - return this.baseUrl + '/api/v4/datalake/measure'; - } - - getAllMeasurementSeries(): Observable { - const url = this.dataLakeUrl + '/measurements/'; - return this.http.get(url).pipe(map(response => { - return (response as any[]).map(p => DataLakeMeasure.fromData(p)); - })); - } - - getMeasurement(id: string): Observable { - return this.http.get(`${this.dataLakeMeasureUrl}/${id}`).pipe(map(res => res as DataLakeMeasure)); - } - - performMultiQuery(queryParams: DatalakeQueryParameters[]): Observable { - return this.http.post(`${this.dataLakeUrl}/query`, queryParams, {headers: {ignoreLoadingBar: ''}}) - .pipe(map(response => response as SpQueryResult[])); - } - - getData(index: string, - queryParams: DatalakeQueryParameters, - ignoreLoadingBar?: boolean): Observable { - - const columns = queryParams.columns; - if (columns === '') { - const emptyQueryResult = new SpQueryResult(); - emptyQueryResult.total = 0; - return of(emptyQueryResult); - } else { - const url = this.dataLakeUrl + '/measurements/' + index; - const headers = ignoreLoadingBar ? {ignoreLoadingBar: ''} : {}; - // @ts-ignore - return this.http.get(url, {params: queryParams, headers}); - } - } - - - getPagedData(index: string, itemsPerPage: number, page: number, columns?: string, order?: string): Observable { - const url = this.dataLakeUrl + '/measurements/' + index; - - const queryParams: DatalakeQueryParameters = this.getQueryParameters(columns, undefined, undefined, page, - itemsPerPage, undefined, undefined, order, undefined, undefined); - - // @ts-ignore - return this.http.get(url, {params: queryParams}); - } - - getTagValues(index: string, - fieldNames: string[]): Observable> { - - if (fieldNames.length === 0) { - return of(new Map()); - } else { - return this.http.get(this.dataLakeUrl + '/measurements/' + index + '/tags?fields=' + fieldNames.toString()) - .pipe(map(r => r as Map)); + constructor(private http: HttpClient) {} + private get baseUrl() { + return '/streampipes-backend'; } - } - - downloadRawData(index: string, - format: string, - delimiter: string, - missingValueBehaviour: string, - startTime?: number, - endTime?: number) { - const queryParams = (startTime && endTime) ? {format, delimiter, startDate: startTime, endDate: endTime} : { - format, - delimiter, - missingValueBehaviour - }; - return this.buildDownloadRequest(index, queryParams); - } - - downloadQueriedData( - index: string, - format: string, - delimiter: string, - missingValueBehaviour: string, - queryParams: DatalakeQueryParameters) { - - (queryParams as any).format = format; - (queryParams as any).delimiter = delimiter; - (queryParams as any).missingValueBehaviour = missingValueBehaviour; - - return this.buildDownloadRequest(index, queryParams); - - } - - buildDownloadRequest(index: string, - queryParams: any) { - const url = this.dataLakeUrl + '/measurements/' + index + '/download'; - const request = new HttpRequest('GET', url, { - reportProgress: true, - responseType: 'text', - params: this.toHttpParams(queryParams) - }); - - return this.http.request(request); - } - toHttpParams(queryParamObject: any): HttpParams { - return new HttpParams({fromObject: queryParamObject}); - } - - removeData(index: string) { - const url = this.dataLakeUrl + '/measurements/' + index; + public get dataLakeUrl() { + return this.baseUrl + '/api/v4' + '/datalake'; + } - return this.http.delete(url); - } + public get dataLakeMeasureUrl() { + return this.baseUrl + '/api/v4/datalake/measure'; + } - dropSingleMeasurementSeries(index: string) { - const url = this.dataLakeUrl + '/measurements/' + index + '/drop'; - return this.http.delete(url); - } + getAllMeasurementSeries(): Observable { + const url = this.dataLakeUrl + '/measurements/'; + return this.http.get(url).pipe( + map(response => { + return (response as any[]).map(p => + DataLakeMeasure.fromData(p), + ); + }), + ); + } - dropAllMeasurementSeries() { - const url = this.dataLakeUrl + '/measurements/'; - return this.http.delete(url); - } + getMeasurement(id: string): Observable { + return this.http + .get(`${this.dataLakeMeasureUrl}/${id}`) + .pipe(map(res => res as DataLakeMeasure)); + } - private getQueryParameters(columns?: string, startDate?: number, endDate?: number, page?: number, limit?: number, - offset?: number, groupBy?: string, order?: string, aggregationFunction?: string, timeInterval?: string): - DatalakeQueryParameters { - const queryParams: DatalakeQueryParameters = new DatalakeQueryParameters(); + performMultiQuery( + queryParams: DatalakeQueryParameters[], + ): Observable { + return this.http + .post(`${this.dataLakeUrl}/query`, queryParams, { + headers: { ignoreLoadingBar: '' }, + }) + .pipe(map(response => response as SpQueryResult[])); + } - if (columns) { - queryParams.columns = columns; + getData( + index: string, + queryParams: DatalakeQueryParameters, + ignoreLoadingBar?: boolean, + ): Observable { + const columns = queryParams.columns; + if (columns === '') { + const emptyQueryResult = new SpQueryResult(); + emptyQueryResult.total = 0; + return of(emptyQueryResult); + } else { + const url = this.dataLakeUrl + '/measurements/' + index; + const headers = ignoreLoadingBar ? { ignoreLoadingBar: '' } : {}; + // @ts-ignore + return this.http.get(url, { + params: queryParams, + headers, + }); + } } - if (startDate) { - queryParams.startDate = startDate; + getPagedData( + index: string, + itemsPerPage: number, + page: number, + columns?: string, + order?: string, + ): Observable { + const url = this.dataLakeUrl + '/measurements/' + index; + + const queryParams: DatalakeQueryParameters = this.getQueryParameters( + columns, + undefined, + undefined, + page, + itemsPerPage, + undefined, + undefined, + order, + undefined, + undefined, + ); + + // @ts-ignore + return this.http.get(url, { params: queryParams }); } - if (endDate) { - queryParams.endDate = endDate; + getTagValues( + index: string, + fieldNames: string[], + ): Observable> { + if (fieldNames.length === 0) { + return of(new Map()); + } else { + return this.http + .get( + this.dataLakeUrl + + '/measurements/' + + index + + '/tags?fields=' + + fieldNames.toString(), + ) + .pipe(map(r => r as Map)); + } } - if (page) { - queryParams.page = page; + + downloadRawData( + index: string, + format: string, + delimiter: string, + missingValueBehaviour: string, + startTime?: number, + endTime?: number, + ) { + const queryParams = + startTime && endTime + ? { format, delimiter, startDate: startTime, endDate: endTime } + : { + format, + delimiter, + missingValueBehaviour, + }; + return this.buildDownloadRequest(index, queryParams); } - if (limit) { - queryParams.limit = limit; + downloadQueriedData( + index: string, + format: string, + delimiter: string, + missingValueBehaviour: string, + queryParams: DatalakeQueryParameters, + ) { + (queryParams as any).format = format; + (queryParams as any).delimiter = delimiter; + (queryParams as any).missingValueBehaviour = missingValueBehaviour; + + return this.buildDownloadRequest(index, queryParams); } - if (offset) { - queryParams.offset = offset; + buildDownloadRequest(index: string, queryParams: any) { + const url = this.dataLakeUrl + '/measurements/' + index + '/download'; + const request = new HttpRequest('GET', url, { + reportProgress: true, + responseType: 'text', + params: this.toHttpParams(queryParams), + }); + + return this.http.request(request); } - if (groupBy) { - queryParams.groupBy = groupBy; + toHttpParams(queryParamObject: any): HttpParams { + return new HttpParams({ fromObject: queryParamObject }); } - if (order) { - queryParams.order = order; + removeData(index: string) { + const url = this.dataLakeUrl + '/measurements/' + index; + + return this.http.delete(url); } - if (aggregationFunction) { - queryParams.aggregationFunction = aggregationFunction; + dropSingleMeasurementSeries(index: string) { + const url = this.dataLakeUrl + '/measurements/' + index + '/drop'; + return this.http.delete(url); } - if (timeInterval) { - queryParams.timeInterval = timeInterval; + dropAllMeasurementSeries() { + const url = this.dataLakeUrl + '/measurements/'; + return this.http.delete(url); } - return queryParams; - } + private getQueryParameters( + columns?: string, + startDate?: number, + endDate?: number, + page?: number, + limit?: number, + offset?: number, + groupBy?: string, + order?: string, + aggregationFunction?: string, + timeInterval?: string, + ): DatalakeQueryParameters { + const queryParams: DatalakeQueryParameters = + new DatalakeQueryParameters(); + + if (columns) { + queryParams.columns = columns; + } + + if (startDate) { + queryParams.startDate = startDate; + } + + if (endDate) { + queryParams.endDate = endDate; + } + if (page) { + queryParams.page = page; + } + + if (limit) { + queryParams.limit = limit; + } + + if (offset) { + queryParams.offset = offset; + } + + if (groupBy) { + queryParams.groupBy = groupBy; + } + + if (order) { + queryParams.order = order; + } + + if (aggregationFunction) { + queryParams.aggregationFunction = aggregationFunction; + } + + if (timeInterval) { + queryParams.timeInterval = timeInterval; + } + + return queryParams; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/files.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/files.service.ts index aa459bd603..db0206210a 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/files.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/files.service.ts @@ -17,50 +17,68 @@ */ import { Injectable } from '@angular/core'; -import { HttpClient, HttpEvent, HttpParams, HttpRequest } from '@angular/common/http'; +import { + HttpClient, + HttpEvent, + HttpParams, + HttpRequest, +} from '@angular/common/http'; import { PlatformServicesCommons } from './commons.service'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { FileMetadata } from '../model/gen/streampipes-model'; - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class FilesService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - - } - - uploadFile(file: File): Observable> { - const data: FormData = new FormData(); - data.append('file_upload', file, file.name); + uploadFile(file: File): Observable> { + const data: FormData = new FormData(); + data.append('file_upload', file, file.name); - const params = new HttpParams(); - const options = { - params, - reportProgress: true, - }; + const params = new HttpParams(); + const options = { + params, + reportProgress: true, + }; - const req = new HttpRequest('POST', this.platformServicesCommons.apiBasePath + '/files', data, options); - return this.http.request(req); - } + const req = new HttpRequest( + 'POST', + this.platformServicesCommons.apiBasePath + '/files', + data, + options, + ); + return this.http.request(req); + } - getFileMetadata(requiredFiletypes?: string[]): Observable { - let requiredFiletypeAppendix = ''; - if (requiredFiletypes && requiredFiletypes.length > 0) { - requiredFiletypeAppendix = '?filetypes=' + requiredFiletypes.join(); + getFileMetadata(requiredFiletypes?: string[]): Observable { + let requiredFiletypeAppendix = ''; + if (requiredFiletypes && requiredFiletypes.length > 0) { + requiredFiletypeAppendix = '?filetypes=' + requiredFiletypes.join(); + } + return this.http + .get( + this.platformServicesCommons.apiBasePath + + '/files' + + requiredFiletypeAppendix, + ) + .pipe( + map(response => { + return (response as any[]).map(fm => + FileMetadata.fromData(fm), + ); + }), + ); } - return this.http - .get(this.platformServicesCommons.apiBasePath + '/files' + requiredFiletypeAppendix) - .pipe(map(response => { - return (response as any[]).map(fm => FileMetadata.fromData(fm)); - })); - } - deleteFile(fileId: string) { - return this.http.delete(this.platformServicesCommons.apiBasePath + '/files/' + fileId); - } + deleteFile(fileId: string) { + return this.http.delete( + this.platformServicesCommons.apiBasePath + '/files/' + fileId, + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/functions.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/functions.service.ts index d7aca9d2f0..3375f2e592 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/functions.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/functions.service.ts @@ -19,35 +19,42 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { PlatformServicesCommons } from './commons.service'; -import { FunctionDefinition, SpLogEntry, SpMetricsEntry } from '../model/gen/streampipes-model'; +import { + FunctionDefinition, + SpLogEntry, + SpMetricsEntry, +} from '../model/gen/streampipes-model'; import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class FunctionsService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor( - private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } + public getActiveFunctions(): Observable { + return this.http + .get(this.functionsPath) + .pipe(map(res => res as FunctionDefinition[])); + } - public getActiveFunctions(): Observable { - return this.http.get(this.functionsPath).pipe(map(res => res as FunctionDefinition[])); - } + public getFunctionLogs(functionId: string): Observable { + return this.http + .get(`${this.functionsPath}/${functionId}/logs`) + .pipe(map(res => res as SpLogEntry[])); + } - public getFunctionLogs(functionId: string): Observable { - return this.http.get(`${this.functionsPath}/${functionId}/logs`) - .pipe(map(res => res as SpLogEntry[])); - } + public getFunctionMetrics(functionId: string): Observable { + return this.http + .get(`${this.functionsPath}/${functionId}/metrics`) + .pipe(map(res => res as SpMetricsEntry)); + } - public getFunctionMetrics(functionId: string): Observable { - return this.http.get(`${this.functionsPath}/${functionId}/metrics`) - .pipe(map(res => res as SpMetricsEntry)); - } - - private get functionsPath() { - return this.platformServicesCommons.apiBasePath + '/functions'; - } + private get functionsPath() { + return this.platformServicesCommons.apiBasePath + '/functions'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/general-config.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/general-config.service.ts index 6ea5b69518..b6eebed641 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/general-config.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/general-config.service.ts @@ -24,26 +24,27 @@ import { PlatformServicesCommons } from './commons.service'; import { GeneralConfigModel } from '../model/general-config.model'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class GeneralConfigService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } + getGeneralConfig(): Observable { + return this.http + .get(this.generalConfigPath) + .pipe(map(response => response as GeneralConfigModel)); + } - getGeneralConfig(): Observable { - return this.http - .get(this.generalConfigPath) - .pipe(map(response => response as GeneralConfigModel)); - } - - updateGeneralConfig(config: GeneralConfigModel): Observable { - return this.http.put(this.generalConfigPath, config); - } - - private get generalConfigPath() { - return this.platformServicesCommons.apiBasePath + '/admin/general-config'; - } + updateGeneralConfig(config: GeneralConfigModel): Observable { + return this.http.put(this.generalConfigPath, config); + } + private get generalConfigPath() { + return ( + this.platformServicesCommons.apiBasePath + '/admin/general-config' + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/generic-storage.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/generic-storage.service.ts index 4cdc45d21c..f4b1ccb28c 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/generic-storage.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/generic-storage.service.ts @@ -22,45 +22,48 @@ import { PlatformServicesCommons } from './commons.service'; import { Observable } from 'rxjs'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class GenericStorageService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } + createDocument(appDocName: string, document: any): Observable { + return this.http.post(this.getAppDocPath(appDocName), document); + } - createDocument(appDocName: string, - document: any): Observable { - return this.http.post(this.getAppDocPath(appDocName), document); - } + getAllDocuments(appDocName: string): Observable { + return this.http.get(this.getAppDocPath(appDocName)); + } - getAllDocuments(appDocName: string): Observable { - return this.http.get(this.getAppDocPath(appDocName)); - } + getDocument(appDocName: string, documentId: string): Observable { + return this.http.get(`${this.getAppDocPath(appDocName)}/${documentId}`); + } - getDocument(appDocName: string, - documentId: string): Observable { - return this.http.get(`${this.getAppDocPath(appDocName)}/${documentId}`); - } + updateDocument(appDocName: string, document: any): Observable { + return this.http.put( + `${this.getAppDocPath(appDocName)}/${document._id}`, + document, + ); + } - updateDocument(appDocName: string, - document: any): Observable { - return this.http.put(`${this.getAppDocPath(appDocName)}/${document._id}`, document); - } + deleteDocument( + appDocName: string, + documentId: string, + rev: string, + ): Observable { + return this.http.delete( + `${this.getAppDocPath(appDocName)}/${documentId}/${rev}`, + ); + } - deleteDocument(appDocName: string, - documentId: string, - rev: string): Observable { - return this.http.delete(`${this.getAppDocPath(appDocName)}/${documentId}/${rev}`); - } - - private getAppDocPath(appDocName: string): string { - return this.genericStorageBasePath + '/' + appDocName; - } - - private get genericStorageBasePath() { - return this.platformServicesCommons.apiBasePath + '/storage-generic'; - } + private getAppDocPath(appDocName: string): string { + return this.genericStorageBasePath + '/' + appDocName; + } + private get genericStorageBasePath() { + return this.platformServicesCommons.apiBasePath + '/storage-generic'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/mail-config.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/mail-config.service.ts index 38068a4e8e..afc270735d 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/mail-config.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/mail-config.service.ts @@ -24,30 +24,29 @@ import { PlatformServicesCommons } from './commons.service'; import { EmailConfig } from '../model/email-config.model'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class MailConfigService { - - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } - - getMailConfig(): Observable { - return this.http - .get(this.mailConfigPath) - .pipe(map(response => response as EmailConfig)); - } - - updateMailConfig(config: EmailConfig): Observable { - return this.http.put(this.mailConfigPath, config); - } - - sendTestMail(config: EmailConfig) { - return this.http.post(`${this.mailConfigPath}/test`, config); - } - - private get mailConfigPath() { - return this.platformServicesCommons.apiBasePath + '/admin/mail-config'; - } - + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} + + getMailConfig(): Observable { + return this.http + .get(this.mailConfigPath) + .pipe(map(response => response as EmailConfig)); + } + + updateMailConfig(config: EmailConfig): Observable { + return this.http.put(this.mailConfigPath, config); + } + + sendTestMail(config: EmailConfig) { + return this.http.post(`${this.mailConfigPath}/test`, config); + } + + private get mailConfigPath() { + return this.platformServicesCommons.apiBasePath + '/admin/mail-config'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/measurement-units.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/measurement-units.service.ts index e4a793857f..733e6c079a 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/measurement-units.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/measurement-units.service.ts @@ -23,16 +23,23 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class MeasurementUnitsService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { } - - getAllMeasurementUnits(): Observable { - return this.http.get(this.platformServicesCommons.apiBasePath + '/measurement-units').pipe(map(response => { - return response; - })); - } + getAllMeasurementUnits(): Observable { + return this.http + .get( + this.platformServicesCommons.apiBasePath + '/measurement-units', + ) + .pipe( + map(response => { + return response; + }), + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/permissions.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/permissions.service.ts index 836db963e4..db1cf9b4d7 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/permissions.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/permissions.service.ts @@ -23,25 +23,31 @@ import { Observable } from 'rxjs'; import { map } from 'rxjs/operators'; import { Permission } from '../model/gen/streampipes-model-client'; - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PermissionsService { - - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { } - - - public getPermissionsForObject(objectInstanceId: string): Observable { - return this.http.get(`${this.permissionsBasePath}/objects/${objectInstanceId}`).pipe(map(response => response as Permission[])); - } - - public updatePermission(permission: Permission): Observable { - return this.http.put(`${this.permissionsBasePath}/${permission.permissionId}`, permission); - } - - get permissionsBasePath() { - return `${this.platformServicesCommons.apiBasePath}/admin/permissions`; - } + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} + + public getPermissionsForObject( + objectInstanceId: string, + ): Observable { + return this.http + .get(`${this.permissionsBasePath}/objects/${objectInstanceId}`) + .pipe(map(response => response as Permission[])); + } + + public updatePermission(permission: Permission): Observable { + return this.http.put( + `${this.permissionsBasePath}/${permission.permissionId}`, + permission, + ); + } + + get permissionsBasePath() { + return `${this.platformServicesCommons.apiBasePath}/admin/permissions`; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-canvas-metadata.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-canvas-metadata.service.ts index d0f0ef4305..1e15361445 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-canvas-metadata.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-canvas-metadata.service.ts @@ -24,40 +24,58 @@ import { PlatformServicesCommons } from './commons.service'; import { map } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PipelineCanvasMetadataService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { + addPipelineCanvasMetadata(pipelineCanvasMetadata: PipelineCanvasMetadata) { + return this.http.post( + this.pipelineCanvasMetadataBasePath, + pipelineCanvasMetadata, + ); + } - } + getPipelineCanvasMetadata( + pipelineId: string, + ): Observable { + return this.http + .get(this.pipelineCanvasMetadataPipelinePath + pipelineId) + .pipe( + map(response => + PipelineCanvasMetadata.fromData(response as any), + ), + ); + } - addPipelineCanvasMetadata(pipelineCanvasMetadata: PipelineCanvasMetadata) { - return this.http.post(this.pipelineCanvasMetadataBasePath, pipelineCanvasMetadata); - } + updatePipelineCanvasMetadata( + pipelineCanvasMetadata: PipelineCanvasMetadata, + ) { + return this.http.put( + this.pipelineCanvasMetadataBasePath + + '/' + + pipelineCanvasMetadata.pipelineId, + pipelineCanvasMetadata, + ); + } - getPipelineCanvasMetadata(pipelineId: string): Observable { - return this.http.get(this.pipelineCanvasMetadataPipelinePath - + pipelineId).pipe(map(response => PipelineCanvasMetadata.fromData(response as any))); - } + deletePipelineCanvasMetadata(pipelineId: string) { + return this.http.delete( + this.pipelineCanvasMetadataPipelinePath + pipelineId, + ); + } - updatePipelineCanvasMetadata(pipelineCanvasMetadata: PipelineCanvasMetadata) { - return this.http.put(this.pipelineCanvasMetadataBasePath - + '/' - + pipelineCanvasMetadata.pipelineId, pipelineCanvasMetadata); - } + private get pipelineCanvasMetadataBasePath() { + return ( + this.platformServicesCommons.apiBasePath + + '/pipeline-canvas-metadata' + ); + } - deletePipelineCanvasMetadata(pipelineId: string) { - return this.http.delete(this.pipelineCanvasMetadataPipelinePath - + pipelineId); - } - - private get pipelineCanvasMetadataBasePath() { - return this.platformServicesCommons.apiBasePath + '/pipeline-canvas-metadata'; - } - - private get pipelineCanvasMetadataPipelinePath() { - return this.pipelineCanvasMetadataBasePath + '/pipeline/'; - } + private get pipelineCanvasMetadataPipelinePath() { + return this.pipelineCanvasMetadataBasePath + '/pipeline/'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-endpoint.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-endpoint.service.ts index 6549f46062..9c13171267 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-endpoint.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-endpoint.service.ts @@ -22,26 +22,38 @@ import { Observable } from 'rxjs'; */ @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PipelineElementEndpointService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } + add(elementUri, ispublic): Observable { + const payload = new HttpParams() + .set('uri', elementUri) + .set('publicElement', ispublic); + return this.http.post( + this.platformServicesCommons.apiBasePath + '/element', + payload, + ); + } - add(elementUri, ispublic): Observable { - const payload = new HttpParams() - .set('uri', elementUri) - .set('publicElement', ispublic); - return this.http.post(this.platformServicesCommons.apiBasePath + '/element', payload); - } + update(elementUri): Observable { + return this.http.put( + this.platformServicesCommons.apiBasePath + + '/element/' + + encodeURIComponent(elementUri), + undefined, + ); + } - update(elementUri): Observable { - return this.http.put(this.platformServicesCommons.apiBasePath + '/element/' + encodeURIComponent(elementUri), undefined); - } - - del(elementUri): Observable { - return this.http.delete(this.platformServicesCommons.apiBasePath + '/element/' + encodeURIComponent(elementUri)); - } + del(elementUri): Observable { + return this.http.delete( + this.platformServicesCommons.apiBasePath + + '/element/' + + encodeURIComponent(elementUri), + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-template.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-template.service.ts index 6cca1d56b9..7e1b43c9bc 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-template.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element-template.service.ts @@ -20,63 +20,108 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { - AdapterDescription, - AdapterDescriptionUnion, - DataProcessorInvocation, - DataSinkInvocation, - PipelineElementTemplate + AdapterDescription, + AdapterDescriptionUnion, + DataProcessorInvocation, + DataSinkInvocation, + PipelineElementTemplate, } from '../model/gen/streampipes-model'; import { PlatformServicesCommons } from './commons.service'; import { map } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PipelineElementTemplateService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { + getPipelineElementTemplates( + appId: string, + ): Observable { + return this.http + .get( + this.platformServicesCommons.apiBasePath + + '/pipeline-element-templates?appId=' + + appId, + ) + .pipe( + map(data => { + return (data as []).map(dpi => + PipelineElementTemplate.fromData(dpi), + ); + }), + ); + } - } + deletePipelineElementTemplate(templateId: string): Observable { + return this.http.delete( + `${this.platformServicesCommons.apiBasePath}/pipeline-element-templates/${templateId}`, + ); + } - getPipelineElementTemplates(appId: string): Observable { - return this.http - .get(this.platformServicesCommons.apiBasePath - + '/pipeline-element-templates?appId=' + appId) - .pipe(map(data => { - return (data as []).map(dpi => PipelineElementTemplate.fromData(dpi)); - })); - } + getConfiguredDataProcessorForTemplate( + templateId: string, + invocation: DataProcessorInvocation, + ): Observable { + return this.http + .post( + this.platformServicesCommons.apiBasePath + + '/pipeline-element-templates/' + + templateId + + '/processor', + invocation, + ) + .pipe( + map(response => { + return DataProcessorInvocation.fromData( + response as DataProcessorInvocation, + ); + }), + ); + } - deletePipelineElementTemplate(templateId: string): Observable { - return this.http.delete(`${this.platformServicesCommons.apiBasePath}/pipeline-element-templates/${templateId}`); - } - - getConfiguredDataProcessorForTemplate(templateId: string, invocation: DataProcessorInvocation): Observable { - return this.http.post(this.platformServicesCommons.apiBasePath - + '/pipeline-element-templates/' + templateId + '/processor', invocation) - .pipe(map(response => { - return DataProcessorInvocation.fromData(response as DataProcessorInvocation); - })); - } - - getConfiguredDataSinkForTemplate(templateId: string, invocation: DataSinkInvocation): Observable { - return this.http.post(this.platformServicesCommons.apiBasePath - + '/pipeline-element-templates/' + templateId + '/sink', invocation) - .pipe(map(response => { - return DataSinkInvocation.fromData(response as DataSinkInvocation); - })); - } - - getConfiguredAdapterForTemplate(templateId: string, - adapter: AdapterDescriptionUnion): Observable { - return this.http.post(this.platformServicesCommons.apiBasePath - + '/pipeline-element-templates/' + templateId + '/adapter', adapter); - } - - storePipelineElementTemplate(template: PipelineElementTemplate) { - return this.http.post(this.platformServicesCommons.apiBasePath + '/pipeline-element-templates', template); - } + getConfiguredDataSinkForTemplate( + templateId: string, + invocation: DataSinkInvocation, + ): Observable { + return this.http + .post( + this.platformServicesCommons.apiBasePath + + '/pipeline-element-templates/' + + templateId + + '/sink', + invocation, + ) + .pipe( + map(response => { + return DataSinkInvocation.fromData( + response as DataSinkInvocation, + ); + }), + ); + } + getConfiguredAdapterForTemplate( + templateId: string, + adapter: AdapterDescriptionUnion, + ): Observable { + return this.http.post( + this.platformServicesCommons.apiBasePath + + '/pipeline-element-templates/' + + templateId + + '/adapter', + adapter, + ); + } + storePipelineElementTemplate(template: PipelineElementTemplate) { + return this.http.post( + this.platformServicesCommons.apiBasePath + + '/pipeline-element-templates', + template, + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element.service.ts index c55b43278b..51bf9ed543 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-element.service.ts @@ -20,74 +20,93 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; import { - DataProcessorInvocation, - DataSinkInvocation, - SpDataSet, - SpDataStream + DataProcessorInvocation, + DataSinkInvocation, + SpDataSet, + SpDataStream, } from '../model/gen/streampipes-model'; import { PlatformServicesCommons } from './commons.service'; import { map } from 'rxjs/operators'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PipelineElementService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } + getDataProcessors(): Observable { + return this.http.get(this.dataProcessorsUrl + '/own').pipe( + map(data => { + return (data as []).map(dpi => + DataProcessorInvocation.fromData(dpi), + ); + }), + ); + } - getDataProcessors(): Observable { - return this.http.get(this.dataProcessorsUrl + '/own').pipe(map(data => { - return (data as []).map(dpi => DataProcessorInvocation.fromData(dpi)); - })); - } + getDataSinks(): Observable { + return this.http.get(this.dataSinksUrl + '/own').pipe( + map(data => { + return (data as []).map(dpi => + DataSinkInvocation.fromData(dpi), + ); + }), + ); + } - getDataSinks(): Observable { - return this.http.get(this.dataSinksUrl + '/own').pipe(map(data => { - return (data as []).map(dpi => DataSinkInvocation.fromData(dpi)); - })); - } + getDataStreams(): Observable { + return this.http.get(this.dataStreamsUrl + '/own').pipe( + map(data => { + return (data as []).map(dpi => { + if ( + dpi['@class'] === + 'org.apache.streampipes.model.SpDataSet' + ) { + return SpDataSet.fromData(dpi); + } else { + return SpDataStream.fromData(dpi); + } + }); + }), + ); + } - getDataStreams(): Observable { - return this.http.get(this.dataStreamsUrl + '/own').pipe(map(data => { - return (data as []).map(dpi => { - if (dpi['@class'] === 'org.apache.streampipes.model.SpDataSet') { - return SpDataSet.fromData(dpi); - } else { - return SpDataStream.fromData(dpi); - } - }); - })); - } + getDataStreamByElementId(elementId: string): Observable { + return this.http.get(`${this.dataStreamsUrl}/${elementId}`).pipe( + map(data => { + if ( + data['@class'] === 'org.apache.streampipes.model.SpDataSet' + ) { + return SpDataSet.fromData(data as any); + } else { + return SpDataStream.fromData(data as any); + } + }), + ); + } - getDataStreamByElementId(elementId: string): Observable { - return this.http.get(`${this.dataStreamsUrl}/${elementId}`).pipe(map(data => { - if (data['@class'] === 'org.apache.streampipes.model.SpDataSet') { - return SpDataSet.fromData(data as any); - } else { - return SpDataStream.fromData(data as any); - } - })); - } + getDocumentation(appId) { + return this.http.get( + this.platformServicesCommons.apiBasePath + + '/pe/' + + appId + + '/assets/documentation', + { responseType: 'text' }, + ); + } - getDocumentation(appId) { - return this.http.get(this.platformServicesCommons.apiBasePath - + '/pe/' - + appId - + '/assets/documentation', {responseType: 'text'}); - } + private get dataProcessorsUrl(): string { + return this.platformServicesCommons.apiBasePath + '/sepas'; + } - private get dataProcessorsUrl(): string { - return this.platformServicesCommons.apiBasePath + '/sepas'; - } - - private get dataStreamsUrl(): string { - return this.platformServicesCommons.apiBasePath + '/streams'; - } - - private get dataSinksUrl(): string { - return this.platformServicesCommons.apiBasePath + '/actions'; - } + private get dataStreamsUrl(): string { + return this.platformServicesCommons.apiBasePath + '/streams'; + } + private get dataSinksUrl(): string { + return this.platformServicesCommons.apiBasePath + '/actions'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts index 7816b9eea7..3e7addffb1 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-monitoring.service.ts @@ -19,37 +19,47 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { Observable } from 'rxjs'; -import { PipelineMonitoringInfo, SpLogEntry, SpMetricsEntry } from '../model/gen/streampipes-model'; +import { + PipelineMonitoringInfo, + SpLogEntry, + SpMetricsEntry, +} from '../model/gen/streampipes-model'; import { PlatformServicesCommons } from './commons.service'; import { map } from 'rxjs/operators'; import { AbstractMonitoringService } from './abstract-monitoring.service'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PipelineMonitoringService extends AbstractMonitoringService { + constructor( + http: HttpClient, + platformServicesCommons: PlatformServicesCommons, + ) { + super(http, platformServicesCommons); + } - constructor(http: HttpClient, - platformServicesCommons: PlatformServicesCommons) { - super(http, platformServicesCommons); - } + getLogInfoForPipeline( + pipelineId: string, + ): Observable> { + return this.http + .get(this.logUrl(pipelineId)) + .pipe(map(response => response as Record)); + } - getLogInfoForPipeline(pipelineId: string): Observable> { - return this.http.get(this.logUrl(pipelineId)) - .pipe(map(response => response as Record)); - } + getMetricsInfoForPipeline( + pipelineId: string, + ): Observable> { + return this.http + .get(this.metricsUrl(pipelineId)) + .pipe(map(response => response as Record)); + } - getMetricsInfoForPipeline(pipelineId: string): Observable> { - return this.http.get(this.metricsUrl(pipelineId)) - .pipe(map(response => response as Record)); - } - - protected get monitoringBasePath(): string { - return `${this.platformServicesCommons.apiBasePath}/pipeline-monitoring`; - } - - protected get monitoringPathAppendix(): string { - return 'pipeline'; - } + protected get monitoringBasePath(): string { + return `${this.platformServicesCommons.apiBasePath}/pipeline-monitoring`; + } + protected get monitoringPathAppendix(): string { + return 'pipeline'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-template.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-template.service.ts index b1285484ff..2df674c729 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-template.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline-template.service.ts @@ -19,99 +19,114 @@ import { Injectable } from '@angular/core'; import { HttpClient } from '@angular/common/http'; import { - FreeTextStaticProperty, - PipelineOperationStatus, - PipelineTemplateInvocation, - StaticPropertyUnion + FreeTextStaticProperty, + PipelineOperationStatus, + PipelineTemplateInvocation, + StaticPropertyUnion, } from '../model/gen/streampipes-model'; import { map } from 'rxjs/operators'; import { Observable } from 'rxjs'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class PipelineTemplateService { + constructor(private http: HttpClient) {} - constructor( - private http: HttpClient - ) { - } + getServerUrl() { + return '/streampipes-backend'; + } - getServerUrl() { - return '/streampipes-backend'; - } + // getDataSets(): Observable { + // return this.http + // .get(this.getServerUrl() + '/api/v2/users/'+ this.authStatusService.email + '/pipeline-templates/streams') + // .pipe(map(response => { + // + // + // + // // TODO remove this + // // quick fix to deserialize URIs + // response['@graph'].forEach(function (object) { + // if (object['sp:domainProperty'] != undefined) { + // // object['sp:domainProperty']['@type'] = "sp:URI"; + // object['sp:domainProperty'] = object['sp:domainProperty']['@id']; + // delete object['sp:domainProperty']['@id']; + // } + // }); + // + // const res = this.tsonLdSerializerService.fromJsonLd(response, 'sp:DataStreamContainer'); + // return res.list; + // })); + // } + // + // getOperators(dataSet: DataSetDescription): Observable { + // return this.http + // .get(this.getServerUrl() + '/api/v2/users/'+ this.authStatusService.email + '/pipeline-templates?dataset=' + dataSet.id) + // .pipe(map(response => { + // const res = this.tsonLdSerializerService.fromJsonLd(response, 'sp:PipelineTemplateDescriptionContainer'); + // return res.list; + // })); + // } - // getDataSets(): Observable { - // return this.http - // .get(this.getServerUrl() + '/api/v2/users/'+ this.authStatusService.email + '/pipeline-templates/streams') - // .pipe(map(response => { - // - // - // - // // TODO remove this - // // quick fix to deserialize URIs - // response['@graph'].forEach(function (object) { - // if (object['sp:domainProperty'] != undefined) { - // // object['sp:domainProperty']['@type'] = "sp:URI"; - // object['sp:domainProperty'] = object['sp:domainProperty']['@id']; - // delete object['sp:domainProperty']['@id']; - // } - // }); - // - // const res = this.tsonLdSerializerService.fromJsonLd(response, 'sp:DataStreamContainer'); - // return res.list; - // })); - // } - // - // getOperators(dataSet: DataSetDescription): Observable { - // return this.http - // .get(this.getServerUrl() + '/api/v2/users/'+ this.authStatusService.email + '/pipeline-templates?dataset=' + dataSet.id) - // .pipe(map(response => { - // const res = this.tsonLdSerializerService.fromJsonLd(response, 'sp:PipelineTemplateDescriptionContainer'); - // return res.list; - // })); - // } + getPipelineTemplateInvocation( + dataSetId: string, + templateId: string, + ): Observable { + return this.http + .get( + `${this.getServerUrl()}/api/v2/pipeline-templates/invocation?streamId=${dataSetId}&templateId=${templateId}`, + ) + .pipe( + map(data => { + return PipelineTemplateInvocation.fromData( + data as PipelineTemplateInvocation, + ); + }), + ); - getPipelineTemplateInvocation(dataSetId: string, templateId: string): Observable { - return this.http - .get(`${this.getServerUrl()}/api/v2/pipeline-templates/invocation?streamId=${dataSetId}&templateId=${templateId}`) - .pipe(map(data => { - return PipelineTemplateInvocation.fromData(data as PipelineTemplateInvocation); - })); + // .pipe(map(response: PipelineTemplateInvocation => { - // .pipe(map(response: PipelineTemplateInvocation => { + // Currently tsonld dows not support objects that just contain one root object without an enclosing @graph array + // const res = new PipelineTemplateInvocation(response['@id']); + // res.dataSetId = response['sp:hasDataSetId']; + // res.name = response['hasElementName']; + // res.pipelineTemplateId = response['sp:hasInternalName']; - // Currently tsonld dows not support objects that just contain one root object without an enclosing @graph array - // const res = new PipelineTemplateInvocation(response['@id']); - // res.dataSetId = response['sp:hasDataSetId']; - // res.name = response['hasElementName']; - // res.pipelineTemplateId = response['sp:hasInternalName']; + // TODO find better solution + // This will remove preconfigured values from the UI + // res.list.forEach(property => { + // if (this.isFreeTextStaticProperty(property)) { + // if (this.asFreeTextStaticProperty(property).value !== undefined) { + // this.asFreeTextStaticProperty(property).render = false; + // } + // } + // }); + // return res; + // })); + } - // TODO find better solution - // This will remove preconfigured values from the UI - // res.list.forEach(property => { - // if (this.isFreeTextStaticProperty(property)) { - // if (this.asFreeTextStaticProperty(property).value !== undefined) { - // this.asFreeTextStaticProperty(property).render = false; - // } - // } - // }); - // return res; - // })); - } + isFreeTextStaticProperty(val) { + return val instanceof FreeTextStaticProperty; + } - isFreeTextStaticProperty(val) { - return val instanceof FreeTextStaticProperty; - } - - asFreeTextStaticProperty(val: StaticPropertyUnion): FreeTextStaticProperty { - return val as FreeTextStaticProperty; - } - - createPipelineTemplateInvocation(invocation: PipelineTemplateInvocation): Observable { - return this.http - .post(`${this.getServerUrl()}/api/v2/pipeline-templates`, invocation) - .pipe(map(result => PipelineOperationStatus.fromData(result as PipelineOperationStatus))); - } + asFreeTextStaticProperty(val: StaticPropertyUnion): FreeTextStaticProperty { + return val as FreeTextStaticProperty; + } + createPipelineTemplateInvocation( + invocation: PipelineTemplateInvocation, + ): Observable { + return this.http + .post( + `${this.getServerUrl()}/api/v2/pipeline-templates`, + invocation, + ) + .pipe( + map(result => + PipelineOperationStatus.fromData( + result as PipelineOperationStatus, + ), + ), + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts index f226c9473a..734a7c1a3d 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/pipeline.service.ts @@ -80,9 +80,7 @@ export class PipelineService { const queryAppendix = forceStop ? '?forceStop=' + forceStop : ''; return this.http .get( - `${ - this.apiBasePath - }/pipelines/${pipelineId}/stop${queryAppendix}`, + `${this.apiBasePath}/pipelines/${pipelineId}/stop${queryAppendix}`, ) .pipe( map(result => diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/semantic-types.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/semantic-types.service.ts index 1158c51a92..0f9c180df9 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/semantic-types.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/semantic-types.service.ts @@ -23,20 +23,25 @@ import { map } from 'rxjs/operators'; import { Observable } from 'rxjs'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class SemanticTypesService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - - } - - getSemanticTypes(text: string): Observable { - return this.http.get(this.platformServicesCommons.apiBasePath + - '/autocomplete/semantic-type?text=' + text).pipe(map(response => { - return response as string[]; - })); - } - + getSemanticTypes(text: string): Observable { + return this.http + .get( + this.platformServicesCommons.apiBasePath + + '/autocomplete/semantic-type?text=' + + text, + ) + .pipe( + map(response => { + return response as string[]; + }), + ); + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/shared-dashboard.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/shared-dashboard.service.ts index f2dbc9db30..53238f996d 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/shared-dashboard.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/shared-dashboard.service.ts @@ -23,31 +23,40 @@ import { Observable } from 'rxjs'; import { Dashboard } from '../model/dashboard/dashboard.model'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class SharedDatalakeRestService { - - constructor(private http: HttpClient) { - } + constructor(private http: HttpClient) {} getDashboards(dashboardUrl: string): Observable { - return this.http.get(dashboardUrl).pipe(map(data => { - return data as Dashboard[]; - })); + return this.http.get(dashboardUrl).pipe( + map(data => { + return data as Dashboard[]; + }), + ); } - updateDashboard(dashboardUrl: string, dashboard: Dashboard): Observable { - return this.http.put(dashboardUrl + '/' + dashboard._id, dashboard).pipe(map(data => { - return data as Dashboard; - })); + updateDashboard( + dashboardUrl: string, + dashboard: Dashboard, + ): Observable { + return this.http + .put(dashboardUrl + '/' + dashboard._id, dashboard) + .pipe( + map(data => { + return data as Dashboard; + }), + ); } - deleteDashboard(dashboardUrl: string, dashboard: Dashboard): Observable { + deleteDashboard( + dashboardUrl: string, + dashboard: Dashboard, + ): Observable { return this.http.delete(dashboardUrl + '/' + dashboard._id); } saveDashboard(dashboardUrl: string, dashboard: Dashboard): Observable { return this.http.post(dashboardUrl, dashboard); } - } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/user-group.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/user-group.service.ts index 8c4e2261dd..3749d1f571 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/user-group.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/user-group.service.ts @@ -24,39 +24,39 @@ import { PlatformServicesCommons } from './commons.service'; import { Group } from '../model/gen/streampipes-model-client'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class UserGroupService { - - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } - - public getAllUserGroups(): Observable { - return this.http.get(`${this.userGroupPath}`) - .pipe(map(response => { - return (response as any[]).map(p => Group.fromData(p)); - })); - } - - public createGroup(group: Group) { - return this.http.post(this.userGroupPath, group); - } - - public updateGroup(group: Group) { - return this.http.put(`${this.userGroupPath}/${group.groupId}`, group); - } - - public deleteGroup(group: Group) { - return this.http.delete(`${this.userGroupPath}/${group.groupId}`); - } - - public getGroup(groupId: string) { - return this.http.get(`${this.userGroupPath}/${groupId}`); - } - - private get userGroupPath() { - return this.platformServicesCommons.apiBasePath + '/usergroups'; - } - + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} + + public getAllUserGroups(): Observable { + return this.http.get(`${this.userGroupPath}`).pipe( + map(response => { + return (response as any[]).map(p => Group.fromData(p)); + }), + ); + } + + public createGroup(group: Group) { + return this.http.post(this.userGroupPath, group); + } + + public updateGroup(group: Group) { + return this.http.put(`${this.userGroupPath}/${group.groupId}`, group); + } + + public deleteGroup(group: Group) { + return this.http.delete(`${this.userGroupPath}/${group.groupId}`); + } + + public getGroup(groupId: string) { + return this.http.get(`${this.userGroupPath}/${groupId}`); + } + + private get userGroupPath() { + return this.platformServicesCommons.apiBasePath + '/usergroups'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/user.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/user.service.ts index 0b39cdd707..aabc3d8998 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/user.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/user.service.ts @@ -22,75 +22,94 @@ import { map } from 'rxjs/operators'; import { Observable } from 'rxjs'; import { PlatformServicesCommons } from './commons.service'; import { - ServiceAccount, - UserAccount + ServiceAccount, + UserAccount, } from '../model/gen/streampipes-model-client'; -import { ChangePasswordRequest } from "../model/user/user.model"; +import { ChangePasswordRequest } from '../model/user/user.model'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class UserService { + constructor( + private http: HttpClient, + private platformServicesCommons: PlatformServicesCommons, + ) {} - constructor(private http: HttpClient, - private platformServicesCommons: PlatformServicesCommons) { - } + getAllUserAccounts(): Observable { + return this.http.get(`${this.usersPath}?type=USER_ACCOUNT`).pipe( + map(response => { + return (response as any[]).map(p => UserAccount.fromData(p)); + }), + ); + } - getAllUserAccounts(): Observable { - return this.http.get(`${this.usersPath}?type=USER_ACCOUNT`) - .pipe(map(response => { - return (response as any[]).map(p => UserAccount.fromData(p)); - })); - } + getAllServiceAccounts(): Observable { + return this.http.get(`${this.usersPath}?type=SERVICE_ACCOUNT`).pipe( + map(response => { + return (response as any[]).map(p => ServiceAccount.fromData(p)); + }), + ); + } - getAllServiceAccounts(): Observable { - return this.http.get(`${this.usersPath}?type=SERVICE_ACCOUNT`) - .pipe(map(response => { - return (response as any[]).map(p => ServiceAccount.fromData(p)); - })); - } + public updateUser(user: UserAccount): Observable { + return this.http.put( + `${this.usersPath}/user/${user.principalId}`, + user, + ); + } - public updateUser(user: (UserAccount)): Observable { - return this.http.put(`${this.usersPath}/user/${user.principalId}`, user); - } + public updateUsername(user: UserAccount): Observable { + return this.http.put( + `${this.usersPath}/user/${user.principalId}/username`, + user, + ); + } - public updateUsername(user: UserAccount): Observable { - return this.http.put(`${this.usersPath}/user/${user.principalId}/username`, user); - } + public updatePassword( + user: UserAccount, + req: ChangePasswordRequest, + ): Observable { + return this.http.put( + `${this.usersPath}/user/${user.principalId}/password`, + req, + ); + } - public updatePassword(user: UserAccount, - req: ChangePasswordRequest): Observable { - return this.http.put(`${this.usersPath}/user/${user.principalId}/password`, req); - } + public updateService(user: ServiceAccount): Observable { + return this.http.put( + `${this.usersPath}/service/${user.principalId}`, + user, + ); + } - public updateService(user: (ServiceAccount)): Observable { - return this.http.put(`${this.usersPath}/service/${user.principalId}`, user); - } + public createUser(user: UserAccount): Observable { + return this.http.post(`${this.usersPath}/user`, user); + } - public createUser(user: UserAccount): Observable { - return this.http.post(`${this.usersPath}/user`, user); - } + public createServiceAccount(user: ServiceAccount): Observable { + return this.http.post(`${this.usersPath}/service`, user); + } - public createServiceAccount(user: ServiceAccount): Observable { - return this.http.post(`${this.usersPath}/service`, user); - } + public deleteUser(principalId: string): Observable { + return this.http.delete(`${this.usersPath}/${principalId}`); + } - public deleteUser(principalId: string): Observable { - return this.http.delete(`${this.usersPath}/${principalId}`); - } + public getUserById( + principalId: string, + ): Observable { + return this.http.get(`${this.usersPath}/${principalId}`).pipe( + map(response => { + if ((response as any).principalType === 'USER_ACCOUNT') { + return UserAccount.fromData(response as any); + } else { + return ServiceAccount.fromData(response as any); + } + }), + ); + } - public getUserById(principalId: string): Observable { - return this.http.get(`${this.usersPath}/${principalId}`) - .pipe(map(response => { - if ((response as any).principalType === 'USER_ACCOUNT') { - return UserAccount.fromData(response as any); - } else { - return ServiceAccount.fromData(response as any); - } - })); - } - - private get usersPath() { - return this.platformServicesCommons.apiBasePath + '/users'; - } + private get usersPath() { + return this.platformServicesCommons.apiBasePath + '/users'; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/contants/platform-services.constants.ts b/ui/projects/streampipes/platform-services/src/lib/contants/platform-services.constants.ts index 1879aa6181..f64a1008e2 100644 --- a/ui/projects/streampipes/platform-services/src/lib/contants/platform-services.constants.ts +++ b/ui/projects/streampipes/platform-services/src/lib/contants/platform-services.constants.ts @@ -16,7 +16,4 @@ * */ -export class PlatformServicesConstants { - -} - +export class PlatformServicesConstants {} diff --git a/ui/projects/streampipes/platform-services/src/lib/model/assets/asset.model.ts b/ui/projects/streampipes/platform-services/src/lib/model/assets/asset.model.ts index 626e627ddf..67a34745cd 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/assets/asset.model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/assets/asset.model.ts @@ -17,48 +17,47 @@ */ export interface AssetLinkType { - linkType: string; - linkLabel: string; - linkColor: string; - linkIcon?: string; - linkQueryHint?: string; - navPaths: string[]; - navigationActive: boolean; + linkType: string; + linkLabel: string; + linkColor: string; + linkIcon?: string; + linkQueryHint?: string; + navPaths: string[]; + navigationActive: boolean; } export interface AssetType { - assetIcon: string; - assetIconColor: string; - assetTypeCategory: string; - assetTypeLabel: string; + assetIcon: string; + assetIconColor: string; + assetTypeCategory: string; + assetTypeLabel: string; } export interface AssetLink { - resourceId: string; - linkType: 'data-view' | 'dashboard' | 'adapter' | 'source' | string; - linkLabel: string; - queryHint: string; - editingDisabled: boolean; - navigationActive: boolean; + resourceId: string; + linkType: 'data-view' | 'dashboard' | 'adapter' | 'source' | string; + linkLabel: string; + queryHint: string; + editingDisabled: boolean; + navigationActive: boolean; } export interface SpAsset { - assetId: string; - assetName: string; - assetDescription: string; + assetId: string; + assetName: string; + assetDescription: string; - assetType: AssetType; - assetLinks: AssetLink[]; + assetType: AssetType; + assetLinks: AssetLink[]; - assets: SpAsset[]; + assets: SpAsset[]; } export interface SpAssetModel extends SpAsset { - _id: string; - _rev: string; + _id: string; + _rev: string; - appDocType: string; + appDocType: string; - removable: boolean; + removable: boolean; } - diff --git a/ui/projects/streampipes/platform-services/src/lib/model/datalake/DatalakeQueryParameters.ts b/ui/projects/streampipes/platform-services/src/lib/model/datalake/DatalakeQueryParameters.ts index 422aec2a5b..132ad471c6 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/datalake/DatalakeQueryParameters.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/datalake/DatalakeQueryParameters.ts @@ -19,24 +19,23 @@ import { MissingValueBehaviour } from './data-lake-query-config.model'; export class DatalakeQueryParameters { - public columns: string; - public startDate: number; - public endDate: number; - public page: number; - public limit: number; - public offset: number; - public groupBy: string; - public order: string; - public aggregationFunction: string; - public timeInterval: string; - public countOnly: boolean; - public autoAggregate: boolean; - public filter: string; - public missingValueBehaviour: MissingValueBehaviour; - public maximumAmountOfEvents: number; + public columns: string; + public startDate: number; + public endDate: number; + public page: number; + public limit: number; + public offset: number; + public groupBy: string; + public order: string; + public aggregationFunction: string; + public timeInterval: string; + public countOnly: boolean; + public autoAggregate: boolean; + public filter: string; + public missingValueBehaviour: MissingValueBehaviour; + public maximumAmountOfEvents: number; - // should be only used for multi-query requests - public measureName: string; - public forId: string; + // should be only used for multi-query requests + public measureName: string; + public forId: string; } - diff --git a/ui/projects/streampipes/platform-services/src/lib/model/datalake/DateRange.ts b/ui/projects/streampipes/platform-services/src/lib/model/datalake/DateRange.ts index a47f4760cb..87151909ca 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/datalake/DateRange.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/datalake/DateRange.ts @@ -16,7 +16,6 @@ * */ - export interface TimeSettings { startTime: number; endTime: number; @@ -24,7 +23,6 @@ export interface TimeSettings { } export class DateRange { - public startDate: Date; public endDate: Date; diff --git a/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts b/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts index a7b881e83b..6affdcc7ac 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/datalake/data-lake-query-config.model.ts @@ -19,60 +19,60 @@ import { DataLakeMeasure } from '../gen/streampipes-model'; export interface DataExplorerFieldCharacteristics { - dimension: boolean; - numeric: boolean; - binary: boolean; - semanticTypes: string[]; + dimension: boolean; + numeric: boolean; + binary: boolean; + semanticTypes: string[]; } export interface DataExplorerField { - runtimeName: string; - aggregation?: string; - measure: string; - fullDbName: string; - sourceIndex: number; - fieldCharacteristics: DataExplorerFieldCharacteristics; + runtimeName: string; + aggregation?: string; + measure: string; + fullDbName: string; + sourceIndex: number; + fieldCharacteristics: DataExplorerFieldCharacteristics; } export interface FieldConfig { - runtimeName: string; - aggregations?: string[]; - alias?: string; - selected: boolean; - numeric: boolean; + runtimeName: string; + aggregations?: string[]; + alias?: string; + selected: boolean; + numeric: boolean; } export interface SelectedFilter { - field?: DataExplorerField; - operator: string; - value: any; + field?: DataExplorerField; + operator: string; + value: any; } export interface QueryConfig { - selectedFilters: SelectedFilter[]; - fields?: FieldConfig[]; - groupBy?: FieldConfig[]; - limit?: number; - page?: number; - order?: 'ASC' | 'DESC'; - autoAggregate?: boolean; - aggregationValue?: number; - aggregationTimeUnit?: string; - aggregationFunction?: string; + selectedFilters: SelectedFilter[]; + fields?: FieldConfig[]; + groupBy?: FieldConfig[]; + limit?: number; + page?: number; + order?: 'ASC' | 'DESC'; + autoAggregate?: boolean; + aggregationValue?: number; + aggregationTimeUnit?: string; + aggregationFunction?: string; } export interface SourceConfig { - measureName: string; - measure?: DataLakeMeasure; - queryConfig: QueryConfig; - queryType: 'raw' | 'aggregated' | 'single'; - sourceType: 'pipeline' | 'measurement'; + measureName: string; + measure?: DataLakeMeasure; + queryConfig: QueryConfig; + queryType: 'raw' | 'aggregated' | 'single'; + sourceType: 'pipeline' | 'measurement'; } export interface DataExplorerDataConfig { - sourceConfigs: SourceConfig[]; - ignoreTooMuchDataWarning: boolean; - ignoreMissingValues: boolean; + sourceConfigs: SourceConfig[]; + ignoreTooMuchDataWarning: boolean; + ignoreMissingValues: boolean; } export type MissingValueBehaviour = 'ignore' | 'empty'; diff --git a/ui/projects/streampipes/platform-services/src/lib/model/email-config.model.ts b/ui/projects/streampipes/platform-services/src/lib/model/email-config.model.ts index 09445f70a5..638b61a778 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/email-config.model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/email-config.model.ts @@ -16,32 +16,31 @@ * */ export interface EmailConfig { + emailConfigured: boolean; + transportStrategy: 'SMTP' | 'SMTPS' | 'SMTP_TLS'; + smtpServerHost: string; + smtpServerPort: number; - emailConfigured: boolean; - transportStrategy: 'SMTP' | 'SMTPS' | 'SMTP_TLS'; - smtpServerHost: string; - smtpServerPort: number; + usesAuthentication: boolean; - usesAuthentication: boolean; + smtpUsername: string; + smtpPassword: string; - smtpUsername: string; - smtpPassword: string; + senderAddress: string; + senderName: string; - senderAddress: string; - senderName: string; + usesProxy: boolean; - usesProxy: boolean; + proxyHost: string; + proxyPort: number; - proxyHost: string; - proxyPort: number; + usesProxyAuthentication: string; - usesProxyAuthentication: string; + proxyUser: string; + proxyPassword: string; - proxyUser: string; - proxyPassword: string; + testRecipientAddress: string; - testRecipientAddress: string; - - smtpPassEncrypted: boolean; - proxyPassEncrypted: boolean; + smtpPassEncrypted: boolean; + proxyPassEncrypted: boolean; } diff --git a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts index 140c9672bd..6901ebb20c 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model-client.ts @@ -35,7 +35,10 @@ export class ExtensionsServiceEndpointItem { type: string; uri: string; - static fromData(data: ExtensionsServiceEndpointItem, target?: ExtensionsServiceEndpointItem): ExtensionsServiceEndpointItem { + static fromData( + data: ExtensionsServiceEndpointItem, + target?: ExtensionsServiceEndpointItem, + ): ExtensionsServiceEndpointItem { if (!data) { return data; } @@ -51,7 +54,9 @@ export class ExtensionsServiceEndpointItem { instance.installed = data.installed; instance.editable = data.editable; instance.available = data.available; - instance.streams = __getCopyArrayFn(ExtensionsServiceEndpointItem.fromData)(data.streams); + instance.streams = __getCopyArrayFn( + ExtensionsServiceEndpointItem.fromData, + )(data.streams); return instance; } } @@ -83,7 +88,10 @@ export class MatchingResultMessage { requirementSubject: string; title: string; - static fromData(data: MatchingResultMessage, target?: MatchingResultMessage): MatchingResultMessage { + static fromData( + data: MatchingResultMessage, + target?: MatchingResultMessage, + ): MatchingResultMessage { if (!data) { return data; } @@ -118,7 +126,9 @@ export class Permission { instance.objectClassName = data.objectClassName; instance.publicElement = data.publicElement; instance.ownerSid = data.ownerSid; - instance.grantedAuthorities = __getCopyArrayFn(PermissionEntry.fromData)(data.grantedAuthorities); + instance.grantedAuthorities = __getCopyArrayFn( + PermissionEntry.fromData, + )(data.grantedAuthorities); return instance; } } @@ -127,7 +137,10 @@ export class PermissionEntry { principalType: PrincipalType; sid: string; - static fromData(data: PermissionEntry, target?: PermissionEntry): PermissionEntry { + static fromData( + data: PermissionEntry, + target?: PermissionEntry, + ): PermissionEntry { if (!data) { return data; } @@ -161,7 +174,9 @@ export class Principal { instance.accountLocked = data.accountLocked; instance.accountExpired = data.accountExpired; instance.username = data.username; - instance.objectPermissions = __getCopyArrayFn(__identity())(data.objectPermissions); + instance.objectPermissions = __getCopyArrayFn(__identity())( + data.objectPermissions, + ); instance.roles = __getCopyArrayFn(__identity())(data.roles); instance.groups = __getCopyArrayFn(__identity())(data.groups); instance.principalType = data.principalType; @@ -175,7 +190,10 @@ export class RawUserApiToken { tokenId: string; tokenName: string; - static fromData(data: RawUserApiToken, target?: RawUserApiToken): RawUserApiToken { + static fromData( + data: RawUserApiToken, + target?: RawUserApiToken, + ): RawUserApiToken { if (!data) { return data; } @@ -192,7 +210,10 @@ export class ServiceAccount extends Principal { clientSecret: string; secretEncrypted: boolean; - static fromData(data: ServiceAccount, target?: ServiceAccount): ServiceAccount { + static fromData( + data: ServiceAccount, + target?: ServiceAccount, + ): ServiceAccount { if (!data) { return data; } @@ -222,10 +243,18 @@ export class UserAccount extends Principal { super.fromData(data, instance); instance.fullName = data.fullName; instance.password = data.password; - instance.preferredDataStreams = __getCopyArrayFn(__identity())(data.preferredDataStreams); - instance.preferredDataProcessors = __getCopyArrayFn(__identity())(data.preferredDataProcessors); - instance.preferredDataSinks = __getCopyArrayFn(__identity())(data.preferredDataSinks); - instance.userApiTokens = __getCopyArrayFn(UserApiToken.fromData)(data.userApiTokens); + instance.preferredDataStreams = __getCopyArrayFn(__identity())( + data.preferredDataStreams, + ); + instance.preferredDataProcessors = __getCopyArrayFn( + __identity(), + )(data.preferredDataProcessors); + instance.preferredDataSinks = __getCopyArrayFn(__identity())( + data.preferredDataSinks, + ); + instance.userApiTokens = __getCopyArrayFn(UserApiToken.fromData)( + data.userApiTokens, + ); instance.hideTutorial = data.hideTutorial; instance.darkMode = data.darkMode; return instance; @@ -247,11 +276,48 @@ export class UserApiToken { } } -export type PrincipalType = "USER_ACCOUNT" | "SERVICE_ACCOUNT" | "GROUP"; +export type PrincipalType = 'USER_ACCOUNT' | 'SERVICE_ACCOUNT' | 'GROUP'; -export type Privilege = "PRIVILEGE_READ_PIPELINE" | "PRIVILEGE_WRITE_PIPELINE" | "PRIVILEGE_DELETE_PIPELINE" | "PRIVILEGE_READ_ADAPTER" | "PRIVILEGE_WRITE_ADAPTER" | "PRIVILEGE_DELETE_ADAPTER" | "PRIVILEGE_READ_PIPELINE_ELEMENT" | "PRIVILEGE_WRITE_PIPELINE_ELEMENT" | "PRIVILEGE_DELETE_PIPELINE_ELEMENT" | "PRIVILEGE_READ_DASHBOARD" | "PRIVILEGE_WRITE_DASHBOARD" | "PRIVILEGE_DELETE_DASHBOARD" | "PRIVILEGE_READ_DASHBOARD_WIDGET" | "PRIVILEGE_WRITE_DASHBOARD_WIDGET" | "PRIVILEGE_DELETE_DASHBOARD_WIDGET" | "PRIVILEGE_READ_DATA_EXPLORER_VIEW" | "PRIVILEGE_WRITE_DATA_EXPLORER_VIEW" | "PRIVILEGE_DELETE_DATA_EXPLORER_VIEW" | "PRIVILEGE_READ_DATA_EXPLORER_WIDGET" | "PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET" | "PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET" | "PRIVILEGE_READ_APPS" | "PRIVILEGE_WRITE_APPS" | "PRIVILEGE_READ_NOTIFICATIONS" | "PRIVILEGE_READ_FILES" | "PRIVILEGE_WRITE_FILES" | "PRIVILEGE_DELETE_FILES"; +export type Privilege = + | 'PRIVILEGE_READ_PIPELINE' + | 'PRIVILEGE_WRITE_PIPELINE' + | 'PRIVILEGE_DELETE_PIPELINE' + | 'PRIVILEGE_READ_ADAPTER' + | 'PRIVILEGE_WRITE_ADAPTER' + | 'PRIVILEGE_DELETE_ADAPTER' + | 'PRIVILEGE_READ_PIPELINE_ELEMENT' + | 'PRIVILEGE_WRITE_PIPELINE_ELEMENT' + | 'PRIVILEGE_DELETE_PIPELINE_ELEMENT' + | 'PRIVILEGE_READ_DASHBOARD' + | 'PRIVILEGE_WRITE_DASHBOARD' + | 'PRIVILEGE_DELETE_DASHBOARD' + | 'PRIVILEGE_READ_DASHBOARD_WIDGET' + | 'PRIVILEGE_WRITE_DASHBOARD_WIDGET' + | 'PRIVILEGE_DELETE_DASHBOARD_WIDGET' + | 'PRIVILEGE_READ_DATA_EXPLORER_VIEW' + | 'PRIVILEGE_WRITE_DATA_EXPLORER_VIEW' + | 'PRIVILEGE_DELETE_DATA_EXPLORER_VIEW' + | 'PRIVILEGE_READ_DATA_EXPLORER_WIDGET' + | 'PRIVILEGE_WRITE_DATA_EXPLORER_WIDGET' + | 'PRIVILEGE_DELETE_DATA_EXPLORER_WIDGET' + | 'PRIVILEGE_READ_APPS' + | 'PRIVILEGE_WRITE_APPS' + | 'PRIVILEGE_READ_NOTIFICATIONS' + | 'PRIVILEGE_READ_FILES' + | 'PRIVILEGE_WRITE_FILES' + | 'PRIVILEGE_DELETE_FILES'; -export type Role = "ROLE_ADMIN" | "ROLE_SERVICE_ADMIN" | "ROLE_PIPELINE_ADMIN" | "ROLE_DASHBOARD_ADMIN" | "ROLE_DATA_EXPLORER_ADMIN" | "ROLE_CONNECT_ADMIN" | "ROLE_DASHBOARD_USER" | "ROLE_DATA_EXPLORER_USER" | "ROLE_PIPELINE_USER" | "ROLE_APP_USER"; +export type Role = + | 'ROLE_ADMIN' + | 'ROLE_SERVICE_ADMIN' + | 'ROLE_PIPELINE_ADMIN' + | 'ROLE_DASHBOARD_ADMIN' + | 'ROLE_DATA_EXPLORER_ADMIN' + | 'ROLE_CONNECT_ADMIN' + | 'ROLE_DASHBOARD_USER' + | 'ROLE_DATA_EXPLORER_USER' + | 'ROLE_PIPELINE_USER' + | 'ROLE_APP_USER'; function __getCopyArrayFn(itemCopyFn: (item: T) => T): (array: T[]) => T[] { return (array: T[]) => __copyArray(array, itemCopyFn); @@ -261,11 +327,16 @@ function __copyArray(array: T[], itemCopyFn: (item: T) => T): T[] { return array && array.map(item => item && itemCopyFn(item)); } -function __getCopyObjectFn(itemCopyFn: (item: T) => T): (object: { [index: string]: T }) => { [index: string]: T } { +function __getCopyObjectFn( + itemCopyFn: (item: T) => T, +): (object: { [index: string]: T }) => { [index: string]: T } { return (object: { [index: string]: T }) => __copyObject(object, itemCopyFn); } -function __copyObject(object: { [index: string]: T }, itemCopyFn: (item: T) => T): { [index: string]: T } { +function __copyObject( + object: { [index: string]: T }, + itemCopyFn: (item: T) => T, +): { [index: string]: T } { if (!object) { return object; } diff --git a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts index ab30779a02..3e0231922b 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/gen/streampipes-model.ts @@ -22,24 +22,236 @@ // Generated using typescript-generator version 2.27.744 on 2022-10-23 22:36:57. export class AbstractStreamPipesEntity { - "@class": "org.apache.streampipes.model.base.AbstractStreamPipesEntity" | "org.apache.streampipes.model.base.NamedStreamPipesEntity" | "org.apache.streampipes.model.connect.adapter.AdapterDescription" | "org.apache.streampipes.model.connect.adapter.AdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.AdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription" | "org.apache.streampipes.model.connect.grounding.ProtocolDescription" | "org.apache.streampipes.model.graph.DataSourceDescription" | "org.apache.streampipes.model.template.PipelineTemplateDescription" | "org.apache.streampipes.model.connect.grounding.FormatDescription" | "org.apache.streampipes.model.SpDataStream" | "org.apache.streampipes.model.SpDataSet" | "org.apache.streampipes.model.base.InvocableStreamPipesEntity" | "org.apache.streampipes.model.graph.DataProcessorInvocation" | "org.apache.streampipes.model.graph.DataSinkInvocation" | "org.apache.streampipes.model.base.UnnamedStreamPipesEntity" | "org.apache.streampipes.model.connect.guess.GuessSchema" | "org.apache.streampipes.model.connect.rules.TransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription" | "org.apache.streampipes.model.dashboard.DashboardWidgetSettings" | "org.apache.streampipes.model.datalake.DataLakeMeasure" | "org.apache.streampipes.model.runtime.RuntimeOptionsRequest" | "org.apache.streampipes.model.runtime.RuntimeOptionsResponse" | "org.apache.streampipes.model.staticproperty.StaticProperty" | "org.apache.streampipes.model.staticproperty.CodeInputStaticProperty" | "org.apache.streampipes.model.staticproperty.CollectionStaticProperty" | "org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty" | "org.apache.streampipes.model.staticproperty.DomainStaticProperty" | "org.apache.streampipes.model.staticproperty.FileStaticProperty" | "org.apache.streampipes.model.staticproperty.FreeTextStaticProperty" | "org.apache.streampipes.model.staticproperty.MatchingStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty" | "org.apache.streampipes.model.staticproperty.SecretStaticProperty" | "org.apache.streampipes.model.staticproperty.StaticPropertyAlternative" | "org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives" | "org.apache.streampipes.model.staticproperty.StaticPropertyGroup" | "org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty" | "org.apache.streampipes.model.staticproperty.SelectionStaticProperty" | "org.apache.streampipes.model.staticproperty.AnyStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty" | "org.apache.streampipes.model.staticproperty.OneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.MappingProperty" | "org.apache.streampipes.model.staticproperty.MappingPropertyUnary" | "org.apache.streampipes.model.staticproperty.MappingPropertyNary" | "org.apache.streampipes.model.template.PipelineTemplateInvocation" | "org.apache.streampipes.model.ApplicationLink" | "org.apache.streampipes.model.grounding.EventGrounding" | "org.apache.streampipes.model.schema.EventSchema" | "org.apache.streampipes.model.template.BoundPipelineElement" | "org.apache.streampipes.model.grounding.TransportProtocol" | "org.apache.streampipes.model.grounding.JmsTransportProtocol" | "org.apache.streampipes.model.grounding.KafkaTransportProtocol" | "org.apache.streampipes.model.grounding.MqttTransportProtocol" | "org.apache.streampipes.model.grounding.NatsTransportProtocol" | "org.apache.streampipes.model.grounding.TransportFormat" | "org.apache.streampipes.model.quality.EventStreamQualityRequirement" | "org.apache.streampipes.model.quality.MeasurementCapability" | "org.apache.streampipes.model.quality.MeasurementObject" | "org.apache.streampipes.model.schema.EventProperty" | "org.apache.streampipes.model.schema.EventPropertyList" | "org.apache.streampipes.model.schema.EventPropertyNested" | "org.apache.streampipes.model.schema.EventPropertyPrimitive" | "org.apache.streampipes.model.output.OutputStrategy" | "org.apache.streampipes.model.output.AppendOutputStrategy" | "org.apache.streampipes.model.output.CustomOutputStrategy" | "org.apache.streampipes.model.output.CustomTransformOutputStrategy" | "org.apache.streampipes.model.output.FixedOutputStrategy" | "org.apache.streampipes.model.output.KeepOutputStrategy" | "org.apache.streampipes.model.output.ListOutputStrategy" | "org.apache.streampipes.model.output.TransformOutputStrategy" | "org.apache.streampipes.model.output.UserDefinedOutputStrategy" | "org.apache.streampipes.model.monitoring.ElementStatusInfoSettings" | "org.apache.streampipes.model.staticproperty.Option" | "org.apache.streampipes.model.staticproperty.SupportedProperty" | "org.apache.streampipes.model.staticproperty.PropertyValueSpecification" | "org.apache.streampipes.model.grounding.TopicDefinition" | "org.apache.streampipes.model.grounding.SimpleTopicDefinition" | "org.apache.streampipes.model.grounding.WildcardTopicDefinition" | "org.apache.streampipes.model.quality.MeasurementProperty" | "org.apache.streampipes.model.quality.EventStreamQualityDefinition" | "org.apache.streampipes.model.quality.Frequency" | "org.apache.streampipes.model.quality.Latency" | "org.apache.streampipes.model.quality.EventPropertyQualityDefinition" | "org.apache.streampipes.model.quality.Accuracy" | "org.apache.streampipes.model.quality.MeasurementRange" | "org.apache.streampipes.model.quality.Precision" | "org.apache.streampipes.model.quality.Resolution" | "org.apache.streampipes.model.quality.EventPropertyQualityRequirement" | "org.apache.streampipes.model.output.PropertyRenameRule" | "org.apache.streampipes.model.schema.ValueSpecification" | "org.apache.streampipes.model.schema.QuantitativeValue" | "org.apache.streampipes.model.schema.Enumeration" | "org.apache.streampipes.model.output.TransformOperation" | "org.apache.streampipes.model.grounding.WildcardTopicMapping"; - elementId: string; - - static fromData(data: AbstractStreamPipesEntity, target?: AbstractStreamPipesEntity): AbstractStreamPipesEntity { + '@class': + | 'org.apache.streampipes.model.base.AbstractStreamPipesEntity' + | 'org.apache.streampipes.model.base.NamedStreamPipesEntity' + | 'org.apache.streampipes.model.connect.adapter.AdapterDescription' + | 'org.apache.streampipes.model.connect.adapter.AdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.AdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription' + | 'org.apache.streampipes.model.connect.grounding.ProtocolDescription' + | 'org.apache.streampipes.model.graph.DataSourceDescription' + | 'org.apache.streampipes.model.template.PipelineTemplateDescription' + | 'org.apache.streampipes.model.connect.grounding.FormatDescription' + | 'org.apache.streampipes.model.SpDataStream' + | 'org.apache.streampipes.model.SpDataSet' + | 'org.apache.streampipes.model.base.InvocableStreamPipesEntity' + | 'org.apache.streampipes.model.graph.DataProcessorInvocation' + | 'org.apache.streampipes.model.graph.DataSinkInvocation' + | 'org.apache.streampipes.model.base.UnnamedStreamPipesEntity' + | 'org.apache.streampipes.model.connect.guess.GuessSchema' + | 'org.apache.streampipes.model.connect.rules.TransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription' + | 'org.apache.streampipes.model.dashboard.DashboardWidgetSettings' + | 'org.apache.streampipes.model.datalake.DataLakeMeasure' + | 'org.apache.streampipes.model.runtime.RuntimeOptionsRequest' + | 'org.apache.streampipes.model.runtime.RuntimeOptionsResponse' + | 'org.apache.streampipes.model.staticproperty.StaticProperty' + | 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty' + | 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty' + | 'org.apache.streampipes.model.staticproperty.DomainStaticProperty' + | 'org.apache.streampipes.model.staticproperty.FileStaticProperty' + | 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty' + | 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty' + | 'org.apache.streampipes.model.staticproperty.SecretStaticProperty' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup' + | 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty' + | 'org.apache.streampipes.model.staticproperty.SelectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.MappingProperty' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyNary' + | 'org.apache.streampipes.model.template.PipelineTemplateInvocation' + | 'org.apache.streampipes.model.ApplicationLink' + | 'org.apache.streampipes.model.grounding.EventGrounding' + | 'org.apache.streampipes.model.schema.EventSchema' + | 'org.apache.streampipes.model.template.BoundPipelineElement' + | 'org.apache.streampipes.model.grounding.TransportProtocol' + | 'org.apache.streampipes.model.grounding.JmsTransportProtocol' + | 'org.apache.streampipes.model.grounding.KafkaTransportProtocol' + | 'org.apache.streampipes.model.grounding.MqttTransportProtocol' + | 'org.apache.streampipes.model.grounding.NatsTransportProtocol' + | 'org.apache.streampipes.model.grounding.TransportFormat' + | 'org.apache.streampipes.model.quality.EventStreamQualityRequirement' + | 'org.apache.streampipes.model.quality.MeasurementCapability' + | 'org.apache.streampipes.model.quality.MeasurementObject' + | 'org.apache.streampipes.model.schema.EventProperty' + | 'org.apache.streampipes.model.schema.EventPropertyList' + | 'org.apache.streampipes.model.schema.EventPropertyNested' + | 'org.apache.streampipes.model.schema.EventPropertyPrimitive' + | 'org.apache.streampipes.model.output.OutputStrategy' + | 'org.apache.streampipes.model.output.AppendOutputStrategy' + | 'org.apache.streampipes.model.output.CustomOutputStrategy' + | 'org.apache.streampipes.model.output.CustomTransformOutputStrategy' + | 'org.apache.streampipes.model.output.FixedOutputStrategy' + | 'org.apache.streampipes.model.output.KeepOutputStrategy' + | 'org.apache.streampipes.model.output.ListOutputStrategy' + | 'org.apache.streampipes.model.output.TransformOutputStrategy' + | 'org.apache.streampipes.model.output.UserDefinedOutputStrategy' + | 'org.apache.streampipes.model.monitoring.ElementStatusInfoSettings' + | 'org.apache.streampipes.model.staticproperty.Option' + | 'org.apache.streampipes.model.staticproperty.SupportedProperty' + | 'org.apache.streampipes.model.staticproperty.PropertyValueSpecification' + | 'org.apache.streampipes.model.grounding.TopicDefinition' + | 'org.apache.streampipes.model.grounding.SimpleTopicDefinition' + | 'org.apache.streampipes.model.grounding.WildcardTopicDefinition' + | 'org.apache.streampipes.model.quality.MeasurementProperty' + | 'org.apache.streampipes.model.quality.EventStreamQualityDefinition' + | 'org.apache.streampipes.model.quality.Frequency' + | 'org.apache.streampipes.model.quality.Latency' + | 'org.apache.streampipes.model.quality.EventPropertyQualityDefinition' + | 'org.apache.streampipes.model.quality.Accuracy' + | 'org.apache.streampipes.model.quality.MeasurementRange' + | 'org.apache.streampipes.model.quality.Precision' + | 'org.apache.streampipes.model.quality.Resolution' + | 'org.apache.streampipes.model.quality.EventPropertyQualityRequirement' + | 'org.apache.streampipes.model.output.PropertyRenameRule' + | 'org.apache.streampipes.model.schema.ValueSpecification' + | 'org.apache.streampipes.model.schema.QuantitativeValue' + | 'org.apache.streampipes.model.schema.Enumeration' + | 'org.apache.streampipes.model.output.TransformOperation' + | 'org.apache.streampipes.model.grounding.WildcardTopicMapping'; + 'elementId': string; + + static 'fromData'( + data: AbstractStreamPipesEntity, + target?: AbstractStreamPipesEntity, + ): AbstractStreamPipesEntity { if (!data) { return data; } const instance = target || new AbstractStreamPipesEntity(); - instance["@class"] = data["@class"]; + instance['@class'] = data['@class']; instance.elementId = data.elementId; return instance; } } export class UnnamedStreamPipesEntity extends AbstractStreamPipesEntity { - "@class": "org.apache.streampipes.model.base.UnnamedStreamPipesEntity" | "org.apache.streampipes.model.connect.guess.GuessSchema" | "org.apache.streampipes.model.connect.rules.TransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription" | "org.apache.streampipes.model.dashboard.DashboardWidgetSettings" | "org.apache.streampipes.model.datalake.DataLakeMeasure" | "org.apache.streampipes.model.runtime.RuntimeOptionsRequest" | "org.apache.streampipes.model.runtime.RuntimeOptionsResponse" | "org.apache.streampipes.model.staticproperty.StaticProperty" | "org.apache.streampipes.model.staticproperty.CodeInputStaticProperty" | "org.apache.streampipes.model.staticproperty.CollectionStaticProperty" | "org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty" | "org.apache.streampipes.model.staticproperty.DomainStaticProperty" | "org.apache.streampipes.model.staticproperty.FileStaticProperty" | "org.apache.streampipes.model.staticproperty.FreeTextStaticProperty" | "org.apache.streampipes.model.staticproperty.MatchingStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty" | "org.apache.streampipes.model.staticproperty.SecretStaticProperty" | "org.apache.streampipes.model.staticproperty.StaticPropertyAlternative" | "org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives" | "org.apache.streampipes.model.staticproperty.StaticPropertyGroup" | "org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty" | "org.apache.streampipes.model.staticproperty.SelectionStaticProperty" | "org.apache.streampipes.model.staticproperty.AnyStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty" | "org.apache.streampipes.model.staticproperty.OneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.MappingProperty" | "org.apache.streampipes.model.staticproperty.MappingPropertyUnary" | "org.apache.streampipes.model.staticproperty.MappingPropertyNary" | "org.apache.streampipes.model.template.PipelineTemplateInvocation" | "org.apache.streampipes.model.ApplicationLink" | "org.apache.streampipes.model.grounding.EventGrounding" | "org.apache.streampipes.model.schema.EventSchema" | "org.apache.streampipes.model.template.BoundPipelineElement" | "org.apache.streampipes.model.grounding.TransportProtocol" | "org.apache.streampipes.model.grounding.JmsTransportProtocol" | "org.apache.streampipes.model.grounding.KafkaTransportProtocol" | "org.apache.streampipes.model.grounding.MqttTransportProtocol" | "org.apache.streampipes.model.grounding.NatsTransportProtocol" | "org.apache.streampipes.model.grounding.TransportFormat" | "org.apache.streampipes.model.quality.EventStreamQualityRequirement" | "org.apache.streampipes.model.quality.MeasurementCapability" | "org.apache.streampipes.model.quality.MeasurementObject" | "org.apache.streampipes.model.schema.EventProperty" | "org.apache.streampipes.model.schema.EventPropertyList" | "org.apache.streampipes.model.schema.EventPropertyNested" | "org.apache.streampipes.model.schema.EventPropertyPrimitive" | "org.apache.streampipes.model.output.OutputStrategy" | "org.apache.streampipes.model.output.AppendOutputStrategy" | "org.apache.streampipes.model.output.CustomOutputStrategy" | "org.apache.streampipes.model.output.CustomTransformOutputStrategy" | "org.apache.streampipes.model.output.FixedOutputStrategy" | "org.apache.streampipes.model.output.KeepOutputStrategy" | "org.apache.streampipes.model.output.ListOutputStrategy" | "org.apache.streampipes.model.output.TransformOutputStrategy" | "org.apache.streampipes.model.output.UserDefinedOutputStrategy" | "org.apache.streampipes.model.monitoring.ElementStatusInfoSettings" | "org.apache.streampipes.model.staticproperty.Option" | "org.apache.streampipes.model.staticproperty.SupportedProperty" | "org.apache.streampipes.model.staticproperty.PropertyValueSpecification" | "org.apache.streampipes.model.grounding.TopicDefinition" | "org.apache.streampipes.model.grounding.SimpleTopicDefinition" | "org.apache.streampipes.model.grounding.WildcardTopicDefinition" | "org.apache.streampipes.model.quality.MeasurementProperty" | "org.apache.streampipes.model.quality.EventStreamQualityDefinition" | "org.apache.streampipes.model.quality.Frequency" | "org.apache.streampipes.model.quality.Latency" | "org.apache.streampipes.model.quality.EventPropertyQualityDefinition" | "org.apache.streampipes.model.quality.Accuracy" | "org.apache.streampipes.model.quality.MeasurementRange" | "org.apache.streampipes.model.quality.Precision" | "org.apache.streampipes.model.quality.Resolution" | "org.apache.streampipes.model.quality.EventPropertyQualityRequirement" | "org.apache.streampipes.model.output.PropertyRenameRule" | "org.apache.streampipes.model.schema.ValueSpecification" | "org.apache.streampipes.model.schema.QuantitativeValue" | "org.apache.streampipes.model.schema.Enumeration" | "org.apache.streampipes.model.output.TransformOperation" | "org.apache.streampipes.model.grounding.WildcardTopicMapping"; - - static fromData(data: UnnamedStreamPipesEntity, target?: UnnamedStreamPipesEntity): UnnamedStreamPipesEntity { + '@class': + | 'org.apache.streampipes.model.base.UnnamedStreamPipesEntity' + | 'org.apache.streampipes.model.connect.guess.GuessSchema' + | 'org.apache.streampipes.model.connect.rules.TransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription' + | 'org.apache.streampipes.model.dashboard.DashboardWidgetSettings' + | 'org.apache.streampipes.model.datalake.DataLakeMeasure' + | 'org.apache.streampipes.model.runtime.RuntimeOptionsRequest' + | 'org.apache.streampipes.model.runtime.RuntimeOptionsResponse' + | 'org.apache.streampipes.model.staticproperty.StaticProperty' + | 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty' + | 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty' + | 'org.apache.streampipes.model.staticproperty.DomainStaticProperty' + | 'org.apache.streampipes.model.staticproperty.FileStaticProperty' + | 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty' + | 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty' + | 'org.apache.streampipes.model.staticproperty.SecretStaticProperty' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup' + | 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty' + | 'org.apache.streampipes.model.staticproperty.SelectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.MappingProperty' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyNary' + | 'org.apache.streampipes.model.template.PipelineTemplateInvocation' + | 'org.apache.streampipes.model.ApplicationLink' + | 'org.apache.streampipes.model.grounding.EventGrounding' + | 'org.apache.streampipes.model.schema.EventSchema' + | 'org.apache.streampipes.model.template.BoundPipelineElement' + | 'org.apache.streampipes.model.grounding.TransportProtocol' + | 'org.apache.streampipes.model.grounding.JmsTransportProtocol' + | 'org.apache.streampipes.model.grounding.KafkaTransportProtocol' + | 'org.apache.streampipes.model.grounding.MqttTransportProtocol' + | 'org.apache.streampipes.model.grounding.NatsTransportProtocol' + | 'org.apache.streampipes.model.grounding.TransportFormat' + | 'org.apache.streampipes.model.quality.EventStreamQualityRequirement' + | 'org.apache.streampipes.model.quality.MeasurementCapability' + | 'org.apache.streampipes.model.quality.MeasurementObject' + | 'org.apache.streampipes.model.schema.EventProperty' + | 'org.apache.streampipes.model.schema.EventPropertyList' + | 'org.apache.streampipes.model.schema.EventPropertyNested' + | 'org.apache.streampipes.model.schema.EventPropertyPrimitive' + | 'org.apache.streampipes.model.output.OutputStrategy' + | 'org.apache.streampipes.model.output.AppendOutputStrategy' + | 'org.apache.streampipes.model.output.CustomOutputStrategy' + | 'org.apache.streampipes.model.output.CustomTransformOutputStrategy' + | 'org.apache.streampipes.model.output.FixedOutputStrategy' + | 'org.apache.streampipes.model.output.KeepOutputStrategy' + | 'org.apache.streampipes.model.output.ListOutputStrategy' + | 'org.apache.streampipes.model.output.TransformOutputStrategy' + | 'org.apache.streampipes.model.output.UserDefinedOutputStrategy' + | 'org.apache.streampipes.model.monitoring.ElementStatusInfoSettings' + | 'org.apache.streampipes.model.staticproperty.Option' + | 'org.apache.streampipes.model.staticproperty.SupportedProperty' + | 'org.apache.streampipes.model.staticproperty.PropertyValueSpecification' + | 'org.apache.streampipes.model.grounding.TopicDefinition' + | 'org.apache.streampipes.model.grounding.SimpleTopicDefinition' + | 'org.apache.streampipes.model.grounding.WildcardTopicDefinition' + | 'org.apache.streampipes.model.quality.MeasurementProperty' + | 'org.apache.streampipes.model.quality.EventStreamQualityDefinition' + | 'org.apache.streampipes.model.quality.Frequency' + | 'org.apache.streampipes.model.quality.Latency' + | 'org.apache.streampipes.model.quality.EventPropertyQualityDefinition' + | 'org.apache.streampipes.model.quality.Accuracy' + | 'org.apache.streampipes.model.quality.MeasurementRange' + | 'org.apache.streampipes.model.quality.Precision' + | 'org.apache.streampipes.model.quality.Resolution' + | 'org.apache.streampipes.model.quality.EventPropertyQualityRequirement' + | 'org.apache.streampipes.model.output.PropertyRenameRule' + | 'org.apache.streampipes.model.schema.ValueSpecification' + | 'org.apache.streampipes.model.schema.QuantitativeValue' + | 'org.apache.streampipes.model.schema.Enumeration' + | 'org.apache.streampipes.model.output.TransformOperation' + | 'org.apache.streampipes.model.grounding.WildcardTopicMapping'; + + static 'fromData'( + data: UnnamedStreamPipesEntity, + target?: UnnamedStreamPipesEntity, + ): UnnamedStreamPipesEntity { if (!data) { return data; } @@ -50,9 +262,21 @@ export class UnnamedStreamPipesEntity extends AbstractStreamPipesEntity { } export class MeasurementProperty extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.quality.MeasurementProperty" | "org.apache.streampipes.model.quality.EventStreamQualityDefinition" | "org.apache.streampipes.model.quality.Frequency" | "org.apache.streampipes.model.quality.Latency" | "org.apache.streampipes.model.quality.EventPropertyQualityDefinition" | "org.apache.streampipes.model.quality.Accuracy" | "org.apache.streampipes.model.quality.MeasurementRange" | "org.apache.streampipes.model.quality.Precision" | "org.apache.streampipes.model.quality.Resolution"; + '@class': + | 'org.apache.streampipes.model.quality.MeasurementProperty' + | 'org.apache.streampipes.model.quality.EventStreamQualityDefinition' + | 'org.apache.streampipes.model.quality.Frequency' + | 'org.apache.streampipes.model.quality.Latency' + | 'org.apache.streampipes.model.quality.EventPropertyQualityDefinition' + | 'org.apache.streampipes.model.quality.Accuracy' + | 'org.apache.streampipes.model.quality.MeasurementRange' + | 'org.apache.streampipes.model.quality.Precision' + | 'org.apache.streampipes.model.quality.Resolution'; - static fromData(data: MeasurementProperty, target?: MeasurementProperty): MeasurementProperty { + static 'fromData'( + data: MeasurementProperty, + target?: MeasurementProperty, + ): MeasurementProperty { if (!data) { return data; } @@ -61,23 +285,33 @@ export class MeasurementProperty extends UnnamedStreamPipesEntity { return instance; } - static fromDataUnion(data: MeasurementPropertyUnion): MeasurementPropertyUnion { + static 'fromDataUnion'( + data: MeasurementPropertyUnion, + ): MeasurementPropertyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.quality.EventPropertyQualityDefinition": + switch (data['@class']) { + case 'org.apache.streampipes.model.quality.EventPropertyQualityDefinition': return EventPropertyQualityDefinition.fromData(data); - case "org.apache.streampipes.model.quality.EventStreamQualityDefinition": + case 'org.apache.streampipes.model.quality.EventStreamQualityDefinition': return EventStreamQualityDefinition.fromData(data); } } } export class EventPropertyQualityDefinition extends MeasurementProperty { - "@class": "org.apache.streampipes.model.quality.EventPropertyQualityDefinition" | "org.apache.streampipes.model.quality.Accuracy" | "org.apache.streampipes.model.quality.MeasurementRange" | "org.apache.streampipes.model.quality.Precision" | "org.apache.streampipes.model.quality.Resolution"; + '@class': + | 'org.apache.streampipes.model.quality.EventPropertyQualityDefinition' + | 'org.apache.streampipes.model.quality.Accuracy' + | 'org.apache.streampipes.model.quality.MeasurementRange' + | 'org.apache.streampipes.model.quality.Precision' + | 'org.apache.streampipes.model.quality.Resolution'; - static fromData(data: EventPropertyQualityDefinition, target?: EventPropertyQualityDefinition): EventPropertyQualityDefinition { + static 'fromData'( + data: EventPropertyQualityDefinition, + target?: EventPropertyQualityDefinition, + ): EventPropertyQualityDefinition { if (!data) { return data; } @@ -86,28 +320,30 @@ export class EventPropertyQualityDefinition extends MeasurementProperty { return instance; } - static fromDataUnion(data: EventPropertyQualityDefinitionUnion): EventPropertyQualityDefinitionUnion { + static 'fromDataUnion'( + data: EventPropertyQualityDefinitionUnion, + ): EventPropertyQualityDefinitionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.quality.Accuracy": + switch (data['@class']) { + case 'org.apache.streampipes.model.quality.Accuracy': return Accuracy.fromData(data); - case "org.apache.streampipes.model.quality.MeasurementRange": + case 'org.apache.streampipes.model.quality.MeasurementRange': return MeasurementRange.fromData(data); - case "org.apache.streampipes.model.quality.Precision": + case 'org.apache.streampipes.model.quality.Precision': return Precision.fromData(data); - case "org.apache.streampipes.model.quality.Resolution": + case 'org.apache.streampipes.model.quality.Resolution': return Resolution.fromData(data); } } } export class Accuracy extends EventPropertyQualityDefinition { - "@class": "org.apache.streampipes.model.quality.Accuracy"; - quantityValue: number; + '@class': 'org.apache.streampipes.model.quality.Accuracy'; + 'quantityValue': number; - static fromData(data: Accuracy, target?: Accuracy): Accuracy { + static 'fromData'(data: Accuracy, target?: Accuracy): Accuracy { if (!data) { return data; } @@ -119,23 +355,43 @@ export class Accuracy extends EventPropertyQualityDefinition { } export class NamedStreamPipesEntity extends AbstractStreamPipesEntity { - "@class": "org.apache.streampipes.model.base.NamedStreamPipesEntity" | "org.apache.streampipes.model.connect.adapter.AdapterDescription" | "org.apache.streampipes.model.connect.adapter.AdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.AdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription" | "org.apache.streampipes.model.connect.grounding.ProtocolDescription" | "org.apache.streampipes.model.graph.DataSourceDescription" | "org.apache.streampipes.model.template.PipelineTemplateDescription" | "org.apache.streampipes.model.connect.grounding.FormatDescription" | "org.apache.streampipes.model.SpDataStream" | "org.apache.streampipes.model.SpDataSet" | "org.apache.streampipes.model.base.InvocableStreamPipesEntity" | "org.apache.streampipes.model.graph.DataProcessorInvocation" | "org.apache.streampipes.model.graph.DataSinkInvocation"; - _rev: string; - appId: string; - applicationLinks: ApplicationLink[]; - connectedTo: string[]; - description: string; - dom: string; - iconUrl: string; - includedAssets: string[]; - includedLocales: string[]; - includesAssets: boolean; - includesLocales: boolean; - internallyManaged: boolean; - name: string; - uri: string; - - static fromData(data: NamedStreamPipesEntity, target?: NamedStreamPipesEntity): NamedStreamPipesEntity { + '@class': + | 'org.apache.streampipes.model.base.NamedStreamPipesEntity' + | 'org.apache.streampipes.model.connect.adapter.AdapterDescription' + | 'org.apache.streampipes.model.connect.adapter.AdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.AdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription' + | 'org.apache.streampipes.model.connect.grounding.ProtocolDescription' + | 'org.apache.streampipes.model.graph.DataSourceDescription' + | 'org.apache.streampipes.model.template.PipelineTemplateDescription' + | 'org.apache.streampipes.model.connect.grounding.FormatDescription' + | 'org.apache.streampipes.model.SpDataStream' + | 'org.apache.streampipes.model.SpDataSet' + | 'org.apache.streampipes.model.base.InvocableStreamPipesEntity' + | 'org.apache.streampipes.model.graph.DataProcessorInvocation' + | 'org.apache.streampipes.model.graph.DataSinkInvocation'; + '_rev': string; + 'appId': string; + 'applicationLinks': ApplicationLink[]; + 'connectedTo': string[]; + 'description': string; + 'dom': string; + 'iconUrl': string; + 'includedAssets': string[]; + 'includedLocales': string[]; + 'includesAssets': boolean; + 'includesLocales': boolean; + 'internallyManaged': boolean; + 'name': string; + 'uri': string; + + static 'fromData'( + data: NamedStreamPipesEntity, + target?: NamedStreamPipesEntity, + ): NamedStreamPipesEntity { if (!data) { return data; } @@ -147,11 +403,19 @@ export class NamedStreamPipesEntity extends AbstractStreamPipesEntity { instance.appId = data.appId; instance.includesAssets = data.includesAssets; instance.includesLocales = data.includesLocales; - instance.includedAssets = __getCopyArrayFn(__identity())(data.includedAssets); - instance.includedLocales = __getCopyArrayFn(__identity())(data.includedLocales); - instance.applicationLinks = __getCopyArrayFn(ApplicationLink.fromData)(data.applicationLinks); + instance.includedAssets = __getCopyArrayFn(__identity())( + data.includedAssets, + ); + instance.includedLocales = __getCopyArrayFn(__identity())( + data.includedLocales, + ); + instance.applicationLinks = __getCopyArrayFn(ApplicationLink.fromData)( + data.applicationLinks, + ); instance.internallyManaged = data.internallyManaged; - instance.connectedTo = __getCopyArrayFn(__identity())(data.connectedTo); + instance.connectedTo = __getCopyArrayFn(__identity())( + data.connectedTo, + ); instance.dom = data.dom; instance.uri = data.uri; instance._rev = data._rev; @@ -160,22 +424,32 @@ export class NamedStreamPipesEntity extends AbstractStreamPipesEntity { } export class AdapterDescription extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.connect.adapter.AdapterDescription" | "org.apache.streampipes.model.connect.adapter.AdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.AdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription"; - adapterType: string; - category: string[]; - config: StaticPropertyUnion[]; - correspondingDataStreamElementId: string; - correspondingServiceGroup: string; - createdAt: number; - eventGrounding: EventGrounding; - icon: string; - rules: TransformationRuleDescriptionUnion[]; - schemaRules: TransformationRuleDescriptionUnion[]; - selectedEndpointUrl: string; - streamRules: TransformationRuleDescriptionUnion[]; - valueRules: TransformationRuleDescriptionUnion[]; - - static fromData(data: AdapterDescription, target?: AdapterDescription): AdapterDescription { + '@class': + | 'org.apache.streampipes.model.connect.adapter.AdapterDescription' + | 'org.apache.streampipes.model.connect.adapter.AdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.AdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription'; + 'adapterType': string; + 'category': string[]; + 'config': StaticPropertyUnion[]; + 'correspondingDataStreamElementId': string; + 'correspondingServiceGroup': string; + 'createdAt': number; + 'eventGrounding': EventGrounding; + 'icon': string; + 'rules': TransformationRuleDescriptionUnion[]; + 'schemaRules': TransformationRuleDescriptionUnion[]; + 'selectedEndpointUrl': string; + 'streamRules': TransformationRuleDescriptionUnion[]; + 'valueRules': TransformationRuleDescriptionUnion[]; + + static 'fromData'( + data: AdapterDescription, + target?: AdapterDescription, + ): AdapterDescription { if (!data) { return data; } @@ -184,31 +458,46 @@ export class AdapterDescription extends NamedStreamPipesEntity { instance.eventGrounding = EventGrounding.fromData(data.eventGrounding); instance.adapterType = data.adapterType; instance.icon = data.icon; - instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.config); - instance.rules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.rules); - instance.category = __getCopyArrayFn(__identity())(data.category); + instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)( + data.config, + ); + instance.rules = __getCopyArrayFn( + TransformationRuleDescription.fromDataUnion, + )(data.rules); + instance.category = __getCopyArrayFn(__identity())( + data.category, + ); instance.createdAt = data.createdAt; instance.selectedEndpointUrl = data.selectedEndpointUrl; instance.correspondingServiceGroup = data.correspondingServiceGroup; - instance.correspondingDataStreamElementId = data.correspondingDataStreamElementId; - instance.streamRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.streamRules); - instance.schemaRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.schemaRules); - instance.valueRules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.valueRules); + instance.correspondingDataStreamElementId = + data.correspondingDataStreamElementId; + instance.streamRules = __getCopyArrayFn( + TransformationRuleDescription.fromDataUnion, + )(data.streamRules); + instance.schemaRules = __getCopyArrayFn( + TransformationRuleDescription.fromDataUnion, + )(data.schemaRules); + instance.valueRules = __getCopyArrayFn( + TransformationRuleDescription.fromDataUnion, + )(data.valueRules); return instance; } - static fromDataUnion(data: AdapterDescriptionUnion): AdapterDescriptionUnion { + static 'fromDataUnion'( + data: AdapterDescriptionUnion, + ): AdapterDescriptionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription": + switch (data['@class']) { + case 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription': return GenericAdapterSetDescription.fromData(data); - case "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription": + case 'org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription': return GenericAdapterStreamDescription.fromData(data); - case "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription": + case 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription': return SpecificAdapterStreamDescription.fromData(data); - case "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription": + case 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription': return SpecificAdapterSetDescription.fromData(data); } } @@ -218,22 +507,35 @@ export class AdapterEventPreview { inputData: { [index: string]: GuessTypeInfo }; rules: TransformationRuleDescriptionUnion[]; - static fromData(data: AdapterEventPreview, target?: AdapterEventPreview): AdapterEventPreview { + static fromData( + data: AdapterEventPreview, + target?: AdapterEventPreview, + ): AdapterEventPreview { if (!data) { return data; } const instance = target || new AdapterEventPreview(); - instance.rules = __getCopyArrayFn(TransformationRuleDescription.fromDataUnion)(data.rules); - instance.inputData = __getCopyObjectFn(GuessTypeInfo.fromData)(data.inputData); + instance.rules = __getCopyArrayFn( + TransformationRuleDescription.fromDataUnion, + )(data.rules); + instance.inputData = __getCopyObjectFn(GuessTypeInfo.fromData)( + data.inputData, + ); return instance; } } export class AdapterSetDescription extends AdapterDescription { - "@class": "org.apache.streampipes.model.connect.adapter.AdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription"; - dataSet: SpDataSet; + '@class': + | 'org.apache.streampipes.model.connect.adapter.AdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription'; + 'dataSet': SpDataSet; - static fromData(data: AdapterSetDescription, target?: AdapterSetDescription): AdapterSetDescription { + static 'fromData'( + data: AdapterSetDescription, + target?: AdapterSetDescription, + ): AdapterSetDescription { if (!data) { return data; } @@ -243,25 +545,33 @@ export class AdapterSetDescription extends AdapterDescription { return instance; } - static fromDataUnion(data: AdapterSetDescriptionUnion): AdapterSetDescriptionUnion { + static 'fromDataUnion'( + data: AdapterSetDescriptionUnion, + ): AdapterSetDescriptionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription": + switch (data['@class']) { + case 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription': return GenericAdapterSetDescription.fromData(data); - case "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription": + case 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription': return SpecificAdapterSetDescription.fromData(data); } } } export class AdapterStreamDescription extends AdapterDescription { - "@class": "org.apache.streampipes.model.connect.adapter.AdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription" | "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription"; - dataStream: SpDataStreamUnion; - running: boolean; + '@class': + | 'org.apache.streampipes.model.connect.adapter.AdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription' + | 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription'; + 'dataStream': SpDataStreamUnion; + 'running': boolean; - static fromData(data: AdapterStreamDescription, target?: AdapterStreamDescription): AdapterStreamDescription { + static 'fromData'( + data: AdapterStreamDescription, + target?: AdapterStreamDescription, + ): AdapterStreamDescription { if (!data) { return data; } @@ -272,14 +582,16 @@ export class AdapterStreamDescription extends AdapterDescription { return instance; } - static fromDataUnion(data: AdapterStreamDescriptionUnion): AdapterStreamDescriptionUnion { + static 'fromDataUnion'( + data: AdapterStreamDescriptionUnion, + ): AdapterStreamDescriptionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription": + switch (data['@class']) { + case 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription': return SpecificAdapterStreamDescription.fromData(data); - case "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription": + case 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription': return SpecificAdapterStreamDescription.fromData(data); } } @@ -303,9 +615,28 @@ export class AdapterType { } export class TransformationRuleDescription extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.connect.rules.TransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription"; - - static fromData(data: TransformationRuleDescription, target?: TransformationRuleDescription): TransformationRuleDescription { + '@class': + | 'org.apache.streampipes.model.connect.rules.TransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription'; + + static 'fromData'( + data: TransformationRuleDescription, + target?: TransformationRuleDescription, + ): TransformationRuleDescription { if (!data) { return data; } @@ -314,43 +645,61 @@ export class TransformationRuleDescription extends UnnamedStreamPipesEntity { return instance; } - static fromDataUnion(data: TransformationRuleDescriptionUnion): TransformationRuleDescriptionUnion { + static 'fromDataUnion'( + data: TransformationRuleDescriptionUnion, + ): TransformationRuleDescriptionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription": + switch (data['@class']) { + case 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription': return AddTimestampRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription": + case 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription': return AddValueTransformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription": + case 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription': return TimestampTranfsformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription": + case 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription': return UnitTransformRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription": + case 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription': return EventRateTransformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription": - return RemoveDuplicatesTransformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription": + case 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription': + return RemoveDuplicatesTransformationRuleDescription.fromData( + data, + ); + case 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription': return CreateNestedRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription": + case 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription': return DeleteRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription": + case 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription': return RenameRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription": + case 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription': return MoveRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription": - return ChangeDatatypeTransformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription": - return CorrectionValueTransformationRuleDescription.fromData(data); + case 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription': + return ChangeDatatypeTransformationRuleDescription.fromData( + data, + ); + case 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription': + return CorrectionValueTransformationRuleDescription.fromData( + data, + ); } } } export class ValueTransformationRuleDescription extends TransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription" | "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription" | "org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription"; + '@class': + | 'org.apache.streampipes.model.connect.rules.value.ValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription'; - static fromData(data: ValueTransformationRuleDescription, target?: ValueTransformationRuleDescription): ValueTransformationRuleDescription { + static 'fromData'( + data: ValueTransformationRuleDescription, + target?: ValueTransformationRuleDescription, + ): ValueTransformationRuleDescription { if (!data) { return data; } @@ -359,30 +708,37 @@ export class ValueTransformationRuleDescription extends TransformationRuleDescri return instance; } - static fromDataUnion(data: ValueTransformationRuleDescriptionUnion): ValueTransformationRuleDescriptionUnion { + static 'fromDataUnion'( + data: ValueTransformationRuleDescriptionUnion, + ): ValueTransformationRuleDescriptionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription": + switch (data['@class']) { + case 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription': return AddTimestampRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription": + case 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription': return AddValueTransformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription": + case 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription': return TimestampTranfsformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription": + case 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription': return UnitTransformRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription": - return CorrectionValueTransformationRuleDescription.fromData(data); + case 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription': + return CorrectionValueTransformationRuleDescription.fromData( + data, + ); } } } export class AddTimestampRuleDescription extends ValueTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription"; - runtimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.value.AddTimestampRuleDescription'; + 'runtimeKey': string; - static fromData(data: AddTimestampRuleDescription, target?: AddTimestampRuleDescription): AddTimestampRuleDescription { + static 'fromData'( + data: AddTimestampRuleDescription, + target?: AddTimestampRuleDescription, + ): AddTimestampRuleDescription { if (!data) { return data; } @@ -394,11 +750,14 @@ export class AddTimestampRuleDescription extends ValueTransformationRuleDescript } export class AddValueTransformationRuleDescription extends ValueTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription"; - runtimeKey: string; - staticValue: string; + '@class': 'org.apache.streampipes.model.connect.rules.value.AddValueTransformationRuleDescription'; + 'runtimeKey': string; + 'staticValue': string; - static fromData(data: AddValueTransformationRuleDescription, target?: AddValueTransformationRuleDescription): AddValueTransformationRuleDescription { + static 'fromData'( + data: AddValueTransformationRuleDescription, + target?: AddValueTransformationRuleDescription, + ): AddValueTransformationRuleDescription { if (!data) { return data; } @@ -411,16 +770,41 @@ export class AddValueTransformationRuleDescription extends ValueTransformationRu } export class StaticProperty extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.staticproperty.StaticProperty" | "org.apache.streampipes.model.staticproperty.CodeInputStaticProperty" | "org.apache.streampipes.model.staticproperty.CollectionStaticProperty" | "org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty" | "org.apache.streampipes.model.staticproperty.DomainStaticProperty" | "org.apache.streampipes.model.staticproperty.FileStaticProperty" | "org.apache.streampipes.model.staticproperty.FreeTextStaticProperty" | "org.apache.streampipes.model.staticproperty.MatchingStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty" | "org.apache.streampipes.model.staticproperty.SecretStaticProperty" | "org.apache.streampipes.model.staticproperty.StaticPropertyAlternative" | "org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives" | "org.apache.streampipes.model.staticproperty.StaticPropertyGroup" | "org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty" | "org.apache.streampipes.model.staticproperty.SelectionStaticProperty" | "org.apache.streampipes.model.staticproperty.AnyStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty" | "org.apache.streampipes.model.staticproperty.OneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.MappingProperty" | "org.apache.streampipes.model.staticproperty.MappingPropertyUnary" | "org.apache.streampipes.model.staticproperty.MappingPropertyNary"; - description: string; - index: number; - internalName: string; - label: string; - predefined: boolean; - staticPropertyType: StaticPropertyType; - valueRequired: boolean; - - static fromData(data: StaticProperty, target?: StaticProperty): StaticProperty { + '@class': + | 'org.apache.streampipes.model.staticproperty.StaticProperty' + | 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty' + | 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty' + | 'org.apache.streampipes.model.staticproperty.DomainStaticProperty' + | 'org.apache.streampipes.model.staticproperty.FileStaticProperty' + | 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty' + | 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty' + | 'org.apache.streampipes.model.staticproperty.SecretStaticProperty' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives' + | 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup' + | 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty' + | 'org.apache.streampipes.model.staticproperty.SelectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.MappingProperty' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyNary'; + 'description': string; + 'index': number; + 'internalName': string; + 'label': string; + 'predefined': boolean; + 'staticPropertyType': StaticPropertyType; + 'valueRequired': boolean; + + static 'fromData'( + data: StaticProperty, + target?: StaticProperty, + ): StaticProperty { if (!data) { return data; } @@ -436,59 +820,67 @@ export class StaticProperty extends UnnamedStreamPipesEntity { return instance; } - static fromDataUnion(data: StaticPropertyUnion): StaticPropertyUnion { + static 'fromDataUnion'(data: StaticPropertyUnion): StaticPropertyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.staticproperty.AnyStaticProperty": + switch (data['@class']) { + case 'org.apache.streampipes.model.staticproperty.AnyStaticProperty': return AnyStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.CodeInputStaticProperty": + case 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty': return CodeInputStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.CollectionStaticProperty": + case 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty': return CollectionStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty": + case 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty': return ColorPickerStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.DomainStaticProperty": + case 'org.apache.streampipes.model.staticproperty.DomainStaticProperty': return DomainStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.FileStaticProperty": + case 'org.apache.streampipes.model.staticproperty.FileStaticProperty': return FileStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.FreeTextStaticProperty": + case 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty': return FreeTextStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.MappingPropertyUnary": + case 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary': return MappingPropertyUnary.fromData(data); - case "org.apache.streampipes.model.staticproperty.MappingPropertyNary": + case 'org.apache.streampipes.model.staticproperty.MappingPropertyNary': return MappingPropertyNary.fromData(data); - case "org.apache.streampipes.model.staticproperty.MatchingStaticProperty": + case 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty': return MatchingStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.OneOfStaticProperty": + case 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty': return OneOfStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty": + case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty': return RuntimeResolvableAnyStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty": + case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty': return RuntimeResolvableOneOfStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty": + case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty': return RuntimeResolvableTreeInputStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.SecretStaticProperty": + case 'org.apache.streampipes.model.staticproperty.SecretStaticProperty': return SecretStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.StaticPropertyAlternative": + case 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative': return StaticPropertyAlternative.fromData(data); - case "org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives": + case 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives': return StaticPropertyAlternatives.fromData(data); - case "org.apache.streampipes.model.staticproperty.StaticPropertyGroup": + case 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup': return StaticPropertyGroup.fromData(data); - case "org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty": + case 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty': return SlideToggleStaticProperty.fromData(data); } } } export class SelectionStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.SelectionStaticProperty" | "org.apache.streampipes.model.staticproperty.AnyStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty" | "org.apache.streampipes.model.staticproperty.OneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty"; - horizontalRendering: boolean; - options: Option[]; + '@class': + | 'org.apache.streampipes.model.staticproperty.SelectionStaticProperty' + | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty'; + 'horizontalRendering': boolean; + 'options': Option[]; - static fromData(data: SelectionStaticProperty, target?: SelectionStaticProperty): SelectionStaticProperty { + static 'fromData'( + data: SelectionStaticProperty, + target?: SelectionStaticProperty, + ): SelectionStaticProperty { if (!data) { return data; } @@ -499,23 +891,30 @@ export class SelectionStaticProperty extends StaticProperty { return instance; } - static fromDataUnion(data: SelectionStaticPropertyUnion): SelectionStaticPropertyUnion { + static 'fromDataUnion'( + data: SelectionStaticPropertyUnion, + ): SelectionStaticPropertyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.staticproperty.AnyStaticProperty": + switch (data['@class']) { + case 'org.apache.streampipes.model.staticproperty.AnyStaticProperty': return AnyStaticProperty.fromData(data); - case "org.apache.streampipes.model.staticproperty.OneOfStaticProperty": + case 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty': return OneOfStaticProperty.fromData(data); } } } export class AnyStaticProperty extends SelectionStaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.AnyStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty"; + '@class': + | 'org.apache.streampipes.model.staticproperty.AnyStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty'; - static fromData(data: AnyStaticProperty, target?: AnyStaticProperty): AnyStaticProperty { + static 'fromData'( + data: AnyStaticProperty, + target?: AnyStaticProperty, + ): AnyStaticProperty { if (!data) { return data; } @@ -526,70 +925,92 @@ export class AnyStaticProperty extends SelectionStaticProperty { } export class OutputStrategy extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.output.OutputStrategy" | "org.apache.streampipes.model.output.AppendOutputStrategy" | "org.apache.streampipes.model.output.CustomOutputStrategy" | "org.apache.streampipes.model.output.CustomTransformOutputStrategy" | "org.apache.streampipes.model.output.FixedOutputStrategy" | "org.apache.streampipes.model.output.KeepOutputStrategy" | "org.apache.streampipes.model.output.ListOutputStrategy" | "org.apache.streampipes.model.output.TransformOutputStrategy" | "org.apache.streampipes.model.output.UserDefinedOutputStrategy"; - name: string; - renameRules: PropertyRenameRule[]; - - static fromData(data: OutputStrategy, target?: OutputStrategy): OutputStrategy { + '@class': + | 'org.apache.streampipes.model.output.OutputStrategy' + | 'org.apache.streampipes.model.output.AppendOutputStrategy' + | 'org.apache.streampipes.model.output.CustomOutputStrategy' + | 'org.apache.streampipes.model.output.CustomTransformOutputStrategy' + | 'org.apache.streampipes.model.output.FixedOutputStrategy' + | 'org.apache.streampipes.model.output.KeepOutputStrategy' + | 'org.apache.streampipes.model.output.ListOutputStrategy' + | 'org.apache.streampipes.model.output.TransformOutputStrategy' + | 'org.apache.streampipes.model.output.UserDefinedOutputStrategy'; + 'name': string; + 'renameRules': PropertyRenameRule[]; + + static 'fromData'( + data: OutputStrategy, + target?: OutputStrategy, + ): OutputStrategy { if (!data) { return data; } const instance = target || new OutputStrategy(); super.fromData(data, instance); instance.name = data.name; - instance.renameRules = __getCopyArrayFn(PropertyRenameRule.fromData)(data.renameRules); + instance.renameRules = __getCopyArrayFn(PropertyRenameRule.fromData)( + data.renameRules, + ); return instance; } - static fromDataUnion(data: OutputStrategyUnion): OutputStrategyUnion { + static 'fromDataUnion'(data: OutputStrategyUnion): OutputStrategyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.output.AppendOutputStrategy": + switch (data['@class']) { + case 'org.apache.streampipes.model.output.AppendOutputStrategy': return AppendOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.CustomOutputStrategy": + case 'org.apache.streampipes.model.output.CustomOutputStrategy': return CustomOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.CustomTransformOutputStrategy": + case 'org.apache.streampipes.model.output.CustomTransformOutputStrategy': return CustomTransformOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.FixedOutputStrategy": + case 'org.apache.streampipes.model.output.FixedOutputStrategy': return FixedOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.KeepOutputStrategy": + case 'org.apache.streampipes.model.output.KeepOutputStrategy': return KeepOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.ListOutputStrategy": + case 'org.apache.streampipes.model.output.ListOutputStrategy': return ListOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.TransformOutputStrategy": + case 'org.apache.streampipes.model.output.TransformOutputStrategy': return TransformOutputStrategy.fromData(data); - case "org.apache.streampipes.model.output.UserDefinedOutputStrategy": + case 'org.apache.streampipes.model.output.UserDefinedOutputStrategy': return UserDefinedOutputStrategy.fromData(data); } } } export class AppendOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.AppendOutputStrategy"; - eventProperties: EventPropertyUnion[]; + '@class': 'org.apache.streampipes.model.output.AppendOutputStrategy'; + 'eventProperties': EventPropertyUnion[]; - static fromData(data: AppendOutputStrategy, target?: AppendOutputStrategy): AppendOutputStrategy { + static 'fromData'( + data: AppendOutputStrategy, + target?: AppendOutputStrategy, + ): AppendOutputStrategy { if (!data) { return data; } const instance = target || new AppendOutputStrategy(); super.fromData(data, instance); - instance.eventProperties = __getCopyArrayFn(EventProperty.fromDataUnion)(data.eventProperties); + instance.eventProperties = __getCopyArrayFn( + EventProperty.fromDataUnion, + )(data.eventProperties); return instance; } } export class ApplicationLink extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.ApplicationLink"; - applicationDescription: string; - applicationIconUrl: string; - applicationLinkType: string; - applicationName: string; - applicationUrl: string; + '@class': 'org.apache.streampipes.model.ApplicationLink'; + 'applicationDescription': string; + 'applicationIconUrl': string; + 'applicationLinkType': string; + 'applicationName': string; + 'applicationUrl': string; - static fromData(data: ApplicationLink, target?: ApplicationLink): ApplicationLink { + static 'fromData'( + data: ApplicationLink, + target?: ApplicationLink, + ): ApplicationLink { if (!data) { return data; } @@ -617,7 +1038,10 @@ export class AssetExportConfiguration { overrideBrokerSettings: boolean; pipelines: ExportItem[]; - static fromData(data: AssetExportConfiguration, target?: AssetExportConfiguration): AssetExportConfiguration { + static fromData( + data: AssetExportConfiguration, + target?: AssetExportConfiguration, + ): AssetExportConfiguration { if (!data) { return data; } @@ -625,12 +1049,24 @@ export class AssetExportConfiguration { instance.assetId = data.assetId; instance.assetName = data.assetName; instance.assets = __getCopyArrayFn(ExportItem.fromData)(data.assets); - instance.adapters = __getCopyArrayFn(ExportItem.fromData)(data.adapters); - instance.dashboards = __getCopyArrayFn(ExportItem.fromData)(data.dashboards); - instance.dataViews = __getCopyArrayFn(ExportItem.fromData)(data.dataViews); - instance.dataLakeMeasures = __getCopyArrayFn(ExportItem.fromData)(data.dataLakeMeasures); - instance.dataSources = __getCopyArrayFn(ExportItem.fromData)(data.dataSources); - instance.pipelines = __getCopyArrayFn(ExportItem.fromData)(data.pipelines); + instance.adapters = __getCopyArrayFn(ExportItem.fromData)( + data.adapters, + ); + instance.dashboards = __getCopyArrayFn(ExportItem.fromData)( + data.dashboards, + ); + instance.dataViews = __getCopyArrayFn(ExportItem.fromData)( + data.dataViews, + ); + instance.dataLakeMeasures = __getCopyArrayFn(ExportItem.fromData)( + data.dataLakeMeasures, + ); + instance.dataSources = __getCopyArrayFn(ExportItem.fromData)( + data.dataSources, + ); + instance.pipelines = __getCopyArrayFn(ExportItem.fromData)( + data.pipelines, + ); instance.files = __getCopyArrayFn(ExportItem.fromData)(data.files); instance.overrideBrokerSettings = data.overrideBrokerSettings; return instance; @@ -638,18 +1074,25 @@ export class AssetExportConfiguration { } export class BoundPipelineElement extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.template.BoundPipelineElement"; - connectedTo: BoundPipelineElement[]; - pipelineElementTemplate: InvocableStreamPipesEntity; + '@class': 'org.apache.streampipes.model.template.BoundPipelineElement'; + 'connectedTo': BoundPipelineElement[]; + 'pipelineElementTemplate': InvocableStreamPipesEntity; - static fromData(data: BoundPipelineElement, target?: BoundPipelineElement): BoundPipelineElement { + static 'fromData'( + data: BoundPipelineElement, + target?: BoundPipelineElement, + ): BoundPipelineElement { if (!data) { return data; } const instance = target || new BoundPipelineElement(); super.fromData(data, instance); - instance.pipelineElementTemplate = InvocableStreamPipesEntity.fromData(data.pipelineElementTemplate); - instance.connectedTo = __getCopyArrayFn(BoundPipelineElement.fromData)(data.connectedTo); + instance.pipelineElementTemplate = InvocableStreamPipesEntity.fromData( + data.pipelineElementTemplate, + ); + instance.connectedTo = __getCopyArrayFn(BoundPipelineElement.fromData)( + data.connectedTo, + ); return instance; } } @@ -658,7 +1101,10 @@ export class CanvasPosition { x: number; y: number; - static fromData(data: CanvasPosition, target?: CanvasPosition): CanvasPosition { + static fromData( + data: CanvasPosition, + target?: CanvasPosition, + ): CanvasPosition { if (!data) { return data; } @@ -693,16 +1139,20 @@ export class Category { } export class ChangeDatatypeTransformationRuleDescription extends ValueTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription"; - originalDatatypeXsd: string; - runtimeKey: string; - targetDatatypeXsd: string; + '@class': 'org.apache.streampipes.model.connect.rules.value.ChangeDatatypeTransformationRuleDescription'; + 'originalDatatypeXsd': string; + 'runtimeKey': string; + 'targetDatatypeXsd': string; - static fromData(data: ChangeDatatypeTransformationRuleDescription, target?: ChangeDatatypeTransformationRuleDescription): ChangeDatatypeTransformationRuleDescription { + static 'fromData'( + data: ChangeDatatypeTransformationRuleDescription, + target?: ChangeDatatypeTransformationRuleDescription, + ): ChangeDatatypeTransformationRuleDescription { if (!data) { return data; } - const instance = target || new ChangeDatatypeTransformationRuleDescription(); + const instance = + target || new ChangeDatatypeTransformationRuleDescription(); super.fromData(data, instance); instance.runtimeKey = data.runtimeKey; instance.originalDatatypeXsd = data.originalDatatypeXsd; @@ -712,12 +1162,15 @@ export class ChangeDatatypeTransformationRuleDescription extends ValueTransforma } export class CodeInputStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.CodeInputStaticProperty"; - codeTemplate: string; - language: string; - value: string; + '@class': 'org.apache.streampipes.model.staticproperty.CodeInputStaticProperty'; + 'codeTemplate': string; + 'language': string; + 'value': string; - static fromData(data: CodeInputStaticProperty, target?: CodeInputStaticProperty): CodeInputStaticProperty { + static 'fromData'( + data: CodeInputStaticProperty, + target?: CodeInputStaticProperty, + ): CodeInputStaticProperty { if (!data) { return data; } @@ -731,29 +1184,39 @@ export class CodeInputStaticProperty extends StaticProperty { } export class CollectionStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.CollectionStaticProperty"; - memberType: string; - members: StaticPropertyUnion[]; - staticPropertyTemplate: StaticPropertyUnion; + '@class': 'org.apache.streampipes.model.staticproperty.CollectionStaticProperty'; + 'memberType': string; + 'members': StaticPropertyUnion[]; + 'staticPropertyTemplate': StaticPropertyUnion; - static fromData(data: CollectionStaticProperty, target?: CollectionStaticProperty): CollectionStaticProperty { + static 'fromData'( + data: CollectionStaticProperty, + target?: CollectionStaticProperty, + ): CollectionStaticProperty { if (!data) { return data; } const instance = target || new CollectionStaticProperty(); super.fromData(data, instance); - instance.staticPropertyTemplate = StaticProperty.fromDataUnion(data.staticPropertyTemplate); - instance.members = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.members); + instance.staticPropertyTemplate = StaticProperty.fromDataUnion( + data.staticPropertyTemplate, + ); + instance.members = __getCopyArrayFn(StaticProperty.fromDataUnion)( + data.members, + ); instance.memberType = data.memberType; return instance; } } export class ColorPickerStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty"; - selectedColor: string; + '@class': 'org.apache.streampipes.model.staticproperty.ColorPickerStaticProperty'; + 'selectedColor': string; - static fromData(data: ColorPickerStaticProperty, target?: ColorPickerStaticProperty): ColorPickerStaticProperty { + static 'fromData'( + data: ColorPickerStaticProperty, + target?: ColorPickerStaticProperty, + ): ColorPickerStaticProperty { if (!data) { return data; } @@ -784,30 +1247,39 @@ export class ConsumedMessagesInfo extends MessagesInfo { lag: number; totalMessagesSincePipelineStart: number; - static fromData(data: ConsumedMessagesInfo, target?: ConsumedMessagesInfo): ConsumedMessagesInfo { + static fromData( + data: ConsumedMessagesInfo, + target?: ConsumedMessagesInfo, + ): ConsumedMessagesInfo { if (!data) { return data; } const instance = target || new ConsumedMessagesInfo(); super.fromData(data, instance); - instance.totalMessagesSincePipelineStart = data.totalMessagesSincePipelineStart; - instance.consumedMessagesSincePipelineStart = data.consumedMessagesSincePipelineStart; + instance.totalMessagesSincePipelineStart = + data.totalMessagesSincePipelineStart; + instance.consumedMessagesSincePipelineStart = + data.consumedMessagesSincePipelineStart; instance.lag = data.lag; return instance; } } export class CorrectionValueTransformationRuleDescription extends ValueTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription"; - correctionValue: number; - operator: string; - runtimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.value.CorrectionValueTransformationRuleDescription'; + 'correctionValue': number; + 'operator': string; + 'runtimeKey': string; - static fromData(data: CorrectionValueTransformationRuleDescription, target?: CorrectionValueTransformationRuleDescription): CorrectionValueTransformationRuleDescription { + static 'fromData'( + data: CorrectionValueTransformationRuleDescription, + target?: CorrectionValueTransformationRuleDescription, + ): CorrectionValueTransformationRuleDescription { if (!data) { return data; } - const instance = target || new CorrectionValueTransformationRuleDescription(); + const instance = + target || new CorrectionValueTransformationRuleDescription(); super.fromData(data, instance); instance.runtimeKey = data.runtimeKey; instance.correctionValue = data.correctionValue; @@ -817,9 +1289,17 @@ export class CorrectionValueTransformationRuleDescription extends ValueTransform } export class SchemaTransformationRuleDescription extends TransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription" | "org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription"; + '@class': + | 'org.apache.streampipes.model.connect.rules.schema.SchemaTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription' + | 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription'; - static fromData(data: SchemaTransformationRuleDescription, target?: SchemaTransformationRuleDescription): SchemaTransformationRuleDescription { + static 'fromData'( + data: SchemaTransformationRuleDescription, + target?: SchemaTransformationRuleDescription, + ): SchemaTransformationRuleDescription { if (!data) { return data; } @@ -830,10 +1310,13 @@ export class SchemaTransformationRuleDescription extends TransformationRuleDescr } export class CreateNestedRuleDescription extends SchemaTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription"; - runtimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.schema.CreateNestedRuleDescription'; + 'runtimeKey': string; - static fromData(data: CreateNestedRuleDescription, target?: CreateNestedRuleDescription): CreateNestedRuleDescription { + static 'fromData'( + data: CreateNestedRuleDescription, + target?: CreateNestedRuleDescription, + ): CreateNestedRuleDescription { if (!data) { return data; } @@ -845,35 +1328,47 @@ export class CreateNestedRuleDescription extends SchemaTransformationRuleDescrip } export class CustomOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.CustomOutputStrategy"; - availablePropertyKeys: string[]; - outputRight: boolean; - selectedPropertyKeys: string[]; + '@class': 'org.apache.streampipes.model.output.CustomOutputStrategy'; + 'availablePropertyKeys': string[]; + 'outputRight': boolean; + 'selectedPropertyKeys': string[]; - static fromData(data: CustomOutputStrategy, target?: CustomOutputStrategy): CustomOutputStrategy { + static 'fromData'( + data: CustomOutputStrategy, + target?: CustomOutputStrategy, + ): CustomOutputStrategy { if (!data) { return data; } const instance = target || new CustomOutputStrategy(); super.fromData(data, instance); - instance.selectedPropertyKeys = __getCopyArrayFn(__identity())(data.selectedPropertyKeys); + instance.selectedPropertyKeys = __getCopyArrayFn(__identity())( + data.selectedPropertyKeys, + ); instance.outputRight = data.outputRight; - instance.availablePropertyKeys = __getCopyArrayFn(__identity())(data.availablePropertyKeys); + instance.availablePropertyKeys = __getCopyArrayFn(__identity())( + data.availablePropertyKeys, + ); return instance; } } export class CustomTransformOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.CustomTransformOutputStrategy"; - eventProperties: EventPropertyUnion[]; + '@class': 'org.apache.streampipes.model.output.CustomTransformOutputStrategy'; + 'eventProperties': EventPropertyUnion[]; - static fromData(data: CustomTransformOutputStrategy, target?: CustomTransformOutputStrategy): CustomTransformOutputStrategy { + static 'fromData'( + data: CustomTransformOutputStrategy, + target?: CustomTransformOutputStrategy, + ): CustomTransformOutputStrategy { if (!data) { return data; } const instance = target || new CustomTransformOutputStrategy(); super.fromData(data, instance); - instance.eventProperties = __getCopyArrayFn(EventProperty.fromDataUnion)(data.eventProperties); + instance.eventProperties = __getCopyArrayFn( + EventProperty.fromDataUnion, + )(data.eventProperties); return instance; } } @@ -882,7 +1377,10 @@ export class DashboardEntity { _id: string; _rev: string; - static fromData(data: DashboardEntity, target?: DashboardEntity): DashboardEntity { + static fromData( + data: DashboardEntity, + target?: DashboardEntity, + ): DashboardEntity { if (!data) { return data; } @@ -903,7 +1401,10 @@ export class DashboardItem { x: number; y: number; - static fromData(data: DashboardItem, target?: DashboardItem): DashboardItem { + static fromData( + data: DashboardItem, + target?: DashboardItem, + ): DashboardItem { if (!data) { return data; } @@ -911,7 +1412,9 @@ export class DashboardItem { instance.id = data.id; instance.name = data.name; instance.component = data.component; - instance.settings = __getCopyArrayFn(__identity())(data.settings); + instance.settings = __getCopyArrayFn(__identity())( + data.settings, + ); instance.cols = data.cols; instance.rows = data.rows; instance.x = data.x; @@ -931,7 +1434,10 @@ export class DashboardModel { name: string; widgets: DashboardItem[]; - static fromData(data: DashboardModel, target?: DashboardModel): DashboardModel { + static fromData( + data: DashboardModel, + target?: DashboardModel, + ): DashboardModel { if (!data) { return data; } @@ -940,9 +1446,15 @@ export class DashboardModel { instance.name = data.name; instance.description = data.description; instance.displayHeader = data.displayHeader; - instance.dashboardTimeSettings = __getCopyObjectFn(__identity())(data.dashboardTimeSettings); - instance.dashboardGeneralSettings = __getCopyObjectFn(__identity())(data.dashboardGeneralSettings); - instance.widgets = __getCopyArrayFn(DashboardItem.fromData)(data.widgets); + instance.dashboardTimeSettings = __getCopyObjectFn(__identity())( + data.dashboardTimeSettings, + ); + instance.dashboardGeneralSettings = __getCopyObjectFn( + __identity(), + )(data.dashboardGeneralSettings); + instance.widgets = __getCopyArrayFn(DashboardItem.fromData)( + data.widgets, + ); instance._id = data._id; instance._rev = data._rev; return instance; @@ -956,7 +1468,10 @@ export class DashboardWidgetModel extends DashboardEntity { widgetId: string; widgetType: string; - static fromData(data: DashboardWidgetModel, target?: DashboardWidgetModel): DashboardWidgetModel { + static fromData( + data: DashboardWidgetModel, + target?: DashboardWidgetModel, + ): DashboardWidgetModel { if (!data) { return data; } @@ -964,7 +1479,9 @@ export class DashboardWidgetModel extends DashboardEntity { super.fromData(data, instance); instance.widgetId = data.widgetId; instance.widgetType = data.widgetType; - instance.dashboardWidgetSettings = DashboardWidgetSettings.fromData(data.dashboardWidgetSettings); + instance.dashboardWidgetSettings = DashboardWidgetSettings.fromData( + data.dashboardWidgetSettings, + ); instance.pipelineId = data.pipelineId; instance.visualizationName = data.visualizationName; return instance; @@ -972,15 +1489,18 @@ export class DashboardWidgetModel extends DashboardEntity { } export class DashboardWidgetSettings extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.dashboard.DashboardWidgetSettings"; - config: StaticPropertyUnion[]; - requiredSchema: EventSchema; - widgetDescription: string; - widgetIconName: string; - widgetLabel: string; - widgetName: string; + '@class': 'org.apache.streampipes.model.dashboard.DashboardWidgetSettings'; + 'config': StaticPropertyUnion[]; + 'requiredSchema': EventSchema; + 'widgetDescription': string; + 'widgetIconName': string; + 'widgetLabel': string; + 'widgetName': string; - static fromData(data: DashboardWidgetSettings, target?: DashboardWidgetSettings): DashboardWidgetSettings { + static 'fromData'( + data: DashboardWidgetSettings, + target?: DashboardWidgetSettings, + ): DashboardWidgetSettings { if (!data) { return data; } @@ -988,7 +1508,9 @@ export class DashboardWidgetSettings extends UnnamedStreamPipesEntity { super.fromData(data, instance); instance.widgetLabel = data.widgetLabel; instance.widgetName = data.widgetName; - instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.config); + instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)( + data.config, + ); instance.requiredSchema = EventSchema.fromData(data.requiredSchema); instance.widgetIconName = data.widgetIconName; instance.widgetDescription = data.widgetDescription; @@ -1005,7 +1527,10 @@ export class DataExplorerWidgetModel extends DashboardEntity { widgetId: string; widgetType: string; - static fromData(data: DataExplorerWidgetModel, target?: DataExplorerWidgetModel): DataExplorerWidgetModel { + static fromData( + data: DataExplorerWidgetModel, + target?: DataExplorerWidgetModel, + ): DataExplorerWidgetModel { if (!data) { return data; } @@ -1013,9 +1538,15 @@ export class DataExplorerWidgetModel extends DashboardEntity { super.fromData(data, instance); instance.widgetId = data.widgetId; instance.widgetType = data.widgetType; - instance.baseAppearanceConfig = __getCopyObjectFn(__identity())(data.baseAppearanceConfig); - instance.visualizationConfig = __getCopyObjectFn(__identity())(data.visualizationConfig); - instance.dataConfig = __getCopyObjectFn(__identity())(data.dataConfig); + instance.baseAppearanceConfig = __getCopyObjectFn(__identity())( + data.baseAppearanceConfig, + ); + instance.visualizationConfig = __getCopyObjectFn(__identity())( + data.visualizationConfig, + ); + instance.dataConfig = __getCopyObjectFn(__identity())( + data.dataConfig, + ); instance.pipelineId = data.pipelineId; instance.measureName = data.measureName; return instance; @@ -1023,17 +1554,20 @@ export class DataExplorerWidgetModel extends DashboardEntity { } export class DataLakeMeasure extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.datalake.DataLakeMeasure"; - _rev: string; - eventSchema: EventSchema; - measureName: string; - pipelineId: string; - pipelineIsRunning: boolean; - pipelineName: string; - schemaVersion: string; - timestampField: string; + '@class': 'org.apache.streampipes.model.datalake.DataLakeMeasure'; + '_rev': string; + 'eventSchema': EventSchema; + 'measureName': string; + 'pipelineId': string; + 'pipelineIsRunning': boolean; + 'pipelineName': string; + 'schemaVersion': string; + 'timestampField': string; - static fromData(data: DataLakeMeasure, target?: DataLakeMeasure): DataLakeMeasure { + static 'fromData'( + data: DataLakeMeasure, + target?: DataLakeMeasure, + ): DataLakeMeasure { if (!data) { return data; } @@ -1052,33 +1586,49 @@ export class DataLakeMeasure extends UnnamedStreamPipesEntity { } export class InvocableStreamPipesEntity extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.base.InvocableStreamPipesEntity" | "org.apache.streampipes.model.graph.DataProcessorInvocation" | "org.apache.streampipes.model.graph.DataSinkInvocation"; - belongsTo: string; - configured: boolean; - correspondingPipeline: string; - correspondingUser: string; - inputStreams: SpDataStreamUnion[]; - selectedEndpointUrl: string; - staticProperties: StaticPropertyUnion[]; - statusInfoSettings: ElementStatusInfoSettings; - streamRequirements: SpDataStreamUnion[]; - supportedGrounding: EventGrounding; - uncompleted: boolean; - - static fromData(data: InvocableStreamPipesEntity, target?: InvocableStreamPipesEntity): InvocableStreamPipesEntity { + '@class': + | 'org.apache.streampipes.model.base.InvocableStreamPipesEntity' + | 'org.apache.streampipes.model.graph.DataProcessorInvocation' + | 'org.apache.streampipes.model.graph.DataSinkInvocation'; + 'belongsTo': string; + 'configured': boolean; + 'correspondingPipeline': string; + 'correspondingUser': string; + 'inputStreams': SpDataStreamUnion[]; + 'selectedEndpointUrl': string; + 'staticProperties': StaticPropertyUnion[]; + 'statusInfoSettings': ElementStatusInfoSettings; + 'streamRequirements': SpDataStreamUnion[]; + 'supportedGrounding': EventGrounding; + 'uncompleted': boolean; + + static 'fromData'( + data: InvocableStreamPipesEntity, + target?: InvocableStreamPipesEntity, + ): InvocableStreamPipesEntity { if (!data) { return data; } const instance = target || new InvocableStreamPipesEntity(); super.fromData(data, instance); - instance.inputStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.inputStreams); - instance.staticProperties = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.staticProperties); + instance.inputStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)( + data.inputStreams, + ); + instance.staticProperties = __getCopyArrayFn( + StaticProperty.fromDataUnion, + )(data.staticProperties); instance.belongsTo = data.belongsTo; - instance.statusInfoSettings = ElementStatusInfoSettings.fromData(data.statusInfoSettings); - instance.supportedGrounding = EventGrounding.fromData(data.supportedGrounding); + instance.statusInfoSettings = ElementStatusInfoSettings.fromData( + data.statusInfoSettings, + ); + instance.supportedGrounding = EventGrounding.fromData( + data.supportedGrounding, + ); instance.correspondingPipeline = data.correspondingPipeline; instance.correspondingUser = data.correspondingUser; - instance.streamRequirements = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.streamRequirements); + instance.streamRequirements = __getCopyArrayFn( + SpDataStream.fromDataUnion, + )(data.streamRequirements); instance.configured = data.configured; instance.uncompleted = data.uncompleted; instance.selectedEndpointUrl = data.selectedEndpointUrl; @@ -1087,22 +1637,29 @@ export class InvocableStreamPipesEntity extends NamedStreamPipesEntity { } export class DataProcessorInvocation extends InvocableStreamPipesEntity { - "@class": "org.apache.streampipes.model.graph.DataProcessorInvocation"; - category: string[]; - outputStrategies: OutputStrategyUnion[]; - outputStream: SpDataStreamUnion; - pathName: string; + '@class': 'org.apache.streampipes.model.graph.DataProcessorInvocation'; + 'category': string[]; + 'outputStrategies': OutputStrategyUnion[]; + 'outputStream': SpDataStreamUnion; + 'pathName': string; - static fromData(data: DataProcessorInvocation, target?: DataProcessorInvocation): DataProcessorInvocation { + static 'fromData'( + data: DataProcessorInvocation, + target?: DataProcessorInvocation, + ): DataProcessorInvocation { if (!data) { return data; } const instance = target || new DataProcessorInvocation(); super.fromData(data, instance); instance.outputStream = SpDataStream.fromDataUnion(data.outputStream); - instance.outputStrategies = __getCopyArrayFn(OutputStrategy.fromDataUnion)(data.outputStrategies); + instance.outputStrategies = __getCopyArrayFn( + OutputStrategy.fromDataUnion, + )(data.outputStrategies); instance.pathName = data.pathName; - instance.category = __getCopyArrayFn(__identity())(data.category); + instance.category = __getCopyArrayFn(__identity())( + data.category, + ); return instance; } } @@ -1112,7 +1669,10 @@ export class DataProcessorType { description: string; label: string; - static fromData(data: DataProcessorType, target?: DataProcessorType): DataProcessorType { + static fromData( + data: DataProcessorType, + target?: DataProcessorType, + ): DataProcessorType { if (!data) { return data; } @@ -1136,7 +1696,9 @@ export class DataSeries { } const instance = target || new DataSeries(); instance.total = data.total; - instance.rows = __getCopyArrayFn(__getCopyArrayFn(__identity()))(data.rows); + instance.rows = __getCopyArrayFn(__getCopyArrayFn(__identity()))( + data.rows, + ); instance.tags = __getCopyObjectFn(__identity())(data.tags); instance.headers = __getCopyArrayFn(__identity())(data.headers); return instance; @@ -1155,7 +1717,9 @@ export class Message { const instance = target || new Message(); instance.success = data.success; instance.elementName = data.elementName; - instance.notifications = __getCopyArrayFn(Notification.fromData)(data.notifications); + instance.notifications = __getCopyArrayFn(Notification.fromData)( + data.notifications, + ); return instance; } } @@ -1164,7 +1728,10 @@ export class DataSetModificationMessage extends Message { eventGrounding: EventGrounding; invocationId: string; - static fromData(data: DataSetModificationMessage, target?: DataSetModificationMessage): DataSetModificationMessage { + static fromData( + data: DataSetModificationMessage, + target?: DataSetModificationMessage, + ): DataSetModificationMessage { if (!data) { return data; } @@ -1177,16 +1744,21 @@ export class DataSetModificationMessage extends Message { } export class DataSinkInvocation extends InvocableStreamPipesEntity { - "@class": "org.apache.streampipes.model.graph.DataSinkInvocation"; - category: string[]; + '@class': 'org.apache.streampipes.model.graph.DataSinkInvocation'; + 'category': string[]; - static fromData(data: DataSinkInvocation, target?: DataSinkInvocation): DataSinkInvocation { + static 'fromData'( + data: DataSinkInvocation, + target?: DataSinkInvocation, + ): DataSinkInvocation { if (!data) { return data; } const instance = target || new DataSinkInvocation(); super.fromData(data, instance); - instance.category = __getCopyArrayFn(__identity())(data.category); + instance.category = __getCopyArrayFn(__identity())( + data.category, + ); return instance; } } @@ -1209,27 +1781,35 @@ export class DataSinkType { } export class DataSourceDescription extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.graph.DataSourceDescription"; - correspondingSourceId: string; - spDataStreams: SpDataStreamUnion[]; + '@class': 'org.apache.streampipes.model.graph.DataSourceDescription'; + 'correspondingSourceId': string; + 'spDataStreams': SpDataStreamUnion[]; - static fromData(data: DataSourceDescription, target?: DataSourceDescription): DataSourceDescription { + static 'fromData'( + data: DataSourceDescription, + target?: DataSourceDescription, + ): DataSourceDescription { if (!data) { return data; } const instance = target || new DataSourceDescription(); super.fromData(data, instance); - instance.spDataStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.spDataStreams); + instance.spDataStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)( + data.spDataStreams, + ); instance.correspondingSourceId = data.correspondingSourceId; return instance; } } export class DeleteRuleDescription extends SchemaTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription"; - runtimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.schema.DeleteRuleDescription'; + 'runtimeKey': string; - static fromData(data: DeleteRuleDescription, target?: DeleteRuleDescription): DeleteRuleDescription { + static 'fromData'( + data: DeleteRuleDescription, + target?: DeleteRuleDescription, + ): DeleteRuleDescription { if (!data) { return data; } @@ -1241,18 +1821,23 @@ export class DeleteRuleDescription extends SchemaTransformationRuleDescription { } export class DomainStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.DomainStaticProperty"; - requiredClass: string; - supportedProperties: SupportedProperty[]; + '@class': 'org.apache.streampipes.model.staticproperty.DomainStaticProperty'; + 'requiredClass': string; + 'supportedProperties': SupportedProperty[]; - static fromData(data: DomainStaticProperty, target?: DomainStaticProperty): DomainStaticProperty { + static 'fromData'( + data: DomainStaticProperty, + target?: DomainStaticProperty, + ): DomainStaticProperty { if (!data) { return data; } const instance = target || new DomainStaticProperty(); super.fromData(data, instance); instance.requiredClass = data.requiredClass; - instance.supportedProperties = __getCopyArrayFn(SupportedProperty.fromData)(data.supportedProperties); + instance.supportedProperties = __getCopyArrayFn( + SupportedProperty.fromData, + )(data.supportedProperties); return instance; } } @@ -1261,13 +1846,18 @@ export class EdgeValidationStatus { notifications: Notification[]; validationStatusType: EdgeValidationStatusType; - static fromData(data: EdgeValidationStatus, target?: EdgeValidationStatus): EdgeValidationStatus { + static fromData( + data: EdgeValidationStatus, + target?: EdgeValidationStatus, + ): EdgeValidationStatus { if (!data) { return data; } const instance = target || new EdgeValidationStatus(); instance.validationStatusType = data.validationStatusType; - instance.notifications = __getCopyArrayFn(Notification.fromData)(data.notifications); + instance.notifications = __getCopyArrayFn(Notification.fromData)( + data.notifications, + ); return instance; } } @@ -1278,13 +1868,20 @@ export class ElementComposition { sepas: DataProcessorInvocation[]; streams: SpDataStreamUnion[]; - static fromData(data: ElementComposition, target?: ElementComposition): ElementComposition { + static fromData( + data: ElementComposition, + target?: ElementComposition, + ): ElementComposition { if (!data) { return data; } const instance = target || new ElementComposition(); - instance.sepas = __getCopyArrayFn(DataProcessorInvocation.fromData)(data.sepas); - instance.streams = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.streams); + instance.sepas = __getCopyArrayFn(DataProcessorInvocation.fromData)( + data.sepas, + ); + instance.streams = __getCopyArrayFn(SpDataStream.fromDataUnion)( + data.streams, + ); instance.name = data.name; instance.description = data.description; return instance; @@ -1292,14 +1889,17 @@ export class ElementComposition { } export class ElementStatusInfoSettings extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.monitoring.ElementStatusInfoSettings"; - elementIdentifier: string; - errorTopic: string; - kafkaHost: string; - kafkaPort: number; - statsTopic: string; + '@class': 'org.apache.streampipes.model.monitoring.ElementStatusInfoSettings'; + 'elementIdentifier': string; + 'errorTopic': string; + 'kafkaHost': string; + 'kafkaPort': number; + 'statsTopic': string; - static fromData(data: ElementStatusInfoSettings, target?: ElementStatusInfoSettings): ElementStatusInfoSettings { + static 'fromData'( + data: ElementStatusInfoSettings, + target?: ElementStatusInfoSettings, + ): ElementStatusInfoSettings { if (!data) { return data; } @@ -1315,9 +1915,15 @@ export class ElementStatusInfoSettings extends UnnamedStreamPipesEntity { } export class ValueSpecification extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.schema.ValueSpecification" | "org.apache.streampipes.model.schema.QuantitativeValue" | "org.apache.streampipes.model.schema.Enumeration"; + '@class': + | 'org.apache.streampipes.model.schema.ValueSpecification' + | 'org.apache.streampipes.model.schema.QuantitativeValue' + | 'org.apache.streampipes.model.schema.Enumeration'; - static fromData(data: ValueSpecification, target?: ValueSpecification): ValueSpecification { + static 'fromData'( + data: ValueSpecification, + target?: ValueSpecification, + ): ValueSpecification { if (!data) { return data; } @@ -1326,26 +1932,28 @@ export class ValueSpecification extends UnnamedStreamPipesEntity { return instance; } - static fromDataUnion(data: ValueSpecificationUnion): ValueSpecificationUnion { + static 'fromDataUnion'( + data: ValueSpecificationUnion, + ): ValueSpecificationUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.schema.QuantitativeValue": + switch (data['@class']) { + case 'org.apache.streampipes.model.schema.QuantitativeValue': return QuantitativeValue.fromData(data); - case "org.apache.streampipes.model.schema.Enumeration": + case 'org.apache.streampipes.model.schema.Enumeration': return Enumeration.fromData(data); } } } export class Enumeration extends ValueSpecification { - "@class": "org.apache.streampipes.model.schema.Enumeration"; - description: string; - label: string; - runtimeValues: string[]; + '@class': 'org.apache.streampipes.model.schema.Enumeration'; + 'description': string; + 'label': string; + 'runtimeValues': string[]; - static fromData(data: Enumeration, target?: Enumeration): Enumeration { + static 'fromData'(data: Enumeration, target?: Enumeration): Enumeration { if (!data) { return data; } @@ -1353,13 +1961,14 @@ export class Enumeration extends ValueSpecification { super.fromData(data, instance); instance.label = data.label; instance.description = data.description; - instance.runtimeValues = __getCopyArrayFn(__identity())(data.runtimeValues); + instance.runtimeValues = __getCopyArrayFn(__identity())( + data.runtimeValues, + ); return instance; } } export class ErrorMessage extends Message { - static fromData(data: ErrorMessage, target?: ErrorMessage): ErrorMessage { if (!data) { return data; @@ -1371,36 +1980,50 @@ export class ErrorMessage extends Message { } export class EventGrounding extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.grounding.EventGrounding"; - transportFormats: TransportFormat[]; - transportProtocols: TransportProtocolUnion[]; + '@class': 'org.apache.streampipes.model.grounding.EventGrounding'; + 'transportFormats': TransportFormat[]; + 'transportProtocols': TransportProtocolUnion[]; - static fromData(data: EventGrounding, target?: EventGrounding): EventGrounding { + static 'fromData'( + data: EventGrounding, + target?: EventGrounding, + ): EventGrounding { if (!data) { return data; } const instance = target || new EventGrounding(); super.fromData(data, instance); - instance.transportProtocols = __getCopyArrayFn(TransportProtocol.fromDataUnion)(data.transportProtocols); - instance.transportFormats = __getCopyArrayFn(TransportFormat.fromData)(data.transportFormats); + instance.transportProtocols = __getCopyArrayFn( + TransportProtocol.fromDataUnion, + )(data.transportProtocols); + instance.transportFormats = __getCopyArrayFn(TransportFormat.fromData)( + data.transportFormats, + ); return instance; } } export class EventProperty extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.schema.EventProperty" | "org.apache.streampipes.model.schema.EventPropertyList" | "org.apache.streampipes.model.schema.EventPropertyNested" | "org.apache.streampipes.model.schema.EventPropertyPrimitive"; - description: string; - domainProperties: string[]; - eventPropertyQualities: EventPropertyQualityDefinitionUnion[]; - index: number; - label: string; - propertyScope: string; - required: boolean; - requiresEventPropertyQualities: EventPropertyQualityRequirement[]; - runtimeId: string; - runtimeName: string; - - static fromData(data: EventProperty, target?: EventProperty): EventProperty { + '@class': + | 'org.apache.streampipes.model.schema.EventProperty' + | 'org.apache.streampipes.model.schema.EventPropertyList' + | 'org.apache.streampipes.model.schema.EventPropertyNested' + | 'org.apache.streampipes.model.schema.EventPropertyPrimitive'; + 'description': string; + 'domainProperties': string[]; + 'eventPropertyQualities': EventPropertyQualityDefinitionUnion[]; + 'index': number; + 'label': string; + 'propertyScope': string; + 'required': boolean; + 'requiresEventPropertyQualities': EventPropertyQualityRequirement[]; + 'runtimeId': string; + 'runtimeName': string; + + static 'fromData'( + data: EventProperty, + target?: EventProperty, + ): EventProperty { if (!data) { return data; } @@ -1410,67 +2033,86 @@ export class EventProperty extends UnnamedStreamPipesEntity { instance.description = data.description; instance.runtimeName = data.runtimeName; instance.required = data.required; - instance.domainProperties = __getCopyArrayFn(__identity())(data.domainProperties); - instance.eventPropertyQualities = __getCopyArrayFn(EventPropertyQualityDefinition.fromDataUnion)(data.eventPropertyQualities); - instance.requiresEventPropertyQualities = __getCopyArrayFn(EventPropertyQualityRequirement.fromData)(data.requiresEventPropertyQualities); + instance.domainProperties = __getCopyArrayFn(__identity())( + data.domainProperties, + ); + instance.eventPropertyQualities = __getCopyArrayFn( + EventPropertyQualityDefinition.fromDataUnion, + )(data.eventPropertyQualities); + instance.requiresEventPropertyQualities = __getCopyArrayFn( + EventPropertyQualityRequirement.fromData, + )(data.requiresEventPropertyQualities); instance.propertyScope = data.propertyScope; instance.index = data.index; instance.runtimeId = data.runtimeId; return instance; } - static fromDataUnion(data: EventPropertyUnion): EventPropertyUnion { + static 'fromDataUnion'(data: EventPropertyUnion): EventPropertyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.schema.EventPropertyList": + switch (data['@class']) { + case 'org.apache.streampipes.model.schema.EventPropertyList': return EventPropertyList.fromData(data); - case "org.apache.streampipes.model.schema.EventPropertyNested": + case 'org.apache.streampipes.model.schema.EventPropertyNested': return EventPropertyNested.fromData(data); - case "org.apache.streampipes.model.schema.EventPropertyPrimitive": + case 'org.apache.streampipes.model.schema.EventPropertyPrimitive': return EventPropertyPrimitive.fromData(data); } } } export class EventPropertyList extends EventProperty { - "@class": "org.apache.streampipes.model.schema.EventPropertyList"; - eventProperty: EventPropertyUnion; + '@class': 'org.apache.streampipes.model.schema.EventPropertyList'; + 'eventProperty': EventPropertyUnion; - static fromData(data: EventPropertyList, target?: EventPropertyList): EventPropertyList { + static 'fromData'( + data: EventPropertyList, + target?: EventPropertyList, + ): EventPropertyList { if (!data) { return data; } const instance = target || new EventPropertyList(); super.fromData(data, instance); - instance.eventProperty = EventProperty.fromDataUnion(data.eventProperty); + instance.eventProperty = EventProperty.fromDataUnion( + data.eventProperty, + ); return instance; } } export class EventPropertyNested extends EventProperty { - "@class": "org.apache.streampipes.model.schema.EventPropertyNested"; - eventProperties: EventPropertyUnion[]; + '@class': 'org.apache.streampipes.model.schema.EventPropertyNested'; + 'eventProperties': EventPropertyUnion[]; - static fromData(data: EventPropertyNested, target?: EventPropertyNested): EventPropertyNested { + static 'fromData'( + data: EventPropertyNested, + target?: EventPropertyNested, + ): EventPropertyNested { if (!data) { return data; } const instance = target || new EventPropertyNested(); super.fromData(data, instance); - instance.eventProperties = __getCopyArrayFn(EventProperty.fromDataUnion)(data.eventProperties); + instance.eventProperties = __getCopyArrayFn( + EventProperty.fromDataUnion, + )(data.eventProperties); return instance; } } export class EventPropertyPrimitive extends EventProperty { - "@class": "org.apache.streampipes.model.schema.EventPropertyPrimitive"; - measurementUnit: string; - runtimeType: string; - valueSpecification: ValueSpecificationUnion; + '@class': 'org.apache.streampipes.model.schema.EventPropertyPrimitive'; + 'measurementUnit': string; + 'runtimeType': string; + 'valueSpecification': ValueSpecificationUnion; - static fromData(data: EventPropertyPrimitive, target?: EventPropertyPrimitive): EventPropertyPrimitive { + static 'fromData'( + data: EventPropertyPrimitive, + target?: EventPropertyPrimitive, + ): EventPropertyPrimitive { if (!data) { return data; } @@ -1478,32 +2120,49 @@ export class EventPropertyPrimitive extends EventProperty { super.fromData(data, instance); instance.runtimeType = data.runtimeType; instance.measurementUnit = data.measurementUnit; - instance.valueSpecification = ValueSpecification.fromDataUnion(data.valueSpecification); + instance.valueSpecification = ValueSpecification.fromDataUnion( + data.valueSpecification, + ); return instance; } } export class EventPropertyQualityRequirement extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.quality.EventPropertyQualityRequirement"; - maximumPropertyQuality: EventPropertyQualityDefinitionUnion; - minimumPropertyQuality: EventPropertyQualityDefinitionUnion; + '@class': 'org.apache.streampipes.model.quality.EventPropertyQualityRequirement'; + 'maximumPropertyQuality': EventPropertyQualityDefinitionUnion; + 'minimumPropertyQuality': EventPropertyQualityDefinitionUnion; - static fromData(data: EventPropertyQualityRequirement, target?: EventPropertyQualityRequirement): EventPropertyQualityRequirement { + static 'fromData'( + data: EventPropertyQualityRequirement, + target?: EventPropertyQualityRequirement, + ): EventPropertyQualityRequirement { if (!data) { return data; } const instance = target || new EventPropertyQualityRequirement(); super.fromData(data, instance); - instance.minimumPropertyQuality = EventPropertyQualityDefinition.fromDataUnion(data.minimumPropertyQuality); - instance.maximumPropertyQuality = EventPropertyQualityDefinition.fromDataUnion(data.maximumPropertyQuality); + instance.minimumPropertyQuality = + EventPropertyQualityDefinition.fromDataUnion( + data.minimumPropertyQuality, + ); + instance.maximumPropertyQuality = + EventPropertyQualityDefinition.fromDataUnion( + data.maximumPropertyQuality, + ); return instance; } } export class StreamTransformationRuleDescription extends TransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription" | "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription"; + '@class': + | 'org.apache.streampipes.model.connect.rules.stream.StreamTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription' + | 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription'; - static fromData(data: StreamTransformationRuleDescription, target?: StreamTransformationRuleDescription): StreamTransformationRuleDescription { + static 'fromData'( + data: StreamTransformationRuleDescription, + target?: StreamTransformationRuleDescription, + ): StreamTransformationRuleDescription { if (!data) { return data; } @@ -1512,25 +2171,32 @@ export class StreamTransformationRuleDescription extends TransformationRuleDescr return instance; } - static fromDataUnion(data: StreamTransformationRuleDescriptionUnion): StreamTransformationRuleDescriptionUnion { + static 'fromDataUnion'( + data: StreamTransformationRuleDescriptionUnion, + ): StreamTransformationRuleDescriptionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription": + switch (data['@class']) { + case 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription': return EventRateTransformationRuleDescription.fromData(data); - case "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription": - return RemoveDuplicatesTransformationRuleDescription.fromData(data); + case 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription': + return RemoveDuplicatesTransformationRuleDescription.fromData( + data, + ); } } } export class EventRateTransformationRuleDescription extends StreamTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription"; - aggregationTimeWindow: number; - aggregationType: string; + '@class': 'org.apache.streampipes.model.connect.rules.stream.EventRateTransformationRuleDescription'; + 'aggregationTimeWindow': number; + 'aggregationType': string; - static fromData(data: EventRateTransformationRuleDescription, target?: EventRateTransformationRuleDescription): EventRateTransformationRuleDescription { + static 'fromData'( + data: EventRateTransformationRuleDescription, + target?: EventRateTransformationRuleDescription, + ): EventRateTransformationRuleDescription { if (!data) { return data; } @@ -1543,24 +2209,32 @@ export class EventRateTransformationRuleDescription extends StreamTransformation } export class EventSchema extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.schema.EventSchema"; - eventProperties: EventPropertyUnion[]; + '@class': 'org.apache.streampipes.model.schema.EventSchema'; + 'eventProperties': EventPropertyUnion[]; - static fromData(data: EventSchema, target?: EventSchema): EventSchema { + static 'fromData'(data: EventSchema, target?: EventSchema): EventSchema { if (!data) { return data; } const instance = target || new EventSchema(); super.fromData(data, instance); - instance.eventProperties = __getCopyArrayFn(EventProperty.fromDataUnion)(data.eventProperties); + instance.eventProperties = __getCopyArrayFn( + EventProperty.fromDataUnion, + )(data.eventProperties); return instance; } } export class EventStreamQualityDefinition extends MeasurementProperty { - "@class": "org.apache.streampipes.model.quality.EventStreamQualityDefinition" | "org.apache.streampipes.model.quality.Frequency" | "org.apache.streampipes.model.quality.Latency"; + '@class': + | 'org.apache.streampipes.model.quality.EventStreamQualityDefinition' + | 'org.apache.streampipes.model.quality.Frequency' + | 'org.apache.streampipes.model.quality.Latency'; - static fromData(data: EventStreamQualityDefinition, target?: EventStreamQualityDefinition): EventStreamQualityDefinition { + static 'fromData'( + data: EventStreamQualityDefinition, + target?: EventStreamQualityDefinition, + ): EventStreamQualityDefinition { if (!data) { return data; } @@ -1569,32 +2243,43 @@ export class EventStreamQualityDefinition extends MeasurementProperty { return instance; } - static fromDataUnion(data: EventStreamQualityDefinitionUnion): EventStreamQualityDefinitionUnion { + static 'fromDataUnion'( + data: EventStreamQualityDefinitionUnion, + ): EventStreamQualityDefinitionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.quality.Frequency": + switch (data['@class']) { + case 'org.apache.streampipes.model.quality.Frequency': return Frequency.fromData(data); - case "org.apache.streampipes.model.quality.Latency": + case 'org.apache.streampipes.model.quality.Latency': return Latency.fromData(data); } } } export class EventStreamQualityRequirement extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.quality.EventStreamQualityRequirement"; - maximumStreamQuality: EventStreamQualityDefinitionUnion; - minimumStreamQuality: EventStreamQualityDefinitionUnion; + '@class': 'org.apache.streampipes.model.quality.EventStreamQualityRequirement'; + 'maximumStreamQuality': EventStreamQualityDefinitionUnion; + 'minimumStreamQuality': EventStreamQualityDefinitionUnion; - static fromData(data: EventStreamQualityRequirement, target?: EventStreamQualityRequirement): EventStreamQualityRequirement { + static 'fromData'( + data: EventStreamQualityRequirement, + target?: EventStreamQualityRequirement, + ): EventStreamQualityRequirement { if (!data) { return data; } const instance = target || new EventStreamQualityRequirement(); super.fromData(data, instance); - instance.minimumStreamQuality = EventStreamQualityDefinition.fromDataUnion(data.minimumStreamQuality); - instance.maximumStreamQuality = EventStreamQualityDefinition.fromDataUnion(data.maximumStreamQuality); + instance.minimumStreamQuality = + EventStreamQualityDefinition.fromDataUnion( + data.minimumStreamQuality, + ); + instance.maximumStreamQuality = + EventStreamQualityDefinition.fromDataUnion( + data.maximumStreamQuality, + ); return instance; } } @@ -1602,12 +2287,17 @@ export class EventStreamQualityRequirement extends UnnamedStreamPipesEntity { export class ExportConfiguration { assetExportConfiguration: AssetExportConfiguration[]; - static fromData(data: ExportConfiguration, target?: ExportConfiguration): ExportConfiguration { + static fromData( + data: ExportConfiguration, + target?: ExportConfiguration, + ): ExportConfiguration { if (!data) { return data; } const instance = target || new ExportConfiguration(); - instance.assetExportConfiguration = __getCopyArrayFn(AssetExportConfiguration.fromData)(data.assetExportConfiguration); + instance.assetExportConfiguration = __getCopyArrayFn( + AssetExportConfiguration.fromData, + )(data.assetExportConfiguration); return instance; } } @@ -1634,7 +2324,10 @@ export class FieldStatusInfo { changesRequired: boolean; fieldStatus: FieldStatus; - static fromData(data: FieldStatusInfo, target?: FieldStatusInfo): FieldStatusInfo { + static fromData( + data: FieldStatusInfo, + target?: FieldStatusInfo, + ): FieldStatusInfo { if (!data) { return data; } @@ -1674,12 +2367,15 @@ export class FileMetadata { } export class FileStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.FileStaticProperty"; - endpointUrl: string; - locationPath: string; - requiredFiletypes: string[]; + '@class': 'org.apache.streampipes.model.staticproperty.FileStaticProperty'; + 'endpointUrl': string; + 'locationPath': string; + 'requiredFiletypes': string[]; - static fromData(data: FileStaticProperty, target?: FileStaticProperty): FileStaticProperty { + static 'fromData'( + data: FileStaticProperty, + target?: FileStaticProperty, + ): FileStaticProperty { if (!data) { return data; } @@ -1687,56 +2383,71 @@ export class FileStaticProperty extends StaticProperty { super.fromData(data, instance); instance.endpointUrl = data.endpointUrl; instance.locationPath = data.locationPath; - instance.requiredFiletypes = __getCopyArrayFn(__identity())(data.requiredFiletypes); + instance.requiredFiletypes = __getCopyArrayFn(__identity())( + data.requiredFiletypes, + ); return instance; } } export class FixedOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.FixedOutputStrategy"; - eventProperties: EventPropertyUnion[]; + '@class': 'org.apache.streampipes.model.output.FixedOutputStrategy'; + 'eventProperties': EventPropertyUnion[]; - static fromData(data: FixedOutputStrategy, target?: FixedOutputStrategy): FixedOutputStrategy { + static 'fromData'( + data: FixedOutputStrategy, + target?: FixedOutputStrategy, + ): FixedOutputStrategy { if (!data) { return data; } const instance = target || new FixedOutputStrategy(); super.fromData(data, instance); - instance.eventProperties = __getCopyArrayFn(EventProperty.fromDataUnion)(data.eventProperties); + instance.eventProperties = __getCopyArrayFn( + EventProperty.fromDataUnion, + )(data.eventProperties); return instance; } } export class FormatDescription extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.connect.grounding.FormatDescription"; - config: StaticPropertyUnion[]; - formatType: string; + '@class': 'org.apache.streampipes.model.connect.grounding.FormatDescription'; + 'config': StaticPropertyUnion[]; + 'formatType': string; - static fromData(data: FormatDescription, target?: FormatDescription): FormatDescription { + static 'fromData'( + data: FormatDescription, + target?: FormatDescription, + ): FormatDescription { if (!data) { return data; } const instance = target || new FormatDescription(); super.fromData(data, instance); - instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.config); + instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)( + data.config, + ); instance.formatType = data.formatType; return instance; } } export class FreeTextStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.FreeTextStaticProperty"; - htmlAllowed: boolean; - htmlFontFormat: boolean; - mapsTo: string; - multiLine: boolean; - placeholdersSupported: boolean; - requiredDatatype: string; - requiredDomainProperty: string; - value: string; - valueSpecification: PropertyValueSpecification; + '@class': 'org.apache.streampipes.model.staticproperty.FreeTextStaticProperty'; + 'htmlAllowed': boolean; + 'htmlFontFormat': boolean; + 'mapsTo': string; + 'multiLine': boolean; + 'placeholdersSupported': boolean; + 'requiredDatatype': string; + 'requiredDomainProperty': string; + 'value': string; + 'valueSpecification': PropertyValueSpecification; - static fromData(data: FreeTextStaticProperty, target?: FreeTextStaticProperty): FreeTextStaticProperty { + static 'fromData'( + data: FreeTextStaticProperty, + target?: FreeTextStaticProperty, + ): FreeTextStaticProperty { if (!data) { return data; } @@ -1750,16 +2461,18 @@ export class FreeTextStaticProperty extends StaticProperty { instance.htmlAllowed = data.htmlAllowed; instance.htmlFontFormat = data.htmlFontFormat; instance.placeholdersSupported = data.placeholdersSupported; - instance.valueSpecification = PropertyValueSpecification.fromData(data.valueSpecification); + instance.valueSpecification = PropertyValueSpecification.fromData( + data.valueSpecification, + ); return instance; } } export class Frequency extends EventStreamQualityDefinition { - "@class": "org.apache.streampipes.model.quality.Frequency"; - quantityValue: number; + '@class': 'org.apache.streampipes.model.quality.Frequency'; + 'quantityValue': number; - static fromData(data: Frequency, target?: Frequency): Frequency { + static 'fromData'(data: Frequency, target?: Frequency): Frequency { if (!data) { return data; } @@ -1774,13 +2487,18 @@ export class FunctionDefinition { consumedStreams: string[]; functionId: FunctionId; - static fromData(data: FunctionDefinition, target?: FunctionDefinition): FunctionDefinition { + static fromData( + data: FunctionDefinition, + target?: FunctionDefinition, + ): FunctionDefinition { if (!data) { return data; } const instance = target || new FunctionDefinition(); instance.functionId = FunctionId.fromData(data.functionId); - instance.consumedStreams = __getCopyArrayFn(__identity())(data.consumedStreams); + instance.consumedStreams = __getCopyArrayFn(__identity())( + data.consumedStreams, + ); return instance; } } @@ -1807,59 +2525,83 @@ export interface GenericAdapterDescription { rules: TransformationRuleDescriptionUnion[]; } -export class GenericAdapterSetDescription extends AdapterSetDescription implements GenericAdapterDescription { - "@class": "org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription"; - eventSchema: EventSchema; - formatDescription: FormatDescription; - protocolDescription: ProtocolDescription; +export class GenericAdapterSetDescription + extends AdapterSetDescription + implements GenericAdapterDescription +{ + '@class': 'org.apache.streampipes.model.connect.adapter.GenericAdapterSetDescription'; + 'eventSchema': EventSchema; + 'formatDescription': FormatDescription; + 'protocolDescription': ProtocolDescription; - static fromData(data: GenericAdapterSetDescription, target?: GenericAdapterSetDescription): GenericAdapterSetDescription { + static 'fromData'( + data: GenericAdapterSetDescription, + target?: GenericAdapterSetDescription, + ): GenericAdapterSetDescription { if (!data) { return data; } const instance = target || new GenericAdapterSetDescription(); super.fromData(data, instance); - instance.formatDescription = FormatDescription.fromData(data.formatDescription); - instance.protocolDescription = ProtocolDescription.fromData(data.protocolDescription); + instance.formatDescription = FormatDescription.fromData( + data.formatDescription, + ); + instance.protocolDescription = ProtocolDescription.fromData( + data.protocolDescription, + ); instance.eventSchema = EventSchema.fromData(data.eventSchema); return instance; } } -export class GenericAdapterStreamDescription extends AdapterStreamDescription implements GenericAdapterDescription { - "@class": "org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription"; - eventSchema: EventSchema; - formatDescription: FormatDescription; - protocolDescription: ProtocolDescription; +export class GenericAdapterStreamDescription + extends AdapterStreamDescription + implements GenericAdapterDescription +{ + '@class': 'org.apache.streampipes.model.connect.adapter.GenericAdapterStreamDescription'; + 'eventSchema': EventSchema; + 'formatDescription': FormatDescription; + 'protocolDescription': ProtocolDescription; - static fromData(data: GenericAdapterStreamDescription, target?: GenericAdapterStreamDescription): GenericAdapterStreamDescription { + static 'fromData'( + data: GenericAdapterStreamDescription, + target?: GenericAdapterStreamDescription, + ): GenericAdapterStreamDescription { if (!data) { return data; } const instance = target || new GenericAdapterStreamDescription(); super.fromData(data, instance); - instance.formatDescription = FormatDescription.fromData(data.formatDescription); - instance.protocolDescription = ProtocolDescription.fromData(data.protocolDescription); + instance.formatDescription = FormatDescription.fromData( + data.formatDescription, + ); + instance.protocolDescription = ProtocolDescription.fromData( + data.protocolDescription, + ); instance.eventSchema = EventSchema.fromData(data.eventSchema); return instance; } } export class GuessSchema extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.connect.guess.GuessSchema"; - eventPreview: { [index: string]: GuessTypeInfo }[]; - eventSchema: EventSchema; - fieldStatusInfo: { [index: string]: FieldStatusInfo }; + '@class': 'org.apache.streampipes.model.connect.guess.GuessSchema'; + 'eventPreview': { [index: string]: GuessTypeInfo }[]; + 'eventSchema': EventSchema; + 'fieldStatusInfo': { [index: string]: FieldStatusInfo }; - static fromData(data: GuessSchema, target?: GuessSchema): GuessSchema { + static 'fromData'(data: GuessSchema, target?: GuessSchema): GuessSchema { if (!data) { return data; } const instance = target || new GuessSchema(); super.fromData(data, instance); instance.eventSchema = EventSchema.fromData(data.eventSchema); - instance.eventPreview = __getCopyArrayFn(__getCopyObjectFn(GuessTypeInfo.fromData))(data.eventPreview); - instance.fieldStatusInfo = __getCopyObjectFn(FieldStatusInfo.fromData)(data.fieldStatusInfo); + instance.eventPreview = __getCopyArrayFn( + __getCopyObjectFn(GuessTypeInfo.fromData), + )(data.eventPreview); + instance.fieldStatusInfo = __getCopyObjectFn(FieldStatusInfo.fromData)( + data.fieldStatusInfo, + ); return instance; } } @@ -1868,7 +2610,10 @@ export class GuessTypeInfo { type: string; value: any; - static fromData(data: GuessTypeInfo, target?: GuessTypeInfo): GuessTypeInfo { + static fromData( + data: GuessTypeInfo, + target?: GuessTypeInfo, + ): GuessTypeInfo { if (!data) { return data; } @@ -1880,43 +2625,58 @@ export class GuessTypeInfo { } export class TransportProtocol extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.grounding.TransportProtocol" | "org.apache.streampipes.model.grounding.JmsTransportProtocol" | "org.apache.streampipes.model.grounding.KafkaTransportProtocol" | "org.apache.streampipes.model.grounding.MqttTransportProtocol" | "org.apache.streampipes.model.grounding.NatsTransportProtocol"; - brokerHostname: string; - topicDefinition: TopicDefinitionUnion; + '@class': + | 'org.apache.streampipes.model.grounding.TransportProtocol' + | 'org.apache.streampipes.model.grounding.JmsTransportProtocol' + | 'org.apache.streampipes.model.grounding.KafkaTransportProtocol' + | 'org.apache.streampipes.model.grounding.MqttTransportProtocol' + | 'org.apache.streampipes.model.grounding.NatsTransportProtocol'; + 'brokerHostname': string; + 'topicDefinition': TopicDefinitionUnion; - static fromData(data: TransportProtocol, target?: TransportProtocol): TransportProtocol { + static 'fromData'( + data: TransportProtocol, + target?: TransportProtocol, + ): TransportProtocol { if (!data) { return data; } const instance = target || new TransportProtocol(); super.fromData(data, instance); instance.brokerHostname = data.brokerHostname; - instance.topicDefinition = TopicDefinition.fromDataUnion(data.topicDefinition); + instance.topicDefinition = TopicDefinition.fromDataUnion( + data.topicDefinition, + ); return instance; } - static fromDataUnion(data: TransportProtocolUnion): TransportProtocolUnion { + static 'fromDataUnion'( + data: TransportProtocolUnion, + ): TransportProtocolUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.grounding.JmsTransportProtocol": + switch (data['@class']) { + case 'org.apache.streampipes.model.grounding.JmsTransportProtocol': return JmsTransportProtocol.fromData(data); - case "org.apache.streampipes.model.grounding.KafkaTransportProtocol": + case 'org.apache.streampipes.model.grounding.KafkaTransportProtocol': return KafkaTransportProtocol.fromData(data); - case "org.apache.streampipes.model.grounding.MqttTransportProtocol": + case 'org.apache.streampipes.model.grounding.MqttTransportProtocol': return MqttTransportProtocol.fromData(data); - case "org.apache.streampipes.model.grounding.NatsTransportProtocol": + case 'org.apache.streampipes.model.grounding.NatsTransportProtocol': return NatsTransportProtocol.fromData(data); } } } export class JmsTransportProtocol extends TransportProtocol { - "@class": "org.apache.streampipes.model.grounding.JmsTransportProtocol"; - port: number; + '@class': 'org.apache.streampipes.model.grounding.JmsTransportProtocol'; + 'port': number; - static fromData(data: JmsTransportProtocol, target?: JmsTransportProtocol): JmsTransportProtocol { + static 'fromData'( + data: JmsTransportProtocol, + target?: JmsTransportProtocol, + ): JmsTransportProtocol { if (!data) { return data; } @@ -1928,19 +2688,22 @@ export class JmsTransportProtocol extends TransportProtocol { } export class KafkaTransportProtocol extends TransportProtocol { - "@class": "org.apache.streampipes.model.grounding.KafkaTransportProtocol"; - acks: string; - batchSize: string; - groupId: string; - kafkaPort: number; - lingerMs: number; - maxRequestSize: string; - messageMaxBytes: string; - offset: string; - zookeeperHost: string; - zookeeperPort: number; + '@class': 'org.apache.streampipes.model.grounding.KafkaTransportProtocol'; + 'acks': string; + 'batchSize': string; + 'groupId': string; + 'kafkaPort': number; + 'lingerMs': number; + 'maxRequestSize': string; + 'messageMaxBytes': string; + 'offset': string; + 'zookeeperHost': string; + 'zookeeperPort': number; - static fromData(data: KafkaTransportProtocol, target?: KafkaTransportProtocol): KafkaTransportProtocol { + static 'fromData'( + data: KafkaTransportProtocol, + target?: KafkaTransportProtocol, + ): KafkaTransportProtocol { if (!data) { return data; } @@ -1961,11 +2724,14 @@ export class KafkaTransportProtocol extends TransportProtocol { } export class KeepOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.KeepOutputStrategy"; - eventName: string; - keepBoth: boolean; + '@class': 'org.apache.streampipes.model.output.KeepOutputStrategy'; + 'eventName': string; + 'keepBoth': boolean; - static fromData(data: KeepOutputStrategy, target?: KeepOutputStrategy): KeepOutputStrategy { + static 'fromData'( + data: KeepOutputStrategy, + target?: KeepOutputStrategy, + ): KeepOutputStrategy { if (!data) { return data; } @@ -2001,10 +2767,10 @@ export class Label { } export class Latency extends EventStreamQualityDefinition { - "@class": "org.apache.streampipes.model.quality.Latency"; - quantityValue: number; + '@class': 'org.apache.streampipes.model.quality.Latency'; + 'quantityValue': number; - static fromData(data: Latency, target?: Latency): Latency { + static 'fromData'(data: Latency, target?: Latency): Latency { if (!data) { return data; } @@ -2016,10 +2782,13 @@ export class Latency extends EventStreamQualityDefinition { } export class ListOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.ListOutputStrategy"; - propertyName: string; + '@class': 'org.apache.streampipes.model.output.ListOutputStrategy'; + 'propertyName': string; - static fromData(data: ListOutputStrategy, target?: ListOutputStrategy): ListOutputStrategy { + static 'fromData'( + data: ListOutputStrategy, + target?: ListOutputStrategy, + ): ListOutputStrategy { if (!data) { return data; } @@ -2031,56 +2800,72 @@ export class ListOutputStrategy extends OutputStrategy { } export class MappingProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.MappingProperty" | "org.apache.streampipes.model.staticproperty.MappingPropertyUnary" | "org.apache.streampipes.model.staticproperty.MappingPropertyNary"; - mapsFromOptions: string[]; - propertyScope: string; - requirementSelector: string; + '@class': + | 'org.apache.streampipes.model.staticproperty.MappingProperty' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary' + | 'org.apache.streampipes.model.staticproperty.MappingPropertyNary'; + 'mapsFromOptions': string[]; + 'propertyScope': string; + 'requirementSelector': string; - static fromData(data: MappingProperty, target?: MappingProperty): MappingProperty { + static 'fromData'( + data: MappingProperty, + target?: MappingProperty, + ): MappingProperty { if (!data) { return data; } const instance = target || new MappingProperty(); super.fromData(data, instance); instance.requirementSelector = data.requirementSelector; - instance.mapsFromOptions = __getCopyArrayFn(__identity())(data.mapsFromOptions); + instance.mapsFromOptions = __getCopyArrayFn(__identity())( + data.mapsFromOptions, + ); instance.propertyScope = data.propertyScope; return instance; } - static fromDataUnion(data: MappingPropertyUnion): MappingPropertyUnion { + static 'fromDataUnion'(data: MappingPropertyUnion): MappingPropertyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.staticproperty.MappingPropertyNary": + switch (data['@class']) { + case 'org.apache.streampipes.model.staticproperty.MappingPropertyNary': return MappingPropertyNary.fromData(data); - case "org.apache.streampipes.model.staticproperty.MappingPropertyUnary": + case 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary': return MappingPropertyUnary.fromData(data); } } } export class MappingPropertyNary extends MappingProperty { - "@class": "org.apache.streampipes.model.staticproperty.MappingPropertyNary"; - selectedProperties: string[]; + '@class': 'org.apache.streampipes.model.staticproperty.MappingPropertyNary'; + 'selectedProperties': string[]; - static fromData(data: MappingPropertyNary, target?: MappingPropertyNary): MappingPropertyNary { + static 'fromData'( + data: MappingPropertyNary, + target?: MappingPropertyNary, + ): MappingPropertyNary { if (!data) { return data; } const instance = target || new MappingPropertyNary(); super.fromData(data, instance); - instance.selectedProperties = __getCopyArrayFn(__identity())(data.selectedProperties); + instance.selectedProperties = __getCopyArrayFn(__identity())( + data.selectedProperties, + ); return instance; } } export class MappingPropertyUnary extends MappingProperty { - "@class": "org.apache.streampipes.model.staticproperty.MappingPropertyUnary"; - selectedProperty: string; + '@class': 'org.apache.streampipes.model.staticproperty.MappingPropertyUnary'; + 'selectedProperty': string; - static fromData(data: MappingPropertyUnary, target?: MappingPropertyUnary): MappingPropertyUnary { + static 'fromData'( + data: MappingPropertyUnary, + target?: MappingPropertyUnary, + ): MappingPropertyUnary { if (!data) { return data; } @@ -2092,11 +2877,14 @@ export class MappingPropertyUnary extends MappingProperty { } export class MatchingStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.MatchingStaticProperty"; - matchLeft: string; - matchRight: string; + '@class': 'org.apache.streampipes.model.staticproperty.MatchingStaticProperty'; + 'matchLeft': string; + 'matchRight': string; - static fromData(data: MatchingStaticProperty, target?: MatchingStaticProperty): MatchingStaticProperty { + static 'fromData'( + data: MatchingStaticProperty, + target?: MatchingStaticProperty, + ): MatchingStaticProperty { if (!data) { return data; } @@ -2109,10 +2897,13 @@ export class MatchingStaticProperty extends StaticProperty { } export class MeasurementCapability extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.quality.MeasurementCapability"; - capability: string; + '@class': 'org.apache.streampipes.model.quality.MeasurementCapability'; + 'capability': string; - static fromData(data: MeasurementCapability, target?: MeasurementCapability): MeasurementCapability { + static 'fromData'( + data: MeasurementCapability, + target?: MeasurementCapability, + ): MeasurementCapability { if (!data) { return data; } @@ -2124,10 +2915,13 @@ export class MeasurementCapability extends UnnamedStreamPipesEntity { } export class MeasurementObject extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.quality.MeasurementObject"; - measuresObject: string; + '@class': 'org.apache.streampipes.model.quality.MeasurementObject'; + 'measuresObject': string; - static fromData(data: MeasurementObject, target?: MeasurementObject): MeasurementObject { + static 'fromData'( + data: MeasurementObject, + target?: MeasurementObject, + ): MeasurementObject { if (!data) { return data; } @@ -2139,11 +2933,14 @@ export class MeasurementObject extends UnnamedStreamPipesEntity { } export class MeasurementRange extends EventPropertyQualityDefinition { - "@class": "org.apache.streampipes.model.quality.MeasurementRange"; - maxValue: number; - minValue: number; + '@class': 'org.apache.streampipes.model.quality.MeasurementRange'; + 'maxValue': number; + 'minValue': number; - static fromData(data: MeasurementRange, target?: MeasurementRange): MeasurementRange { + static 'fromData'( + data: MeasurementRange, + target?: MeasurementRange, + ): MeasurementRange { if (!data) { return data; } @@ -2159,7 +2956,10 @@ export class MessageCounter { counter: number; lastTimestamp: number; - static fromData(data: MessageCounter, target?: MessageCounter): MessageCounter { + static fromData( + data: MessageCounter, + target?: MessageCounter, + ): MessageCounter { if (!data) { return data; } @@ -2171,11 +2971,14 @@ export class MessageCounter { } export class MoveRuleDescription extends SchemaTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription"; - newRuntimeKey: string; - oldRuntimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.schema.MoveRuleDescription'; + 'newRuntimeKey': string; + 'oldRuntimeKey': string; - static fromData(data: MoveRuleDescription, target?: MoveRuleDescription): MoveRuleDescription { + static 'fromData'( + data: MoveRuleDescription, + target?: MoveRuleDescription, + ): MoveRuleDescription { if (!data) { return data; } @@ -2188,10 +2991,13 @@ export class MoveRuleDescription extends SchemaTransformationRuleDescription { } export class MqttTransportProtocol extends TransportProtocol { - "@class": "org.apache.streampipes.model.grounding.MqttTransportProtocol"; - port: number; + '@class': 'org.apache.streampipes.model.grounding.MqttTransportProtocol'; + 'port': number; - static fromData(data: MqttTransportProtocol, target?: MqttTransportProtocol): MqttTransportProtocol { + static 'fromData'( + data: MqttTransportProtocol, + target?: MqttTransportProtocol, + ): MqttTransportProtocol { if (!data) { return data; } @@ -2203,10 +3009,13 @@ export class MqttTransportProtocol extends TransportProtocol { } export class NatsTransportProtocol extends TransportProtocol { - "@class": "org.apache.streampipes.model.grounding.NatsTransportProtocol"; - port: number; + '@class': 'org.apache.streampipes.model.grounding.NatsTransportProtocol'; + 'port': number; - static fromData(data: NatsTransportProtocol, target?: NatsTransportProtocol): NatsTransportProtocol { + static 'fromData'( + data: NatsTransportProtocol, + target?: NatsTransportProtocol, + ): NatsTransportProtocol { if (!data) { return data; } @@ -2235,9 +3044,14 @@ export class Notification { } export class OneOfStaticProperty extends SelectionStaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.OneOfStaticProperty" | "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty"; + '@class': + | 'org.apache.streampipes.model.staticproperty.OneOfStaticProperty' + | 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty'; - static fromData(data: OneOfStaticProperty, target?: OneOfStaticProperty): OneOfStaticProperty { + static 'fromData'( + data: OneOfStaticProperty, + target?: OneOfStaticProperty, + ): OneOfStaticProperty { if (!data) { return data; } @@ -2246,24 +3060,26 @@ export class OneOfStaticProperty extends SelectionStaticProperty { return instance; } - static fromDataUnion(data: OneOfStaticPropertyUnion): OneOfStaticPropertyUnion { + static 'fromDataUnion'( + data: OneOfStaticPropertyUnion, + ): OneOfStaticPropertyUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty": + switch (data['@class']) { + case 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty': return RuntimeResolvableOneOfStaticProperty.fromData(data); } } } export class Option extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.staticproperty.Option"; - internalName: string; - name: string; - selected: boolean; + '@class': 'org.apache.streampipes.model.staticproperty.Option'; + 'internalName': string; + 'name': string; + 'selected': boolean; - static fromData(data: Option, target?: Option): Option { + static 'fromData'(data: Option, target?: Option): Option { if (!data) { return data; } @@ -2298,7 +3114,10 @@ export class PersistedDataStream { pipelineName: string; schema: EventSchema; - static fromData(data: PersistedDataStream, target?: PersistedDataStream): PersistedDataStream { + static fromData( + data: PersistedDataStream, + target?: PersistedDataStream, + ): PersistedDataStream { if (!data) { return data; } @@ -2331,15 +3150,21 @@ export class Pipeline extends ElementComposition { } const instance = target || new Pipeline(); super.fromData(data, instance); - instance.actions = __getCopyArrayFn(DataSinkInvocation.fromData)(data.actions); + instance.actions = __getCopyArrayFn(DataSinkInvocation.fromData)( + data.actions, + ); instance.running = data.running; instance.restartOnSystemReboot = data.restartOnSystemReboot; instance.startedAt = data.startedAt; instance.createdAt = data.createdAt; instance.publicElement = data.publicElement; instance.createdByUser = data.createdByUser; - instance.pipelineCategories = __getCopyArrayFn(__identity())(data.pipelineCategories); - instance.pipelineNotifications = __getCopyArrayFn(__identity())(data.pipelineNotifications); + instance.pipelineCategories = __getCopyArrayFn(__identity())( + data.pipelineCategories, + ); + instance.pipelineNotifications = __getCopyArrayFn(__identity())( + data.pipelineNotifications, + ); instance.healthStatus = data.healthStatus; instance._id = data._id; instance._rev = data._rev; @@ -2351,7 +3176,10 @@ export class PipelineCanvasComment { comment: string; position: CanvasPosition; - static fromData(data: PipelineCanvasComment, target?: PipelineCanvasComment): PipelineCanvasComment { + static fromData( + data: PipelineCanvasComment, + target?: PipelineCanvasComment, + ): PipelineCanvasComment { if (!data) { return data; } @@ -2369,14 +3197,21 @@ export class PipelineCanvasMetadata { pipelineElementMetadata: { [index: string]: PipelineElementMetadata }; pipelineId: string; - static fromData(data: PipelineCanvasMetadata, target?: PipelineCanvasMetadata): PipelineCanvasMetadata { + static fromData( + data: PipelineCanvasMetadata, + target?: PipelineCanvasMetadata, + ): PipelineCanvasMetadata { if (!data) { return data; } const instance = target || new PipelineCanvasMetadata(); instance.pipelineId = data.pipelineId; - instance.pipelineElementMetadata = __getCopyObjectFn(PipelineElementMetadata.fromData)(data.pipelineElementMetadata); - instance.comments = __getCopyArrayFn(PipelineCanvasComment.fromData)(data.comments); + instance.pipelineElementMetadata = __getCopyObjectFn( + PipelineElementMetadata.fromData, + )(data.pipelineElementMetadata); + instance.comments = __getCopyArrayFn(PipelineCanvasComment.fromData)( + data.comments, + ); instance._id = data._id; instance._rev = data._rev; return instance; @@ -2389,7 +3224,10 @@ export class PipelineCategory { categoryDescription: string; categoryName: string; - static fromData(data: PipelineCategory, target?: PipelineCategory): PipelineCategory { + static fromData( + data: PipelineCategory, + target?: PipelineCategory, + ): PipelineCategory { if (!data) { return data; } @@ -2407,7 +3245,10 @@ export class PipelineEdgeValidation { status: EdgeValidationStatus; targetId: string; - static fromData(data: PipelineEdgeValidation, target?: PipelineEdgeValidation): PipelineEdgeValidation { + static fromData( + data: PipelineEdgeValidation, + target?: PipelineEdgeValidation, + ): PipelineEdgeValidation { if (!data) { return data; } @@ -2423,7 +3264,10 @@ export class PipelineElementMetadata { customName: string; position: CanvasPosition; - static fromData(data: PipelineElementMetadata, target?: PipelineElementMetadata): PipelineElementMetadata { + static fromData( + data: PipelineElementMetadata, + target?: PipelineElementMetadata, + ): PipelineElementMetadata { if (!data) { return data; } @@ -2442,7 +3286,10 @@ export class PipelineElementMonitoringInfo { producedMessageInfoExists: boolean; producedMessagesInfo: ProducedMessagesInfo; - static fromData(data: PipelineElementMonitoringInfo, target?: PipelineElementMonitoringInfo): PipelineElementMonitoringInfo { + static fromData( + data: PipelineElementMonitoringInfo, + target?: PipelineElementMonitoringInfo, + ): PipelineElementMonitoringInfo { if (!data) { return data; } @@ -2451,8 +3298,12 @@ export class PipelineElementMonitoringInfo { instance.pipelineElementName = data.pipelineElementName; instance.consumedMessageInfoExists = data.consumedMessageInfoExists; instance.producedMessageInfoExists = data.producedMessageInfoExists; - instance.consumedMessagesInfos = __getCopyArrayFn(ConsumedMessagesInfo.fromData)(data.consumedMessagesInfos); - instance.producedMessagesInfo = ProducedMessagesInfo.fromData(data.producedMessagesInfo); + instance.consumedMessagesInfos = __getCopyArrayFn( + ConsumedMessagesInfo.fromData, + )(data.consumedMessagesInfos); + instance.producedMessagesInfo = ProducedMessagesInfo.fromData( + data.producedMessagesInfo, + ); return instance; } } @@ -2464,7 +3315,10 @@ export class PipelineElementRecommendation { name: string; weight: number; - static fromData(data: PipelineElementRecommendation, target?: PipelineElementRecommendation): PipelineElementRecommendation { + static fromData( + data: PipelineElementRecommendation, + target?: PipelineElementRecommendation, + ): PipelineElementRecommendation { if (!data) { return data; } @@ -2483,13 +3337,20 @@ export class PipelineElementRecommendationMessage { recommendedElements: PipelineElementRecommendation[]; success: boolean; - static fromData(data: PipelineElementRecommendationMessage, target?: PipelineElementRecommendationMessage): PipelineElementRecommendationMessage { + static fromData( + data: PipelineElementRecommendationMessage, + target?: PipelineElementRecommendationMessage, + ): PipelineElementRecommendationMessage { if (!data) { return data; } const instance = target || new PipelineElementRecommendationMessage(); - instance.possibleElements = __getCopyArrayFn(PipelineElementRecommendation.fromData)(data.possibleElements); - instance.recommendedElements = __getCopyArrayFn(PipelineElementRecommendation.fromData)(data.recommendedElements); + instance.possibleElements = __getCopyArrayFn( + PipelineElementRecommendation.fromData, + )(data.possibleElements); + instance.recommendedElements = __getCopyArrayFn( + PipelineElementRecommendation.fromData, + )(data.recommendedElements); instance.success = data.success; return instance; } @@ -2501,7 +3362,10 @@ export class PipelineElementStatus { optionalMessage: string; success: boolean; - static fromData(data: PipelineElementStatus, target?: PipelineElementStatus): PipelineElementStatus { + static fromData( + data: PipelineElementStatus, + target?: PipelineElementStatus, + ): PipelineElementStatus { if (!data) { return data; } @@ -2522,7 +3386,10 @@ export class PipelineElementTemplate { templateDescription: string; templateName: string; - static fromData(data: PipelineElementTemplate, target?: PipelineElementTemplate): PipelineElementTemplate { + static fromData( + data: PipelineElementTemplate, + target?: PipelineElementTemplate, + ): PipelineElementTemplate { if (!data) { return data; } @@ -2530,7 +3397,9 @@ export class PipelineElementTemplate { instance.templateName = data.templateName; instance.templateDescription = data.templateDescription; instance.basePipelineElementAppId = data.basePipelineElementAppId; - instance.templateConfigs = __getCopyObjectFn(PipelineElementTemplateConfig.fromData)(data.templateConfigs); + instance.templateConfigs = __getCopyObjectFn( + PipelineElementTemplateConfig.fromData, + )(data.templateConfigs); instance._id = data._id; instance._rev = data._rev; return instance; @@ -2542,7 +3411,10 @@ export class PipelineElementTemplateConfig { editable: boolean; value: any; - static fromData(data: PipelineElementTemplateConfig, target?: PipelineElementTemplateConfig): PipelineElementTemplateConfig { + static fromData( + data: PipelineElementTemplateConfig, + target?: PipelineElementTemplateConfig, + ): PipelineElementTemplateConfig { if (!data) { return data; } @@ -2558,7 +3430,10 @@ export class PipelineElementValidationInfo { level: ValidationInfoLevel; message: string; - static fromData(data: PipelineElementValidationInfo, target?: PipelineElementValidationInfo): PipelineElementValidationInfo { + static fromData( + data: PipelineElementValidationInfo, + target?: PipelineElementValidationInfo, + ): PipelineElementValidationInfo { if (!data) { return data; } @@ -2579,7 +3454,10 @@ export class PipelineModification { staticProperties: StaticPropertyUnion[]; validationInfos: PipelineElementValidationInfo[]; - static fromData(data: PipelineModification, target?: PipelineModification): PipelineModification { + static fromData( + data: PipelineModification, + target?: PipelineModification, + ): PipelineModification { if (!data) { return data; } @@ -2587,10 +3465,18 @@ export class PipelineModification { instance.domId = data.domId; instance.elementId = data.elementId; instance.pipelineElementValid = data.pipelineElementValid; - instance.validationInfos = __getCopyArrayFn(PipelineElementValidationInfo.fromData)(data.validationInfos); - instance.staticProperties = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.staticProperties); - instance.outputStrategies = __getCopyArrayFn(OutputStrategy.fromDataUnion)(data.outputStrategies); - instance.inputStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.inputStreams); + instance.validationInfos = __getCopyArrayFn( + PipelineElementValidationInfo.fromData, + )(data.validationInfos); + instance.staticProperties = __getCopyArrayFn( + StaticProperty.fromDataUnion, + )(data.staticProperties); + instance.outputStrategies = __getCopyArrayFn( + OutputStrategy.fromDataUnion, + )(data.outputStrategies); + instance.inputStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)( + data.inputStreams, + ); instance.outputStream = SpDataStream.fromDataUnion(data.outputStream); return instance; } @@ -2601,15 +3487,22 @@ export class PipelineModificationMessage extends Message { pipelineModifications: PipelineModification[]; pipelineValid: boolean; - static fromData(data: PipelineModificationMessage, target?: PipelineModificationMessage): PipelineModificationMessage { + static fromData( + data: PipelineModificationMessage, + target?: PipelineModificationMessage, + ): PipelineModificationMessage { if (!data) { return data; } const instance = target || new PipelineModificationMessage(); super.fromData(data, instance); - instance.pipelineModifications = __getCopyArrayFn(PipelineModification.fromData)(data.pipelineModifications); + instance.pipelineModifications = __getCopyArrayFn( + PipelineModification.fromData, + )(data.pipelineModifications); instance.pipelineValid = data.pipelineValid; - instance.edgeValidations = __getCopyArrayFn(PipelineEdgeValidation.fromData)(data.edgeValidations); + instance.edgeValidations = __getCopyArrayFn( + PipelineEdgeValidation.fromData, + )(data.edgeValidations); return instance; } } @@ -2620,7 +3513,10 @@ export class PipelineMonitoringInfo { pipelineId: string; startedAt: number; - static fromData(data: PipelineMonitoringInfo, target?: PipelineMonitoringInfo): PipelineMonitoringInfo { + static fromData( + data: PipelineMonitoringInfo, + target?: PipelineMonitoringInfo, + ): PipelineMonitoringInfo { if (!data) { return data; } @@ -2628,7 +3524,9 @@ export class PipelineMonitoringInfo { instance.pipelineId = data.pipelineId; instance.createdAt = data.createdAt; instance.startedAt = data.startedAt; - instance.pipelineElementMonitoringInfo = __getCopyArrayFn(PipelineElementMonitoringInfo.fromData)(data.pipelineElementMonitoringInfo); + instance.pipelineElementMonitoringInfo = __getCopyArrayFn( + PipelineElementMonitoringInfo.fromData, + )(data.pipelineElementMonitoringInfo); return instance; } } @@ -2640,7 +3538,10 @@ export class PipelineOperationStatus { success: boolean; title: string; - static fromData(data: PipelineOperationStatus, target?: PipelineOperationStatus): PipelineOperationStatus { + static fromData( + data: PipelineOperationStatus, + target?: PipelineOperationStatus, + ): PipelineOperationStatus { if (!data) { return data; } @@ -2649,7 +3550,9 @@ export class PipelineOperationStatus { instance.pipelineName = data.pipelineName; instance.title = data.title; instance.success = data.success; - instance.elementStatus = __getCopyArrayFn(PipelineElementStatus.fromData)(data.elementStatus); + instance.elementStatus = __getCopyArrayFn( + PipelineElementStatus.fromData, + )(data.elementStatus); return instance; } } @@ -2658,13 +3561,18 @@ export class PipelinePreviewModel { previewId: string; supportedPipelineElementDomIds: string[]; - static fromData(data: PipelinePreviewModel, target?: PipelinePreviewModel): PipelinePreviewModel { + static fromData( + data: PipelinePreviewModel, + target?: PipelinePreviewModel, + ): PipelinePreviewModel { if (!data) { return data; } const instance = target || new PipelinePreviewModel(); instance.previewId = data.previewId; - instance.supportedPipelineElementDomIds = __getCopyArrayFn(__identity())(data.supportedPipelineElementDomIds); + instance.supportedPipelineElementDomIds = __getCopyArrayFn( + __identity(), + )(data.supportedPipelineElementDomIds); return instance; } } @@ -2675,7 +3583,10 @@ export class PipelineStatusMessage { pipelineId: string; timestamp: number; - static fromData(data: PipelineStatusMessage, target?: PipelineStatusMessage): PipelineStatusMessage { + static fromData( + data: PipelineStatusMessage, + target?: PipelineStatusMessage, + ): PipelineStatusMessage { if (!data) { return data; } @@ -2689,19 +3600,24 @@ export class PipelineStatusMessage { } export class PipelineTemplateDescription extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.template.PipelineTemplateDescription"; - boundTo: BoundPipelineElement[]; - pipelineTemplateDescription: string; - pipelineTemplateId: string; - pipelineTemplateName: string; + '@class': 'org.apache.streampipes.model.template.PipelineTemplateDescription'; + 'boundTo': BoundPipelineElement[]; + 'pipelineTemplateDescription': string; + 'pipelineTemplateId': string; + 'pipelineTemplateName': string; - static fromData(data: PipelineTemplateDescription, target?: PipelineTemplateDescription): PipelineTemplateDescription { + static 'fromData'( + data: PipelineTemplateDescription, + target?: PipelineTemplateDescription, + ): PipelineTemplateDescription { if (!data) { return data; } const instance = target || new PipelineTemplateDescription(); super.fromData(data, instance); - instance.boundTo = __getCopyArrayFn(BoundPipelineElement.fromData)(data.boundTo); + instance.boundTo = __getCopyArrayFn(BoundPipelineElement.fromData)( + data.boundTo, + ); instance.pipelineTemplateName = data.pipelineTemplateName; instance.pipelineTemplateId = data.pipelineTemplateId; instance.pipelineTemplateDescription = data.pipelineTemplateDescription; @@ -2710,14 +3626,17 @@ export class PipelineTemplateDescription extends NamedStreamPipesEntity { } export class PipelineTemplateInvocation extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.template.PipelineTemplateInvocation"; - dataSetId: string; - kviName: string; - pipelineTemplateDescription: PipelineTemplateDescription; - pipelineTemplateId: string; - staticProperties: StaticPropertyUnion[]; + '@class': 'org.apache.streampipes.model.template.PipelineTemplateInvocation'; + 'dataSetId': string; + 'kviName': string; + 'pipelineTemplateDescription': PipelineTemplateDescription; + 'pipelineTemplateId': string; + 'staticProperties': StaticPropertyUnion[]; - static fromData(data: PipelineTemplateInvocation, target?: PipelineTemplateInvocation): PipelineTemplateInvocation { + static 'fromData'( + data: PipelineTemplateInvocation, + target?: PipelineTemplateInvocation, + ): PipelineTemplateInvocation { if (!data) { return data; } @@ -2726,17 +3645,22 @@ export class PipelineTemplateInvocation extends UnnamedStreamPipesEntity { instance.kviName = data.kviName; instance.dataSetId = data.dataSetId; instance.pipelineTemplateId = data.pipelineTemplateId; - instance.pipelineTemplateDescription = PipelineTemplateDescription.fromData(data.pipelineTemplateDescription); - instance.staticProperties = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.staticProperties); + instance.pipelineTemplateDescription = + PipelineTemplateDescription.fromData( + data.pipelineTemplateDescription, + ); + instance.staticProperties = __getCopyArrayFn( + StaticProperty.fromDataUnion, + )(data.staticProperties); return instance; } } export class Precision extends EventPropertyQualityDefinition { - "@class": "org.apache.streampipes.model.quality.Precision"; - quantityValue: number; + '@class': 'org.apache.streampipes.model.quality.Precision'; + 'quantityValue': number; - static fromData(data: Precision, target?: Precision): Precision { + static 'fromData'(data: Precision, target?: Precision): Precision { if (!data) { return data; } @@ -2751,24 +3675,31 @@ export class ProducedMessagesInfo extends MessagesInfo { totalProducedMessages: number; totalProducedMessagesSincePipelineStart: number; - static fromData(data: ProducedMessagesInfo, target?: ProducedMessagesInfo): ProducedMessagesInfo { + static fromData( + data: ProducedMessagesInfo, + target?: ProducedMessagesInfo, + ): ProducedMessagesInfo { if (!data) { return data; } const instance = target || new ProducedMessagesInfo(); super.fromData(data, instance); instance.totalProducedMessages = data.totalProducedMessages; - instance.totalProducedMessagesSincePipelineStart = data.totalProducedMessagesSincePipelineStart; + instance.totalProducedMessagesSincePipelineStart = + data.totalProducedMessagesSincePipelineStart; return instance; } } export class PropertyRenameRule extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.output.PropertyRenameRule"; - newRuntimeName: string; - runtimeId: string; + '@class': 'org.apache.streampipes.model.output.PropertyRenameRule'; + 'newRuntimeName': string; + 'runtimeId': string; - static fromData(data: PropertyRenameRule, target?: PropertyRenameRule): PropertyRenameRule { + static 'fromData'( + data: PropertyRenameRule, + target?: PropertyRenameRule, + ): PropertyRenameRule { if (!data) { return data; } @@ -2781,12 +3712,15 @@ export class PropertyRenameRule extends UnnamedStreamPipesEntity { } export class PropertyValueSpecification extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.staticproperty.PropertyValueSpecification"; - maxValue: number; - minValue: number; - step: number; + '@class': 'org.apache.streampipes.model.staticproperty.PropertyValueSpecification'; + 'maxValue': number; + 'minValue': number; + 'step': number; - static fromData(data: PropertyValueSpecification, target?: PropertyValueSpecification): PropertyValueSpecification { + static 'fromData'( + data: PropertyValueSpecification, + target?: PropertyValueSpecification, + ): PropertyValueSpecification { if (!data) { return data; } @@ -2800,31 +3734,41 @@ export class PropertyValueSpecification extends UnnamedStreamPipesEntity { } export class ProtocolDescription extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.connect.grounding.ProtocolDescription"; - category: string[]; - config: StaticPropertyUnion[]; - sourceType: string; + '@class': 'org.apache.streampipes.model.connect.grounding.ProtocolDescription'; + 'category': string[]; + 'config': StaticPropertyUnion[]; + 'sourceType': string; - static fromData(data: ProtocolDescription, target?: ProtocolDescription): ProtocolDescription { + static 'fromData'( + data: ProtocolDescription, + target?: ProtocolDescription, + ): ProtocolDescription { if (!data) { return data; } const instance = target || new ProtocolDescription(); super.fromData(data, instance); instance.sourceType = data.sourceType; - instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.config); - instance.category = __getCopyArrayFn(__identity())(data.category); + instance.config = __getCopyArrayFn(StaticProperty.fromDataUnion)( + data.config, + ); + instance.category = __getCopyArrayFn(__identity())( + data.category, + ); return instance; } } export class QuantitativeValue extends ValueSpecification { - "@class": "org.apache.streampipes.model.schema.QuantitativeValue"; - maxValue: number; - minValue: number; - step: number; + '@class': 'org.apache.streampipes.model.schema.QuantitativeValue'; + 'maxValue': number; + 'minValue': number; + 'step': number; - static fromData(data: QuantitativeValue, target?: QuantitativeValue): QuantitativeValue { + static 'fromData'( + data: QuantitativeValue, + target?: QuantitativeValue, + ): QuantitativeValue { if (!data) { return data; } @@ -2838,14 +3782,18 @@ export class QuantitativeValue extends ValueSpecification { } export class RemoveDuplicatesTransformationRuleDescription extends StreamTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription"; - filterTimeWindow: string; + '@class': 'org.apache.streampipes.model.connect.rules.stream.RemoveDuplicatesTransformationRuleDescription'; + 'filterTimeWindow': string; - static fromData(data: RemoveDuplicatesTransformationRuleDescription, target?: RemoveDuplicatesTransformationRuleDescription): RemoveDuplicatesTransformationRuleDescription { + static 'fromData'( + data: RemoveDuplicatesTransformationRuleDescription, + target?: RemoveDuplicatesTransformationRuleDescription, + ): RemoveDuplicatesTransformationRuleDescription { if (!data) { return data; } - const instance = target || new RemoveDuplicatesTransformationRuleDescription(); + const instance = + target || new RemoveDuplicatesTransformationRuleDescription(); super.fromData(data, instance); instance.filterTimeWindow = data.filterTimeWindow; return instance; @@ -2853,11 +3801,14 @@ export class RemoveDuplicatesTransformationRuleDescription extends StreamTransfo } export class RenameRuleDescription extends SchemaTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription"; - newRuntimeKey: string; - oldRuntimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.schema.RenameRuleDescription'; + 'newRuntimeKey': string; + 'oldRuntimeKey': string; - static fromData(data: RenameRuleDescription, target?: RenameRuleDescription): RenameRuleDescription { + static 'fromData'( + data: RenameRuleDescription, + target?: RenameRuleDescription, + ): RenameRuleDescription { if (!data) { return data; } @@ -2870,10 +3821,10 @@ export class RenameRuleDescription extends SchemaTransformationRuleDescription { } export class Resolution extends EventPropertyQualityDefinition { - "@class": "org.apache.streampipes.model.quality.Resolution"; - quantityValue: number; + '@class': 'org.apache.streampipes.model.quality.Resolution'; + 'quantityValue': number; - static fromData(data: Resolution, target?: Resolution): Resolution { + static 'fromData'(data: Resolution, target?: Resolution): Resolution { if (!data) { return data; } @@ -2885,14 +3836,19 @@ export class Resolution extends EventPropertyQualityDefinition { } export class RuntimeOptionsRequest extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.runtime.RuntimeOptionsRequest" | "org.apache.streampipes.model.runtime.RuntimeOptionsResponse"; - appId: string; - belongsTo: string; - inputStreams: SpDataStreamUnion[]; - requestId: string; - staticProperties: StaticPropertyUnion[]; + '@class': + | 'org.apache.streampipes.model.runtime.RuntimeOptionsRequest' + | 'org.apache.streampipes.model.runtime.RuntimeOptionsResponse'; + 'appId': string; + 'belongsTo': string; + 'inputStreams': SpDataStreamUnion[]; + 'requestId': string; + 'staticProperties': StaticPropertyUnion[]; - static fromData(data: RuntimeOptionsRequest, target?: RuntimeOptionsRequest): RuntimeOptionsRequest { + static 'fromData'( + data: RuntimeOptionsRequest, + target?: RuntimeOptionsRequest, + ): RuntimeOptionsRequest { if (!data) { return data; } @@ -2900,81 +3856,109 @@ export class RuntimeOptionsRequest extends UnnamedStreamPipesEntity { super.fromData(data, instance); instance.requestId = data.requestId; instance.appId = data.appId; - instance.staticProperties = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.staticProperties); - instance.inputStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)(data.inputStreams); + instance.staticProperties = __getCopyArrayFn( + StaticProperty.fromDataUnion, + )(data.staticProperties); + instance.inputStreams = __getCopyArrayFn(SpDataStream.fromDataUnion)( + data.inputStreams, + ); instance.belongsTo = data.belongsTo; return instance; } } export class RuntimeOptionsResponse extends RuntimeOptionsRequest { - "@class": "org.apache.streampipes.model.runtime.RuntimeOptionsResponse"; - staticProperty: StaticPropertyUnion; + '@class': 'org.apache.streampipes.model.runtime.RuntimeOptionsResponse'; + 'staticProperty': StaticPropertyUnion; - static fromData(data: RuntimeOptionsResponse, target?: RuntimeOptionsResponse): RuntimeOptionsResponse { + static 'fromData'( + data: RuntimeOptionsResponse, + target?: RuntimeOptionsResponse, + ): RuntimeOptionsResponse { if (!data) { return data; } const instance = target || new RuntimeOptionsResponse(); super.fromData(data, instance); - instance.staticProperty = StaticProperty.fromDataUnion(data.staticProperty); + instance.staticProperty = StaticProperty.fromDataUnion( + data.staticProperty, + ); return instance; } } export class RuntimeResolvableAnyStaticProperty extends AnyStaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty"; - dependsOn: string[]; + '@class': 'org.apache.streampipes.model.staticproperty.RuntimeResolvableAnyStaticProperty'; + 'dependsOn': string[]; - static fromData(data: RuntimeResolvableAnyStaticProperty, target?: RuntimeResolvableAnyStaticProperty): RuntimeResolvableAnyStaticProperty { + static 'fromData'( + data: RuntimeResolvableAnyStaticProperty, + target?: RuntimeResolvableAnyStaticProperty, + ): RuntimeResolvableAnyStaticProperty { if (!data) { return data; } const instance = target || new RuntimeResolvableAnyStaticProperty(); super.fromData(data, instance); - instance.dependsOn = __getCopyArrayFn(__identity())(data.dependsOn); + instance.dependsOn = __getCopyArrayFn(__identity())( + data.dependsOn, + ); return instance; } } export class RuntimeResolvableOneOfStaticProperty extends OneOfStaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty"; - dependsOn: string[]; + '@class': 'org.apache.streampipes.model.staticproperty.RuntimeResolvableOneOfStaticProperty'; + 'dependsOn': string[]; - static fromData(data: RuntimeResolvableOneOfStaticProperty, target?: RuntimeResolvableOneOfStaticProperty): RuntimeResolvableOneOfStaticProperty { + static 'fromData'( + data: RuntimeResolvableOneOfStaticProperty, + target?: RuntimeResolvableOneOfStaticProperty, + ): RuntimeResolvableOneOfStaticProperty { if (!data) { return data; } const instance = target || new RuntimeResolvableOneOfStaticProperty(); super.fromData(data, instance); - instance.dependsOn = __getCopyArrayFn(__identity())(data.dependsOn); + instance.dependsOn = __getCopyArrayFn(__identity())( + data.dependsOn, + ); return instance; } } export class RuntimeResolvableTreeInputStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty"; - dependsOn: string[]; - nodes: TreeInputNode[]; + '@class': 'org.apache.streampipes.model.staticproperty.RuntimeResolvableTreeInputStaticProperty'; + 'dependsOn': string[]; + 'nodes': TreeInputNode[]; - static fromData(data: RuntimeResolvableTreeInputStaticProperty, target?: RuntimeResolvableTreeInputStaticProperty): RuntimeResolvableTreeInputStaticProperty { + static 'fromData'( + data: RuntimeResolvableTreeInputStaticProperty, + target?: RuntimeResolvableTreeInputStaticProperty, + ): RuntimeResolvableTreeInputStaticProperty { if (!data) { return data; } - const instance = target || new RuntimeResolvableTreeInputStaticProperty(); + const instance = + target || new RuntimeResolvableTreeInputStaticProperty(); super.fromData(data, instance); - instance.dependsOn = __getCopyArrayFn(__identity())(data.dependsOn); + instance.dependsOn = __getCopyArrayFn(__identity())( + data.dependsOn, + ); instance.nodes = __getCopyArrayFn(TreeInputNode.fromData)(data.nodes); return instance; } } export class SecretStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.SecretStaticProperty"; - encrypted: boolean; - value: string; + '@class': 'org.apache.streampipes.model.staticproperty.SecretStaticProperty'; + 'encrypted': boolean; + 'value': string; - static fromData(data: SecretStaticProperty, target?: SecretStaticProperty): SecretStaticProperty { + static 'fromData'( + data: SecretStaticProperty, + target?: SecretStaticProperty, + ): SecretStaticProperty { if (!data) { return data; } @@ -2987,10 +3971,16 @@ export class SecretStaticProperty extends StaticProperty { } export class TopicDefinition extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.grounding.TopicDefinition" | "org.apache.streampipes.model.grounding.SimpleTopicDefinition" | "org.apache.streampipes.model.grounding.WildcardTopicDefinition"; - actualTopicName: string; + '@class': + | 'org.apache.streampipes.model.grounding.TopicDefinition' + | 'org.apache.streampipes.model.grounding.SimpleTopicDefinition' + | 'org.apache.streampipes.model.grounding.WildcardTopicDefinition'; + 'actualTopicName': string; - static fromData(data: TopicDefinition, target?: TopicDefinition): TopicDefinition { + static 'fromData'( + data: TopicDefinition, + target?: TopicDefinition, + ): TopicDefinition { if (!data) { return data; } @@ -3000,23 +3990,26 @@ export class TopicDefinition extends UnnamedStreamPipesEntity { return instance; } - static fromDataUnion(data: TopicDefinitionUnion): TopicDefinitionUnion { + static 'fromDataUnion'(data: TopicDefinitionUnion): TopicDefinitionUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.grounding.SimpleTopicDefinition": + switch (data['@class']) { + case 'org.apache.streampipes.model.grounding.SimpleTopicDefinition': return SimpleTopicDefinition.fromData(data); - case "org.apache.streampipes.model.grounding.WildcardTopicDefinition": + case 'org.apache.streampipes.model.grounding.WildcardTopicDefinition': return WildcardTopicDefinition.fromData(data); } } } export class SimpleTopicDefinition extends TopicDefinition { - "@class": "org.apache.streampipes.model.grounding.SimpleTopicDefinition"; + '@class': 'org.apache.streampipes.model.grounding.SimpleTopicDefinition'; - static fromData(data: SimpleTopicDefinition, target?: SimpleTopicDefinition): SimpleTopicDefinition { + static 'fromData'( + data: SimpleTopicDefinition, + target?: SimpleTopicDefinition, + ): SimpleTopicDefinition { if (!data) { return data; } @@ -3027,11 +4020,14 @@ export class SimpleTopicDefinition extends TopicDefinition { } export class SlideToggleStaticProperty extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty"; - defaultValue: boolean; - selected: boolean; + '@class': 'org.apache.streampipes.model.staticproperty.SlideToggleStaticProperty'; + 'defaultValue': boolean; + 'selected': boolean; - static fromData(data: SlideToggleStaticProperty, target?: SlideToggleStaticProperty): SlideToggleStaticProperty { + static 'fromData'( + data: SlideToggleStaticProperty, + target?: SlideToggleStaticProperty, + ): SlideToggleStaticProperty { if (!data) { return data; } @@ -3044,64 +4040,78 @@ export class SlideToggleStaticProperty extends StaticProperty { } export class SpDataStream extends NamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.SpDataStream" | "org.apache.streampipes.model.SpDataSet"; - category: string[]; - correspondingAdapterId: string; - eventGrounding: EventGrounding; - eventSchema: EventSchema; - hasEventStreamQualities: EventStreamQualityDefinitionUnion[]; - index: number; - measurementCapability: MeasurementCapability[]; - measurementObject: MeasurementObject[]; - requiresEventStreamQualities: EventStreamQualityRequirement[]; + '@class': + | 'org.apache.streampipes.model.SpDataStream' + | 'org.apache.streampipes.model.SpDataSet'; + 'category': string[]; + 'correspondingAdapterId': string; + 'eventGrounding': EventGrounding; + 'eventSchema': EventSchema; + 'hasEventStreamQualities': EventStreamQualityDefinitionUnion[]; + 'index': number; + 'measurementCapability': MeasurementCapability[]; + 'measurementObject': MeasurementObject[]; + 'requiresEventStreamQualities': EventStreamQualityRequirement[]; - static fromData(data: SpDataStream, target?: SpDataStream): SpDataStream { + static 'fromData'(data: SpDataStream, target?: SpDataStream): SpDataStream { if (!data) { return data; } const instance = target || new SpDataStream(); super.fromData(data, instance); - instance.hasEventStreamQualities = __getCopyArrayFn(EventStreamQualityDefinition.fromDataUnion)(data.hasEventStreamQualities); - instance.requiresEventStreamQualities = __getCopyArrayFn(EventStreamQualityRequirement.fromData)(data.requiresEventStreamQualities); + instance.hasEventStreamQualities = __getCopyArrayFn( + EventStreamQualityDefinition.fromDataUnion, + )(data.hasEventStreamQualities); + instance.requiresEventStreamQualities = __getCopyArrayFn( + EventStreamQualityRequirement.fromData, + )(data.requiresEventStreamQualities); instance.eventGrounding = EventGrounding.fromData(data.eventGrounding); instance.eventSchema = EventSchema.fromData(data.eventSchema); - instance.measurementCapability = __getCopyArrayFn(MeasurementCapability.fromData)(data.measurementCapability); - instance.measurementObject = __getCopyArrayFn(MeasurementObject.fromData)(data.measurementObject); + instance.measurementCapability = __getCopyArrayFn( + MeasurementCapability.fromData, + )(data.measurementCapability); + instance.measurementObject = __getCopyArrayFn( + MeasurementObject.fromData, + )(data.measurementObject); instance.index = data.index; instance.correspondingAdapterId = data.correspondingAdapterId; - instance.category = __getCopyArrayFn(__identity())(data.category); + instance.category = __getCopyArrayFn(__identity())( + data.category, + ); return instance; } - static fromDataUnion(data: SpDataStreamUnion): SpDataStreamUnion { + static 'fromDataUnion'(data: SpDataStreamUnion): SpDataStreamUnion { if (!data) { return data; } - switch (data["@class"]) { - case "org.apache.streampipes.model.SpDataStream": + switch (data['@class']) { + case 'org.apache.streampipes.model.SpDataStream': return SpDataStream.fromData(data); - case "org.apache.streampipes.model.SpDataSet": + case 'org.apache.streampipes.model.SpDataSet': return SpDataSet.fromData(data); } } } export class SpDataSet extends SpDataStream { - "@class": "org.apache.streampipes.model.SpDataSet"; - actualTopicName: string; - brokerHostname: string; - correspondingPipeline: string; - datasetInvocationId: string; - selectedEndpointUrl: string; - supportedGrounding: EventGrounding; + '@class': 'org.apache.streampipes.model.SpDataSet'; + 'actualTopicName': string; + 'brokerHostname': string; + 'correspondingPipeline': string; + 'datasetInvocationId': string; + 'selectedEndpointUrl': string; + 'supportedGrounding': EventGrounding; - static fromData(data: SpDataSet, target?: SpDataSet): SpDataSet { + static 'fromData'(data: SpDataSet, target?: SpDataSet): SpDataSet { if (!data) { return data; } const instance = target || new SpDataSet(); super.fromData(data, instance); - instance.supportedGrounding = EventGrounding.fromData(data.supportedGrounding); + instance.supportedGrounding = EventGrounding.fromData( + data.supportedGrounding, + ); instance.datasetInvocationId = data.datasetInvocationId; instance.correspondingPipeline = data.correspondingPipeline; instance.selectedEndpointUrl = data.selectedEndpointUrl; @@ -3121,7 +4131,9 @@ export class SpLogEntry { } const instance = target || new SpLogEntry(); instance.timestamp = data.timestamp; - instance.errorMessage = StreamPipesErrorMessage.fromData(data.errorMessage); + instance.errorMessage = StreamPipesErrorMessage.fromData( + data.errorMessage, + ); return instance; } } @@ -3131,13 +4143,18 @@ export class SpMetricsEntry { messagesIn: { [index: string]: MessageCounter }; messagesOut: MessageCounter; - static fromData(data: SpMetricsEntry, target?: SpMetricsEntry): SpMetricsEntry { + static fromData( + data: SpMetricsEntry, + target?: SpMetricsEntry, + ): SpMetricsEntry { if (!data) { return data; } const instance = target || new SpMetricsEntry(); instance.lastTimestamp = data.lastTimestamp; - instance.messagesIn = __getCopyObjectFn(MessageCounter.fromData)(data.messagesIn); + instance.messagesIn = __getCopyObjectFn(MessageCounter.fromData)( + data.messagesIn, + ); instance.messagesOut = MessageCounter.fromData(data.messagesOut); return instance; } @@ -3151,14 +4168,19 @@ export class SpQueryResult { spQueryStatus: SpQueryStatus; total: number; - static fromData(data: SpQueryResult, target?: SpQueryResult): SpQueryResult { + static fromData( + data: SpQueryResult, + target?: SpQueryResult, + ): SpQueryResult { if (!data) { return data; } const instance = target || new SpQueryResult(); instance.total = data.total; instance.headers = __getCopyArrayFn(__identity())(data.headers); - instance.allDataSeries = __getCopyArrayFn(DataSeries.fromData)(data.allDataSeries); + instance.allDataSeries = __getCopyArrayFn(DataSeries.fromData)( + data.allDataSeries, + ); instance.sourceIndex = data.sourceIndex; instance.spQueryStatus = data.spQueryStatus; instance.forId = data.forId; @@ -3167,9 +4189,12 @@ export class SpQueryResult { } export class SpecificAdapterSetDescription extends AdapterSetDescription { - "@class": "org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription"; + '@class': 'org.apache.streampipes.model.connect.adapter.SpecificAdapterSetDescription'; - static fromData(data: SpecificAdapterSetDescription, target?: SpecificAdapterSetDescription): SpecificAdapterSetDescription { + static 'fromData'( + data: SpecificAdapterSetDescription, + target?: SpecificAdapterSetDescription, + ): SpecificAdapterSetDescription { if (!data) { return data; } @@ -3180,9 +4205,12 @@ export class SpecificAdapterSetDescription extends AdapterSetDescription { } export class SpecificAdapterStreamDescription extends AdapterStreamDescription { - "@class": "org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription"; + '@class': 'org.apache.streampipes.model.connect.adapter.SpecificAdapterStreamDescription'; - static fromData(data: SpecificAdapterStreamDescription, target?: SpecificAdapterStreamDescription): SpecificAdapterStreamDescription { + static 'fromData'( + data: SpecificAdapterStreamDescription, + target?: SpecificAdapterStreamDescription, + ): SpecificAdapterStreamDescription { if (!data) { return data; } @@ -3193,50 +4221,65 @@ export class SpecificAdapterStreamDescription extends AdapterStreamDescription { } export class StaticPropertyAlternative extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.StaticPropertyAlternative"; - selected: boolean; - staticProperty: StaticPropertyUnion; + '@class': 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternative'; + 'selected': boolean; + 'staticProperty': StaticPropertyUnion; - static fromData(data: StaticPropertyAlternative, target?: StaticPropertyAlternative): StaticPropertyAlternative { + static 'fromData'( + data: StaticPropertyAlternative, + target?: StaticPropertyAlternative, + ): StaticPropertyAlternative { if (!data) { return data; } const instance = target || new StaticPropertyAlternative(); super.fromData(data, instance); instance.selected = data.selected; - instance.staticProperty = StaticProperty.fromDataUnion(data.staticProperty); + instance.staticProperty = StaticProperty.fromDataUnion( + data.staticProperty, + ); return instance; } } export class StaticPropertyAlternatives extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives"; - alternatives: StaticPropertyAlternative[]; + '@class': 'org.apache.streampipes.model.staticproperty.StaticPropertyAlternatives'; + 'alternatives': StaticPropertyAlternative[]; - static fromData(data: StaticPropertyAlternatives, target?: StaticPropertyAlternatives): StaticPropertyAlternatives { + static 'fromData'( + data: StaticPropertyAlternatives, + target?: StaticPropertyAlternatives, + ): StaticPropertyAlternatives { if (!data) { return data; } const instance = target || new StaticPropertyAlternatives(); super.fromData(data, instance); - instance.alternatives = __getCopyArrayFn(StaticPropertyAlternative.fromData)(data.alternatives); + instance.alternatives = __getCopyArrayFn( + StaticPropertyAlternative.fromData, + )(data.alternatives); return instance; } } export class StaticPropertyGroup extends StaticProperty { - "@class": "org.apache.streampipes.model.staticproperty.StaticPropertyGroup"; - horizontalRendering: boolean; - showLabel: boolean; - staticProperties: StaticPropertyUnion[]; + '@class': 'org.apache.streampipes.model.staticproperty.StaticPropertyGroup'; + 'horizontalRendering': boolean; + 'showLabel': boolean; + 'staticProperties': StaticPropertyUnion[]; - static fromData(data: StaticPropertyGroup, target?: StaticPropertyGroup): StaticPropertyGroup { + static 'fromData'( + data: StaticPropertyGroup, + target?: StaticPropertyGroup, + ): StaticPropertyGroup { if (!data) { return data; } const instance = target || new StaticPropertyGroup(); super.fromData(data, instance); - instance.staticProperties = __getCopyArrayFn(StaticProperty.fromDataUnion)(data.staticProperties); + instance.staticProperties = __getCopyArrayFn( + StaticProperty.fromDataUnion, + )(data.staticProperties); instance.showLabel = data.showLabel; instance.horizontalRendering = data.horizontalRendering; return instance; @@ -3258,23 +4301,48 @@ export class StreamPipesApplicationPackage { requiredDataSinkAppIds: string[]; requiredProcessorAppIds: string[]; - static fromData(data: StreamPipesApplicationPackage, target?: StreamPipesApplicationPackage): StreamPipesApplicationPackage { + static fromData( + data: StreamPipesApplicationPackage, + target?: StreamPipesApplicationPackage, + ): StreamPipesApplicationPackage { if (!data) { return data; } const instance = target || new StreamPipesApplicationPackage(); - instance.requiredProcessorAppIds = __getCopyArrayFn(__identity())(data.requiredProcessorAppIds); - instance.requiredDataSinkAppIds = __getCopyArrayFn(__identity())(data.requiredDataSinkAppIds); - instance.requiredAdapterAppIds = __getCopyArrayFn(__identity())(data.requiredAdapterAppIds); + instance.requiredProcessorAppIds = __getCopyArrayFn( + __identity(), + )(data.requiredProcessorAppIds); + instance.requiredDataSinkAppIds = __getCopyArrayFn( + __identity(), + )(data.requiredDataSinkAppIds); + instance.requiredAdapterAppIds = __getCopyArrayFn(__identity())( + data.requiredAdapterAppIds, + ); instance.assets = __getCopyArrayFn(__identity())(data.assets); - instance.adapters = __getCopyArrayFn(__identity())(data.adapters); - instance.dashboards = __getCopyArrayFn(__identity())(data.dashboards); - instance.dashboardWidgets = __getCopyArrayFn(__identity())(data.dashboardWidgets); - instance.dataViews = __getCopyArrayFn(__identity())(data.dataViews); - instance.dataViewWidgets = __getCopyArrayFn(__identity())(data.dataViewWidgets); - instance.dataLakeMeasures = __getCopyArrayFn(__identity())(data.dataLakeMeasures); - instance.dataSources = __getCopyArrayFn(__identity())(data.dataSources); - instance.pipelines = __getCopyArrayFn(__identity())(data.pipelines); + instance.adapters = __getCopyArrayFn(__identity())( + data.adapters, + ); + instance.dashboards = __getCopyArrayFn(__identity())( + data.dashboards, + ); + instance.dashboardWidgets = __getCopyArrayFn(__identity())( + data.dashboardWidgets, + ); + instance.dataViews = __getCopyArrayFn(__identity())( + data.dataViews, + ); + instance.dataViewWidgets = __getCopyArrayFn(__identity())( + data.dataViewWidgets, + ); + instance.dataLakeMeasures = __getCopyArrayFn(__identity())( + data.dataLakeMeasures, + ); + instance.dataSources = __getCopyArrayFn(__identity())( + data.dataSources, + ); + instance.pipelines = __getCopyArrayFn(__identity())( + data.pipelines, + ); instance.files = __getCopyArrayFn(__identity())(data.files); return instance; } @@ -3287,7 +4355,10 @@ export class StreamPipesErrorMessage { level: string; title: string; - static fromData(data: StreamPipesErrorMessage, target?: StreamPipesErrorMessage): StreamPipesErrorMessage { + static fromData( + data: StreamPipesErrorMessage, + target?: StreamPipesErrorMessage, + ): StreamPipesErrorMessage { if (!data) { return data; } @@ -3302,8 +4373,10 @@ export class StreamPipesErrorMessage { } export class SuccessMessage extends Message { - - static fromData(data: SuccessMessage, target?: SuccessMessage): SuccessMessage { + static fromData( + data: SuccessMessage, + target?: SuccessMessage, + ): SuccessMessage { if (!data) { return data; } @@ -3314,12 +4387,15 @@ export class SuccessMessage extends Message { } export class SupportedProperty extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.staticproperty.SupportedProperty"; - propertyId: string; - value: string; - valueRequired: boolean; + '@class': 'org.apache.streampipes.model.staticproperty.SupportedProperty'; + 'propertyId': string; + 'value': string; + 'valueRequired': boolean; - static fromData(data: SupportedProperty, target?: SupportedProperty): SupportedProperty { + static 'fromData'( + data: SupportedProperty, + target?: SupportedProperty, + ): SupportedProperty { if (!data) { return data; } @@ -3333,17 +4409,21 @@ export class SupportedProperty extends UnnamedStreamPipesEntity { } export class TimestampTranfsformationRuleDescription extends ValueTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription"; - formatString: string; - mode: string; - multiplier: number; - runtimeKey: string; + '@class': 'org.apache.streampipes.model.connect.rules.value.TimestampTranfsformationRuleDescription'; + 'formatString': string; + 'mode': string; + 'multiplier': number; + 'runtimeKey': string; - static fromData(data: TimestampTranfsformationRuleDescription, target?: TimestampTranfsformationRuleDescription): TimestampTranfsformationRuleDescription { + static 'fromData'( + data: TimestampTranfsformationRuleDescription, + target?: TimestampTranfsformationRuleDescription, + ): TimestampTranfsformationRuleDescription { if (!data) { return data; } - const instance = target || new TimestampTranfsformationRuleDescription(); + const instance = + target || new TimestampTranfsformationRuleDescription(); super.fromData(data, instance); instance.runtimeKey = data.runtimeKey; instance.mode = data.mode; @@ -3354,13 +4434,16 @@ export class TimestampTranfsformationRuleDescription extends ValueTransformation } export class TransformOperation extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.output.TransformOperation"; - mappingPropertyInternalName: string; - sourceStaticProperty: string; - targetValue: string; - transformationScope: string; + '@class': 'org.apache.streampipes.model.output.TransformOperation'; + 'mappingPropertyInternalName': string; + 'sourceStaticProperty': string; + 'targetValue': string; + 'transformationScope': string; - static fromData(data: TransformOperation, target?: TransformOperation): TransformOperation { + static 'fromData'( + data: TransformOperation, + target?: TransformOperation, + ): TransformOperation { if (!data) { return data; } @@ -3375,25 +4458,33 @@ export class TransformOperation extends UnnamedStreamPipesEntity { } export class TransformOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.TransformOutputStrategy"; - transformOperations: TransformOperation[]; + '@class': 'org.apache.streampipes.model.output.TransformOutputStrategy'; + 'transformOperations': TransformOperation[]; - static fromData(data: TransformOutputStrategy, target?: TransformOutputStrategy): TransformOutputStrategy { + static 'fromData'( + data: TransformOutputStrategy, + target?: TransformOutputStrategy, + ): TransformOutputStrategy { if (!data) { return data; } const instance = target || new TransformOutputStrategy(); super.fromData(data, instance); - instance.transformOperations = __getCopyArrayFn(TransformOperation.fromData)(data.transformOperations); + instance.transformOperations = __getCopyArrayFn( + TransformOperation.fromData, + )(data.transformOperations); return instance; } } export class TransportFormat extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.grounding.TransportFormat"; - rdfType: string[]; + '@class': 'org.apache.streampipes.model.grounding.TransportFormat'; + 'rdfType': string[]; - static fromData(data: TransportFormat, target?: TransportFormat): TransportFormat { + static 'fromData'( + data: TransportFormat, + target?: TransportFormat, + ): TransportFormat { if (!data) { return data; } @@ -3411,7 +4502,10 @@ export class TreeInputNode { nodeName: string; selected: boolean; - static fromData(data: TreeInputNode, target?: TreeInputNode): TreeInputNode { + static fromData( + data: TreeInputNode, + target?: TreeInputNode, + ): TreeInputNode { if (!data) { return data; } @@ -3420,18 +4514,23 @@ export class TreeInputNode { instance.selected = data.selected; instance.nodeName = data.nodeName; instance.internalNodeName = data.internalNodeName; - instance.children = __getCopyArrayFn(TreeInputNode.fromData)(data.children); + instance.children = __getCopyArrayFn(TreeInputNode.fromData)( + data.children, + ); return instance; } } export class UnitTransformRuleDescription extends ValueTransformationRuleDescription { - "@class": "org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription"; - fromUnitRessourceURL: string; - runtimeKey: string; - toUnitRessourceURL: string; + '@class': 'org.apache.streampipes.model.connect.rules.value.UnitTransformRuleDescription'; + 'fromUnitRessourceURL': string; + 'runtimeKey': string; + 'toUnitRessourceURL': string; - static fromData(data: UnitTransformRuleDescription, target?: UnitTransformRuleDescription): UnitTransformRuleDescription { + static 'fromData'( + data: UnitTransformRuleDescription, + target?: UnitTransformRuleDescription, + ): UnitTransformRuleDescription { if (!data) { return data; } @@ -3445,16 +4544,21 @@ export class UnitTransformRuleDescription extends ValueTransformationRuleDescrip } export class UserDefinedOutputStrategy extends OutputStrategy { - "@class": "org.apache.streampipes.model.output.UserDefinedOutputStrategy"; - eventProperties: EventPropertyUnion[]; + '@class': 'org.apache.streampipes.model.output.UserDefinedOutputStrategy'; + 'eventProperties': EventPropertyUnion[]; - static fromData(data: UserDefinedOutputStrategy, target?: UserDefinedOutputStrategy): UserDefinedOutputStrategy { + static 'fromData'( + data: UserDefinedOutputStrategy, + target?: UserDefinedOutputStrategy, + ): UserDefinedOutputStrategy { if (!data) { return data; } const instance = target || new UserDefinedOutputStrategy(); super.fromData(data, instance); - instance.eventProperties = __getCopyArrayFn(EventProperty.fromDataUnion)(data.eventProperties); + instance.eventProperties = __getCopyArrayFn( + EventProperty.fromDataUnion, + )(data.eventProperties); return instance; } } @@ -3487,7 +4591,10 @@ export class VisualizablePipeline { topic: string; visualizationName: string; - static fromData(data: VisualizablePipeline, target?: VisualizablePipeline): VisualizablePipeline { + static fromData( + data: VisualizablePipeline, + target?: VisualizablePipeline, + ): VisualizablePipeline { if (!data) { return data; } @@ -3502,30 +4609,38 @@ export class VisualizablePipeline { } export class WildcardTopicDefinition extends TopicDefinition { - "@class": "org.apache.streampipes.model.grounding.WildcardTopicDefinition"; - wildcardTopicMappings: WildcardTopicMapping[]; - wildcardTopicName: string; + '@class': 'org.apache.streampipes.model.grounding.WildcardTopicDefinition'; + 'wildcardTopicMappings': WildcardTopicMapping[]; + 'wildcardTopicName': string; - static fromData(data: WildcardTopicDefinition, target?: WildcardTopicDefinition): WildcardTopicDefinition { + static 'fromData'( + data: WildcardTopicDefinition, + target?: WildcardTopicDefinition, + ): WildcardTopicDefinition { if (!data) { return data; } const instance = target || new WildcardTopicDefinition(); super.fromData(data, instance); instance.wildcardTopicName = data.wildcardTopicName; - instance.wildcardTopicMappings = __getCopyArrayFn(WildcardTopicMapping.fromData)(data.wildcardTopicMappings); + instance.wildcardTopicMappings = __getCopyArrayFn( + WildcardTopicMapping.fromData, + )(data.wildcardTopicMappings); return instance; } } export class WildcardTopicMapping extends UnnamedStreamPipesEntity { - "@class": "org.apache.streampipes.model.grounding.WildcardTopicMapping"; - mappedRuntimeName: string; - mappingId: string; - selectedMapping: string; - topicParameterType: string; + '@class': 'org.apache.streampipes.model.grounding.WildcardTopicMapping'; + 'mappedRuntimeName': string; + 'mappingId': string; + 'selectedMapping': string; + 'topicParameterType': string; - static fromData(data: WildcardTopicMapping, target?: WildcardTopicMapping): WildcardTopicMapping { + static 'fromData'( + data: WildcardTopicMapping, + target?: WildcardTopicMapping, + ): WildcardTopicMapping { if (!data) { return data; } @@ -3539,55 +4654,143 @@ export class WildcardTopicMapping extends UnnamedStreamPipesEntity { } } -export type AdapterDescriptionUnion = GenericAdapterSetDescription | GenericAdapterStreamDescription | SpecificAdapterStreamDescription | SpecificAdapterSetDescription; +export type AdapterDescriptionUnion = + | GenericAdapterSetDescription + | GenericAdapterStreamDescription + | SpecificAdapterStreamDescription + | SpecificAdapterSetDescription; -export type AdapterSetDescriptionUnion = GenericAdapterSetDescription | SpecificAdapterSetDescription; +export type AdapterSetDescriptionUnion = + | GenericAdapterSetDescription + | SpecificAdapterSetDescription; export type AdapterStreamDescriptionUnion = SpecificAdapterStreamDescription; -export type EdgeValidationStatusType = "COMPLETE" | "INCOMPLETE" | "INVALID"; +export type EdgeValidationStatusType = 'COMPLETE' | 'INCOMPLETE' | 'INVALID'; -export type EventPropertyQualityDefinitionUnion = Accuracy | MeasurementRange | Precision | Resolution; +export type EventPropertyQualityDefinitionUnion = + | Accuracy + | MeasurementRange + | Precision + | Resolution; -export type EventPropertyUnion = EventPropertyList | EventPropertyNested | EventPropertyPrimitive; +export type EventPropertyUnion = + | EventPropertyList + | EventPropertyNested + | EventPropertyPrimitive; export type EventStreamQualityDefinitionUnion = Frequency | Latency; -export type FieldStatus = "GOOD" | "BAD" | "ATTENTION"; +export type FieldStatus = 'GOOD' | 'BAD' | 'ATTENTION'; export type MappingPropertyUnion = MappingPropertyNary | MappingPropertyUnary; -export type MeasurementPropertyUnion = EventPropertyQualityDefinition | EventStreamQualityDefinition; +export type MeasurementPropertyUnion = + | EventPropertyQualityDefinition + | EventStreamQualityDefinition; export type OneOfStaticPropertyUnion = RuntimeResolvableOneOfStaticProperty; -export type OutputStrategyUnion = AppendOutputStrategy | CustomOutputStrategy | CustomTransformOutputStrategy | FixedOutputStrategy | KeepOutputStrategy | ListOutputStrategy | TransformOutputStrategy | UserDefinedOutputStrategy; +export type OutputStrategyUnion = + | AppendOutputStrategy + | CustomOutputStrategy + | CustomTransformOutputStrategy + | FixedOutputStrategy + | KeepOutputStrategy + | ListOutputStrategy + | TransformOutputStrategy + | UserDefinedOutputStrategy; -export type PipelineHealthStatus = "OK" | "REQUIRES_ATTENTION" | "FAILURE"; +export type PipelineHealthStatus = 'OK' | 'REQUIRES_ATTENTION' | 'FAILURE'; -export type SelectionStaticPropertyUnion = AnyStaticProperty | OneOfStaticProperty; +export type SelectionStaticPropertyUnion = + | AnyStaticProperty + | OneOfStaticProperty; export type SpDataStreamUnion = SpDataStream | SpDataSet; -export type SpQueryStatus = "OK" | "TOO_MUCH_DATA"; - -export type StaticPropertyType = "AnyStaticProperty" | "CodeInputStaticProperty" | "CollectionStaticProperty" | "ColorPickerStaticProperty" | "DomainStaticProperty" | "FreeTextStaticProperty" | "FileStaticProperty" | "MappingPropertyUnary" | "MappingPropertyNary" | "MatchingStaticProperty" | "OneOfStaticProperty" | "RuntimeResolvableAnyStaticProperty" | "RuntimeResolvableOneOfStaticProperty" | "RuntimeResolvableTreeInputStaticProperty" | "StaticPropertyGroup" | "StaticPropertyAlternatives" | "StaticPropertyAlternative" | "SecretStaticProperty" | "SlideToggleStaticProperty"; - -export type StaticPropertyUnion = AnyStaticProperty | CodeInputStaticProperty | CollectionStaticProperty | ColorPickerStaticProperty | DomainStaticProperty | FileStaticProperty | FreeTextStaticProperty | MappingPropertyUnary | MappingPropertyNary | MatchingStaticProperty | OneOfStaticProperty | RuntimeResolvableAnyStaticProperty | RuntimeResolvableOneOfStaticProperty | RuntimeResolvableTreeInputStaticProperty | SecretStaticProperty | StaticPropertyAlternative | StaticPropertyAlternatives | StaticPropertyGroup | SlideToggleStaticProperty; - -export type StreamTransformationRuleDescriptionUnion = EventRateTransformationRuleDescription | RemoveDuplicatesTransformationRuleDescription; - -export type TopicDefinitionUnion = SimpleTopicDefinition | WildcardTopicDefinition; - -export type TransformationRuleDescriptionUnion = AddTimestampRuleDescription | AddValueTransformationRuleDescription | TimestampTranfsformationRuleDescription | UnitTransformRuleDescription | EventRateTransformationRuleDescription | RemoveDuplicatesTransformationRuleDescription | CreateNestedRuleDescription | DeleteRuleDescription | RenameRuleDescription | MoveRuleDescription | ChangeDatatypeTransformationRuleDescription | CorrectionValueTransformationRuleDescription; - -export type TransportProtocolUnion = JmsTransportProtocol | KafkaTransportProtocol | MqttTransportProtocol | NatsTransportProtocol; - -export type ValidationInfoLevel = "INFO" | "ERROR"; +export type SpQueryStatus = 'OK' | 'TOO_MUCH_DATA'; + +export type StaticPropertyType = + | 'AnyStaticProperty' + | 'CodeInputStaticProperty' + | 'CollectionStaticProperty' + | 'ColorPickerStaticProperty' + | 'DomainStaticProperty' + | 'FreeTextStaticProperty' + | 'FileStaticProperty' + | 'MappingPropertyUnary' + | 'MappingPropertyNary' + | 'MatchingStaticProperty' + | 'OneOfStaticProperty' + | 'RuntimeResolvableAnyStaticProperty' + | 'RuntimeResolvableOneOfStaticProperty' + | 'RuntimeResolvableTreeInputStaticProperty' + | 'StaticPropertyGroup' + | 'StaticPropertyAlternatives' + | 'StaticPropertyAlternative' + | 'SecretStaticProperty' + | 'SlideToggleStaticProperty'; + +export type StaticPropertyUnion = + | AnyStaticProperty + | CodeInputStaticProperty + | CollectionStaticProperty + | ColorPickerStaticProperty + | DomainStaticProperty + | FileStaticProperty + | FreeTextStaticProperty + | MappingPropertyUnary + | MappingPropertyNary + | MatchingStaticProperty + | OneOfStaticProperty + | RuntimeResolvableAnyStaticProperty + | RuntimeResolvableOneOfStaticProperty + | RuntimeResolvableTreeInputStaticProperty + | SecretStaticProperty + | StaticPropertyAlternative + | StaticPropertyAlternatives + | StaticPropertyGroup + | SlideToggleStaticProperty; + +export type StreamTransformationRuleDescriptionUnion = + | EventRateTransformationRuleDescription + | RemoveDuplicatesTransformationRuleDescription; + +export type TopicDefinitionUnion = + | SimpleTopicDefinition + | WildcardTopicDefinition; + +export type TransformationRuleDescriptionUnion = + | AddTimestampRuleDescription + | AddValueTransformationRuleDescription + | TimestampTranfsformationRuleDescription + | UnitTransformRuleDescription + | EventRateTransformationRuleDescription + | RemoveDuplicatesTransformationRuleDescription + | CreateNestedRuleDescription + | DeleteRuleDescription + | RenameRuleDescription + | MoveRuleDescription + | ChangeDatatypeTransformationRuleDescription + | CorrectionValueTransformationRuleDescription; + +export type TransportProtocolUnion = + | JmsTransportProtocol + | KafkaTransportProtocol + | MqttTransportProtocol + | NatsTransportProtocol; + +export type ValidationInfoLevel = 'INFO' | 'ERROR'; export type ValueSpecificationUnion = QuantitativeValue | Enumeration; -export type ValueTransformationRuleDescriptionUnion = AddTimestampRuleDescription | AddValueTransformationRuleDescription | TimestampTranfsformationRuleDescription | UnitTransformRuleDescription | CorrectionValueTransformationRuleDescription; +export type ValueTransformationRuleDescriptionUnion = + | AddTimestampRuleDescription + | AddValueTransformationRuleDescription + | TimestampTranfsformationRuleDescription + | UnitTransformRuleDescription + | CorrectionValueTransformationRuleDescription; function __getCopyArrayFn(itemCopyFn: (item: T) => T): (array: T[]) => T[] { return (array: T[]) => __copyArray(array, itemCopyFn); @@ -3597,11 +4800,16 @@ function __copyArray(array: T[], itemCopyFn: (item: T) => T): T[] { return array && array.map(item => item && itemCopyFn(item)); } -function __getCopyObjectFn(itemCopyFn: (item: T) => T): (object: { [index: string]: T }) => { [index: string]: T } { +function __getCopyObjectFn( + itemCopyFn: (item: T) => T, +): (object: { [index: string]: T }) => { [index: string]: T } { return (object: { [index: string]: T }) => __copyObject(object, itemCopyFn); } -function __copyObject(object: { [index: string]: T }, itemCopyFn: (item: T) => T): { [index: string]: T } { +function __copyObject( + object: { [index: string]: T }, + itemCopyFn: (item: T) => T, +): { [index: string]: T } { if (!object) { return object; } diff --git a/ui/projects/streampipes/platform-services/src/lib/model/general-config.model.ts b/ui/projects/streampipes/platform-services/src/lib/model/general-config.model.ts index badda4b7c0..bf1f9fc93c 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/general-config.model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/general-config.model.ts @@ -17,12 +17,12 @@ */ export interface GeneralConfigModel { - hostname: string; - port: number; - protocol: 'http' | 'https'; - configured: boolean; - allowPasswordRecovery: boolean; - allowSelfRegistration: boolean; - defaultUserRoles: string[]; - appName: string; + hostname: string; + port: number; + protocol: 'http' | 'https'; + configured: boolean; + allowPasswordRecovery: boolean; + allowSelfRegistration: boolean; + defaultUserRoles: string[]; + appName: string; } diff --git a/ui/projects/streampipes/platform-services/src/lib/model/user/user.model.ts b/ui/projects/streampipes/platform-services/src/lib/model/user/user.model.ts index 7bb0376917..8f797f3521 100644 --- a/ui/projects/streampipes/platform-services/src/lib/model/user/user.model.ts +++ b/ui/projects/streampipes/platform-services/src/lib/model/user/user.model.ts @@ -17,6 +17,6 @@ */ export interface ChangePasswordRequest { - existingPassword: string; - newPassword: string; + existingPassword: string; + newPassword: string; } diff --git a/ui/projects/streampipes/platform-services/src/lib/platform-services.module.ts b/ui/projects/streampipes/platform-services/src/lib/platform-services.module.ts index f05c40d23e..ced7ef5a04 100644 --- a/ui/projects/streampipes/platform-services/src/lib/platform-services.module.ts +++ b/ui/projects/streampipes/platform-services/src/lib/platform-services.module.ts @@ -16,17 +16,11 @@ * */ - import { NgModule } from '@angular/core'; - @NgModule({ - declarations: [ - ], - imports: [ - ], - exports: [ - - ] + declarations: [], + imports: [], + exports: [], }) -export class PlatformServicesModule { } +export class PlatformServicesModule {} diff --git a/ui/projects/streampipes/platform-services/src/lib/query/DatalakeQueryParameterBuilder.ts b/ui/projects/streampipes/platform-services/src/lib/query/DatalakeQueryParameterBuilder.ts index f14dfa04ab..383c16d543 100644 --- a/ui/projects/streampipes/platform-services/src/lib/query/DatalakeQueryParameterBuilder.ts +++ b/ui/projects/streampipes/platform-services/src/lib/query/DatalakeQueryParameterBuilder.ts @@ -16,146 +16,176 @@ * */ -import { FieldConfig, MissingValueBehaviour, SelectedFilter } from '../model/datalake/data-lake-query-config.model'; +import { + FieldConfig, + MissingValueBehaviour, + SelectedFilter, +} from '../model/datalake/data-lake-query-config.model'; import { DatalakeQueryParameters } from '../model/datalake/DatalakeQueryParameters'; export class DatalakeQueryParameterBuilder { + private queryParams: DatalakeQueryParameters; - private queryParams: DatalakeQueryParameters; - - static create(startTime?: number, - endTime?: number): DatalakeQueryParameterBuilder { - - return new DatalakeQueryParameterBuilder(startTime, endTime); - } - - - private constructor(startTime?: number, - endTime?: number) { - this.queryParams = new DatalakeQueryParameters(); - if (startTime) { - this.queryParams.startDate = startTime; - } - if (endTime) { - this.queryParams.endDate = endTime; + static create( + startTime?: number, + endTime?: number, + ): DatalakeQueryParameterBuilder { + return new DatalakeQueryParameterBuilder(startTime, endTime); } - } - public withMaximumAmountOfEvents(maximumAmountOfEvents: number): DatalakeQueryParameterBuilder { - this.queryParams.maximumAmountOfEvents = maximumAmountOfEvents; - return this; - } + private constructor(startTime?: number, endTime?: number) { + this.queryParams = new DatalakeQueryParameters(); + if (startTime) { + this.queryParams.startDate = startTime; + } + if (endTime) { + this.queryParams.endDate = endTime; + } + } - public withCountOnly(): DatalakeQueryParameterBuilder { - this.queryParams.countOnly = true; + public withMaximumAmountOfEvents( + maximumAmountOfEvents: number, + ): DatalakeQueryParameterBuilder { + this.queryParams.maximumAmountOfEvents = maximumAmountOfEvents; + return this; + } - return this; - } + public withCountOnly(): DatalakeQueryParameterBuilder { + this.queryParams.countOnly = true; - public withAutoAggregation() { - this.queryParams.autoAggregate = true; + return this; + } - return this; - } + public withAutoAggregation() { + this.queryParams.autoAggregate = true; - public withAggregationFunction(aggregationFunction: string) { - this.queryParams.aggregationFunction = aggregationFunction; + return this; + } - return this; - } + public withAggregationFunction(aggregationFunction: string) { + this.queryParams.aggregationFunction = aggregationFunction; - public withAggregation(aggregationTimeUnit: string, - aggregationTimeValue: number) { - this.queryParams.timeInterval = aggregationTimeValue + aggregationTimeUnit; + return this; + } - return this; - } + public withAggregation( + aggregationTimeUnit: string, + aggregationTimeValue: number, + ) { + this.queryParams.timeInterval = + aggregationTimeValue + aggregationTimeUnit; - public withGrouping(groupBy: FieldConfig[]): DatalakeQueryParameterBuilder { - const groupByRuntimeNames = groupBy.map(property => property.runtimeName); - this.queryParams.groupBy = groupByRuntimeNames.toString(); - return this; - } + return this; + } - public withPaging(page: number, - limit: number): DatalakeQueryParameterBuilder { - this.queryParams.page = page; - this.queryParams.limit = limit; + public withGrouping(groupBy: FieldConfig[]): DatalakeQueryParameterBuilder { + const groupByRuntimeNames = groupBy.map( + property => property.runtimeName, + ); + this.queryParams.groupBy = groupByRuntimeNames.toString(); + return this; + } - return this; - } + public withPaging( + page: number, + limit: number, + ): DatalakeQueryParameterBuilder { + this.queryParams.page = page; + this.queryParams.limit = limit; - public withLimit(limit: number): DatalakeQueryParameterBuilder { - this.queryParams.limit = limit; + return this; + } - return this; - } + public withLimit(limit: number): DatalakeQueryParameterBuilder { + this.queryParams.limit = limit; - public withOrdering(order: string): DatalakeQueryParameterBuilder { - this.queryParams.order = order; + return this; + } - return this; - } + public withOrdering(order: string): DatalakeQueryParameterBuilder { + this.queryParams.order = order; - public withOffset(offset: number, - limit: number): DatalakeQueryParameterBuilder { - this.queryParams.offset = offset; - this.queryParams.limit = limit; + return this; + } - return this; - } + public withOffset( + offset: number, + limit: number, + ): DatalakeQueryParameterBuilder { + this.queryParams.offset = offset; + this.queryParams.limit = limit; - public withColumnFilter(columns: FieldConfig[], - useAggregation: boolean): DatalakeQueryParameterBuilder { - const finalColumns = []; - columns.forEach(column => { - if (!column.alias && !useAggregation) { - finalColumns.push(column.runtimeName); - } else { - // replace display name, when * is used instead of the name of a single property - const displayName = column.runtimeName === '*' ? 'all' : column.runtimeName; + return this; + } - column.aggregations.forEach(agg => { - finalColumns.push('[' - + column.runtimeName - + ';' - + agg - + ';' - + agg.toLowerCase() - + '_' - + displayName + ']'); + public withColumnFilter( + columns: FieldConfig[], + useAggregation: boolean, + ): DatalakeQueryParameterBuilder { + const finalColumns = []; + columns.forEach(column => { + if (!column.alias && !useAggregation) { + finalColumns.push(column.runtimeName); + } else { + // replace display name, when * is used instead of the name of a single property + const displayName = + column.runtimeName === '*' ? 'all' : column.runtimeName; + + column.aggregations.forEach(agg => { + finalColumns.push( + '[' + + column.runtimeName + + ';' + + agg + + ';' + + agg.toLowerCase() + + '_' + + displayName + + ']', + ); + }); + } }); - } - }); + this.queryParams.columns = finalColumns.toString(); - this.queryParams.columns = finalColumns.toString(); + return this; + } - return this; - } + public withFilters( + filterConditions: SelectedFilter[], + ): DatalakeQueryParameterBuilder { + const filters = []; + filterConditions.forEach(filter => { + if (filter.field && filter.value && filter.operator) { + filters.push( + '[' + + filter.field.runtimeName + + ';' + + filter.operator + + ';' + + filter.value + + ']', + ); + } + }); - public withFilters(filterConditions: SelectedFilter[]): DatalakeQueryParameterBuilder { - const filters = []; - filterConditions.forEach(filter => { - if (filter.field && filter.value && filter.operator) { - filters.push('[' + filter.field.runtimeName + ';' + filter.operator + ';' + filter.value + ']'); - } - }); + if (filters.length > 0) { + this.queryParams.filter = filters.toString(); + } - if (filters.length > 0) { - this.queryParams.filter = filters.toString(); + return this; } - return this; - } - - public withMissingValueBehaviour(missingValueBehaviour: MissingValueBehaviour): DatalakeQueryParameterBuilder { - this.queryParams.missingValueBehaviour = missingValueBehaviour; + public withMissingValueBehaviour( + missingValueBehaviour: MissingValueBehaviour, + ): DatalakeQueryParameterBuilder { + this.queryParams.missingValueBehaviour = missingValueBehaviour; - return this; - } + return this; + } - public build(): DatalakeQueryParameters { - return this.queryParams; - } + public build(): DatalakeQueryParameters { + return this.queryParams; + } } diff --git a/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts b/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts index 44122ee550..2ac32f916b 100644 --- a/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/query/data-view-query-generator.service.ts @@ -19,93 +19,108 @@ import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { DatalakeRestService } from '../apis/datalake-rest.service'; -import { DataExplorerDataConfig, SourceConfig } from '../model/datalake/data-lake-query-config.model'; +import { + DataExplorerDataConfig, + SourceConfig, +} from '../model/datalake/data-lake-query-config.model'; import { SpQueryResult } from '../model/gen/streampipes-model'; import { DatalakeQueryParameters } from '../model/datalake/DatalakeQueryParameters'; import { DatalakeQueryParameterBuilder } from './DatalakeQueryParameterBuilder'; - @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DataViewQueryGeneratorService { - - constructor(protected dataLakeRestService: DatalakeRestService) { - - } - - generateObservables(startTime: number, - endTime: number, - dataConfig: DataExplorerDataConfig, - maximumResultingEvents: number = -1): Observable[] { - return dataConfig - .sourceConfigs - .map(sourceConfig => { - const dataLakeConfiguration = this.generateQuery(startTime, - endTime, - sourceConfig, - dataConfig.ignoreMissingValues, - maximumResultingEvents); - - return this.dataLakeRestService - .getData(sourceConfig.measureName, dataLakeConfiguration); + constructor(protected dataLakeRestService: DatalakeRestService) {} + + generateObservables( + startTime: number, + endTime: number, + dataConfig: DataExplorerDataConfig, + maximumResultingEvents: number = -1, + ): Observable[] { + return dataConfig.sourceConfigs.map(sourceConfig => { + const dataLakeConfiguration = this.generateQuery( + startTime, + endTime, + sourceConfig, + dataConfig.ignoreMissingValues, + maximumResultingEvents, + ); + + return this.dataLakeRestService.getData( + sourceConfig.measureName, + dataLakeConfiguration, + ); }); - } - - generateQuery(startTime: number, - endTime: number, - sourceConfig: SourceConfig, - ignoreEventsWithMissingValues: boolean, - maximumResultingEvents: number = -1): DatalakeQueryParameters { - const queryBuilder = DatalakeQueryParameterBuilder.create(startTime, endTime); - const queryConfig = sourceConfig.queryConfig; - - queryBuilder.withColumnFilter( - queryConfig.fields.filter(f => f.selected), - sourceConfig.queryType === 'aggregated' || sourceConfig.queryType === 'single' - ); - - if (sourceConfig.queryConfig.groupBy !== undefined) { - const selectedGroupByFields = sourceConfig.queryConfig.groupBy.filter(field => field.selected === true); - if (selectedGroupByFields.length > 0) { - queryBuilder.withGrouping(selectedGroupByFields); - } - } - - if (queryConfig.selectedFilters.length > 0) { - queryBuilder.withFilters(queryConfig.selectedFilters); - } - - if (queryConfig.order) { - queryBuilder.withOrdering(queryConfig.order); - } - - if (sourceConfig.queryType === 'single') { - queryBuilder.withLimit(1); - } else if (sourceConfig.queryType === 'raw') { - // raw query with paging - queryBuilder.withPaging(queryConfig.page - 1, queryConfig.limit); - } else { - // aggregated query - if (queryConfig.autoAggregate) { - queryBuilder.withAutoAggregation(); - } else { - queryBuilder.withAggregation(queryConfig.aggregationTimeUnit, queryConfig.aggregationValue); - } } - if (ignoreEventsWithMissingValues) { - queryBuilder.withMissingValueBehaviour('ignore'); - } else { - queryBuilder.withMissingValueBehaviour('empty'); + generateQuery( + startTime: number, + endTime: number, + sourceConfig: SourceConfig, + ignoreEventsWithMissingValues: boolean, + maximumResultingEvents: number = -1, + ): DatalakeQueryParameters { + const queryBuilder = DatalakeQueryParameterBuilder.create( + startTime, + endTime, + ); + const queryConfig = sourceConfig.queryConfig; + + queryBuilder.withColumnFilter( + queryConfig.fields.filter(f => f.selected), + sourceConfig.queryType === 'aggregated' || + sourceConfig.queryType === 'single', + ); + + if (sourceConfig.queryConfig.groupBy !== undefined) { + const selectedGroupByFields = + sourceConfig.queryConfig.groupBy.filter( + field => field.selected === true, + ); + if (selectedGroupByFields.length > 0) { + queryBuilder.withGrouping(selectedGroupByFields); + } + } + + if (queryConfig.selectedFilters.length > 0) { + queryBuilder.withFilters(queryConfig.selectedFilters); + } + + if (queryConfig.order) { + queryBuilder.withOrdering(queryConfig.order); + } + + if (sourceConfig.queryType === 'single') { + queryBuilder.withLimit(1); + } else if (sourceConfig.queryType === 'raw') { + // raw query with paging + queryBuilder.withPaging(queryConfig.page - 1, queryConfig.limit); + } else { + // aggregated query + if (queryConfig.autoAggregate) { + queryBuilder.withAutoAggregation(); + } else { + queryBuilder.withAggregation( + queryConfig.aggregationTimeUnit, + queryConfig.aggregationValue, + ); + } + } + + if (ignoreEventsWithMissingValues) { + queryBuilder.withMissingValueBehaviour('ignore'); + } else { + queryBuilder.withMissingValueBehaviour('empty'); + } + + const dataLakeQueryParameter = queryBuilder.build(); + + if (maximumResultingEvents !== -1) { + queryBuilder.withMaximumAmountOfEvents(maximumResultingEvents); + } + + return dataLakeQueryParameter; } - - const dataLakeQueryParameter = queryBuilder.build(); - - if (maximumResultingEvents !== -1) { - queryBuilder.withMaximumAmountOfEvents(maximumResultingEvents); - } - - return dataLakeQueryParameter; - } } diff --git a/ui/projects/streampipes/platform-services/src/public-api.ts b/ui/projects/streampipes/platform-services/src/public-api.ts index 2240e2b1f0..1d6f971c55 100644 --- a/ui/projects/streampipes/platform-services/src/public-api.ts +++ b/ui/projects/streampipes/platform-services/src/public-api.ts @@ -16,7 +16,6 @@ * */ - /* * Public API Surface of platform-services */ diff --git a/ui/projects/streampipes/platform-services/src/test.ts b/ui/projects/streampipes/platform-services/src/test.ts index c028be1c2e..f209c0390f 100644 --- a/ui/projects/streampipes/platform-services/src/test.ts +++ b/ui/projects/streampipes/platform-services/src/test.ts @@ -16,29 +16,32 @@ * */ - // This file is required by karma.conf.js and loads recursively all the .spec and framework files import 'zone.js'; import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting + BrowserDynamicTestingModule, + platformBrowserDynamicTesting, } from '@angular/platform-browser-dynamic/testing'; declare const require: { - context(path: string, deep?: boolean, filter?: RegExp): { - keys(): string[]; - (id: string): T; - }; + context( + path: string, + deep?: boolean, + filter?: RegExp, + ): { + keys(): string[]; + (id: string): T; + }; }; // First, initialize the Angular testing environment. getTestBed().initTestEnvironment( - BrowserDynamicTestingModule, - platformBrowserDynamicTesting(), - { teardown: { destroyAfterEach: true }}, + BrowserDynamicTestingModule, + platformBrowserDynamicTesting(), + { teardown: { destroyAfterEach: true } }, ); // Then we find all the tests. diff --git a/ui/projects/streampipes/platform-services/tsconfig.lib.json b/ui/projects/streampipes/platform-services/tsconfig.lib.json index fbbed4791a..e2c590dbbf 100644 --- a/ui/projects/streampipes/platform-services/tsconfig.lib.json +++ b/ui/projects/streampipes/platform-services/tsconfig.lib.json @@ -8,13 +8,7 @@ "declarationMap": true, "inlineSources": true, "types": [], - "lib": [ - "dom", - "es2018" - ] + "lib": ["dom", "es2018"] }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] + "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/ui/projects/streampipes/platform-services/tsconfig.spec.json b/ui/projects/streampipes/platform-services/tsconfig.spec.json index 85392ee8f8..c6d4f53228 100644 --- a/ui/projects/streampipes/platform-services/tsconfig.spec.json +++ b/ui/projects/streampipes/platform-services/tsconfig.spec.json @@ -3,15 +3,8 @@ "extends": "../../../tsconfig.json", "compilerOptions": { "outDir": "../../../out-tsc/spec", - "types": [ - "jasmine" - ] + "types": ["jasmine"] }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } diff --git a/ui/projects/streampipes/shared-ui/README.md b/ui/projects/streampipes/shared-ui/README.md index 309258b3fa..89b45ac01d 100644 --- a/ui/projects/streampipes/shared-ui/README.md +++ b/ui/projects/streampipes/shared-ui/README.md @@ -23,7 +23,8 @@ This library was generated with [Angular CLI](https://github.com/angular/angular ## Code scaffolding Run `ng generate component component-name --project shared-ui` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project shared-ui`. -> Note: Don't forget to add `--project shared-ui` or else it will be added to the default project in your `angular.json` file. + +> Note: Don't forget to add `--project shared-ui` or else it will be added to the default project in your `angular.json` file. ## Build diff --git a/ui/projects/streampipes/shared-ui/karma.conf.js b/ui/projects/streampipes/shared-ui/karma.conf.js index c5b1f445c4..ba85fcc6ad 100644 --- a/ui/projects/streampipes/shared-ui/karma.conf.js +++ b/ui/projects/streampipes/shared-ui/karma.conf.js @@ -28,7 +28,7 @@ module.exports = function (config) { require('karma-chrome-launcher'), require('karma-jasmine-html-reporter'), require('karma-coverage'), - require('@angular-devkit/build-angular/plugins/karma') + require('@angular-devkit/build-angular/plugins/karma'), ], client: { jasmine: { @@ -37,18 +37,18 @@ module.exports = function (config) { // for example, you can disable the random execution with `random: false` // or set a specific seed with `seed: 4321` }, - clearContext: false // leave Jasmine Spec Runner output visible in browser + clearContext: false, // leave Jasmine Spec Runner output visible in browser }, jasmineHtmlReporter: { - suppressAll: true // removes the duplicated traces + suppressAll: true, // removes the duplicated traces }, coverageReporter: { - dir: require('path').join(__dirname, '../../../coverage/streampipes/shared-ui'), + dir: require('path').join( + __dirname, + '../../../coverage/streampipes/shared-ui', + ), subdir: '.', - reporters: [ - { type: 'html' }, - { type: 'text-summary' } - ] + reporters: [{ type: 'html' }, { type: 'text-summary' }], }, reporters: ['progress', 'kjhtml'], port: 9876, @@ -57,6 +57,6 @@ module.exports = function (config) { autoWatch: true, browsers: ['Chrome'], singleRun: false, - restartOnFileChange: true + restartOnFileChange: true, }); }; diff --git a/ui/projects/streampipes/shared-ui/ng-package.json b/ui/projects/streampipes/shared-ui/ng-package.json index e5d8e8315e..55bc513c92 100644 --- a/ui/projects/streampipes/shared-ui/ng-package.json +++ b/ui/projects/streampipes/shared-ui/ng-package.json @@ -4,4 +4,4 @@ "lib": { "entryFile": "src/public-api.ts" } -} \ No newline at end of file +} diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.html b/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.html index 972c2a092f..f503b279ca 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.html @@ -16,4 +16,6 @@ ~ --> -
{{title}}
+
+ {{ title }} +
diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.scss b/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.scss index f4e4f2de9d..bf049c6a6b 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.scss @@ -17,12 +17,11 @@ */ .title-left-border { - border-left: 4px solid var(--color-accent); - padding-left: 8px; + border-left: 4px solid var(--color-accent); + padding-left: 8px; } .header-title { - font-size: 20pt; - font-weight: bold; + font-size: 20pt; + font-weight: bold; } - diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.ts b/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.ts index 6b27876fd4..c4488e176e 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-header-title/header-title.component.ts @@ -19,19 +19,16 @@ import { Component, Input, OnInit } from '@angular/core'; @Component({ - selector: 'sp-basic-header-title-component', - templateUrl: './header-title.component.html', - styleUrls: ['./header-title.component.scss'] + selector: 'sp-basic-header-title-component', + templateUrl: './header-title.component.html', + styleUrls: ['./header-title.component.scss'], }) export class SpBasicHeaderTitleComponent implements OnInit { + @Input() + title: string; - @Input() - title: string; - - @Input() - margin = '20px 0px'; - - ngOnInit(): void { - } + @Input() + margin = '20px 0px'; + ngOnInit(): void {} } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.html b/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.html index 9d58bff416..73038461b7 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.html @@ -16,17 +16,30 @@ ~ --> -
-
+
+
-
{{panelTitle}}
+
+ {{ panelTitle }} +
-
+
diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.scss b/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.scss index c4d52dfcfe..8c22486a15 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.scss @@ -17,31 +17,31 @@ */ .panel-outer { - margin-top: 15px; - margin-bottom: 15px; - border: 2px solid var(--color-bg-3); + margin-top: 15px; + margin-bottom: 15px; + border: 2px solid var(--color-bg-3); } .general-panel { - border: 0px solid var(--color-bg-3); + border: 0px solid var(--color-bg-3); } .general-panel-header { - margin-top: -1px; - background: var(--color-bg-2); - border: 0px solid var(--color-bg-3); - border-bottom: 2px solid var(--color-bg-3); - padding-left: 5px; - height: 50px; - min-height: 50px; - max-height: 50px; + margin-top: -1px; + background: var(--color-bg-2); + border: 0px solid var(--color-bg-3); + border-bottom: 2px solid var(--color-bg-3); + padding-left: 5px; + height: 50px; + min-height: 50px; + max-height: 50px; } .content-box-title { - margin-left: 5px; - padding-left: 5px; - border-left: 4px solid var(--color-accent); - font-weight: 600; - font-size: 13pt; - white-space: nowrap; + margin-left: 5px; + padding-left: 5px; + border-left: 4px solid var(--color-accent); + font-weight: 600; + font-size: 13pt; + white-space: nowrap; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.ts b/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.ts index 3e56b98938..93ab0cea46 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-inner-panel/basic-inner-panel.component.ts @@ -19,25 +19,23 @@ import { Component, Input } from '@angular/core'; @Component({ - selector: 'sp-basic-inner-panel', - templateUrl: './basic-inner-panel.component.html', - styleUrls: ['./basic-inner-panel.component.scss'] + selector: 'sp-basic-inner-panel', + templateUrl: './basic-inner-panel.component.html', + styleUrls: ['./basic-inner-panel.component.scss'], }) export class SpBasicInnerPanelComponent { + @Input() + panelTitle: string; - @Input() - panelTitle: string; + @Input() + showTitle = true; - @Input() - showTitle = true; + @Input() + innerPadding = '15px'; - @Input() - innerPadding = '15px'; - - @Input() - outerMargin = '0px'; - - @Input() - hideToolbar = false; + @Input() + outerMargin = '0px'; + @Input() + hideToolbar = false; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.html b/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.html index 12a4534159..c9695f922d 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.html @@ -18,33 +18,50 @@
-
-
- -
- - - +
+
+
+ + + +
-
+
diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.scss b/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.scss index 4bbebfcc05..920102eb74 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.scss @@ -17,31 +17,31 @@ */ .page-container-padding-inner { - padding: 10px; + padding: 10px; } .sp-bg-lightgray { - background-color: var(--color-bg-1); + background-color: var(--color-bg-1); } .sp-tab-bg { - background-color: var(--color-bg-1); + background-color: var(--color-bg-1); } .page-container { - margin: 10px; - border: 1px solid var(--color-bg-3); - min-height: calc(100% - 50px); + margin: 10px; + border: 1px solid var(--color-bg-3); + min-height: calc(100% - 50px); } .page-container-padding-inner { - margin: 10px; + margin: 10px; } .upper-case { - text-transform: uppercase; + text-transform: uppercase; } .pr-5 { - padding-right: 5px; + padding-right: 5px; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.ts b/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.ts index 5ab53a56b6..9ee27ae361 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-nav-tabs/basic-nav-tabs.component.ts @@ -21,33 +21,30 @@ import { Router } from '@angular/router'; import { SpNavigationItem } from '../../models/sp-navigation.model'; @Component({ - selector: 'sp-basic-nav-tabs', - templateUrl: './basic-nav-tabs.component.html', - styleUrls: ['./basic-nav-tabs.component.scss'] + selector: 'sp-basic-nav-tabs', + templateUrl: './basic-nav-tabs.component.html', + styleUrls: ['./basic-nav-tabs.component.scss'], }) export class SpBasicNavTabsComponent { + @Input() + spNavigationItems: SpNavigationItem[]; - @Input() - spNavigationItems: SpNavigationItem[]; + @Input() + activeLink: string; - @Input() - activeLink: string; + @Input() + showBackLink = false; - @Input() - showBackLink = false; + @Input() + backLinkTarget: string[] = []; - @Input() - backLinkTarget: string[] = []; + constructor(private router: Router) {} - constructor(private router: Router) { + navigateTo(spNavigationItem: SpNavigationItem) { + this.router.navigate(spNavigationItem.itemLink); + } - } - - navigateTo(spNavigationItem: SpNavigationItem) { - this.router.navigate(spNavigationItem.itemLink); - } - - navigateBack() { - this.router.navigate(this.backLinkTarget); - } + navigateBack() { + this.router.navigate(this.backLinkTarget); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.html b/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.html index a8bf70437b..b310416e88 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.html @@ -17,18 +17,27 @@ -->
-
+
-
-
@@ -36,8 +45,11 @@
-
+
- diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.scss b/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.scss index 95d1ed5fb4..66eb0f253d 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.scss @@ -17,42 +17,42 @@ */ .fixed-height { - flex-direction: row; - box-sizing: border-box; - display: flex; - flex: 1 1 100%; - max-height: 100%; - overflow-y: auto; + flex-direction: row; + box-sizing: border-box; + display: flex; + flex: 1 1 100%; + max-height: 100%; + overflow-y: auto; } .page-container-nav { - line-height:24px; - height: 50px; - border-bottom:1px solid var(--color-bg-3); + line-height: 24px; + height: 50px; + border-bottom: 1px solid var(--color-bg-3); } .sp-bg-lightgray { - background-color: var(--color-bg-1); + background-color: var(--color-bg-1); } .sp-tab-bg { - background-color: var(--color-bg-1); + background-color: var(--color-bg-1); } .page-container { - margin: 10px; - border: 1px solid var(--color-bg-3); - min-height: calc(100% - 50px); + margin: 10px; + border: 1px solid var(--color-bg-3); + min-height: calc(100% - 50px); } .page-container-padding-inner { - margin: 20px; + margin: 20px; } .pl-5 { - padding-left: 5px; + padding-left: 5px; } .pr-5 { - padding-right: 5px; + padding-right: 5px; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.ts b/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.ts index 12af9e3f69..b5c2153c08 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/components/basic-view/basic-view.component.ts @@ -20,29 +20,26 @@ import { Component, Input } from '@angular/core'; import { Router } from '@angular/router'; @Component({ - selector: 'sp-basic-view', - templateUrl: './basic-view.component.html', - styleUrls: ['./basic-view.component.scss'] + selector: 'sp-basic-view', + templateUrl: './basic-view.component.html', + styleUrls: ['./basic-view.component.scss'], }) export class SpBasicViewComponent { + @Input() + padding = false; - @Input() - padding = false; + @Input() + showBackLink = false; - @Input() - showBackLink = false; + @Input() + backLinkTarget: string[]; - @Input() - backLinkTarget: string[]; + @Input() + hideNavbar = false; - @Input() - hideNavbar = false; + constructor(private router: Router) {} - constructor(private router: Router) { - - } - - navigateBack() { - this.router.navigate(this.backLinkTarget); - } + navigateBack() { + this.router.navigate(this.backLinkTarget); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.html b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.html index 06dbd0c93d..ed56aaf95c 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.html @@ -19,28 +19,49 @@
-
- warning - {{title}} +
+ warning + {{ title }}
Probable cause
-
-
+
- +
-
+
Full stack trace
-
-
diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.scss b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.scss index 05d9cfdb85..06d3667288 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.scss @@ -17,39 +17,39 @@ */ .log-message { - background-color: black; - font: 9pt Inconsolata, monospace; - text-shadow: 0 0 5px #C8C8C8; - color: white; - padding: 10px; - max-width: 100%; - min-height: 50px; - max-height: 300px; - overflow-y: scroll; - white-space: pre-wrap; + background-color: black; + font: 9pt Inconsolata, monospace; + text-shadow: 0 0 5px #c8c8c8; + color: white; + padding: 10px; + max-width: 100%; + min-height: 50px; + max-height: 300px; + overflow-y: scroll; + white-space: pre-wrap; } .error-details-title { - font-size: 13pt; - font-weight: var(--color-default-text); - border-left: 3px solid var(--color-accent); - padding-left: 10px; - margin-bottom: 15px; + font-size: 13pt; + font-weight: var(--color-default-text); + border-left: 3px solid var(--color-accent); + padding-left: 10px; + margin-bottom: 15px; } .mt-10 { - margin-top: 10px; + margin-top: 10px; } .p-20 { - padding: 20px; + padding: 20px; } .color-warn { - color: var(--color-warn); + color: var(--color-warn); } .title-message { - font-size: 16pt; - margin-bottom: 15px; + font-size: 16pt; + margin-bottom: 15px; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.ts b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.ts index 0e469cef37..dd5e42687f 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/exception-details-dialog/exception-details-dialog.component.ts @@ -21,29 +21,29 @@ import { StreamPipesErrorMessage } from '@streampipes/platform-services'; import { DialogRef } from '../../../dialog/base-dialog/dialog-ref'; @Component({ - selector: 'sp-exception-details-dialog', - templateUrl: './exception-details-dialog.component.html', - styleUrls: ['./exception-details-dialog.component.scss', '../../../../../../../../src/scss/sp/sp-dialog.scss'] + selector: 'sp-exception-details-dialog', + templateUrl: './exception-details-dialog.component.html', + styleUrls: [ + './exception-details-dialog.component.scss', + '../../../../../../../../src/scss/sp/sp-dialog.scss', + ], }) export class SpExceptionDetailsDialogComponent implements OnInit { + @Input() + message: StreamPipesErrorMessage; - @Input() - message: StreamPipesErrorMessage; + @Input() + title: string; - @Input() - title: string; + showDetails = false; - showDetails = false; + constructor( + private dialogRef: DialogRef, + ) {} - constructor(private dialogRef: DialogRef) { - - } - - close() { - this.dialogRef.close(); - } - - ngOnInit(): void { - } + close() { + this.dialogRef.close(); + } + ngOnInit(): void {} } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.html b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.html index b60cfdbbd8..9a32302d6e 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.html @@ -17,23 +17,28 @@ -->
-
-
-
-
- warning -
{{messageTimestamp | date : 'short'}}
-
{{message.title}}
+
+
+
+
+ warning +
+ {{ messageTimestamp | date : 'short' }} +
+
{{ message.title }}
+
+ +
+ +
+
- -
- -
-
-
-
-
diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.scss b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.scss index 74d8851254..26170c62ba 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.scss @@ -17,18 +17,18 @@ */ .error-panel { - background: var(--color-bg-1); - border-radius: 5px; + background: var(--color-bg-1); + border-radius: 5px; } .error { - border: 1px solid var(--color-warn); + border: 1px solid var(--color-warn); } .color-warn { - color: var(--color-warn); + color: var(--color-warn); } .mr-15 { - margin-right: 15px; + margin-right: 15px; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.ts b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.ts index 04343a3ea0..4314769999 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/components/sp-exception-message/sp-exception-message.component.ts @@ -23,37 +23,33 @@ import { PanelType } from '../../dialog/base-dialog/base-dialog.model'; import { SpExceptionDetailsDialogComponent } from './exception-details-dialog/exception-details-dialog.component'; @Component({ - selector: 'sp-exception-message', - templateUrl: './sp-exception-message.component.html', - styleUrls: ['./sp-exception-message.component.scss'] + selector: 'sp-exception-message', + templateUrl: './sp-exception-message.component.html', + styleUrls: ['./sp-exception-message.component.scss'], }) export class SpExceptionMessageComponent { - - @Input() - level = 'error'; - - @Input() - showDetails = true; - - @Input() - message: StreamPipesErrorMessage; - - @Input() - messageTimestamp: number; - - constructor(private dialogService: DialogService) { - - } - - openDetailsDialog() { - this.dialogService.open(SpExceptionDetailsDialogComponent, { - panelType: PanelType.STANDARD_PANEL, - width: '80vw', - title: 'Error Details', - data: { - 'message': this.message - } - }); - } - + @Input() + level = 'error'; + + @Input() + showDetails = true; + + @Input() + message: StreamPipesErrorMessage; + + @Input() + messageTimestamp: number; + + constructor(private dialogService: DialogService) {} + + openDetailsDialog() { + this.dialogService.open(SpExceptionDetailsDialogComponent, { + panelType: PanelType.STANDARD_PANEL, + width: '80vw', + title: 'Error Details', + data: { + message: this.message, + }, + }); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.component.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.component.ts index f8fadb9588..8330af4fba 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.component.ts @@ -16,45 +16,46 @@ * */ -import { EventEmitter, Input, Output, ViewChild, Directive } from '@angular/core'; +import { + EventEmitter, + Input, + Output, + ViewChild, + Directive, +} from '@angular/core'; import { CdkPortalOutlet, ComponentPortal, Portal } from '@angular/cdk/portal'; import { DialogRef } from './dialog-ref'; @Directive() export abstract class BaseDialogComponent { + @Input() + dialogTitle = ''; - @Input() - dialogTitle = ''; + @Input() + comp: ComponentPortal; - @Input() - comp: ComponentPortal; + @Output() + containerEvent = new EventEmitter<{ key: 'CLOSE' }>(); - @Output() - containerEvent = new EventEmitter<{ key: 'CLOSE' }>(); + @ViewChild('portal', { read: CdkPortalOutlet, static: true }) + portal: CdkPortalOutlet; - @ViewChild('portal', {read: CdkPortalOutlet, static: true}) - portal: CdkPortalOutlet; + @Input() + selectedPortal: Portal; - @Input() - selectedPortal: Portal; + @Input() + dialogRef: DialogRef; - @Input() - dialogRef: DialogRef; + protected constructor() {} + attach(): any { + const c = this.portal.attach(this.selectedPortal); + return c.instance; + } - protected constructor() { + close() { + this.dialogRef.close(); + } - } - - attach(): any { - const c = this.portal.attach(this.selectedPortal); - return c.instance; - } - - close() { - this.dialogRef.close(); - } - - abstract closeDialog(); + abstract closeDialog(); } - diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.config.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.config.ts index b7a96b59e0..e90b091695 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.config.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.config.ts @@ -19,8 +19,7 @@ import { Overlay } from '@angular/cdk/overlay'; export interface BaseDialogConfig { + getPosition(overlay: Overlay); - getPosition(overlay: Overlay); - - getOverlayConfig(config: any, positionStrategy: any); + getOverlayConfig(config: any, positionStrategy: any); } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.model.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.model.ts index d9c4c423ef..474b3d8f12 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.model.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.model.ts @@ -19,23 +19,25 @@ import { PanelDialogComponent } from '../panel-dialog/panel-dialog.component'; import { StandardDialogComponent } from '../standard-dialog/standard-dialog.component'; -export type BaseDialogComponentUnion = PanelDialogComponent | StandardDialogComponent; +export type BaseDialogComponentUnion = + | PanelDialogComponent + | StandardDialogComponent; export enum PanelType { - STANDARD_PANEL, - SLIDE_IN_PANEL + STANDARD_PANEL, + SLIDE_IN_PANEL, } export interface DialogConfig { - width?: string; - panelType: PanelType; - disableClose?: boolean; - autoFocus?: boolean; - title: string; - data?: any; + width?: string; + panelType: PanelType; + disableClose?: boolean; + autoFocus?: boolean; + title: string; + data?: any; } export interface DialogPanelConfig { - maxWidth: string; - height: string; + maxWidth: string; + height: string; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.service.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.service.ts index 31bc2157da..9a2a9f6ad9 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.service.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/base-dialog.service.ts @@ -21,7 +21,11 @@ import { ComponentRef, Injectable, Injector } from '@angular/core'; import { DialogRef } from './dialog-ref'; import { ComponentPortal, PortalInjector } from '@angular/cdk/portal'; import { BaseDialogComponent } from './base-dialog.component'; -import { BaseDialogComponentUnion, DialogConfig, PanelType } from './base-dialog.model'; +import { + BaseDialogComponentUnion, + DialogConfig, + PanelType, +} from './base-dialog.model'; import { PanelDialogComponent } from '../panel-dialog/panel-dialog.component'; import { StandardDialogComponent } from '../standard-dialog/standard-dialog.component'; import { BaseDialogConfig } from './base-dialog.config'; @@ -29,74 +33,90 @@ import { PanelDialogConfig } from '../panel-dialog/panel-dialog.config'; import { StandardDialogConfig } from '../standard-dialog/standard-dialog.config'; @Injectable({ - providedIn: 'root' + providedIn: 'root', }) export class DialogService { - - constructor(private overlay: Overlay, private injector: Injector) { - - } - - public open(component: ComponentType, - config?: DialogConfig): DialogRef { - config = config || {width: '60vw', title: '', panelType: PanelType.SLIDE_IN_PANEL}; - - const positionStrategy = this.getPositionStrategy(config.panelType); - const panelConfig: BaseDialogConfig = this.getConfig(config.panelType); - const overlay = this.overlay.create(panelConfig.getOverlayConfig(config, positionStrategy)); - - const panelDialogContainer = new ComponentPortal(this.getPanel(config.panelType)); - const panelDialogContainerRef = overlay.attach(panelDialogContainer); - panelDialogContainerRef.instance.dialogTitle = config.title; - const dialogRef = new DialogRef(overlay, panelDialogContainerRef); - - const injector = this.createInjector(dialogRef); - panelDialogContainerRef.instance.selectedPortal = new ComponentPortal(component, - null, injector); - panelDialogContainerRef.instance.dialogRef = dialogRef; - dialogRef.componentInstance = panelDialogContainerRef.instance.attach(); - - if (config.data) { - Object.keys(config.data).forEach(key => { - dialogRef.componentInstance[key] = config.data[key]; - }); + constructor(private overlay: Overlay, private injector: Injector) {} + + public open( + component: ComponentType, + config?: DialogConfig, + ): DialogRef { + config = config || { + width: '60vw', + title: '', + panelType: PanelType.SLIDE_IN_PANEL, + }; + + const positionStrategy = this.getPositionStrategy(config.panelType); + const panelConfig: BaseDialogConfig = this.getConfig(config.panelType); + const overlay = this.overlay.create( + panelConfig.getOverlayConfig(config, positionStrategy), + ); + + const panelDialogContainer = new ComponentPortal( + this.getPanel(config.panelType), + ); + const panelDialogContainerRef = overlay.attach(panelDialogContainer); + panelDialogContainerRef.instance.dialogTitle = config.title; + const dialogRef = new DialogRef(overlay, panelDialogContainerRef); + + const injector = this.createInjector(dialogRef); + panelDialogContainerRef.instance.selectedPortal = new ComponentPortal( + component, + null, + injector, + ); + panelDialogContainerRef.instance.dialogRef = dialogRef; + dialogRef.componentInstance = panelDialogContainerRef.instance.attach(); + + if (config.data) { + Object.keys(config.data).forEach(key => { + dialogRef.componentInstance[key] = config.data[key]; + }); + } + + this.applyDialogProperties(panelDialogContainerRef, overlay, config); + + return dialogRef; } - this.applyDialogProperties(panelDialogContainerRef, overlay, config); - - return dialogRef; - } - - private createInjector>(dialogRef: DialogRef) { - const injectorMap = new WeakMap(); - injectorMap.set(DialogRef, dialogRef); - return new PortalInjector(this.injector, injectorMap); - } - - private applyDialogProperties(panelDialogComponentRef: ComponentRef, - overlayRef: OverlayRef, - config: DialogConfig) { - panelDialogComponentRef.instance.containerEvent.subscribe(e => { - if (e.key === 'CLOSE') { - overlayRef.dispose(); - } - }); - if (!config.disableClose) { - overlayRef.backdropClick().subscribe(() => overlayRef.dispose()); + private createInjector>( + dialogRef: DialogRef, + ) { + const injectorMap = new WeakMap(); + injectorMap.set(DialogRef, dialogRef); + return new PortalInjector(this.injector, injectorMap); } - } - getPositionStrategy(panelType: PanelType) { - return this.getConfig(panelType).getPosition(this.overlay); - } + private applyDialogProperties( + panelDialogComponentRef: ComponentRef, + overlayRef: OverlayRef, + config: DialogConfig, + ) { + panelDialogComponentRef.instance.containerEvent.subscribe(e => { + if (e.key === 'CLOSE') { + overlayRef.dispose(); + } + }); + if (!config.disableClose) { + overlayRef.backdropClick().subscribe(() => overlayRef.dispose()); + } + } - getPanel(panelType: PanelType): ComponentType { - return panelType === PanelType.SLIDE_IN_PANEL ? PanelDialogComponent : StandardDialogComponent; - } + getPositionStrategy(panelType: PanelType) { + return this.getConfig(panelType).getPosition(this.overlay); + } - getConfig(panelType: PanelType): BaseDialogConfig { - return panelType === PanelType.SLIDE_IN_PANEL ? new PanelDialogConfig() : - new StandardDialogConfig(); - } + getPanel(panelType: PanelType): ComponentType { + return panelType === PanelType.SLIDE_IN_PANEL + ? PanelDialogComponent + : StandardDialogComponent; + } + getConfig(panelType: PanelType): BaseDialogConfig { + return panelType === PanelType.SLIDE_IN_PANEL + ? new PanelDialogConfig() + : new StandardDialogConfig(); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/dialog-ref.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/dialog-ref.ts index 530b277b81..58bbeae5fe 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/dialog-ref.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/base-dialog/dialog-ref.ts @@ -23,36 +23,37 @@ import { BaseDialogComponentUnion } from './base-dialog.model'; import { OverlayConfig, OverlaySizeConfig } from '@angular/cdk/overlay'; export class DialogRef { - private _componentInstance: ComponentRef; - private _afterClosed: Subject = new Subject(); - - constructor(private overlayRef: OverlayRef, - private dialogContainerRef: ComponentRef) { - } - - get componentInstance() { - return this._componentInstance; - } - - set componentInstance(c: ComponentRef) { - this._componentInstance = c; - } - - public close(data?: any) { - this.dialogContainerRef.instance.closeDialog(); - this._afterClosed.next(data); - this._afterClosed.complete(); - } - - public afterClosed(): Observable { - return this._afterClosed.asObservable(); - } - - public changeDialogSize(sizeConfig: OverlaySizeConfig) { - this.overlayRef.updateSize(sizeConfig); - } - - public currentConfig(): OverlayConfig { - return this.overlayRef.getConfig(); - } + private _componentInstance: ComponentRef; + private _afterClosed: Subject = new Subject(); + + constructor( + private overlayRef: OverlayRef, + private dialogContainerRef: ComponentRef, + ) {} + + get componentInstance() { + return this._componentInstance; + } + + set componentInstance(c: ComponentRef) { + this._componentInstance = c; + } + + public close(data?: any) { + this.dialogContainerRef.instance.closeDialog(); + this._afterClosed.next(data); + this._afterClosed.complete(); + } + + public afterClosed(): Observable { + return this._afterClosed.asObservable(); + } + + public changeDialogSize(sizeConfig: OverlaySizeConfig) { + this.overlayRef.updateSize(sizeConfig); + } + + public currentConfig(): OverlayConfig { + return this.overlayRef.getConfig(); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.html b/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.html index d7a2bdf306..a501a39e9a 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.html @@ -18,11 +18,20 @@
-

{{data.title}}

-
{{data.subtitle}}
+

{{ data.title }}

+
{{ data.subtitle }}
-
\ No newline at end of file +
diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.scss b/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.scss index eeee6bd8ab..3c70ba34e4 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.scss @@ -19,5 +19,5 @@ @import '../../../../../../../src/scss/sp/sp-dialog'; .footer { - margin-top:20px; + margin-top: 20px; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.ts index 32eb31309f..7af5424b62 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/confirm-dialog/confirm-dialog.component.ts @@ -19,23 +19,22 @@ import { Component, Inject } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; - @Component({ - selector: 'confirmation-dialog', - templateUrl: './confirm-dialog.component.html', - styleUrls: ['./confirm-dialog.component.scss'] + selector: 'confirmation-dialog', + templateUrl: './confirm-dialog.component.html', + styleUrls: ['./confirm-dialog.component.scss'], }) export class ConfirmDialogComponent { - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public data: any) { - } + constructor( + public dialogRef: MatDialogRef, + @Inject(MAT_DIALOG_DATA) public data: any, + ) {} - onCancel(): void { - this.dialogRef.close(); - } + onCancel(): void { + this.dialogRef.close(); + } - onOk(): void { - this.dialogRef.close(true); - } + onOk(): void { + this.dialogRef.close(true); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.html b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.html index 165ccdf057..3a32313b8a 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.html @@ -20,7 +20,9 @@
{{ dialogTitle }}
diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.scss b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.scss index a5bb35d007..936a684f8e 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.scss @@ -19,39 +19,39 @@ @import '../../../../../../../src/scss/sp/colors'; app-dialog-container { - width: 100%; - background-color: var(--color-bg-dialog); - color: var(--color-default-text); - box-shadow: -7px 0px 5px -5px #777; + width: 100%; + background-color: var(--color-bg-dialog); + color: var(--color-default-text); + box-shadow: -7px 0px 5px -5px #777; } .dialog-panel { - height: 100vh; - display: grid; - grid-template-rows: 50px auto; + height: 100vh; + display: grid; + grid-template-rows: 50px auto; } .dialog-panel-header { - display: flex; - justify-content: space-between; - height: 50px; - min-height: 50px; - width: 100%; - background: var(--color-primary); - align-items: center; + display: flex; + justify-content: space-between; + height: 50px; + min-height: 50px; + width: 100%; + background: var(--color-primary); + align-items: center; } .dialog-panel-content { - height: 100%; - overflow-y:auto; + height: 100%; + overflow-y: auto; } .dialog-title { - padding: 5px 5px 5px 15px; - font-size:20px; - color: white; + padding: 5px 5px 5px 15px; + font-size: 20px; + color: white; } #portal { - width:100%; + width: 100%; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.ts index c75eeebbb0..c72b10521a 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.component.ts @@ -17,57 +17,76 @@ */ import { - Component, - EventEmitter, - HostBinding, - HostListener, - OnInit, - Output, - ViewEncapsulation + Component, + EventEmitter, + HostBinding, + HostListener, + OnInit, + Output, + ViewEncapsulation, } from '@angular/core'; -import { animate, state, style, transition, trigger } from '@angular/animations'; +import { + animate, + state, + style, + transition, + trigger, +} from '@angular/animations'; import { BaseDialogComponent } from '../base-dialog/base-dialog.component'; @Component({ - selector: 'app-dialog-container', - templateUrl: './panel-dialog.component.html', - encapsulation: ViewEncapsulation.None, - styleUrls: ['./panel-dialog.component.scss'], - animations: [trigger('flyInOut', [ - state('void', style({ - transform: 'translateX(80vw)', - })), - state('in', style({ - transform: 'translateX(0)', - })), - state('out', style({ - transform: 'translateX(80vw)' - })), - transition('* => *', animate(300)) - ])] + selector: 'app-dialog-container', + templateUrl: './panel-dialog.component.html', + encapsulation: ViewEncapsulation.None, + styleUrls: ['./panel-dialog.component.scss'], + animations: [ + trigger('flyInOut', [ + state( + 'void', + style({ + transform: 'translateX(80vw)', + }), + ), + state( + 'in', + style({ + transform: 'translateX(0)', + }), + ), + state( + 'out', + style({ + transform: 'translateX(80vw)', + }), + ), + transition('* => *', animate(300)), + ]), + ], }) -export class PanelDialogComponent extends BaseDialogComponent implements OnInit { - - constructor() { - super(); - } +export class PanelDialogComponent + extends BaseDialogComponent + implements OnInit +{ + constructor() { + super(); + } - @HostBinding('@flyInOut') slideDown = 'in'; + @HostBinding('@flyInOut') slideDown = 'in'; - @Output() - animationStateChanged = new EventEmitter(); + @Output() + animationStateChanged = new EventEmitter(); - @HostListener('@flyInOut.done', ['$event']) startDrawerHandler(event: any): void { - if (event.toState === 'out') { - this.containerEvent.emit({key: 'CLOSE'}); + @HostListener('@flyInOut.done', ['$event']) startDrawerHandler( + event: any, + ): void { + if (event.toState === 'out') { + this.containerEvent.emit({ key: 'CLOSE' }); + } } - } - ngOnInit() { - } - - closeDialog() { - this.slideDown = 'out'; - } + ngOnInit() {} + closeDialog() { + this.slideDown = 'out'; + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.config.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.config.ts index 268b4ec362..ef450a8a09 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.config.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/panel-dialog/panel-dialog.config.ts @@ -20,23 +20,18 @@ import { BaseDialogConfig } from '../base-dialog/base-dialog.config'; import { Overlay } from '@angular/cdk/overlay'; export class PanelDialogConfig implements BaseDialogConfig { + getPosition(overlay: Overlay) { + return overlay.position().global().top('0').right('0'); + } - getPosition(overlay: Overlay) { - return overlay - .position() - .global() - .top('0') - .right('0'); - } - - getOverlayConfig(config: any, positionStrategy: any) { - return { - hasBackdrop: true, - positionStrategy, - panelClass: 'dialog-container', - width: config.width, - maxWidth: '90vw', - height: '100vh', - }; - } + getOverlayConfig(config: any, positionStrategy: any) { + return { + hasBackdrop: true, + positionStrategy, + panelClass: 'dialog-container', + width: config.width, + maxWidth: '90vw', + height: '100vh', + }; + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.html b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.html index b9821c7ae2..12e623c60c 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.html +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.html @@ -20,10 +20,12 @@
{{ dialogTitle }}
-
\ No newline at end of file +
diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.scss b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.scss index 1efe8a4576..be90aedfe2 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.scss +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.scss @@ -19,45 +19,45 @@ @import '../../../../../../../src/scss/sp/colors'; standard-dialog-container { - width: 100%; - background-color: var(--color-bg-dialog); - color: var(--color-default-text); - border-radius: 5px; - -webkit-box-shadow: 0 10px 6px -6px #777; - -moz-box-shadow: 0 10px 6px -6px #777; - box-shadow: 0 10px 6px -6px #777; + width: 100%; + background-color: var(--color-bg-dialog); + color: var(--color-default-text); + border-radius: 5px; + -webkit-box-shadow: 0 10px 6px -6px #777; + -moz-box-shadow: 0 10px 6px -6px #777; + box-shadow: 0 10px 6px -6px #777; } .standard-dialog-panel { - max-height: 80vh; - height: 100%; - display: grid; - grid-template-rows: 50px auto; + max-height: 80vh; + height: 100%; + display: grid; + grid-template-rows: 50px auto; } .standard-dialog-panel-header { - display: flex; - justify-content: space-between; - height: 50px; - min-height: 50px; - width: 100%; - background: var(--color-primary); - align-items: center; - border-top-left-radius: 5px; - border-top-right-radius: 5px; + display: flex; + justify-content: space-between; + height: 50px; + min-height: 50px; + width: 100%; + background: var(--color-primary); + align-items: center; + border-top-left-radius: 5px; + border-top-right-radius: 5px; } .dialog-panel-content { - height: 100%; - overflow-y:auto; + height: 100%; + overflow-y: auto; } .dialog-title { - padding: 5px 5px 5px 15px; - font-size:20px; - color: white; + padding: 5px 5px 5px 15px; + font-size: 20px; + color: white; } #portal { - width:100%; + width: 100%; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.ts index 63a302e325..1145fbd98b 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.component.ts @@ -20,22 +20,22 @@ import { Component, OnInit, ViewEncapsulation } from '@angular/core'; import { BaseDialogComponent } from '../base-dialog/base-dialog.component'; @Component({ - selector: 'standard-dialog-container', - templateUrl: './standard-dialog.component.html', - encapsulation: ViewEncapsulation.None, - styleUrls: ['./standard-dialog.component.scss'] + selector: 'standard-dialog-container', + templateUrl: './standard-dialog.component.html', + encapsulation: ViewEncapsulation.None, + styleUrls: ['./standard-dialog.component.scss'], }) -export class StandardDialogComponent extends BaseDialogComponent implements OnInit { +export class StandardDialogComponent + extends BaseDialogComponent + implements OnInit +{ + constructor() { + super(); + } - constructor() { - super(); - } - - ngOnInit() { - } - - closeDialog() { - this.containerEvent.emit({key: 'CLOSE'}); - } + ngOnInit() {} + closeDialog() { + this.containerEvent.emit({ key: 'CLOSE' }); + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.config.ts b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.config.ts index 6594dd400d..386df0e428 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.config.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/dialog/standard-dialog/standard-dialog.config.ts @@ -21,29 +21,28 @@ import { DialogPanelConfig } from '../base-dialog/base-dialog.model'; import { Overlay } from '@angular/cdk/overlay'; export class StandardDialogConfig implements BaseDialogConfig { + getConfig(): DialogPanelConfig { + const config: DialogPanelConfig = {} as DialogPanelConfig; + config.maxWidth = '90vw'; + config.height = '50vh'; + return config; + } - getConfig(): DialogPanelConfig { - const config: DialogPanelConfig = {} as DialogPanelConfig; - config.maxWidth = '90vw'; - config.height = '50vh'; - return config; - } + getPosition(overlay: Overlay) { + return overlay + .position() + .global() + .centerHorizontally() + .centerVertically(); + } - getPosition(overlay: Overlay) { - return overlay - .position() - .global() - .centerHorizontally() - .centerVertically(); - } - - getOverlayConfig(config: any, positionStrategy: any) { - return { - hasBackdrop: true, - positionStrategy, - panelClass: 'dialog-container', - width: config.width, - maxWidth: '90vw', - }; - } + getOverlayConfig(config: any, positionStrategy: any) { + return { + hasBackdrop: true, + positionStrategy, + panelClass: 'dialog-container', + width: config.width, + maxWidth: '90vw', + }; + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/models/sp-navigation.model.ts b/ui/projects/streampipes/shared-ui/src/lib/models/sp-navigation.model.ts index 1a90c9e321..25d22adde3 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/models/sp-navigation.model.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/models/sp-navigation.model.ts @@ -17,12 +17,12 @@ */ export interface SpNavigationItem { - itemId: string; - itemTitle: string; - itemLink: string[]; + itemId: string; + itemTitle: string; + itemLink: string[]; } export interface SpBreadcrumbItem { - label: string; - link?: string[]; + label: string; + link?: string[]; } diff --git a/ui/projects/streampipes/shared-ui/src/lib/services/breadcrumb.service.ts b/ui/projects/streampipes/shared-ui/src/lib/services/breadcrumb.service.ts index 1d915c65bb..e486910530 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/services/breadcrumb.service.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/services/breadcrumb.service.ts @@ -20,27 +20,31 @@ import { BehaviorSubject } from 'rxjs'; import { SpBreadcrumbItem } from '../models/sp-navigation.model'; import { Injectable } from '@angular/core'; -@Injectable({providedIn: 'root'}) +@Injectable({ providedIn: 'root' }) export class SpBreadcrumbService { + currentNavHierarchy$: BehaviorSubject = + new BehaviorSubject([]); - currentNavHierarchy$: BehaviorSubject = new BehaviorSubject([]); + updateBreadcrumb(breadcrumbItems: SpBreadcrumbItem[]) { + this.currentNavHierarchy$.next(breadcrumbItems); + } - updateBreadcrumb(breadcrumbItems: SpBreadcrumbItem[]) { - this.currentNavHierarchy$.next(breadcrumbItems); - } + public getRootLink(baseRoute: SpBreadcrumbItem): SpBreadcrumbItem[] { + return [this.removeLink({ ...baseRoute })]; + } - public getRootLink(baseRoute: SpBreadcrumbItem): SpBreadcrumbItem[] { - return [this.removeLink({...baseRoute})]; - } + public makeRoute( + baseItems: SpBreadcrumbItem[], + label: string, + link?: string[], + ) { + baseItems.push({ label, link }); + return baseItems; + } - public makeRoute(baseItems: SpBreadcrumbItem[], label: string, link?: string[]) { - baseItems.push({label, link}); - return baseItems; - } - - public removeLink(item: SpBreadcrumbItem): SpBreadcrumbItem { - const newItem = {...item}; - newItem.link = undefined; - return newItem; - } + public removeLink(item: SpBreadcrumbItem): SpBreadcrumbItem { + const newItem = { ...item }; + newItem.link = undefined; + return newItem; + } } diff --git a/ui/projects/streampipes/shared-ui/src/lib/shared-ui.module.ts b/ui/projects/streampipes/shared-ui/src/lib/shared-ui.module.ts index 8e40ee51fe..7142b50052 100644 --- a/ui/projects/streampipes/shared-ui/src/lib/shared-ui.module.ts +++ b/ui/projects/streampipes/shared-ui/src/lib/shared-ui.module.ts @@ -37,39 +37,38 @@ import { SpExceptionDetailsDialogComponent } from './components/sp-exception-mes import { MatDividerModule } from '@angular/material/divider'; @NgModule({ - declarations: [ - ConfirmDialogComponent, - PanelDialogComponent, - StandardDialogComponent, - SpBasicInnerPanelComponent, - SpBasicHeaderTitleComponent, - SpBasicViewComponent, - SpBasicNavTabsComponent, - SpExceptionMessageComponent, - SpExceptionDetailsDialogComponent - ], - imports: [ - CommonModule, - FlexLayoutModule, - MatButtonModule, - MatDividerModule, - MatIconModule, - MatTabsModule, - MatTooltipModule, - PortalModule, - OverlayModule, - ], - exports: [ - ConfirmDialogComponent, - PanelDialogComponent, - StandardDialogComponent, - SpBasicInnerPanelComponent, - SpBasicHeaderTitleComponent, - SpBasicViewComponent, - SpBasicNavTabsComponent, - SpExceptionMessageComponent, - SpExceptionDetailsDialogComponent - ] + declarations: [ + ConfirmDialogComponent, + PanelDialogComponent, + StandardDialogComponent, + SpBasicInnerPanelComponent, + SpBasicHeaderTitleComponent, + SpBasicViewComponent, + SpBasicNavTabsComponent, + SpExceptionMessageComponent, + SpExceptionDetailsDialogComponent, + ], + imports: [ + CommonModule, + FlexLayoutModule, + MatButtonModule, + MatDividerModule, + MatIconModule, + MatTabsModule, + MatTooltipModule, + PortalModule, + OverlayModule, + ], + exports: [ + ConfirmDialogComponent, + PanelDialogComponent, + StandardDialogComponent, + SpBasicInnerPanelComponent, + SpBasicHeaderTitleComponent, + SpBasicViewComponent, + SpBasicNavTabsComponent, + SpExceptionMessageComponent, + SpExceptionDetailsDialogComponent, + ], }) -export class SharedUiModule { -} +export class SharedUiModule {} diff --git a/ui/projects/streampipes/shared-ui/src/public-api.ts b/ui/projects/streampipes/shared-ui/src/public-api.ts index a19dfd5af4..f6de0d7eca 100644 --- a/ui/projects/streampipes/shared-ui/src/public-api.ts +++ b/ui/projects/streampipes/shared-ui/src/public-api.ts @@ -36,5 +36,3 @@ export * from './lib/components/sp-exception-message/exception-details-dialog/ex export * from './lib/models/sp-navigation.model'; export * from './lib/services/breadcrumb.service'; - - diff --git a/ui/projects/streampipes/shared-ui/tsconfig.lib.json b/ui/projects/streampipes/shared-ui/tsconfig.lib.json index fbbed4791a..e2c590dbbf 100644 --- a/ui/projects/streampipes/shared-ui/tsconfig.lib.json +++ b/ui/projects/streampipes/shared-ui/tsconfig.lib.json @@ -8,13 +8,7 @@ "declarationMap": true, "inlineSources": true, "types": [], - "lib": [ - "dom", - "es2018" - ] + "lib": ["dom", "es2018"] }, - "exclude": [ - "src/test.ts", - "**/*.spec.ts" - ] + "exclude": ["src/test.ts", "**/*.spec.ts"] } diff --git a/ui/projects/streampipes/shared-ui/tsconfig.spec.json b/ui/projects/streampipes/shared-ui/tsconfig.spec.json index 85392ee8f8..c6d4f53228 100644 --- a/ui/projects/streampipes/shared-ui/tsconfig.spec.json +++ b/ui/projects/streampipes/shared-ui/tsconfig.spec.json @@ -3,15 +3,8 @@ "extends": "../../../tsconfig.json", "compilerOptions": { "outDir": "../../../out-tsc/spec", - "types": [ - "jasmine" - ] + "types": ["jasmine"] }, - "files": [ - "src/test.ts" - ], - "include": [ - "**/*.spec.ts", - "**/*.d.ts" - ] + "files": ["src/test.ts"], + "include": ["**/*.spec.ts", "**/*.d.ts"] } From 6c8425a312858a96b5b97aa65a4b5e9163e787b8 Mon Sep 17 00:00:00 2001 From: Aamir Shaikh Date: Mon, 2 Jan 2023 23:03:01 +0530 Subject: [PATCH 2/2] [#877] Fix params --- .../platform-services/src/lib/apis/datalake-rest.service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts b/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts index 428c543e44..e27a8d8471 100644 --- a/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts +++ b/ui/projects/streampipes/platform-services/src/lib/apis/datalake-rest.service.ts @@ -87,7 +87,7 @@ export class DatalakeRestService { const headers = ignoreLoadingBar ? { ignoreLoadingBar: '' } : {}; // @ts-ignore return this.http.get(url, { - params: queryParams, + params: queryParams as unknown as HttpParams, headers, }); }