@nice2dev/ui-tools 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.md +36 -0
  2. package/dist/access-control.d.ts +726 -0
  3. package/dist/access-control.d.ts.map +1 -0
  4. package/dist/accessibility-i18n.d.ts +1017 -0
  5. package/dist/accessibility-i18n.d.ts.map +1 -0
  6. package/dist/ai-assistant.d.ts +263 -0
  7. package/dist/ai-assistant.d.ts.map +1 -0
  8. package/dist/ai-playgrounds.d.ts +842 -0
  9. package/dist/ai-playgrounds.d.ts.map +1 -0
  10. package/dist/alerting-incidents.d.ts +558 -0
  11. package/dist/alerting-incidents.d.ts.map +1 -0
  12. package/dist/api-designer.d.ts +1568 -0
  13. package/dist/api-designer.d.ts.map +1 -0
  14. package/dist/api-testing.d.ts +1146 -0
  15. package/dist/api-testing.d.ts.map +1 -0
  16. package/dist/apm-profiling.d.ts +656 -0
  17. package/dist/apm-profiling.d.ts.map +1 -0
  18. package/dist/artifacts.d.ts +421 -0
  19. package/dist/artifacts.d.ts.map +1 -0
  20. package/dist/audit-compliance.d.ts +752 -0
  21. package/dist/audit-compliance.d.ts.map +1 -0
  22. package/dist/certificates.d.ts +256 -0
  23. package/dist/certificates.d.ts.map +1 -0
  24. package/dist/chart-builder.d.ts +1404 -0
  25. package/dist/chart-builder.d.ts.map +1 -0
  26. package/dist/cloud-instances.d.ts +169 -0
  27. package/dist/cloud-instances.d.ts.map +1 -0
  28. package/dist/config-management.d.ts +350 -0
  29. package/dist/config-management.d.ts.map +1 -0
  30. package/dist/containers.d.ts +256 -0
  31. package/dist/containers.d.ts.map +1 -0
  32. package/dist/dashboard-designer.d.ts +1238 -0
  33. package/dist/dashboard-designer.d.ts.map +1 -0
  34. package/dist/data-management.d.ts +496 -0
  35. package/dist/data-management.d.ts.map +1 -0
  36. package/dist/data-pipeline.d.ts +1105 -0
  37. package/dist/data-pipeline.d.ts.map +1 -0
  38. package/dist/data-warehouse.d.ts +1097 -0
  39. package/dist/data-warehouse.d.ts.map +1 -0
  40. package/dist/dataset-management.d.ts +782 -0
  41. package/dist/dataset-management.d.ts.map +1 -0
  42. package/dist/db-adapters.d.ts +704 -0
  43. package/dist/db-adapters.d.ts.map +1 -0
  44. package/dist/db-admin.d.ts +699 -0
  45. package/dist/db-admin.d.ts.map +1 -0
  46. package/dist/db-designer.d.ts +366 -0
  47. package/dist/db-designer.d.ts.map +1 -0
  48. package/dist/debugger.d.ts +356 -0
  49. package/dist/debugger.d.ts.map +1 -0
  50. package/dist/device-management.d.ts +871 -0
  51. package/dist/device-management.d.ts.map +1 -0
  52. package/dist/distributed-tracing.d.ts +427 -0
  53. package/dist/distributed-tracing.d.ts.map +1 -0
  54. package/dist/dns-management.d.ts +215 -0
  55. package/dist/dns-management.d.ts.map +1 -0
  56. package/dist/download-manager.d.ts +271 -0
  57. package/dist/download-manager.d.ts.map +1 -0
  58. package/dist/download-torrent.d.ts +1062 -0
  59. package/dist/download-torrent.d.ts.map +1 -0
  60. package/dist/edge-computing.d.ts +720 -0
  61. package/dist/edge-computing.d.ts.map +1 -0
  62. package/dist/education.d.ts +1135 -0
  63. package/dist/education.d.ts.map +1 -0
  64. package/dist/email-template.d.ts +1141 -0
  65. package/dist/email-template.d.ts.map +1 -0
  66. package/dist/erp-enterprise.d.ts +1270 -0
  67. package/dist/erp-enterprise.d.ts.map +1 -0
  68. package/dist/form-builder.d.ts +1117 -0
  69. package/dist/form-builder.d.ts.map +1 -0
  70. package/dist/game-engine-advanced.d.ts +1049 -0
  71. package/dist/game-engine-advanced.d.ts.map +1 -0
  72. package/dist/git.d.ts +415 -0
  73. package/dist/git.d.ts.map +1 -0
  74. package/dist/hardware-integration.d.ts +966 -0
  75. package/dist/hardware-integration.d.ts.map +1 -0
  76. package/dist/iac.d.ts +318 -0
  77. package/dist/iac.d.ts.map +1 -0
  78. package/dist/icon-tools.d.ts +1023 -0
  79. package/dist/icon-tools.d.ts.map +1 -0
  80. package/dist/ide.d.ts +322 -0
  81. package/dist/ide.d.ts.map +1 -0
  82. package/dist/index.cjs +2 -0
  83. package/dist/index.cjs.map +1 -0
  84. package/dist/index.d.ts +176 -0
  85. package/dist/index.d.ts.map +1 -0
  86. package/dist/index.mjs +1887 -0
  87. package/dist/index.mjs.map +1 -0
  88. package/dist/integration-platform.d.ts +857 -0
  89. package/dist/integration-platform.d.ts.map +1 -0
  90. package/dist/kubernetes.d.ts +278 -0
  91. package/dist/kubernetes.d.ts.map +1 -0
  92. package/dist/life-management.d.ts +1132 -0
  93. package/dist/life-management.d.ts.map +1 -0
  94. package/dist/log-management.d.ts +473 -0
  95. package/dist/log-management.d.ts.map +1 -0
  96. package/dist/mathematics.d.ts +870 -0
  97. package/dist/mathematics.d.ts.map +1 -0
  98. package/dist/message-queue.d.ts +1006 -0
  99. package/dist/message-queue.d.ts.map +1 -0
  100. package/dist/metrics-dashboard.d.ts +596 -0
  101. package/dist/metrics-dashboard.d.ts.map +1 -0
  102. package/dist/mobile-components.d.ts +766 -0
  103. package/dist/mobile-components.d.ts.map +1 -0
  104. package/dist/model-deployment.d.ts +787 -0
  105. package/dist/model-deployment.d.ts.map +1 -0
  106. package/dist/model-registry.d.ts +740 -0
  107. package/dist/model-registry.d.ts.map +1 -0
  108. package/dist/model-training.d.ts +706 -0
  109. package/dist/model-training.d.ts.map +1 -0
  110. package/dist/network-config.d.ts +334 -0
  111. package/dist/network-config.d.ts.map +1 -0
  112. package/dist/network-monitoring.d.ts +291 -0
  113. package/dist/network-monitoring.d.ts.map +1 -0
  114. package/dist/pdf-tools.d.ts +1003 -0
  115. package/dist/pdf-tools.d.ts.map +1 -0
  116. package/dist/pipelines.d.ts +250 -0
  117. package/dist/pipelines.d.ts.map +1 -0
  118. package/dist/remote-desktop.d.ts +207 -0
  119. package/dist/remote-desktop.d.ts.map +1 -0
  120. package/dist/report-designer.d.ts +1153 -0
  121. package/dist/report-designer.d.ts.map +1 -0
  122. package/dist/scada-industrial.d.ts +848 -0
  123. package/dist/scada-industrial.d.ts.map +1 -0
  124. package/dist/scientific-research.d.ts +1149 -0
  125. package/dist/scientific-research.d.ts.map +1 -0
  126. package/dist/secret-management.d.ts +617 -0
  127. package/dist/secret-management.d.ts.map +1 -0
  128. package/dist/security-scanning.d.ts +714 -0
  129. package/dist/security-scanning.d.ts.map +1 -0
  130. package/dist/self-service-analytics.d.ts +1208 -0
  131. package/dist/self-service-analytics.d.ts.map +1 -0
  132. package/dist/sensor-dashboard.d.ts +845 -0
  133. package/dist/sensor-dashboard.d.ts.map +1 -0
  134. package/dist/server-management.d.ts +331 -0
  135. package/dist/server-management.d.ts.map +1 -0
  136. package/dist/smart-home.d.ts +861 -0
  137. package/dist/smart-home.d.ts.map +1 -0
  138. package/dist/spreadsheet.d.ts +1043 -0
  139. package/dist/spreadsheet.d.ts.map +1 -0
  140. package/dist/sql-editor.d.ts +402 -0
  141. package/dist/sql-editor.d.ts.map +1 -0
  142. package/dist/terminal.d.ts +245 -0
  143. package/dist/terminal.d.ts.map +1 -0
  144. package/dist/testing-qa.d.ts +1013 -0
  145. package/dist/testing-qa.d.ts.map +1 -0
  146. package/dist/torrent-client.d.ts +298 -0
  147. package/dist/torrent-client.d.ts.map +1 -0
  148. package/dist/traceless.d.ts +759 -0
  149. package/dist/traceless.d.ts.map +1 -0
  150. package/dist/virtual-machines.d.ts +199 -0
  151. package/dist/virtual-machines.d.ts.map +1 -0
  152. package/dist/visual-scripting.d.ts +381 -0
  153. package/dist/visual-scripting.d.ts.map +1 -0
  154. package/dist/word-processor.d.ts +1124 -0
  155. package/dist/word-processor.d.ts.map +1 -0
  156. package/dist/workspace.d.ts +333 -0
  157. package/dist/workspace.d.ts.map +1 -0
  158. package/package.json +62 -0
