@things-factory/kpi 10.1.248 → 10.1.249
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-client/bootstrap.d.ts +2 -0
- package/dist-client/bootstrap.js +7 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/charts/kpi-boxplot-chart.d.ts +24 -0
- package/dist-client/charts/kpi-boxplot-chart.js +324 -0
- package/dist-client/charts/kpi-boxplot-chart.js.map +1 -0
- package/dist-client/charts/kpi-mini-trend-chart.d.ts +14 -0
- package/dist-client/charts/kpi-mini-trend-chart.js +148 -0
- package/dist-client/charts/kpi-mini-trend-chart.js.map +1 -0
- package/dist-client/charts/kpi-radar-chart.d.ts +16 -0
- package/dist-client/charts/kpi-radar-chart.js +138 -0
- package/dist-client/charts/kpi-radar-chart.js.map +1 -0
- package/dist-client/charts/kpi-trend-chart.d.ts +25 -0
- package/dist-client/charts/kpi-trend-chart.js +186 -0
- package/dist-client/charts/kpi-trend-chart.js.map +1 -0
- package/dist-client/google-map/common-google-map.d.ts +34 -0
- package/dist-client/google-map/common-google-map.js +333 -0
- package/dist-client/google-map/common-google-map.js.map +1 -0
- package/dist-client/google-map/google-map-loader.d.ts +8 -0
- package/dist-client/google-map/google-map-loader.js +22 -0
- package/dist-client/google-map/google-map-loader.js.map +1 -0
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/kpi/kpi-grade-editor.d.ts +35 -0
- package/dist-client/pages/kpi/kpi-grade-editor.js +165 -0
- package/dist-client/pages/kpi/kpi-grade-editor.js.map +1 -0
- package/dist-client/pages/kpi/kpi-importer.d.ts +23 -0
- package/dist-client/pages/kpi/kpi-importer.js +92 -0
- package/dist-client/pages/kpi/kpi-importer.js.map +1 -0
- package/dist-client/pages/kpi/kpi-list-page.d.ts +136 -0
- package/dist-client/pages/kpi/kpi-list-page.js +948 -0
- package/dist-client/pages/kpi/kpi-list-page.js.map +1 -0
- package/dist-client/pages/kpi/kpi-overview-sample.d.ts +36 -0
- package/dist-client/pages/kpi/kpi-overview-sample.js +264 -0
- package/dist-client/pages/kpi/kpi-overview-sample.js.map +1 -0
- package/dist-client/pages/kpi/kpi-overview.d.ts +14 -0
- package/dist-client/pages/kpi/kpi-overview.js +361 -0
- package/dist-client/pages/kpi/kpi-overview.js.map +1 -0
- package/dist-client/pages/kpi/kpi-tree-page.d.ts +51 -0
- package/dist-client/pages/kpi/kpi-tree-page.js +355 -0
- package/dist-client/pages/kpi/kpi-tree-page.js.map +1 -0
- package/dist-client/pages/kpi/kpi-view.d.ts +12 -0
- package/dist-client/pages/kpi/kpi-view.js +193 -0
- package/dist-client/pages/kpi/kpi-view.js.map +1 -0
- package/dist-client/pages/kpi/kpi-viz-editor.d.ts +19 -0
- package/dist-client/pages/kpi/kpi-viz-editor.js +562 -0
- package/dist-client/pages/kpi/kpi-viz-editor.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.d.ts +17 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.js +279 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level1-card.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.d.ts +19 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.js +385 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level2-comparison.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.d.ts +23 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.js +465 -0
- package/dist-client/pages/kpi-dashboard/cards/kpi-level3-comparison.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.d.ts +8 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.js +78 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-chart-toggle.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.d.ts +24 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.js +440 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-left-panel.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.d.ts +33 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.js +444 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-map-panel.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.d.ts +23 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.js +369 -0
- package/dist-client/pages/kpi-dashboard/components/kpi-region-popup.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-alert-panel.d.ts +18 -0
- package/dist-client/pages/kpi-dashboard/kpi-alert-panel.js +128 -0
- package/dist-client/pages/kpi-dashboard/kpi-alert-panel.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.d.ts +31 -0
- package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.js +493 -0
- package/dist-client/pages/kpi-dashboard/kpi-dashboard-map.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-dashboard.d.ts +50 -0
- package/dist-client/pages/kpi-dashboard/kpi-dashboard.js +884 -0
- package/dist-client/pages/kpi-dashboard/kpi-dashboard.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.d.ts +12 -0
- package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.js +82 -0
- package/dist-client/pages/kpi-dashboard/kpi-grade-visualization.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-history-viewer.d.ts +11 -0
- package/dist-client/pages/kpi-dashboard/kpi-history-viewer.js +65 -0
- package/dist-client/pages/kpi-dashboard/kpi-history-viewer.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-list-summary.d.ts +13 -0
- package/dist-client/pages/kpi-dashboard/kpi-list-summary.js +115 -0
- package/dist-client/pages/kpi-dashboard/kpi-list-summary.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-performance-summary.d.ts +15 -0
- package/dist-client/pages/kpi-dashboard/kpi-performance-summary.js +146 -0
- package/dist-client/pages/kpi-dashboard/kpi-performance-summary.js.map +1 -0
- package/dist-client/pages/kpi-dashboard/kpi-value-entry.d.ts +7 -0
- package/dist-client/pages/kpi-dashboard/kpi-value-entry.js +86 -0
- package/dist-client/pages/kpi-dashboard/kpi-value-entry.js.map +1 -0
- package/dist-client/pages/kpi-history/kpi-history-list-page.d.ts +21 -0
- package/dist-client/pages/kpi-history/kpi-history-list-page.js +160 -0
- package/dist-client/pages/kpi-history/kpi-history-list-page.js.map +1 -0
- package/dist-client/pages/kpi-metric/kpi-metric-importer.d.ts +23 -0
- package/dist-client/pages/kpi-metric/kpi-metric-importer.js +92 -0
- package/dist-client/pages/kpi-metric/kpi-metric-importer.js.map +1 -0
- package/dist-client/pages/kpi-metric/kpi-metric-list-page.d.ts +65 -0
- package/dist-client/pages/kpi-metric/kpi-metric-list-page.js +415 -0
- package/dist-client/pages/kpi-metric/kpi-metric-list-page.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.d.ts +52 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js +678 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-editor-page.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.d.ts +23 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js +75 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-importer.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.d.ts +64 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js +311 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-list-page.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.d.ts +12 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js +175 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-form.js.map +1 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.d.ts +35 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js +161 -0
- package/dist-client/pages/kpi-metric-value/kpi-metric-value-manual-entry-page.js.map +1 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-editor-page.d.ts +47 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-editor-page.js +655 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-editor-page.js.map +1 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-importer.d.ts +23 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-importer.js +92 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-importer.js.map +1 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-list-page.d.ts +65 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-list-page.js +416 -0
- package/dist-client/pages/kpi-statistic/kpi-statistic-list-page.js.map +1 -0
- package/dist-client/pages/kpi-value/kpi-value-editor-page.d.ts +50 -0
- package/dist-client/pages/kpi-value/kpi-value-editor-page.js +700 -0
- package/dist-client/pages/kpi-value/kpi-value-editor-page.js.map +1 -0
- package/dist-client/pages/kpi-value/kpi-value-importer.d.ts +23 -0
- package/dist-client/pages/kpi-value/kpi-value-importer.js +92 -0
- package/dist-client/pages/kpi-value/kpi-value-importer.js.map +1 -0
- package/dist-client/pages/kpi-value/kpi-value-list-page.d.ts +73 -0
- package/dist-client/pages/kpi-value/kpi-value-list-page.js +403 -0
- package/dist-client/pages/kpi-value/kpi-value-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +47 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/viewparts/kpi-metric-input.d.ts +23 -0
- package/dist-client/viewparts/kpi-metric-input.js +140 -0
- package/dist-client/viewparts/kpi-metric-input.js.map +1 -0
- package/dist-client/viewparts/kpi-metric-meta-editor.d.ts +36 -0
- package/dist-client/viewparts/kpi-metric-meta-editor.js +321 -0
- package/dist-client/viewparts/kpi-metric-meta-editor.js.map +1 -0
- package/dist-client/viewparts/metric-input-hint.d.ts +26 -0
- package/dist-client/viewparts/metric-input-hint.js +19 -0
- package/dist-client/viewparts/metric-input-hint.js.map +1 -0
- package/dist-client/viewparts/metric-input.test.d.ts +1 -0
- package/dist-client/viewparts/metric-input.test.js +43 -0
- package/dist-client/viewparts/metric-input.test.js.map +1 -0
- package/dist-client/viewparts/metric-renderer-registry.d.ts +18 -0
- package/dist-client/viewparts/metric-renderer-registry.js +29 -0
- package/dist-client/viewparts/metric-renderer-registry.js.map +1 -0
- package/dist-client/viewparts/ox-grist-editor-metric-input-hint.d.ts +19 -0
- package/dist-client/viewparts/ox-grist-editor-metric-input-hint.js +76 -0
- package/dist-client/viewparts/ox-grist-editor-metric-input-hint.js.map +1 -0
- package/dist-server/calculator/calculator.test.d.ts +1 -0
- package/dist-server/calculator/calculator.test.js +126 -0
- package/dist-server/calculator/calculator.test.js.map +1 -0
- package/dist-server/calculator/evaluator.d.ts +8 -0
- package/dist-server/calculator/evaluator.js +42 -0
- package/dist-server/calculator/evaluator.js.map +1 -0
- package/dist-server/calculator/functions.d.ts +3 -0
- package/dist-server/calculator/functions.js +62 -0
- package/dist-server/calculator/functions.js.map +1 -0
- package/dist-server/calculator/index.d.ts +6 -0
- package/dist-server/calculator/index.js +10 -0
- package/dist-server/calculator/index.js.map +1 -0
- package/dist-server/calculator/parser.d.ts +34 -0
- package/dist-server/calculator/parser.js +185 -0
- package/dist-server/calculator/parser.js.map +1 -0
- package/dist-server/calculator/provider.d.ts +8 -0
- package/dist-server/calculator/provider.js +13 -0
- package/dist-server/calculator/provider.js.map +1 -0
- package/dist-server/calculator/score.d.ts +21 -0
- package/dist-server/calculator/score.js +36 -0
- package/dist-server/calculator/score.js.map +1 -0
- package/dist-server/calculator/score.test.d.ts +1 -0
- package/dist-server/calculator/score.test.js +47 -0
- package/dist-server/calculator/score.test.js.map +1 -0
- package/dist-server/calculator/validate.d.ts +15 -0
- package/dist-server/calculator/validate.js +30 -0
- package/dist-server/calculator/validate.js.map +1 -0
- package/dist-server/calculator/validate.test.d.ts +1 -0
- package/dist-server/calculator/validate.test.js +45 -0
- package/dist-server/calculator/validate.test.js.map +1 -0
- package/dist-server/controllers/index.d.ts +2 -0
- package/dist-server/controllers/index.js +6 -0
- package/dist-server/controllers/index.js.map +1 -0
- package/dist-server/controllers/kpi-metric-value-provider.d.ts +11 -0
- package/dist-server/controllers/kpi-metric-value-provider.js +97 -0
- package/dist-server/controllers/kpi-metric-value-provider.js.map +1 -0
- package/dist-server/controllers/kpi-value-provider.d.ts +11 -0
- package/dist-server/controllers/kpi-value-provider.js +50 -0
- package/dist-server/controllers/kpi-value-provider.js.map +1 -0
- package/dist-server/index.d.ts +5 -0
- package/dist-server/index.js +9 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/migrations/1752190849680-seed-kpi-metrics.d.ts +6 -0
- package/dist-server/migrations/1752190849680-seed-kpi-metrics.js +102 -0
- package/dist-server/migrations/1752190849680-seed-kpi-metrics.js.map +1 -0
- package/dist-server/migrations/1752190849681-seed-kpi.d.ts +5 -0
- package/dist-server/migrations/1752190849681-seed-kpi.js +315 -0
- package/dist-server/migrations/1752190849681-seed-kpi.js.map +1 -0
- package/dist-server/migrations/1752192090123-add-grades-to-kpi.d.ts +7 -0
- package/dist-server/migrations/1752192090123-add-grades-to-kpi.js +51 -0
- package/dist-server/migrations/1752192090123-add-grades-to-kpi.js.map +1 -0
- package/dist-server/migrations/1752192090124-add-kpi-statistics.d.ts +5 -0
- package/dist-server/migrations/1752192090124-add-kpi-statistics.js +710 -0
- package/dist-server/migrations/1752192090124-add-kpi-statistics.js.map +1 -0
- package/dist-server/migrations/1752192090128-seed-kpi-org-scope.d.ts +6 -0
- package/dist-server/migrations/1752192090128-seed-kpi-org-scope.js +111 -0
- package/dist-server/migrations/1752192090128-seed-kpi-org-scope.js.map +1 -0
- package/dist-server/migrations/1752192090129-seed-kpi-values.d.ts +6 -0
- package/dist-server/migrations/1752192090129-seed-kpi-values.js +187 -0
- package/dist-server/migrations/1752192090129-seed-kpi-values.js.map +1 -0
- package/dist-server/migrations/1752192090200-add-meta-to-kpi-metric.d.ts +10 -0
- package/dist-server/migrations/1752192090200-add-meta-to-kpi-metric.js +26 -0
- package/dist-server/migrations/1752192090200-add-meta-to-kpi-metric.js.map +1 -0
- package/dist-server/migrations/1752192090201-backfill-kpi-metric-meta.d.ts +11 -0
- package/dist-server/migrations/1752192090201-backfill-kpi-metric-meta.js +54 -0
- package/dist-server/migrations/1752192090201-backfill-kpi-metric-meta.js.map +1 -0
- package/dist-server/migrations/grade-data/x11-performance-table.json +962 -0
- package/dist-server/migrations/grade-data/x12-performance-table.json +611 -0
- package/dist-server/migrations/grade-data/x14-performance-table.json +42 -0
- package/dist-server/migrations/grade-data/x21-performance-table.json +889 -0
- package/dist-server/migrations/grade-data/x22-performance-table.json +1064 -0
- package/dist-server/migrations/grade-data/x23-performance-table.json +42 -0
- package/dist-server/migrations/grade-data/x31-performance-table.json +644 -0
- package/dist-server/migrations/grade-data/x32-performance-table.json +993 -0
- package/dist-server/migrations/grade-data/x33-performance-table.json +195 -0
- package/dist-server/migrations/grade-data/x34-performance-table.json +12 -0
- package/dist-server/migrations/grade-data/x35-performance-table.json +42 -0
- package/dist-server/migrations/grade-data/x41-performance-table.json +825 -0
- package/dist-server/migrations/grade-data/x42-performance-table.json +786 -0
- package/dist-server/migrations/grade-data/x43-performance-table.json +12 -0
- package/dist-server/migrations/grade-data/x44-performance-table.json +42 -0
- package/dist-server/migrations/grade-data/x51-performance-table.json +924 -0
- package/dist-server/migrations/grade-data/x52-performance-table.json +42 -0
- package/dist-server/migrations/grade-data/x61-performance-table.json +261 -0
- package/dist-server/migrations/grade-data/x62-performance-table.json +42 -0
- package/dist-server/migrations/index.d.ts +1 -0
- package/dist-server/migrations/index.js +12 -0
- package/dist-server/migrations/index.js.map +1 -0
- package/dist-server/migrations/seed-data/kpi-metrics-seed.json +517 -0
- package/dist-server/migrations/seed-data/kpi-org-scope-seed.json +1676 -0
- package/dist-server/migrations/seed-data/kpi-scopes-seed.json +121 -0
- package/dist-server/migrations/seed-data/kpi-values-seed.json +402 -0
- package/dist-server/migrations/seed-data/kpis-seed.json +488 -0
- package/dist-server/migrations/seed-data/scope-definitions-seed.json +90 -0
- package/dist-server/routes.d.ts +1 -0
- package/dist-server/routes.js +72 -0
- package/dist-server/routes.js.map +1 -0
- package/dist-server/service/index.d.ts +15 -0
- package/dist-server/service/index.js +49 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/kpi/aggregate-kpi.d.ts +8 -0
- package/dist-server/service/kpi/aggregate-kpi.js +123 -0
- package/dist-server/service/kpi/aggregate-kpi.js.map +1 -0
- package/dist-server/service/kpi/event-subscriber.d.ts +9 -0
- package/dist-server/service/kpi/event-subscriber.js +31 -0
- package/dist-server/service/kpi/event-subscriber.js.map +1 -0
- package/dist-server/service/kpi/index.d.ts +8 -0
- package/dist-server/service/kpi/index.js +12 -0
- package/dist-server/service/kpi/index.js.map +1 -0
- package/dist-server/service/kpi/kpi-formula.service.d.ts +49 -0
- package/dist-server/service/kpi/kpi-formula.service.js +165 -0
- package/dist-server/service/kpi/kpi-formula.service.js.map +1 -0
- package/dist-server/service/kpi/kpi-grade.types.d.ts +22 -0
- package/dist-server/service/kpi/kpi-grade.types.js +3 -0
- package/dist-server/service/kpi/kpi-grade.types.js.map +1 -0
- package/dist-server/service/kpi/kpi-history.d.ts +29 -0
- package/dist-server/service/kpi/kpi-history.js +148 -0
- package/dist-server/service/kpi/kpi-history.js.map +1 -0
- package/dist-server/service/kpi/kpi-mutation.d.ts +14 -0
- package/dist-server/service/kpi/kpi-mutation.js +553 -0
- package/dist-server/service/kpi/kpi-mutation.js.map +1 -0
- package/dist-server/service/kpi/kpi-query.d.ts +24 -0
- package/dist-server/service/kpi/kpi-query.js +309 -0
- package/dist-server/service/kpi/kpi-query.js.map +1 -0
- package/dist-server/service/kpi/kpi-type.d.ts +48 -0
- package/dist-server/service/kpi/kpi-type.js +221 -0
- package/dist-server/service/kpi/kpi-type.js.map +1 -0
- package/dist-server/service/kpi/kpi.d.ts +130 -0
- package/dist-server/service/kpi/kpi.js +356 -0
- package/dist-server/service/kpi/kpi.js.map +1 -0
- package/dist-server/service/kpi-alert/index.d.ts +2 -0
- package/dist-server/service/kpi-alert/index.js +6 -0
- package/dist-server/service/kpi-alert/index.js.map +1 -0
- package/dist-server/service/kpi-alert/kpi-alert-query.d.ts +4 -0
- package/dist-server/service/kpi-alert/kpi-alert-query.js +72 -0
- package/dist-server/service/kpi-alert/kpi-alert-query.js.map +1 -0
- package/dist-server/service/kpi-alert/kpi-alert-type.d.ts +8 -0
- package/dist-server/service/kpi-alert/kpi-alert-type.js +33 -0
- package/dist-server/service/kpi-alert/kpi-alert-type.js.map +1 -0
- package/dist-server/service/kpi-metric/aggregate-kpi-metric.d.ts +8 -0
- package/dist-server/service/kpi-metric/aggregate-kpi-metric.js +126 -0
- package/dist-server/service/kpi-metric/aggregate-kpi-metric.js.map +1 -0
- package/dist-server/service/kpi-metric/index.d.ts +6 -0
- package/dist-server/service/kpi-metric/index.js +10 -0
- package/dist-server/service/kpi-metric/index.js.map +1 -0
- package/dist-server/service/kpi-metric/kpi-metric-meta.d.ts +46 -0
- package/dist-server/service/kpi-metric/kpi-metric-meta.js +27 -0
- package/dist-server/service/kpi-metric/kpi-metric-meta.js.map +1 -0
- package/dist-server/service/kpi-metric/kpi-metric-meta.test.d.ts +1 -0
- package/dist-server/service/kpi-metric/kpi-metric-meta.test.js +43 -0
- package/dist-server/service/kpi-metric/kpi-metric-meta.test.js.map +1 -0
- package/dist-server/service/kpi-metric/kpi-metric-mutation.d.ts +10 -0
- package/dist-server/service/kpi-metric/kpi-metric-mutation.js +296 -0
- package/dist-server/service/kpi-metric/kpi-metric-mutation.js.map +1 -0
- package/dist-server/service/kpi-metric/kpi-metric-query.d.ts +14 -0
- package/dist-server/service/kpi-metric/kpi-metric-query.js +126 -0
- package/dist-server/service/kpi-metric/kpi-metric-query.js.map +1 -0
- package/dist-server/service/kpi-metric/kpi-metric-type.d.ts +45 -0
- package/dist-server/service/kpi-metric/kpi-metric-type.js +177 -0
- package/dist-server/service/kpi-metric/kpi-metric-type.js.map +1 -0
- package/dist-server/service/kpi-metric/kpi-metric.d.ts +39 -0
- package/dist-server/service/kpi-metric/kpi-metric.js +174 -0
- package/dist-server/service/kpi-metric/kpi-metric.js.map +1 -0
- package/dist-server/service/kpi-metric-value/index.d.ts +6 -0
- package/dist-server/service/kpi-metric-value/index.js +10 -0
- package/dist-server/service/kpi-metric-value/index.js.map +1 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.d.ts +11 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js +283 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-mutation.js.map +1 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.d.ts +13 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js +106 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-query.js.map +1 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-type.d.ts +26 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-type.js +112 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value-type.js.map +1 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value.d.ts +23 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value.js +107 -0
- package/dist-server/service/kpi-metric-value/kpi-metric-value.js.map +1 -0
- package/dist-server/service/kpi-org-scope/index.d.ts +5 -0
- package/dist-server/service/kpi-org-scope/index.js +9 -0
- package/dist-server/service/kpi-org-scope/index.js.map +1 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-mutation.d.ts +8 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-mutation.js +170 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-mutation.js.map +1 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-query.d.ts +14 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-query.js +152 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-query.js.map +1 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-type.d.ts +26 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-type.js +101 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope-type.js.map +1 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope.d.ts +26 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope.js +135 -0
- package/dist-server/service/kpi-org-scope/kpi-org-scope.js.map +1 -0
- package/dist-server/service/kpi-scope/index.d.ts +9 -0
- package/dist-server/service/kpi-scope/index.js +14 -0
- package/dist-server/service/kpi-scope/index.js.map +1 -0
- package/dist-server/service/kpi-scope/kpi-scope-mutation.d.ts +9 -0
- package/dist-server/service/kpi-scope/kpi-scope-mutation.js +140 -0
- package/dist-server/service/kpi-scope/kpi-scope-mutation.js.map +1 -0
- package/dist-server/service/kpi-scope/kpi-scope-query.d.ts +11 -0
- package/dist-server/service/kpi-scope/kpi-scope-query.js +89 -0
- package/dist-server/service/kpi-scope/kpi-scope-query.js.map +1 -0
- package/dist-server/service/kpi-scope/kpi-scope-type.d.ts +35 -0
- package/dist-server/service/kpi-scope/kpi-scope-type.js +138 -0
- package/dist-server/service/kpi-scope/kpi-scope-type.js.map +1 -0
- package/dist-server/service/kpi-scope/kpi-scope.d.ts +38 -0
- package/dist-server/service/kpi-scope/kpi-scope.js +144 -0
- package/dist-server/service/kpi-scope/kpi-scope.js.map +1 -0
- package/dist-server/service/kpi-statistic/index.d.ts +6 -0
- package/dist-server/service/kpi-statistic/index.js +10 -0
- package/dist-server/service/kpi-statistic/index.js.map +1 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-batch.service.d.ts +43 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-batch.service.js +181 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-batch.service.js.map +1 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-calculation.service.d.ts +50 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-calculation.service.js +324 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-calculation.service.js.map +1 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-mutation.d.ts +14 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-mutation.js +279 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-mutation.js.map +1 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-query.d.ts +17 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-query.js +183 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-query.js.map +1 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-type.d.ts +59 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-type.js +200 -0
- package/dist-server/service/kpi-statistic/kpi-statistic-type.js.map +1 -0
- package/dist-server/service/kpi-statistic/kpi-statistic.d.ts +42 -0
- package/dist-server/service/kpi-statistic/kpi-statistic.js +210 -0
- package/dist-server/service/kpi-statistic/kpi-statistic.js.map +1 -0
- package/dist-server/service/kpi-value/index.d.ts +6 -0
- package/dist-server/service/kpi-value/index.js +10 -0
- package/dist-server/service/kpi-value/index.js.map +1 -0
- package/dist-server/service/kpi-value/kpi-value-mutation.d.ts +13 -0
- package/dist-server/service/kpi-value/kpi-value-mutation.js +447 -0
- package/dist-server/service/kpi-value/kpi-value-mutation.js.map +1 -0
- package/dist-server/service/kpi-value/kpi-value-query.d.ts +22 -0
- package/dist-server/service/kpi-value/kpi-value-query.js +149 -0
- package/dist-server/service/kpi-value/kpi-value-query.js.map +1 -0
- package/dist-server/service/kpi-value/kpi-value-score.service.d.ts +24 -0
- package/dist-server/service/kpi-value/kpi-value-score.service.js +61 -0
- package/dist-server/service/kpi-value/kpi-value-score.service.js.map +1 -0
- package/dist-server/service/kpi-value/kpi-value-type.d.ts +33 -0
- package/dist-server/service/kpi-value/kpi-value-type.js +156 -0
- package/dist-server/service/kpi-value/kpi-value-type.js.map +1 -0
- package/dist-server/service/kpi-value/kpi-value.d.ts +32 -0
- package/dist-server/service/kpi-value/kpi-value.js +175 -0
- package/dist-server/service/kpi-value/kpi-value.js.map +1 -0
- package/dist-server/service/utils/value-date-util.d.ts +4 -0
- package/dist-server/service/utils/value-date-util.js +117 -0
- package/dist-server/service/utils/value-date-util.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KpiMetricList = exports.KpiMetricPatch = exports.NewKpiMetric = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const GraphQLUpload_js_1 = tslib_1.__importDefault(require("graphql-upload/GraphQLUpload.js"));
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const shell_1 = require("@things-factory/shell");
|
|
8
|
+
const kpi_1 = require("../kpi/kpi");
|
|
9
|
+
const kpi_metric_1 = require("./kpi-metric");
|
|
10
|
+
const kpi_metric_2 = require("./kpi-metric");
|
|
11
|
+
let NewKpiMetric = class NewKpiMetric {
|
|
12
|
+
};
|
|
13
|
+
exports.NewKpiMetric = NewKpiMetric;
|
|
14
|
+
tslib_1.__decorate([
|
|
15
|
+
(0, type_graphql_1.Field)({ description: 'Metric code, unique within the domain, used in KPI formulas.' }),
|
|
16
|
+
tslib_1.__metadata("design:type", String)
|
|
17
|
+
], NewKpiMetric.prototype, "name", void 0);
|
|
18
|
+
tslib_1.__decorate([
|
|
19
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'User-friendly name or description of the metric.' }),
|
|
20
|
+
tslib_1.__metadata("design:type", String)
|
|
21
|
+
], NewKpiMetric.prototype, "description", void 0);
|
|
22
|
+
tslib_1.__decorate([
|
|
23
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Unit of measurement for this metric (e.g., %, count, hours).' }),
|
|
24
|
+
tslib_1.__metadata("design:type", String)
|
|
25
|
+
], NewKpiMetric.prototype, "unit", void 0);
|
|
26
|
+
tslib_1.__decorate([
|
|
27
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Source of the metric data (e.g., system, method, dataset).' }),
|
|
28
|
+
tslib_1.__metadata("design:type", String)
|
|
29
|
+
], NewKpiMetric.prototype, "source", void 0);
|
|
30
|
+
tslib_1.__decorate([
|
|
31
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true, description: 'Source dataset for this metric.' }),
|
|
32
|
+
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
33
|
+
], NewKpiMetric.prototype, "dataSet", void 0);
|
|
34
|
+
tslib_1.__decorate([
|
|
35
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Name of the field in the dataset this metric maps to.' }),
|
|
36
|
+
tslib_1.__metadata("design:type", String)
|
|
37
|
+
], NewKpiMetric.prototype, "fieldName", void 0);
|
|
38
|
+
tslib_1.__decorate([
|
|
39
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Indicates whether this metric is active and usable.' }),
|
|
40
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
41
|
+
], NewKpiMetric.prototype, "active", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, type_graphql_1.Field)({
|
|
44
|
+
nullable: true,
|
|
45
|
+
description: 'Cron schedule string for periodic KPI value aggregation (e.g., "0 0 * * *" for daily).'
|
|
46
|
+
}),
|
|
47
|
+
tslib_1.__metadata("design:type", String)
|
|
48
|
+
], NewKpiMetric.prototype, "schedule", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true, description: 'Thumbnail image or file for this metric.' }),
|
|
51
|
+
tslib_1.__metadata("design:type", Object)
|
|
52
|
+
], NewKpiMetric.prototype, "thumbnail", void 0);
|
|
53
|
+
tslib_1.__decorate([
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Timezone for the schedule.' }),
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
56
|
+
], NewKpiMetric.prototype, "timezone", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Schedule ID for the registered cron job.' }),
|
|
59
|
+
tslib_1.__metadata("design:type", String)
|
|
60
|
+
], NewKpiMetric.prototype, "scheduleId", void 0);
|
|
61
|
+
tslib_1.__decorate([
|
|
62
|
+
(0, type_graphql_1.Field)(type => kpi_1.KpiPeriodType, { nullable: true, description: 'Aggregation period type for this metric.' }),
|
|
63
|
+
tslib_1.__metadata("design:type", String)
|
|
64
|
+
], NewKpiMetric.prototype, "periodType", void 0);
|
|
65
|
+
tslib_1.__decorate([
|
|
66
|
+
(0, type_graphql_1.Field)(type => kpi_metric_1.KpiMetricCollectType, { nullable: true, description: '데이터 수집 방식' }),
|
|
67
|
+
tslib_1.__metadata("design:type", String)
|
|
68
|
+
], NewKpiMetric.prototype, "collectType", void 0);
|
|
69
|
+
tslib_1.__decorate([
|
|
70
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: '목록 표시 순서(오름차순). 미지정(null)은 뒤로 정렬.' }),
|
|
71
|
+
tslib_1.__metadata("design:type", Number)
|
|
72
|
+
], NewKpiMetric.prototype, "rank", void 0);
|
|
73
|
+
tslib_1.__decorate([
|
|
74
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
|
75
|
+
nullable: true,
|
|
76
|
+
description: '확장 메타(JSON). 입력 위젯 힌트(meta.input) 등. 스키마 변경 없이 확장.'
|
|
77
|
+
}),
|
|
78
|
+
tslib_1.__metadata("design:type", Object)
|
|
79
|
+
], NewKpiMetric.prototype, "meta", void 0);
|
|
80
|
+
exports.NewKpiMetric = NewKpiMetric = tslib_1.__decorate([
|
|
81
|
+
(0, type_graphql_1.InputType)({ description: 'Input type for creating a new KPI metric. Used in mutations to provide metric details.' })
|
|
82
|
+
], NewKpiMetric);
|
|
83
|
+
let KpiMetricPatch = class KpiMetricPatch {
|
|
84
|
+
};
|
|
85
|
+
exports.KpiMetricPatch = KpiMetricPatch;
|
|
86
|
+
tslib_1.__decorate([
|
|
87
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
88
|
+
tslib_1.__metadata("design:type", String)
|
|
89
|
+
], KpiMetricPatch.prototype, "id", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
92
|
+
tslib_1.__metadata("design:type", String)
|
|
93
|
+
], KpiMetricPatch.prototype, "name", void 0);
|
|
94
|
+
tslib_1.__decorate([
|
|
95
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
96
|
+
tslib_1.__metadata("design:type", String)
|
|
97
|
+
], KpiMetricPatch.prototype, "description", void 0);
|
|
98
|
+
tslib_1.__decorate([
|
|
99
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
100
|
+
tslib_1.__metadata("design:type", String)
|
|
101
|
+
], KpiMetricPatch.prototype, "unit", void 0);
|
|
102
|
+
tslib_1.__decorate([
|
|
103
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
104
|
+
tslib_1.__metadata("design:type", String)
|
|
105
|
+
], KpiMetricPatch.prototype, "source", void 0);
|
|
106
|
+
tslib_1.__decorate([
|
|
107
|
+
(0, type_graphql_1.Field)(type => shell_1.ObjectRef, { nullable: true }),
|
|
108
|
+
tslib_1.__metadata("design:type", shell_1.ObjectRef)
|
|
109
|
+
], KpiMetricPatch.prototype, "dataSet", void 0);
|
|
110
|
+
tslib_1.__decorate([
|
|
111
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
112
|
+
tslib_1.__metadata("design:type", String)
|
|
113
|
+
], KpiMetricPatch.prototype, "fieldName", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
116
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
117
|
+
], KpiMetricPatch.prototype, "active", void 0);
|
|
118
|
+
tslib_1.__decorate([
|
|
119
|
+
(0, type_graphql_1.Field)({
|
|
120
|
+
nullable: true,
|
|
121
|
+
description: 'Cron schedule string for periodic KPI value aggregation (e.g., "0 0 * * *" for daily).'
|
|
122
|
+
}),
|
|
123
|
+
tslib_1.__metadata("design:type", String)
|
|
124
|
+
], KpiMetricPatch.prototype, "schedule", void 0);
|
|
125
|
+
tslib_1.__decorate([
|
|
126
|
+
(0, type_graphql_1.Field)(type => GraphQLUpload_js_1.default, { nullable: true }),
|
|
127
|
+
tslib_1.__metadata("design:type", Object)
|
|
128
|
+
], KpiMetricPatch.prototype, "thumbnail", void 0);
|
|
129
|
+
tslib_1.__decorate([
|
|
130
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Timezone for the schedule.' }),
|
|
131
|
+
tslib_1.__metadata("design:type", String)
|
|
132
|
+
], KpiMetricPatch.prototype, "timezone", void 0);
|
|
133
|
+
tslib_1.__decorate([
|
|
134
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Schedule ID for the registered cron job.' }),
|
|
135
|
+
tslib_1.__metadata("design:type", String)
|
|
136
|
+
], KpiMetricPatch.prototype, "scheduleId", void 0);
|
|
137
|
+
tslib_1.__decorate([
|
|
138
|
+
(0, type_graphql_1.Field)(type => kpi_1.KpiPeriodType, { nullable: true, description: 'Aggregation period type for this metric.' }),
|
|
139
|
+
tslib_1.__metadata("design:type", String)
|
|
140
|
+
], KpiMetricPatch.prototype, "periodType", void 0);
|
|
141
|
+
tslib_1.__decorate([
|
|
142
|
+
(0, type_graphql_1.Field)({ nullable: true }),
|
|
143
|
+
tslib_1.__metadata("design:type", String)
|
|
144
|
+
], KpiMetricPatch.prototype, "cuFlag", void 0);
|
|
145
|
+
tslib_1.__decorate([
|
|
146
|
+
(0, type_graphql_1.Field)(type => kpi_metric_1.KpiMetricCollectType, { nullable: true, description: '데이터 수집 방식' }),
|
|
147
|
+
tslib_1.__metadata("design:type", String)
|
|
148
|
+
], KpiMetricPatch.prototype, "collectType", void 0);
|
|
149
|
+
tslib_1.__decorate([
|
|
150
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: '목록 표시 순서(오름차순). 미지정(null)은 뒤로 정렬.' }),
|
|
151
|
+
tslib_1.__metadata("design:type", Number)
|
|
152
|
+
], KpiMetricPatch.prototype, "rank", void 0);
|
|
153
|
+
tslib_1.__decorate([
|
|
154
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
|
155
|
+
nullable: true,
|
|
156
|
+
description: '확장 메타(JSON). 입력 위젯 힌트(meta.input) 등. 스키마 변경 없이 확장.'
|
|
157
|
+
}),
|
|
158
|
+
tslib_1.__metadata("design:type", Object)
|
|
159
|
+
], KpiMetricPatch.prototype, "meta", void 0);
|
|
160
|
+
exports.KpiMetricPatch = KpiMetricPatch = tslib_1.__decorate([
|
|
161
|
+
(0, type_graphql_1.InputType)()
|
|
162
|
+
], KpiMetricPatch);
|
|
163
|
+
let KpiMetricList = class KpiMetricList {
|
|
164
|
+
};
|
|
165
|
+
exports.KpiMetricList = KpiMetricList;
|
|
166
|
+
tslib_1.__decorate([
|
|
167
|
+
(0, type_graphql_1.Field)(type => [kpi_metric_2.KpiMetric]),
|
|
168
|
+
tslib_1.__metadata("design:type", Array)
|
|
169
|
+
], KpiMetricList.prototype, "items", void 0);
|
|
170
|
+
tslib_1.__decorate([
|
|
171
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
172
|
+
tslib_1.__metadata("design:type", Number)
|
|
173
|
+
], KpiMetricList.prototype, "total", void 0);
|
|
174
|
+
exports.KpiMetricList = KpiMetricList = tslib_1.__decorate([
|
|
175
|
+
(0, type_graphql_1.ObjectType)()
|
|
176
|
+
], KpiMetricList);
|
|
177
|
+
//# sourceMappingURL=kpi-metric-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kpi-metric-type.js","sourceRoot":"","sources":["../../../server/service/kpi-metric/kpi-metric-type.ts"],"names":[],"mappings":";;;;AACA,+FAA2D;AAC3D,+CAAsF;AACtF,iDAA+D;AAE/D,oCAA0C;AAC1C,6CAAmD;AACnD,6CAAwC;AAGjC,IAAM,YAAY,GAAlB,MAAM,YAAY;CAkDxB,CAAA;AAlDY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;;0CAC3E;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;;iDACvE;AAGpB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,8DAA8D,EAAE,CAAC;;0CAC1F;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4DAA4D,EAAE,CAAC;;4CACtF;AAGf;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;sCACnF,iBAAS;6CAAA;AAGnB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uDAAuD,EAAE,CAAC;;+CAC9E;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,qDAAqD,EAAE,CAAC;;4CAC9E;AAMhB;IAJC,IAAA,oBAAK,EAAC;QACL,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,wFAAwF;KACtG,CAAC;;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AC,iCAAoB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;;mDAChD;AAGlC;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;;4CAC5E;AAMb;IAJC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE;QAC3B,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,oDAAoD;KAClE,CAAC;;4CACQ;yBAxDC,cAAc;IAD1B,IAAA,wBAAS,GAAE;GACC,cAAc,CAyD1B;AAGM,IAAM,aAAa,GAAnB,MAAM,aAAa;CAMzB,CAAA;AANY,sCAAa;AAExB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,sBAAS,CAAC,CAAC;;4CACT;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,CAAC;;4CACN;wBALF,aAAa;IADzB,IAAA,yBAAU,GAAE;GACA,aAAa,CAMzB","sourcesContent":["import type { FileUpload } from 'graphql-upload/GraphQLUpload.js'\nimport GraphQLUpload from 'graphql-upload/GraphQLUpload.js'\nimport { ObjectType, Field, InputType, Int, ID, registerEnumType } from 'type-graphql'\nimport { ObjectRef, ScalarObject } from '@things-factory/shell'\n\nimport { KpiPeriodType } from '../kpi/kpi'\nimport { KpiMetricCollectType } from './kpi-metric'\nimport { KpiMetric } from './kpi-metric'\n\n@InputType({ description: 'Input type for creating a new KPI metric. Used in mutations to provide metric details.' })\nexport class NewKpiMetric {\n @Field({ description: 'Metric code, unique within the domain, used in KPI formulas.' })\n name: string\n\n @Field({ nullable: true, description: 'User-friendly name or description of the metric.' })\n description?: string\n\n @Field({ nullable: true, description: 'Unit of measurement for this metric (e.g., %, count, hours).' })\n unit?: string\n\n @Field({ nullable: true, description: 'Source of the metric data (e.g., system, method, dataset).' })\n source?: string\n\n @Field(type => ObjectRef, { nullable: true, description: 'Source dataset for this metric.' })\n dataSet?: ObjectRef\n\n @Field({ nullable: true, description: 'Name of the field in the dataset this metric maps to.' })\n fieldName?: string\n\n @Field({ nullable: true, description: 'Indicates whether this metric is active and usable.' })\n active?: boolean\n\n @Field({\n nullable: true,\n description: 'Cron schedule string for periodic KPI value aggregation (e.g., \"0 0 * * *\" for daily).'\n })\n schedule?: string\n\n @Field(type => GraphQLUpload, { nullable: true, description: 'Thumbnail image or file for this metric.' })\n thumbnail?: FileUpload\n\n @Field({ nullable: true, description: 'Timezone for the schedule.' })\n timezone?: string\n @Field({ nullable: true, description: 'Schedule ID for the registered cron job.' })\n scheduleId?: string\n\n @Field(type => KpiPeriodType, { nullable: true, description: 'Aggregation period type for this metric.' })\n periodType?: KpiPeriodType\n\n @Field(type => KpiMetricCollectType, { nullable: true, description: '데이터 수집 방식' })\n collectType?: KpiMetricCollectType\n\n @Field(type => Int, { nullable: true, description: '목록 표시 순서(오름차순). 미지정(null)은 뒤로 정렬.' })\n rank?: number\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: '확장 메타(JSON). 입력 위젯 힌트(meta.input) 등. 스키마 변경 없이 확장.'\n })\n meta?: any\n}\n\n@InputType()\nexport class KpiMetricPatch {\n @Field(type => ID, { nullable: true })\n id?: string\n\n @Field({ nullable: true })\n name?: string\n\n @Field({ nullable: true })\n description?: string\n\n @Field({ nullable: true })\n unit?: string\n\n @Field({ nullable: true })\n source?: string\n\n @Field(type => ObjectRef, { nullable: true })\n dataSet?: ObjectRef\n\n @Field({ nullable: true })\n fieldName?: string\n\n @Field({ nullable: true })\n active?: boolean\n\n @Field({\n nullable: true,\n description: 'Cron schedule string for periodic KPI value aggregation (e.g., \"0 0 * * *\" for daily).'\n })\n schedule?: string\n\n @Field(type => GraphQLUpload, { nullable: true })\n thumbnail?: FileUpload\n\n @Field({ nullable: true, description: 'Timezone for the schedule.' })\n timezone?: string\n\n @Field({ nullable: true, description: 'Schedule ID for the registered cron job.' })\n scheduleId?: string\n\n @Field(type => KpiPeriodType, { nullable: true, description: 'Aggregation period type for this metric.' })\n periodType?: KpiPeriodType\n\n @Field({ nullable: true })\n cuFlag?: string\n\n @Field(type => KpiMetricCollectType, { nullable: true, description: '데이터 수집 방식' })\n collectType?: KpiMetricCollectType\n\n @Field(type => Int, { nullable: true, description: '목록 표시 순서(오름차순). 미지정(null)은 뒤로 정렬.' })\n rank?: number\n\n @Field(type => ScalarObject, {\n nullable: true,\n description: '확장 메타(JSON). 입력 위젯 힌트(meta.input) 등. 스키마 변경 없이 확장.'\n })\n meta?: any\n}\n\n@ObjectType()\nexport class KpiMetricList {\n @Field(type => [KpiMetric])\n items: KpiMetric[]\n\n @Field(type => Int)\n total: number\n}\n"]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Domain } from '@things-factory/shell';
|
|
2
|
+
import { User } from '@things-factory/auth-base';
|
|
3
|
+
import { DataSet } from '@things-factory/dataset';
|
|
4
|
+
import { KpiPeriodType } from '../kpi/kpi';
|
|
5
|
+
import { KpiMetricMeta } from './kpi-metric-meta';
|
|
6
|
+
export declare enum KpiMetricCollectType {
|
|
7
|
+
AUTO = "AUTO",// 데이터셋 등 자동 수집
|
|
8
|
+
MANUAL = "MANUAL",// 수동 입력
|
|
9
|
+
IMPORT = "IMPORT",// 외부 파일 등 임포트
|
|
10
|
+
EXTERNAL = "EXTERNAL"
|
|
11
|
+
}
|
|
12
|
+
export declare class KpiMetric {
|
|
13
|
+
readonly id: string;
|
|
14
|
+
domain?: Domain;
|
|
15
|
+
domainId?: string;
|
|
16
|
+
name: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
unit?: string;
|
|
19
|
+
source?: string;
|
|
20
|
+
dataSet?: DataSet;
|
|
21
|
+
dataSetId?: string;
|
|
22
|
+
fieldName?: string;
|
|
23
|
+
active?: boolean;
|
|
24
|
+
schedule?: string;
|
|
25
|
+
scheduleId?: string;
|
|
26
|
+
timezone?: string;
|
|
27
|
+
collectType: KpiMetricCollectType;
|
|
28
|
+
periodType: KpiPeriodType;
|
|
29
|
+
rank?: number;
|
|
30
|
+
meta?: KpiMetricMeta;
|
|
31
|
+
createdAt?: Date;
|
|
32
|
+
updatedAt?: Date;
|
|
33
|
+
deletedAt?: Date;
|
|
34
|
+
creator?: User;
|
|
35
|
+
creatorId?: string;
|
|
36
|
+
updater?: User;
|
|
37
|
+
updaterId?: string;
|
|
38
|
+
thumbnail?: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KpiMetric = exports.KpiMetricCollectType = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const typeorm_1 = require("typeorm");
|
|
6
|
+
const type_graphql_1 = require("type-graphql");
|
|
7
|
+
const env_1 = require("@things-factory/env");
|
|
8
|
+
const shell_1 = require("@things-factory/shell");
|
|
9
|
+
const auth_base_1 = require("@things-factory/auth-base");
|
|
10
|
+
const dataset_1 = require("@things-factory/dataset");
|
|
11
|
+
const kpi_1 = require("../kpi/kpi");
|
|
12
|
+
const DATABASE_TYPE = env_1.config.get('ormconfig', {}).type;
|
|
13
|
+
var KpiMetricCollectType;
|
|
14
|
+
(function (KpiMetricCollectType) {
|
|
15
|
+
KpiMetricCollectType["AUTO"] = "AUTO";
|
|
16
|
+
KpiMetricCollectType["MANUAL"] = "MANUAL";
|
|
17
|
+
KpiMetricCollectType["IMPORT"] = "IMPORT";
|
|
18
|
+
KpiMetricCollectType["EXTERNAL"] = "EXTERNAL"; // 외부 API 등
|
|
19
|
+
})(KpiMetricCollectType || (exports.KpiMetricCollectType = KpiMetricCollectType = {}));
|
|
20
|
+
(0, type_graphql_1.registerEnumType)(KpiMetricCollectType, {
|
|
21
|
+
name: 'KpiMetricCollectType',
|
|
22
|
+
description: '방식: AUTO(자동), MANUAL(수동), IMPORT(임포트), EXTERNAL(외부API)'
|
|
23
|
+
});
|
|
24
|
+
let KpiMetric = class KpiMetric {
|
|
25
|
+
};
|
|
26
|
+
exports.KpiMetric = KpiMetric;
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
29
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for this KPI metric.' }),
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
31
|
+
], KpiMetric.prototype, "id", void 0);
|
|
32
|
+
tslib_1.__decorate([
|
|
33
|
+
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
34
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Domain (tenant) to which this KPI metric belongs.' }),
|
|
35
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
36
|
+
], KpiMetric.prototype, "domain", void 0);
|
|
37
|
+
tslib_1.__decorate([
|
|
38
|
+
(0, typeorm_1.RelationId)((metric) => metric.domain),
|
|
39
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'ID of the domain (tenant) for this KPI metric.' }),
|
|
40
|
+
tslib_1.__metadata("design:type", String)
|
|
41
|
+
], KpiMetric.prototype, "domainId", void 0);
|
|
42
|
+
tslib_1.__decorate([
|
|
43
|
+
(0, typeorm_1.Column)(),
|
|
44
|
+
(0, type_graphql_1.Field)({ description: 'Metric code, unique within the domain, used in KPI formulas.' }),
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
46
|
+
], KpiMetric.prototype, "name", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
49
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'User-friendly name or description of the metric.' }),
|
|
50
|
+
tslib_1.__metadata("design:type", String)
|
|
51
|
+
], KpiMetric.prototype, "description", void 0);
|
|
52
|
+
tslib_1.__decorate([
|
|
53
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Unit of measurement for this metric (e.g., %, count, hours).' }),
|
|
55
|
+
tslib_1.__metadata("design:type", String)
|
|
56
|
+
], KpiMetric.prototype, "unit", void 0);
|
|
57
|
+
tslib_1.__decorate([
|
|
58
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
59
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Source of the metric data (e.g., system, method, dataset).' }),
|
|
60
|
+
tslib_1.__metadata("design:type", String)
|
|
61
|
+
], KpiMetric.prototype, "source", void 0);
|
|
62
|
+
tslib_1.__decorate([
|
|
63
|
+
(0, typeorm_1.ManyToOne)(type => dataset_1.DataSet, { nullable: true }),
|
|
64
|
+
(0, type_graphql_1.Field)(type => dataset_1.DataSet, { nullable: true, description: 'Reference to the source dataset for this metric.' }),
|
|
65
|
+
tslib_1.__metadata("design:type", dataset_1.DataSet)
|
|
66
|
+
], KpiMetric.prototype, "dataSet", void 0);
|
|
67
|
+
tslib_1.__decorate([
|
|
68
|
+
(0, typeorm_1.RelationId)((metric) => metric.dataSet),
|
|
69
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'ID of the referenced source dataset.' }),
|
|
70
|
+
tslib_1.__metadata("design:type", String)
|
|
71
|
+
], KpiMetric.prototype, "dataSetId", void 0);
|
|
72
|
+
tslib_1.__decorate([
|
|
73
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
74
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Name of the field in the dataset this metric maps to.' }),
|
|
75
|
+
tslib_1.__metadata("design:type", String)
|
|
76
|
+
], KpiMetric.prototype, "fieldName", void 0);
|
|
77
|
+
tslib_1.__decorate([
|
|
78
|
+
(0, typeorm_1.Column)({ nullable: false, default: false }),
|
|
79
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Indicates whether this metric is active and usable.' }),
|
|
80
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
81
|
+
], KpiMetric.prototype, "active", void 0);
|
|
82
|
+
tslib_1.__decorate([
|
|
83
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
84
|
+
(0, type_graphql_1.Field)({
|
|
85
|
+
nullable: true,
|
|
86
|
+
description: 'Cron schedule string for periodic KPI value aggregation (e.g., "0 0 * * *" for daily).'
|
|
87
|
+
}),
|
|
88
|
+
tslib_1.__metadata("design:type", String)
|
|
89
|
+
], KpiMetric.prototype, "schedule", void 0);
|
|
90
|
+
tslib_1.__decorate([
|
|
91
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
92
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Schedule ID for the registered cron job.' }),
|
|
93
|
+
tslib_1.__metadata("design:type", String)
|
|
94
|
+
], KpiMetric.prototype, "scheduleId", void 0);
|
|
95
|
+
tslib_1.__decorate([
|
|
96
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
97
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Timezone for the schedule.' }),
|
|
98
|
+
tslib_1.__metadata("design:type", String)
|
|
99
|
+
], KpiMetric.prototype, "timezone", void 0);
|
|
100
|
+
tslib_1.__decorate([
|
|
101
|
+
(0, typeorm_1.Column)({
|
|
102
|
+
type: DATABASE_TYPE == 'oracle' ? undefined : 'simple-enum',
|
|
103
|
+
enum: KpiMetricCollectType,
|
|
104
|
+
default: KpiMetricCollectType.AUTO
|
|
105
|
+
}),
|
|
106
|
+
(0, type_graphql_1.Field)(type => KpiMetricCollectType, { description: '데이터 수집 방식' }),
|
|
107
|
+
tslib_1.__metadata("design:type", String)
|
|
108
|
+
], KpiMetric.prototype, "collectType", void 0);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, typeorm_1.Column)({ default: 'DAY' }),
|
|
111
|
+
(0, type_graphql_1.Field)(type => kpi_1.KpiPeriodType, { description: 'Aggregation period type for this metric.' }),
|
|
112
|
+
tslib_1.__metadata("design:type", String)
|
|
113
|
+
], KpiMetric.prototype, "periodType", void 0);
|
|
114
|
+
tslib_1.__decorate([
|
|
115
|
+
(0, typeorm_1.Column)({ type: 'int', nullable: true }),
|
|
116
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: '목록 표시 순서(오름차순). 미지정(null)은 뒤로 정렬.' }),
|
|
117
|
+
tslib_1.__metadata("design:type", Number)
|
|
118
|
+
], KpiMetric.prototype, "rank", void 0);
|
|
119
|
+
tslib_1.__decorate([
|
|
120
|
+
(0, typeorm_1.Column)({ type: 'simple-json', nullable: true }),
|
|
121
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
|
122
|
+
nullable: true,
|
|
123
|
+
description: 'metric 확장 설정(input/kind/source 등). 입력 UI·소스 바인딩 등을 담는 네임스페이스.'
|
|
124
|
+
}),
|
|
125
|
+
tslib_1.__metadata("design:type", Object)
|
|
126
|
+
], KpiMetric.prototype, "meta", void 0);
|
|
127
|
+
tslib_1.__decorate([
|
|
128
|
+
(0, typeorm_1.CreateDateColumn)(),
|
|
129
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Timestamp when this KPI metric was created.' }),
|
|
130
|
+
tslib_1.__metadata("design:type", Date)
|
|
131
|
+
], KpiMetric.prototype, "createdAt", void 0);
|
|
132
|
+
tslib_1.__decorate([
|
|
133
|
+
(0, typeorm_1.UpdateDateColumn)(),
|
|
134
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Timestamp when this KPI metric was last updated.' }),
|
|
135
|
+
tslib_1.__metadata("design:type", Date)
|
|
136
|
+
], KpiMetric.prototype, "updatedAt", void 0);
|
|
137
|
+
tslib_1.__decorate([
|
|
138
|
+
(0, typeorm_1.DeleteDateColumn)(),
|
|
139
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Timestamp when this KPI metric was deleted (soft delete).' }),
|
|
140
|
+
tslib_1.__metadata("design:type", Date)
|
|
141
|
+
], KpiMetric.prototype, "deletedAt", void 0);
|
|
142
|
+
tslib_1.__decorate([
|
|
143
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
144
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'User who created this KPI metric.' }),
|
|
145
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
146
|
+
], KpiMetric.prototype, "creator", void 0);
|
|
147
|
+
tslib_1.__decorate([
|
|
148
|
+
(0, typeorm_1.RelationId)((metric) => metric.creator),
|
|
149
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'ID of the user who created this KPI metric.' }),
|
|
150
|
+
tslib_1.__metadata("design:type", String)
|
|
151
|
+
], KpiMetric.prototype, "creatorId", void 0);
|
|
152
|
+
tslib_1.__decorate([
|
|
153
|
+
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
154
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'User who last updated this KPI metric.' }),
|
|
155
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
156
|
+
], KpiMetric.prototype, "updater", void 0);
|
|
157
|
+
tslib_1.__decorate([
|
|
158
|
+
(0, typeorm_1.RelationId)((metric) => metric.updater),
|
|
159
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'ID of the user who last updated this KPI metric.' }),
|
|
160
|
+
tslib_1.__metadata("design:type", String)
|
|
161
|
+
], KpiMetric.prototype, "updaterId", void 0);
|
|
162
|
+
tslib_1.__decorate([
|
|
163
|
+
(0, type_graphql_1.Field)(type => String, { nullable: true, description: 'Thumbnail image or file path for this KPI metric.' }),
|
|
164
|
+
tslib_1.__metadata("design:type", String)
|
|
165
|
+
], KpiMetric.prototype, "thumbnail", void 0);
|
|
166
|
+
exports.KpiMetric = KpiMetric = tslib_1.__decorate([
|
|
167
|
+
(0, typeorm_1.Entity)(),
|
|
168
|
+
(0, typeorm_1.Index)('ix_kpi_metric_0', (kpiMetric) => [kpiMetric.domain, kpiMetric.name], {
|
|
169
|
+
where: '"deleted_at" IS NULL',
|
|
170
|
+
unique: true
|
|
171
|
+
}),
|
|
172
|
+
(0, type_graphql_1.ObjectType)({ description: 'KPI metric entity. Represents a source data item used in KPI formulas.' })
|
|
173
|
+
], KpiMetric);
|
|
174
|
+
//# sourceMappingURL=kpi-metric.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"kpi-metric.js","sourceRoot":"","sources":["../../../server/service/kpi-metric/kpi-metric.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAA2E;AAE3E,6CAA4C;AAC5C,iDAA4D;AAC5D,yDAAgD;AAChD,qDAAiD;AACjD,oCAA0C;AAG1C,MAAM,aAAa,GAAG,YAAM,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,CAAC,CAAC,IAAI,CAAA;AAEtD,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,qCAAa,CAAA;IACb,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,6CAAqB,CAAA,CAAC,WAAW;AACnC,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AACD,IAAA,+BAAgB,EAAC,oBAAoB,EAAE;IACrC,IAAI,EAAE,sBAAsB;IAC5B,WAAW,EAAE,wDAAwD;CACtE,CAAC,CAAA;AAQK,IAAM,SAAS,GAAf,MAAM,SAAS;CAoHrB,CAAA;AApHY,8BAAS;AAGX;IAFR,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;;qCAC1D;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;sCACnF,cAAM;yCAAA;AAIf;IAFC,IAAA,oBAAU,EAAC,CAAC,MAAiB,EAAE,EAAE,CAAC,MAAM,CAAC,M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AE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IACjD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,6CAA6C,EAAE,CAAC;;4CACpE;AAIlB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;sCACrF,gBAAI;0CAAA;AAId;IAFC,IAAA,oBAAU,EAAC,CAAC,MAAiB,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC;IACjD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;;4CACzE;AAGlB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;;4CAC1F;oBAnHP,SAAS;IANrB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,iBAAiB,EAAE,CAAC,SAAoB,EAAE,EAAE,CAAC,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE;QACtF,KAAK,EAAE,sBAAsB;QAC7B,MAAM,EAAE,IAAI;KACb,CAAC;IACD,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,wEAAwE,EAAE,CAAC;GACzF,SAAS,CAoHrB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, Int, ID, registerEnumType } from 'type-graphql'\n\nimport { config } from '@things-factory/env'\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { DataSet } from '@things-factory/dataset'\nimport { KpiPeriodType } from '../kpi/kpi'\nimport { KpiMetricMeta } from './kpi-metric-meta'\n\nconst DATABASE_TYPE = config.get('ormconfig', {}).type\n\nexport enum KpiMetricCollectType {\n AUTO = 'AUTO', // 데이터셋 등 자동 수집\n MANUAL = 'MANUAL', // 수동 입력\n IMPORT = 'IMPORT', // 외부 파일 등 임포트\n EXTERNAL = 'EXTERNAL' // 외부 API 등\n}\nregisterEnumType(KpiMetricCollectType, {\n name: 'KpiMetricCollectType',\n description: '방식: AUTO(자동), MANUAL(수동), IMPORT(임포트), EXTERNAL(외부API)'\n})\n\n@Entity()\n@Index('ix_kpi_metric_0', (kpiMetric: KpiMetric) => [kpiMetric.domain, kpiMetric.name], {\n where: '\"deleted_at\" IS NULL',\n unique: true\n})\n@ObjectType({ description: 'KPI metric entity. Represents a source data item used in KPI formulas.' })\nexport class KpiMetric {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for this KPI metric.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true, description: 'Domain (tenant) to which this KPI metric belongs.' })\n domain?: Domain\n\n @RelationId((metric: KpiMetric) => metric.domain)\n @Field({ nullable: true, description: 'ID of the domain (tenant) for this KPI metric.' })\n domainId?: string\n\n @Column()\n @Field({ description: 'Metric code, unique within the domain, used in KPI formulas.' })\n name: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'User-friendly name or description of the metric.' })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Unit of measurement for this metric (e.g., %, count, hours).' })\n unit?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Source of the metric data (e.g., system, method, dataset).' })\n source?: string\n\n @ManyToOne(type => DataSet, { nullable: true })\n @Field(type => DataSet, { nullable: true, description: 'Reference to the source dataset for this metric.' })\n dataSet?: DataSet\n\n @RelationId((metric: KpiMetric) => metric.dataSet)\n @Field({ nullable: true, description: 'ID of the referenced source dataset.' })\n dataSetId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Name of the field in the dataset this metric maps to.' })\n fieldName?: string\n\n @Column({ nullable: false, default: false })\n @Field({ nullable: true, description: 'Indicates whether this metric is active and usable.' })\n active?: boolean\n\n @Column({ nullable: true })\n @Field({\n nullable: true,\n description: 'Cron schedule string for periodic KPI value aggregation (e.g., \"0 0 * * *\" for daily).'\n })\n schedule?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Schedule ID for the registered cron job.' })\n scheduleId?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Timezone for the schedule.' })\n timezone?: string\n\n /* 'simple-enum' is the enum every driver but oracle can build: postgres and mysql turn it into their\n native enum (the same type 'enum' made, so an existing table does not change), sqlite and mssql\n into a varchar with a CHECK. Oracle knows neither - there the type is left to TypeORM (varchar2). */\n @Column({\n type: DATABASE_TYPE == 'oracle' ? undefined : 'simple-enum',\n enum: KpiMetricCollectType,\n default: KpiMetricCollectType.AUTO\n })\n @Field(type => KpiMetricCollectType, { description: '데이터 수집 방식' })\n collectType: KpiMetricCollectType\n\n @Column({ default: 'DAY' })\n @Field(type => KpiPeriodType, { description: 'Aggregation period type for this metric.' })\n periodType: KpiPeriodType\n\n @Column({ type: 'int', nullable: true })\n @Field(type => Int, { nullable: true, description: '목록 표시 순서(오름차순). 미지정(null)은 뒤로 정렬.' })\n rank?: number\n\n @Column({ type: 'simple-json', nullable: true })\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'metric 확장 설정(input/kind/source 등). 입력 UI·소스 바인딩 등을 담는 네임스페이스.'\n })\n meta?: KpiMetricMeta\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'Timestamp when this KPI metric was created.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'Timestamp when this KPI metric was last updated.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'Timestamp when this KPI metric was deleted (soft delete).' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User who created this KPI metric.' })\n creator?: User\n\n @RelationId((metric: KpiMetric) => metric.creator)\n @Field({ nullable: true, description: 'ID of the user who created this KPI metric.' })\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'User who last updated this KPI metric.' })\n updater?: User\n\n @RelationId((metric: KpiMetric) => metric.updater)\n @Field({ nullable: true, description: 'ID of the user who last updated this KPI metric.' })\n updaterId?: string\n\n @Field(type => String, { nullable: true, description: 'Thumbnail image or file path for this KPI metric.' })\n thumbnail?: string\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { KpiMetricValue } from './kpi-metric-value';
|
|
2
|
+
import { KpiMetricValueQuery } from './kpi-metric-value-query';
|
|
3
|
+
import { KpiMetricValueMutation } from './kpi-metric-value-mutation';
|
|
4
|
+
export declare const entities: (typeof KpiMetricValue)[];
|
|
5
|
+
export declare const resolvers: (typeof KpiMetricValueQuery | typeof KpiMetricValueMutation)[];
|
|
6
|
+
export declare const subscribers: any[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.subscribers = exports.resolvers = exports.entities = void 0;
|
|
4
|
+
const kpi_metric_value_1 = require("./kpi-metric-value");
|
|
5
|
+
const kpi_metric_value_query_1 = require("./kpi-metric-value-query");
|
|
6
|
+
const kpi_metric_value_mutation_1 = require("./kpi-metric-value-mutation");
|
|
7
|
+
exports.entities = [kpi_metric_value_1.KpiMetricValue];
|
|
8
|
+
exports.resolvers = [kpi_metric_value_query_1.KpiMetricValueQuery, kpi_metric_value_mutation_1.KpiMetricValueMutation];
|
|
9
|
+
exports.subscribers = [];
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../server/service/kpi-metric-value/index.ts"],"names":[],"mappings":";;;AAAA,yDAAmD;AACnD,qEAA8D;AAC9D,2EAAoE;AAEvD,QAAA,QAAQ,GAAG,CAAC,iCAAc,CAAC,CAAA;AAC3B,QAAA,SAAS,GAAG,CAAC,4CAAmB,EAAE,kDAAsB,CAAC,CAAA;AACzD,QAAA,WAAW,GAAG,EAAE,CAAA","sourcesContent":["import { KpiMetricValue } from './kpi-metric-value'\nimport { KpiMetricValueQuery } from './kpi-metric-value-query'\nimport { KpiMetricValueMutation } from './kpi-metric-value-mutation'\n\nexport const entities = [KpiMetricValue]\nexport const resolvers = [KpiMetricValueQuery, KpiMetricValueMutation]\nexport const subscribers = []\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { KpiMetricValue } from './kpi-metric-value';
|
|
2
|
+
import { NewKpiMetricValue, KpiMetricValuePatch } from './kpi-metric-value-type';
|
|
3
|
+
export declare class KpiMetricValueMutation {
|
|
4
|
+
createKpiMetricValue(metricValue: NewKpiMetricValue, context: ResolverContext): Promise<KpiMetricValue>;
|
|
5
|
+
recordKpiMetricValue(metricName: string, value: number | null, meta: any, org: string | null, context: ResolverContext): Promise<KpiMetricValue>;
|
|
6
|
+
updateKpiMetricValue(id: string, patch: KpiMetricValuePatch, context: ResolverContext): Promise<KpiMetricValue>;
|
|
7
|
+
updateMultipleKpiMetricValue(patches: KpiMetricValuePatch[], context: ResolverContext): Promise<KpiMetricValue[]>;
|
|
8
|
+
deleteKpiMetricValue(id: string, context: ResolverContext): Promise<boolean>;
|
|
9
|
+
deleteKpiMetricValues(ids: string[], context: ResolverContext): Promise<boolean>;
|
|
10
|
+
importKpiMetricValues(metricValues: KpiMetricValuePatch[], context: ResolverContext): Promise<boolean>;
|
|
11
|
+
}
|