@@ -0,0 +1,845 @@
1
+ /**
2
+ * @file sensor-dashboard.ts
3
+ * @module @nice2dev/ui-tools
4
+ * @description PRO-16.2 — Sensor Dashboard
5
+ *
6
+ * Types for real-time sensor dashboard: sensor types, live gauges,
7
+ * historical charts, threshold alerts, geospatial view, calibration.
8
+ */
9
+ /** Sensor type */
10
+ export type SensorTypeId = 'temperature' | 'humidity' | 'pressure' | 'light' | 'motion' | 'proximity' | 'accelerometer' | 'gyroscope' | 'magnetometer' | 'gps' | 'co2' | 'voc' | 'pm25' | 'pm10' | 'noise' | 'vibration' | 'current' | 'voltage' | 'power' | 'energy' | 'flow' | 'level' | 'ph' | 'conductivity' | 'turbidity' | 'weight' | 'strain' | 'distance' | 'speed' | 'rpm' | 'custom';
11
+ /** Display mode */
12
+ export type DisplayMode = 'gauge' | 'value' | 'chart' | 'sparkline' | 'status' | 'map' | 'heatmap';
13
+ /** Alert status */
14
+ export type SensorAlertStatus = 'normal' | 'warning' | 'critical' | 'unknown' | 'disabled';
15
+ /** Time range preset */
16
+ export type TimeRangePreset = 'realtime' | 'last5m' | 'last15m' | 'last30m' | 'last1h' | 'last6h' | 'last12h' | 'last24h' | 'last7d' | 'last30d' | 'custom';
17
+ /** Sensor dashboard configuration */
18
+ export interface SensorDashboardConfig {
19
+ /** Data source */
20
+ dataSource?: SensorDataSource;
21
+ /** Theme */
22
+ theme?: SensorDashboardTheme;
23
+ /** Locale */
24
+ locale?: string;
25
+ /** Features */
26
+ features?: SensorDashboardFeatures;
27
+ /** Sensor types */
28
+ sensorTypes?: SensorTypeConfig[];
29
+ /** Widgets */
30
+ widgets?: WidgetConfig[];
31
+ /** Alerts */
32
+ alerts?: AlertConfig;
33
+ /** Map config */
34
+ map?: MapConfig;
35
+ /** Export config */
36
+ export?: ExportConfig;
37
+ }
38
+ /** Sensor data source */
39
+ export interface SensorDataSource {
40
+ type: 'iot' | 'timeseries' | 'mqtt' | 'websocket' | 'rest';
41
+ endpoint?: string;
42
+ credentials?: DataSourceCredentials;
43
+ options?: Record<string, unknown>;
44
+ polling?: PollingConfig;
45
+ streaming?: StreamingConfig;
46
+ }
47
+ /** Data source credentials */
48
+ export interface DataSourceCredentials {
49
+ type: 'apiKey' | 'bearer' | 'basic' | 'oauth2';
50
+ apiKey?: string;
51
+ token?: string;
52
+ username?: string;
53
+ password?: string;
54
+ clientId?: string;
55
+ clientSecret?: string;
56
+ }
57
+ /** Polling config */
58
+ export interface PollingConfig {
59
+ enabled: boolean;
60
+ interval: number;
61
+ backoff?: boolean;
62
+ maxInterval?: number;
63
+ }
64
+ /** Streaming config */
65
+ export interface StreamingConfig {
66
+ enabled: boolean;
67
+ protocol: 'websocket' | 'sse' | 'mqtt';
68
+ reconnect?: boolean;
69
+ reconnectInterval?: number;
70
+ maxRetries?: number;
71
+ }
72
+ /** Sensor dashboard theme */
73
+ export interface SensorDashboardTheme {
74
+ name?: string;
75
+ background?: string;
76
+ surface?: string;
77
+ primary?: string;
78
+ secondary?: string;
79
+ gaugeColors?: GaugeColorScheme;
80
+ chartColors?: string[];
81
+ alertColors?: AlertColorScheme;
82
+ }
83
+ /** Gauge color scheme */
84
+ export interface GaugeColorScheme {
85
+ normal?: string;
86
+ warning?: string;
87
+ critical?: string;
88
+ background?: string;
89
+ needle?: string;
90
+ text?: string;
91
+ }
92
+ /** Alert color scheme */
93
+ export interface AlertColorScheme {
94
+ normal?: string;
95
+ warning?: string;
96
+ critical?: string;
97
+ unknown?: string;
98
+ }
99
+ /** Sensor dashboard features */
100
+ export interface SensorDashboardFeatures {
101
+ realtime?: boolean;
102
+ historical?: boolean;
103
+ alerts?: boolean;
104
+ map?: boolean;
105
+ calibration?: boolean;
106
+ export?: boolean;
107
+ annotations?: boolean;
108
+ comparison?: boolean;
109
+ anomalyDetection?: boolean;
110
+ forecasting?: boolean;
111
+ }
112
+ /** Sensor type configuration */
113
+ export interface SensorTypeConfig {
114
+ id: SensorTypeId;
115
+ name: string;
116
+ icon?: string;
117
+ color?: string;
118
+ unit: string;
119
+ unitSymbol?: string;
120
+ precision?: number;
121
+ min?: number;
122
+ max?: number;
123
+ defaultThresholds?: SensorThresholds;
124
+ calibration?: CalibrationConfig;
125
+ display?: DisplayConfig;
126
+ }
127
+ /** Sensor thresholds */
128
+ export interface SensorThresholds {
129
+ warningLow?: number;
130
+ warningHigh?: number;
131
+ criticalLow?: number;
132
+ criticalHigh?: number;
133
+ }
134
+ /** Calibration config */
135
+ export interface CalibrationConfig {
136
+ enabled?: boolean;
137
+ offset?: number;
138
+ scale?: number;
139
+ formula?: string;
140
+ points?: CalibrationPoint[];
141
+ }
142
+ /** Calibration point */
143
+ export interface CalibrationPoint {
144
+ raw: number;
145
+ calibrated: number;
146
+ }
147
+ /** Display config */
148
+ export interface DisplayConfig {
149
+ mode?: DisplayMode;
150
+ gauge?: GaugeConfig;
151
+ chart?: ChartConfig;
152
+ format?: ValueFormatConfig;
153
+ }
154
+ /** Gauge config */
155
+ export interface GaugeConfig {
156
+ type?: 'radial' | 'linear' | 'arc' | 'thermometer';
157
+ min?: number;
158
+ max?: number;
159
+ segments?: GaugeSegment[];
160
+ showValue?: boolean;
161
+ showMinMax?: boolean;
162
+ animated?: boolean;
163
+ size?: 'small' | 'medium' | 'large';
164
+ }
165
+ /** Gauge segment */
166
+ export interface GaugeSegment {
167
+ from: number;
168
+ to: number;
169
+ color: string;
170
+ label?: string;
171
+ }
172
+ /** Chart config */
173
+ export interface ChartConfig {
174
+ type?: 'line' | 'area' | 'bar' | 'scatter';
175
+ fill?: boolean;
176
+ smooth?: boolean;
177
+ showPoints?: boolean;
178
+ showGrid?: boolean;
179
+ showLegend?: boolean;
180
+ animation?: boolean;
181
+ }
182
+ /** Value format config */
183
+ export interface ValueFormatConfig {
184
+ decimals?: number;
185
+ prefix?: string;
186
+ suffix?: string;
187
+ locale?: string;
188
+ }
189
+ /** Widget config */
190
+ export interface WidgetConfig {
191
+ id: string;
192
+ type: WidgetType;
193
+ title?: string;
194
+ position: WidgetPosition;
195
+ size: WidgetSize;
196
+ sensors?: string[];
197
+ config?: WidgetTypeConfig;
198
+ }
199
+ /** Widget type */
200
+ export type WidgetType = 'gauge' | 'value' | 'chart' | 'sparkline' | 'table' | 'map' | 'heatmap' | 'status' | 'alert' | 'comparison';
201
+ /** Widget position */
202
+ export interface WidgetPosition {
203
+ x: number;
204
+ y: number;
205
+ }
206
+ /** Widget size */
207
+ export interface WidgetSize {
208
+ width: number;
209
+ height: number;
210
+ }
211
+ /** Widget type config */
212
+ export type WidgetTypeConfig = GaugeWidgetConfig | ValueWidgetConfig | ChartWidgetConfig | TableWidgetConfig | MapWidgetConfig | HeatmapWidgetConfig;
213
+ /** Gauge widget config */
214
+ export interface GaugeWidgetConfig {
215
+ type: 'gauge';
216
+ gauge: GaugeConfig;
217
+ showTrend?: boolean;
218
+ showAlertStatus?: boolean;
219
+ }
220
+ /** Value widget config */
221
+ export interface ValueWidgetConfig {
222
+ type: 'value';
223
+ format: ValueFormatConfig;
224
+ showChange?: boolean;
225
+ showSparkline?: boolean;
226
+ showTimestamp?: boolean;
227
+ }
228
+ /** Chart widget config */
229
+ export interface ChartWidgetConfig {
230
+ type: 'chart';
231
+ chart: ChartConfig;
232
+ timeRange?: TimeRangePreset;
233
+ aggregation?: AggregationType;
234
+ showAnnotations?: boolean;
235
+ showThresholds?: boolean;
236
+ }
237
+ /** Aggregation type */
238
+ export type AggregationType = 'raw' | 'avg' | 'min' | 'max' | 'sum' | 'count' | 'first' | 'last' | 'median' | 'p95' | 'p99';
239
+ /** Table widget config */
240
+ export interface TableWidgetConfig {
241
+ type: 'table';
242
+ columns: TableColumn[];
243
+ sortable?: boolean;
244
+ filterable?: boolean;
245
+ pageSize?: number;
246
+ }
247
+ /** Table column */
248
+ export interface TableColumn {
249
+ field: string;
250
+ header: string;
251
+ width?: number;
252
+ format?: ValueFormatConfig;
253
+ sortable?: boolean;
254
+ }
255
+ /** Map widget config */
256
+ export interface MapWidgetConfig {
257
+ type: 'map';
258
+ center?: MapCenter;
259
+ zoom?: number;
260
+ clustering?: boolean;
261
+ heatmap?: boolean;
262
+ geofences?: boolean;
263
+ }
264
+ /** Map center */
265
+ export interface MapCenter {
266
+ latitude: number;
267
+ longitude: number;
268
+ }
269
+ /** Heatmap widget config */
270
+ export interface HeatmapWidgetConfig {
271
+ type: 'heatmap';
272
+ xAxis: string;
273
+ yAxis: string;
274
+ colorScale: string[];
275
+ showLabels?: boolean;
276
+ }
277
+ /** Alert config */
278
+ export interface AlertConfig {
279
+ enabled?: boolean;
280
+ rules?: SensorAlertRule[];
281
+ notifications?: NotificationConfig;
282
+ acknowledgment?: AcknowledgmentConfig;
283
+ }
284
+ /** Sensor alert rule */
285
+ export interface SensorAlertRule {
286
+ id: string;
287
+ name: string;
288
+ enabled: boolean;
289
+ sensors?: string[];
290
+ sensorTypes?: SensorTypeId[];
291
+ condition: AlertCondition;
292
+ severity: 'warning' | 'critical';
293
+ message?: string;
294
+ cooldown?: number;
295
+ }
296
+ /** Alert condition */
297
+ export interface AlertCondition {
298
+ type: 'threshold' | 'change' | 'absence' | 'anomaly';
299
+ operator?: 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'neq';
300
+ value?: number;
301
+ duration?: number;
302
+ changePercent?: number;
303
+ absenceMinutes?: number;
304
+ }
305
+ /** Notification config */
306
+ export interface NotificationConfig {
307
+ inApp?: boolean;
308
+ email?: EmailNotificationConfig;
309
+ sms?: SMSNotificationConfig;
310
+ webhook?: WebhookNotificationConfig;
311
+ push?: PushNotificationConfig;
312
+ }
313
+ /** Email notification config */
314
+ export interface EmailNotificationConfig {
315
+ enabled: boolean;
316
+ recipients: string[];
317
+ template?: string;
318
+ }
319
+ /** SMS notification config */
320
+ export interface SMSNotificationConfig {
321
+ enabled: boolean;
322
+ recipients: string[];
323
+ provider?: string;
324
+ }
325
+ /** Webhook notification config */
326
+ export interface WebhookNotificationConfig {
327
+ enabled: boolean;
328
+ url: string;
329
+ method?: 'POST' | 'PUT';
330
+ headers?: Record<string, string>;
331
+ }
332
+ /** Push notification config */
333
+ export interface PushNotificationConfig {
334
+ enabled: boolean;
335
+ topics?: string[];
336
+ }
337
+ /** Acknowledgment config */
338
+ export interface AcknowledgmentConfig {
339
+ required?: boolean;
340
+ autoResolve?: boolean;
341
+ autoResolveMinutes?: number;
342
+ }
343
+ /** Map config */
344
+ export interface MapConfig {
345
+ provider: 'mapbox' | 'google' | 'leaflet' | 'azure';
346
+ apiKey?: string;
347
+ style?: string;
348
+ defaultCenter?: MapCenter;
349
+ defaultZoom?: number;
350
+ clustering?: ClusteringConfig;
351
+ geofences?: GeofenceConfig;
352
+ }
353
+ /** Clustering config */
354
+ export interface ClusteringConfig {
355
+ enabled: boolean;
356
+ minPoints?: number;
357
+ radius?: number;
358
+ showCount?: boolean;
359
+ }
360
+ /** Geofence config */
361
+ export interface GeofenceConfig {
362
+ enabled: boolean;
363
+ editable?: boolean;
364
+ fillColor?: string;
365
+ strokeColor?: string;
366
+ fillOpacity?: number;
367
+ }
368
+ /** Export config */
369
+ export interface ExportConfig {
370
+ formats?: ('csv' | 'json' | 'xlsx' | 'pdf')[];
371
+ maxRows?: number;
372
+ includeMetadata?: boolean;
373
+ }
374
+ /** Sensor */
375
+ export interface Sensor {
376
+ id: string;
377
+ name: string;
378
+ type: SensorTypeId;
379
+ deviceId: string;
380
+ deviceName?: string;
381
+ location?: SensorLocation;
382
+ status: SensorStatus;
383
+ currentValue?: SensorValue;
384
+ thresholds?: SensorThresholds;
385
+ calibration?: CalibrationConfig;
386
+ metadata?: SensorMetadata;
387
+ }
388
+ /** Sensor location */
389
+ export interface SensorLocation {
390
+ latitude?: number;
391
+ longitude?: number;
392
+ altitude?: number;
393
+ floor?: number;
394
+ room?: string;
395
+ zone?: string;
396
+ building?: string;
397
+ custom?: Record<string, string>;
398
+ }
399
+ /** Sensor status */
400
+ export interface SensorStatus {
401
+ online: boolean;
402
+ alertStatus: SensorAlertStatus;
403
+ lastSeen?: Date;
404
+ health?: SensorHealth;
405
+ battery?: number;
406
+ signal?: number;
407
+ }
408
+ /** Sensor health */
409
+ export interface SensorHealth {
410
+ overall: 'good' | 'degraded' | 'poor' | 'unknown';
411
+ issues?: HealthIssue[];
412
+ }
413
+ /** Health issue */
414
+ export interface HealthIssue {
415
+ type: 'calibration' | 'drift' | 'noise' | 'connectivity' | 'battery' | 'custom';
416
+ severity: 'warning' | 'critical';
417
+ message: string;
418
+ detected?: Date;
419
+ }
420
+ /** Sensor value */
421
+ export interface SensorValue {
422
+ value: number;
423
+ unit: string;
424
+ timestamp: Date;
425
+ quality?: ValueQuality;
426
+ raw?: number;
427
+ }
428
+ /** Value quality */
429
+ export type ValueQuality = 'good' | 'uncertain' | 'bad' | 'substituted';
430
+ /** Sensor metadata */
431
+ export interface SensorMetadata {
432
+ manufacturer?: string;
433
+ model?: string;
434
+ serialNumber?: string;
435
+ firmwareVersion?: string;
436
+ installDate?: Date;
437
+ lastCalibration?: Date;
438
+ nextCalibration?: Date;
439
+ tags?: Record<string, string>;
440
+ custom?: Record<string, unknown>;
441
+ }
442
+ /** Sensor reading */
443
+ export interface SensorReading {
444
+ sensorId: string;
445
+ value: number;
446
+ unit: string;
447
+ timestamp: Date;
448
+ quality?: ValueQuality;
449
+ raw?: number;
450
+ metadata?: ReadingMetadata;
451
+ }
452
+ /** Reading metadata */
453
+ export interface ReadingMetadata {
454
+ source?: 'device' | 'calculated' | 'interpolated' | 'manual';
455
+ confidence?: number;
456
+ annotations?: string[];
457
+ }
458
+ /** Historical query */
459
+ export interface HistoricalQuery {
460
+ sensorIds: string[];
461
+ startTime: Date;
462
+ endTime: Date;
463
+ aggregation?: AggregationType;
464
+ interval?: string;
465
+ fill?: FillStrategy;
466
+ limit?: number;
467
+ }
468
+ /** Fill strategy */
469
+ export type FillStrategy = 'none' | 'null' | 'previous' | 'linear' | 'zero';
470
+ /** Historical result */
471
+ export interface HistoricalResult {
472
+ sensorId: string;
473
+ sensorName?: string;
474
+ unit: string;
475
+ data: TimeSeriesPoint[];
476
+ statistics?: DataStatistics;
477
+ }
478
+ /** Time series point */
479
+ export interface TimeSeriesPoint {
480
+ timestamp: Date;
481
+ value: number | null;
482
+ quality?: ValueQuality;
483
+ min?: number;
484
+ max?: number;
485
+ count?: number;
486
+ }
487
+ /** Data statistics */
488
+ export interface DataStatistics {
489
+ count: number;
490
+ min: number;
491
+ max: number;
492
+ avg: number;
493
+ sum: number;
494
+ stddev?: number;
495
+ median?: number;
496
+ p95?: number;
497
+ p99?: number;
498
+ first?: number;
499
+ last?: number;
500
+ firstTime?: Date;
501
+ lastTime?: Date;
502
+ }
503
+ /** Sensor alert */
504
+ export interface SensorAlert {
505
+ id: string;
506
+ sensorId: string;
507
+ sensorName?: string;
508
+ ruleId?: string;
509
+ ruleName?: string;
510
+ severity: 'warning' | 'critical';
511
+ status: 'active' | 'acknowledged' | 'resolved';
512
+ message: string;
513
+ value?: number;
514
+ threshold?: number;
515
+ timestamp: Date;
516
+ acknowledgedAt?: Date;
517
+ acknowledgedBy?: string;
518
+ resolvedAt?: Date;
519
+ resolvedBy?: string;
520
+ notes?: string;
521
+ }
522
+ /** Alert summary */
523
+ export interface AlertSummary {
524
+ total: number;
525
+ active: number;
526
+ acknowledged: number;
527
+ resolved: number;
528
+ bySeverity: {
529
+ warning: number;
530
+ critical: number;
531
+ };
532
+ bySensor?: Record<string, number>;
533
+ byType?: Record<string, number>;
534
+ }
535
+ /** Aggregation query */
536
+ export interface AggregationQuery {
537
+ sensorIds?: string[];
538
+ sensorTypes?: SensorTypeId[];
539
+ groupBy?: GroupByField[];
540
+ aggregations: AggregationField[];
541
+ timeRange: TimeRange;
542
+ interval?: string;
543
+ filters?: AggregationFilter[];
544
+ }
545
+ /** Group by field */
546
+ export type GroupByField = 'sensor' | 'sensorType' | 'device' | 'location' | 'zone' | 'building' | 'time';
547
+ /** Aggregation field */
548
+ export interface AggregationField {
549
+ field: string;
550
+ aggregation: AggregationType;
551
+ alias?: string;
552
+ }
553
+ /** Time range */
554
+ export interface TimeRange {
555
+ start: Date;
556
+ end: Date;
557
+ }
558
+ /** Aggregation filter */
559
+ export interface AggregationFilter {
560
+ field: string;
561
+ operator: 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'in' | 'contains';
562
+ value: unknown;
563
+ }
564
+ /** Aggregation result */
565
+ export interface AggregationResult {
566
+ groups: AggregationGroup[];
567
+ metadata: AggregationMetadata;
568
+ }
569
+ /** Aggregation group */
570
+ export interface AggregationGroup {
571
+ keys: Record<string, string>;
572
+ values: Record<string, number>;
573
+ count: number;
574
+ }
575
+ /** Aggregation metadata */
576
+ export interface AggregationMetadata {
577
+ totalGroups: number;
578
+ totalRecords: number;
579
+ executionTime: number;
580
+ truncated?: boolean;
581
+ }
582
+ /** Anomaly detection config */
583
+ export interface AnomalyDetectionConfig {
584
+ method: 'zscore' | 'iqr' | 'isolation' | 'dbscan' | 'prophet' | 'custom';
585
+ sensitivity: number;
586
+ trainingPeriod?: string;
587
+ updateInterval?: string;
588
+ options?: Record<string, unknown>;
589
+ }
590
+ /** Anomaly */
591
+ export interface Anomaly {
592
+ id: string;
593
+ sensorId: string;
594
+ timestamp: Date;
595
+ value: number;
596
+ expectedValue?: number;
597
+ deviation?: number;
598
+ confidence: number;
599
+ type: 'spike' | 'dip' | 'trend' | 'level' | 'pattern';
600
+ severity: 'low' | 'medium' | 'high';
601
+ }
602
+ /** Forecast config */
603
+ export interface ForecastConfig {
604
+ method: 'arima' | 'prophet' | 'lstm' | 'holt-winters' | 'custom';
605
+ horizon: number;
606
+ interval: string;
607
+ confidenceLevel?: number;
608
+ seasonality?: SeasonalityConfig;
609
+ }
610
+ /** Seasonality config */
611
+ export interface SeasonalityConfig {
612
+ daily?: boolean;
613
+ weekly?: boolean;
614
+ yearly?: boolean;
615
+ custom?: number[];
616
+ }
617
+ /** Forecast result */
618
+ export interface ForecastResult {
619
+ sensorId: string;
620
+ predictions: ForecastPoint[];
621
+ confidence: number;
622
+ model: string;
623
+ trainingMetrics?: TrainingMetrics;
624
+ }
625
+ /** Forecast point */
626
+ export interface ForecastPoint {
627
+ timestamp: Date;
628
+ value: number;
629
+ lower: number;
630
+ upper: number;
631
+ }
632
+ /** Training metrics */
633
+ export interface TrainingMetrics {
634
+ mse?: number;
635
+ rmse?: number;
636
+ mae?: number;
637
+ mape?: number;
638
+ r2?: number;
639
+ }
640
+ /** Sensor map view */
641
+ export interface SensorMapView {
642
+ sensors: SensorMapMarker[];
643
+ geofences?: Geofence[];
644
+ heatmap?: HeatmapData;
645
+ clusters?: SensorCluster[];
646
+ }
647
+ /** Sensor map marker */
648
+ export interface SensorMapMarker {
649
+ sensorId: string;
650
+ name: string;
651
+ type: SensorTypeId;
652
+ latitude: number;
653
+ longitude: number;
654
+ value?: number;
655
+ unit?: string;
656
+ status: SensorAlertStatus;
657
+ icon?: string;
658
+ color?: string;
659
+ }
660
+ /** Geofence */
661
+ export interface Geofence {
662
+ id: string;
663
+ name: string;
664
+ type: 'circle' | 'polygon' | 'rectangle';
665
+ coordinates: GeofenceCoordinates;
666
+ sensors?: string[];
667
+ alertOnEnter?: boolean;
668
+ alertOnExit?: boolean;
669
+ style?: GeofenceStyle;
670
+ }
671
+ /** Geofence coordinates */
672
+ export type GeofenceCoordinates = CircleCoordinates | PolygonCoordinates | RectangleCoordinates;
673
+ /** Circle coordinates */
674
+ export interface CircleCoordinates {
675
+ type: 'circle';
676
+ center: {
677
+ latitude: number;
678
+ longitude: number;
679
+ };
680
+ radius: number;
681
+ }
682
+ /** Polygon coordinates */
683
+ export interface PolygonCoordinates {
684
+ type: 'polygon';
685
+ points: Array<{
686
+ latitude: number;
687
+ longitude: number;
688
+ }>;
689
+ }
690
+ /** Rectangle coordinates */
691
+ export interface RectangleCoordinates {
692
+ type: 'rectangle';
693
+ bounds: {
694
+ north: number;
695
+ south: number;
696
+ east: number;
697
+ west: number;
698
+ };
699
+ }
700
+ /** Geofence style */
701
+ export interface GeofenceStyle {
702
+ fillColor?: string;
703
+ fillOpacity?: number;
704
+ strokeColor?: string;
705
+ strokeWidth?: number;
706
+ }
707
+ /** Heatmap data */
708
+ export interface HeatmapData {
709
+ points: HeatmapPoint[];
710
+ min: number;
711
+ max: number;
712
+ radius?: number;
713
+ blur?: number;
714
+ gradient?: Record<number, string>;
715
+ }
716
+ /** Heatmap point */
717
+ export interface HeatmapPoint {
718
+ latitude: number;
719
+ longitude: number;
720
+ value: number;
721
+ }
722
+ /** Sensor cluster */
723
+ export interface SensorCluster {
724
+ id: string;
725
+ latitude: number;
726
+ longitude: number;
727
+ count: number;
728
+ sensors: string[];
729
+ bounds: ClusterBounds;
730
+ }
731
+ /** Cluster bounds */
732
+ export interface ClusterBounds {
733
+ north: number;
734
+ south: number;
735
+ east: number;
736
+ west: number;
737
+ }
738
+ /** Calibration record */
739
+ export interface CalibrationRecord {
740
+ id: string;
741
+ sensorId: string;
742
+ timestamp: Date;
743
+ performedBy?: string;
744
+ method: CalibrationType;
745
+ reference?: ReferenceStandard;
746
+ measurements: CalibrationMeasurement[];
747
+ result: CalibrationResult;
748
+ certificate?: CalibrationCertificate;
749
+ nextDue?: Date;
750
+ }
751
+ /** Calibration type */
752
+ export type CalibrationType = 'offset' | 'twoPoint' | 'multiPoint' | 'linearization' | 'factory';
753
+ /** Reference standard */
754
+ export interface ReferenceStandard {
755
+ name: string;
756
+ value: number;
757
+ unit: string;
758
+ accuracy: number;
759
+ certificateId?: string;
760
+ traceable?: boolean;
761
+ }
762
+ /** Calibration measurement */
763
+ export interface CalibrationMeasurement {
764
+ reference: number;
765
+ measured: number;
766
+ error?: number;
767
+ errorPercent?: number;
768
+ }
769
+ /** Calibration result */
770
+ export interface CalibrationResult {
771
+ passed: boolean;
772
+ offset?: number;
773
+ scale?: number;
774
+ coefficients?: number[];
775
+ maxError?: number;
776
+ avgError?: number;
777
+ uncertainty?: number;
778
+ }
779
+ /** Calibration certificate */
780
+ export interface CalibrationCertificate {
781
+ id: string;
782
+ issuer: string;
783
+ issuedDate: Date;
784
+ validUntil: Date;
785
+ documentUrl?: string;
786
+ }
787
+ /** Export request */
788
+ export interface ExportRequest {
789
+ sensorIds: string[];
790
+ timeRange: TimeRange;
791
+ format: 'csv' | 'json' | 'xlsx' | 'pdf';
792
+ aggregation?: AggregationType;
793
+ interval?: string;
794
+ includeMetadata?: boolean;
795
+ includeStatistics?: boolean;
796
+ filename?: string;
797
+ }
798
+ /** Export result */
799
+ export interface ExportResult {
800
+ id: string;
801
+ status: 'pending' | 'processing' | 'completed' | 'failed';
802
+ format: string;
803
+ size?: number;
804
+ url?: string;
805
+ expiresAt?: Date;
806
+ error?: string;
807
+ }
808
+ /** Report template */
809
+ export interface ReportTemplate {
810
+ id: string;
811
+ name: string;
812
+ description?: string;
813
+ type: ReportType;
814
+ sections: ReportSection[];
815
+ schedule?: ReportSchedule;
816
+ recipients?: string[];
817
+ }
818
+ /** Report type */
819
+ export type ReportType = 'summary' | 'detailed' | 'compliance' | 'trend' | 'comparison' | 'custom';
820
+ /** Report section */
821
+ export interface ReportSection {
822
+ id: string;
823
+ type: 'chart' | 'table' | 'statistics' | 'text' | 'image';
824
+ title?: string;
825
+ config: ReportSectionConfig;
826
+ }
827
+ /** Report section config */
828
+ export interface ReportSectionConfig {
829
+ sensors?: string[];
830
+ metrics?: string[];
831
+ aggregation?: AggregationType;
832
+ timeRange?: TimeRangePreset;
833
+ content?: string;
834
+ imageUrl?: string;
835
+ }
836
+ /** Report schedule */
837
+ export interface ReportSchedule {
838
+ frequency: 'daily' | 'weekly' | 'monthly' | 'custom';
839
+ time?: string;
840
+ dayOfWeek?: number;
841
+ dayOfMonth?: number;
842
+ cron?: string;
843
+ timezone?: string;
844
+ }
845
+ //# sourceMappingURL=sensor-dashboard.d.ts.map