@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,871 @@
1
+ /**
2
+ * @file device-management.ts
3
+ * @module @nice2dev/ui-tools
4
+ * @description PRO-16.1 — Device Management
5
+ *
6
+ * Types for IoT device management: device registry, provisioning,
7
+ * device twins, firmware updates, health monitoring, PKI.
8
+ */
9
+ /** Device status */
10
+ export type DeviceStatus = 'online' | 'offline' | 'connecting' | 'error' | 'maintenance' | 'provisioning' | 'decommissioned';
11
+ /** Device type */
12
+ export type DeviceType = 'sensor' | 'actuator' | 'gateway' | 'edge' | 'display' | 'controller' | 'camera' | 'meter' | 'tracker' | 'custom';
13
+ /** Connection protocol */
14
+ export type ConnectionProtocol = 'mqtt' | 'amqp' | 'http' | 'https' | 'coap' | 'lwm2m' | 'websocket' | 'modbus' | 'opcua' | 'bacnet' | 'zigbee' | 'zwave' | 'bluetooth' | 'lora' | 'nbiot' | 'custom';
15
+ /** Provisioning method */
16
+ export type ProvisioningMethod = 'manual' | 'symmetric' | 'x509' | 'tpm' | 'dps' | 'qrcode' | 'nfc' | 'zeroTouch';
17
+ /** Device registry configuration */
18
+ export interface DeviceRegistryConfig {
19
+ /** Hub connection */
20
+ hub?: IoTHubConnection;
21
+ /** Theme */
22
+ theme?: DeviceRegistryTheme;
23
+ /** Locale */
24
+ locale?: string;
25
+ /** Features */
26
+ features?: DeviceRegistryFeatures;
27
+ /** Device types */
28
+ deviceTypes?: DeviceTypeDefinition[];
29
+ /** Groups */
30
+ groups?: DeviceGroupDefinition[];
31
+ /** Tags */
32
+ tags?: DeviceTagDefinition[];
33
+ /** Provisioning config */
34
+ provisioning?: ProvisioningConfig;
35
+ /** Update config */
36
+ updates?: FirmwareUpdateConfig;
37
+ }
38
+ /** IoT Hub connection */
39
+ export interface IoTHubConnection {
40
+ type: 'azureIot' | 'awsIot' | 'gcpIot' | 'ibmWatson' | 'custom';
41
+ connectionString?: string;
42
+ endpoint?: string;
43
+ certificate?: string;
44
+ region?: string;
45
+ projectId?: string;
46
+ options?: Record<string, unknown>;
47
+ }
48
+ /** Device registry theme */
49
+ export interface DeviceRegistryTheme {
50
+ name?: string;
51
+ background?: string;
52
+ surface?: string;
53
+ primary?: string;
54
+ deviceIcons?: DeviceIconSet;
55
+ statusColors?: StatusColorSet;
56
+ }
57
+ /** Device icon set */
58
+ export interface DeviceIconSet {
59
+ sensor?: string;
60
+ actuator?: string;
61
+ gateway?: string;
62
+ edge?: string;
63
+ display?: string;
64
+ controller?: string;
65
+ camera?: string;
66
+ meter?: string;
67
+ tracker?: string;
68
+ custom?: string;
69
+ }
70
+ /** Status color set */
71
+ export interface StatusColorSet {
72
+ online?: string;
73
+ offline?: string;
74
+ connecting?: string;
75
+ error?: string;
76
+ maintenance?: string;
77
+ provisioning?: string;
78
+ decommissioned?: string;
79
+ }
80
+ /** Device registry features */
81
+ export interface DeviceRegistryFeatures {
82
+ provisioning?: boolean;
83
+ deviceTwin?: boolean;
84
+ commands?: boolean;
85
+ firmwareUpdate?: boolean;
86
+ health?: boolean;
87
+ location?: boolean;
88
+ certificates?: boolean;
89
+ bulkOperations?: boolean;
90
+ import?: boolean;
91
+ export?: boolean;
92
+ }
93
+ /** Device type definition */
94
+ export interface DeviceTypeDefinition {
95
+ id: string;
96
+ name: string;
97
+ description?: string;
98
+ icon?: string;
99
+ capabilities?: DeviceCapability[];
100
+ properties?: DevicePropertySchema[];
101
+ commands?: DeviceCommandDefinition[];
102
+ telemetry?: TelemetryDefinition[];
103
+ }
104
+ /** Device capability */
105
+ export type DeviceCapability = 'telemetry' | 'commands' | 'directMethods' | 'twinProperties' | 'cloudMessages' | 'fileUpload' | 'edgeModules' | 'offlineOperation';
106
+ /** Device property schema */
107
+ export interface DevicePropertySchema {
108
+ name: string;
109
+ displayName?: string;
110
+ type: PropertyType;
111
+ unit?: string;
112
+ writable?: boolean;
113
+ required?: boolean;
114
+ defaultValue?: unknown;
115
+ validation?: PropertyValidation;
116
+ semantic?: SemanticPropertyType;
117
+ }
118
+ /** Property type */
119
+ export type PropertyType = 'string' | 'number' | 'integer' | 'boolean' | 'date' | 'datetime' | 'duration' | 'enum' | 'object' | 'array' | 'geopoint' | 'vector';
120
+ /** Property validation */
121
+ export interface PropertyValidation {
122
+ min?: number;
123
+ max?: number;
124
+ minLength?: number;
125
+ maxLength?: number;
126
+ pattern?: string;
127
+ enum?: unknown[];
128
+ schema?: Record<string, unknown>;
129
+ }
130
+ /** Semantic property type */
131
+ export type SemanticPropertyType = 'temperature' | 'humidity' | 'pressure' | 'voltage' | 'current' | 'power' | 'energy' | 'speed' | 'acceleration' | 'distance' | 'weight' | 'volume' | 'flow' | 'level' | 'brightness' | 'color' | 'angle' | 'frequency' | 'latitude' | 'longitude' | 'altitude' | 'heading' | 'timestamp';
132
+ /** Device command definition */
133
+ export interface DeviceCommandDefinition {
134
+ name: string;
135
+ displayName?: string;
136
+ description?: string;
137
+ requestSchema?: CommandSchema;
138
+ responseSchema?: CommandSchema;
139
+ timeout?: number;
140
+ confirmation?: boolean;
141
+ }
142
+ /** Command schema */
143
+ export interface CommandSchema {
144
+ type: PropertyType;
145
+ properties?: DevicePropertySchema[];
146
+ required?: string[];
147
+ }
148
+ /** Telemetry definition */
149
+ export interface TelemetryDefinition {
150
+ name: string;
151
+ displayName?: string;
152
+ description?: string;
153
+ type: PropertyType;
154
+ unit?: string;
155
+ semantic?: SemanticPropertyType;
156
+ aggregations?: TelemetryAggregation[];
157
+ }
158
+ /** Telemetry aggregation */
159
+ export type TelemetryAggregation = 'avg' | 'min' | 'max' | 'sum' | 'count' | 'first' | 'last' | 'stddev';
160
+ /** Device group definition */
161
+ export interface DeviceGroupDefinition {
162
+ id: string;
163
+ name: string;
164
+ description?: string;
165
+ parent?: string;
166
+ filter?: DeviceFilter;
167
+ icon?: string;
168
+ color?: string;
169
+ }
170
+ /** Device filter */
171
+ export interface DeviceFilter {
172
+ conditions: FilterCondition[];
173
+ operator: 'and' | 'or';
174
+ }
175
+ /** Filter condition */
176
+ export interface FilterCondition {
177
+ field: string;
178
+ operator: FilterOperator;
179
+ value?: unknown;
180
+ values?: unknown[];
181
+ }
182
+ /** Filter operator */
183
+ export type FilterOperator = 'equals' | 'notEquals' | 'contains' | 'startsWith' | 'endsWith' | 'greaterThan' | 'lessThan' | 'in' | 'notIn' | 'exists' | 'notExists';
184
+ /** Device tag definition */
185
+ export interface DeviceTagDefinition {
186
+ key: string;
187
+ displayName?: string;
188
+ description?: string;
189
+ type?: 'string' | 'number' | 'boolean';
190
+ allowedValues?: unknown[];
191
+ required?: boolean;
192
+ }
193
+ /** Provisioning configuration */
194
+ export interface ProvisioningConfig {
195
+ methods?: ProvisioningMethod[];
196
+ defaultMethod?: ProvisioningMethod;
197
+ dps?: DPSConfig;
198
+ attestation?: AttestationConfig;
199
+ enrollment?: EnrollmentConfig;
200
+ }
201
+ /** Device Provisioning Service config */
202
+ export interface DPSConfig {
203
+ endpoint?: string;
204
+ idScope?: string;
205
+ globalEndpoint?: string;
206
+ }
207
+ /** Attestation config */
208
+ export interface AttestationConfig {
209
+ symmetric?: SymmetricKeyConfig;
210
+ x509?: X509Config;
211
+ tpm?: TPMConfig;
212
+ }
213
+ /** Symmetric key config */
214
+ export interface SymmetricKeyConfig {
215
+ primaryKey?: string;
216
+ secondaryKey?: string;
217
+ keyLength?: number;
218
+ }
219
+ /** X.509 config */
220
+ export interface X509Config {
221
+ rootCertificate?: string;
222
+ intermediateCertificates?: string[];
223
+ verification?: CertificateVerification;
224
+ }
225
+ /** Certificate verification */
226
+ export interface CertificateVerification {
227
+ revocationCheck?: boolean;
228
+ crlEndpoint?: string;
229
+ ocspEndpoint?: string;
230
+ }
231
+ /** TPM config */
232
+ export interface TPMConfig {
233
+ endorsementKey?: string;
234
+ storageRootKey?: string;
235
+ }
236
+ /** Enrollment config */
237
+ export interface EnrollmentConfig {
238
+ individual?: boolean;
239
+ group?: boolean;
240
+ autoApprove?: boolean;
241
+ tags?: Record<string, string>;
242
+ twins?: Record<string, unknown>;
243
+ }
244
+ /** Firmware update config */
245
+ export interface FirmwareUpdateConfig {
246
+ enabled?: boolean;
247
+ storage?: UpdateStorageConfig;
248
+ rollout?: RolloutConfig;
249
+ rollback?: RollbackConfig;
250
+ }
251
+ /** Update storage config */
252
+ export interface UpdateStorageConfig {
253
+ type: 'blob' | 's3' | 'gcs' | 'http';
254
+ endpoint?: string;
255
+ container?: string;
256
+ bucket?: string;
257
+ credentials?: string;
258
+ }
259
+ /** Rollout config */
260
+ export interface RolloutConfig {
261
+ strategy: 'all' | 'staged' | 'canary' | 'blueGreen';
262
+ stages?: RolloutStage[];
263
+ pauseOnFailure?: boolean;
264
+ failureThreshold?: number;
265
+ }
266
+ /** Rollout stage */
267
+ export interface RolloutStage {
268
+ name: string;
269
+ percentage: number;
270
+ filter?: DeviceFilter;
271
+ delay?: number;
272
+ }
273
+ /** Rollback config */
274
+ export interface RollbackConfig {
275
+ auto?: boolean;
276
+ failureThreshold?: number;
277
+ keepPrevious?: number;
278
+ }
279
+ /** Device */
280
+ export interface Device {
281
+ id: string;
282
+ displayName?: string;
283
+ type: DeviceType;
284
+ typeId?: string;
285
+ status: DeviceStatus;
286
+ connectionState: ConnectionState;
287
+ provisioning?: DeviceProvisioning;
288
+ twin?: DeviceTwin;
289
+ health?: DeviceHealth;
290
+ location?: DeviceLocation;
291
+ certificates?: DeviceCertificates;
292
+ metadata?: DeviceMetadata;
293
+ }
294
+ /** Connection state */
295
+ export interface ConnectionState {
296
+ connected: boolean;
297
+ connectedAt?: Date;
298
+ disconnectedAt?: Date;
299
+ protocol?: ConnectionProtocol;
300
+ ipAddress?: string;
301
+ port?: number;
302
+ sessionId?: string;
303
+ reconnectAttempts?: number;
304
+ }
305
+ /** Device provisioning */
306
+ export interface DeviceProvisioning {
307
+ status: ProvisioningStatus;
308
+ method: ProvisioningMethod;
309
+ registrationId?: string;
310
+ enrollmentGroupId?: string;
311
+ provisionedAt?: Date;
312
+ assignedHub?: string;
313
+ attestationType?: string;
314
+ }
315
+ /** Provisioning status */
316
+ export type ProvisioningStatus = 'unregistered' | 'pending' | 'assigned' | 'failed' | 'disabled';
317
+ /** Device twin */
318
+ export interface DeviceTwin {
319
+ desired: TwinProperties;
320
+ reported: TwinProperties;
321
+ tags?: Record<string, unknown>;
322
+ version?: number;
323
+ etag?: string;
324
+ lastUpdated?: Date;
325
+ }
326
+ /** Twin properties */
327
+ export interface TwinProperties {
328
+ [key: string]: unknown;
329
+ $metadata?: TwinMetadata;
330
+ $version?: number;
331
+ }
332
+ /** Twin metadata */
333
+ export interface TwinMetadata {
334
+ [key: string]: {
335
+ $lastUpdated?: string;
336
+ $lastUpdatedVersion?: number;
337
+ };
338
+ }
339
+ /** Device health */
340
+ export interface DeviceHealth {
341
+ overall: HealthStatus;
342
+ lastHeartbeat?: Date;
343
+ heartbeatInterval?: number;
344
+ battery?: BatteryStatus;
345
+ signal?: SignalStatus;
346
+ memory?: ResourceStatus;
347
+ storage?: ResourceStatus;
348
+ cpu?: ResourceStatus;
349
+ temperature?: TemperatureStatus;
350
+ diagnostics?: DeviceDiagnostics;
351
+ }
352
+ /** Health status */
353
+ export type HealthStatus = 'healthy' | 'degraded' | 'unhealthy' | 'unknown';
354
+ /** Battery status */
355
+ export interface BatteryStatus {
356
+ level: number;
357
+ charging?: boolean;
358
+ voltage?: number;
359
+ health?: number;
360
+ estimatedLife?: number;
361
+ }
362
+ /** Signal status */
363
+ export interface SignalStatus {
364
+ strength: number;
365
+ quality?: number;
366
+ type?: 'wifi' | 'cellular' | 'lora' | 'zigbee' | 'bluetooth';
367
+ network?: string;
368
+ }
369
+ /** Resource status */
370
+ export interface ResourceStatus {
371
+ used: number;
372
+ total: number;
373
+ percent: number;
374
+ unit?: string;
375
+ }
376
+ /** Temperature status */
377
+ export interface TemperatureStatus {
378
+ current: number;
379
+ min?: number;
380
+ max?: number;
381
+ warning?: number;
382
+ critical?: number;
383
+ unit?: 'celsius' | 'fahrenheit' | 'kelvin';
384
+ }
385
+ /** Device diagnostics */
386
+ export interface DeviceDiagnostics {
387
+ uptime?: number;
388
+ restarts?: number;
389
+ lastRestart?: Date;
390
+ restartReason?: string;
391
+ errors?: DeviceError[];
392
+ warnings?: DeviceWarning[];
393
+ }
394
+ /** Device error */
395
+ export interface DeviceError {
396
+ code: string;
397
+ message: string;
398
+ timestamp: Date;
399
+ severity: 'error' | 'critical';
400
+ component?: string;
401
+ stack?: string;
402
+ }
403
+ /** Device warning */
404
+ export interface DeviceWarning {
405
+ code: string;
406
+ message: string;
407
+ timestamp: Date;
408
+ component?: string;
409
+ }
410
+ /** Device location */
411
+ export interface DeviceLocation {
412
+ latitude: number;
413
+ longitude: number;
414
+ altitude?: number;
415
+ accuracy?: number;
416
+ source?: LocationSource;
417
+ timestamp?: Date;
418
+ address?: LocationAddress;
419
+ geofences?: GeofenceStatus[];
420
+ }
421
+ /** Location source */
422
+ export type LocationSource = 'gps' | 'wifi' | 'cell' | 'ip' | 'manual' | 'beacon';
423
+ /** Location address */
424
+ export interface LocationAddress {
425
+ street?: string;
426
+ city?: string;
427
+ state?: string;
428
+ country?: string;
429
+ postalCode?: string;
430
+ formatted?: string;
431
+ }
432
+ /** Geofence status */
433
+ export interface GeofenceStatus {
434
+ id: string;
435
+ name: string;
436
+ inside: boolean;
437
+ enteredAt?: Date;
438
+ exitedAt?: Date;
439
+ }
440
+ /** Device certificates */
441
+ export interface DeviceCertificates {
442
+ device?: DeviceCertificate;
443
+ ca?: CACertificate[];
444
+ expiringSoon?: boolean;
445
+ expirationWarningDays?: number;
446
+ }
447
+ /** Device certificate */
448
+ export interface DeviceCertificate {
449
+ thumbprint: string;
450
+ subject: string;
451
+ issuer: string;
452
+ serialNumber: string;
453
+ validFrom: Date;
454
+ validTo: Date;
455
+ algorithm?: string;
456
+ keySize?: number;
457
+ }
458
+ /** CA certificate */
459
+ export interface CACertificate {
460
+ thumbprint: string;
461
+ subject: string;
462
+ issuer: string;
463
+ validTo: Date;
464
+ }
465
+ /** Device metadata */
466
+ export interface DeviceMetadata {
467
+ created: Date;
468
+ createdBy?: string;
469
+ modified?: Date;
470
+ modifiedBy?: string;
471
+ manufacturer?: string;
472
+ model?: string;
473
+ serialNumber?: string;
474
+ hwVersion?: string;
475
+ swVersion?: string;
476
+ fwVersion?: string;
477
+ osVersion?: string;
478
+ tags?: Record<string, string>;
479
+ groups?: string[];
480
+ notes?: string;
481
+ }
482
+ /** Device command */
483
+ export interface DeviceCommand {
484
+ id: string;
485
+ deviceId: string;
486
+ name: string;
487
+ payload?: unknown;
488
+ status: CommandStatus;
489
+ requestedAt: Date;
490
+ requestedBy?: string;
491
+ executedAt?: Date;
492
+ completedAt?: Date;
493
+ response?: unknown;
494
+ error?: CommandError;
495
+ timeout?: number;
496
+ }
497
+ /** Command status */
498
+ export type CommandStatus = 'queued' | 'pending' | 'executing' | 'completed' | 'failed' | 'timeout' | 'cancelled';
499
+ /** Command error */
500
+ export interface CommandError {
501
+ code: string;
502
+ message: string;
503
+ details?: unknown;
504
+ }
505
+ /** Direct method request */
506
+ export interface DirectMethodRequest {
507
+ deviceId: string;
508
+ methodName: string;
509
+ payload?: unknown;
510
+ responseTimeout?: number;
511
+ connectionTimeout?: number;
512
+ }
513
+ /** Direct method response */
514
+ export interface DirectMethodResponse {
515
+ status: number;
516
+ payload?: unknown;
517
+ requestId?: string;
518
+ }
519
+ /** Cloud-to-device message */
520
+ export interface CloudToDeviceMessage {
521
+ id: string;
522
+ deviceId: string;
523
+ body: string | Uint8Array;
524
+ properties?: Record<string, string>;
525
+ correlationId?: string;
526
+ messageId?: string;
527
+ contentType?: string;
528
+ contentEncoding?: string;
529
+ expiryTimeUtc?: Date;
530
+ ack?: MessageAck;
531
+ status?: MessageStatus;
532
+ enqueuedTime?: Date;
533
+ deliveredTime?: Date;
534
+ }
535
+ /** Message acknowledgment */
536
+ export type MessageAck = 'none' | 'positive' | 'negative' | 'full';
537
+ /** Message status */
538
+ export type MessageStatus = 'enqueued' | 'delivered' | 'completed' | 'abandoned' | 'rejected' | 'expired';
539
+ /** Firmware */
540
+ export interface Firmware {
541
+ id: string;
542
+ name: string;
543
+ version: string;
544
+ description?: string;
545
+ deviceType?: string;
546
+ size: number;
547
+ checksum: string;
548
+ checksumType: 'md5' | 'sha1' | 'sha256';
549
+ url?: string;
550
+ releaseNotes?: string;
551
+ releaseDate?: Date;
552
+ minHwVersion?: string;
553
+ maxHwVersion?: string;
554
+ dependencies?: FirmwareDependency[];
555
+ status: FirmwareStatus;
556
+ metadata?: FirmwareMetadata;
557
+ }
558
+ /** Firmware dependency */
559
+ export interface FirmwareDependency {
560
+ name: string;
561
+ minVersion?: string;
562
+ maxVersion?: string;
563
+ }
564
+ /** Firmware status */
565
+ export type FirmwareStatus = 'draft' | 'testing' | 'released' | 'deprecated' | 'recalled';
566
+ /** Firmware metadata */
567
+ export interface FirmwareMetadata {
568
+ created: Date;
569
+ createdBy?: string;
570
+ modified?: Date;
571
+ testedDevices?: number;
572
+ deployedDevices?: number;
573
+ successRate?: number;
574
+ }
575
+ /** Firmware update job */
576
+ export interface FirmwareUpdateJob {
577
+ id: string;
578
+ firmwareId: string;
579
+ name?: string;
580
+ target: UpdateTarget;
581
+ rollout: RolloutConfig;
582
+ status: UpdateJobStatus;
583
+ progress?: UpdateProgress;
584
+ created: Date;
585
+ createdBy?: string;
586
+ started?: Date;
587
+ completed?: Date;
588
+ error?: string;
589
+ }
590
+ /** Update target */
591
+ export interface UpdateTarget {
592
+ type: 'all' | 'group' | 'filter' | 'devices';
593
+ groupId?: string;
594
+ filter?: DeviceFilter;
595
+ deviceIds?: string[];
596
+ }
597
+ /** Update job status */
598
+ export type UpdateJobStatus = 'created' | 'scheduled' | 'inProgress' | 'paused' | 'completed' | 'failed' | 'cancelled' | 'rollingBack';
599
+ /** Update progress */
600
+ export interface UpdateProgress {
601
+ total: number;
602
+ pending: number;
603
+ downloading: number;
604
+ installing: number;
605
+ succeeded: number;
606
+ failed: number;
607
+ skipped: number;
608
+ currentStage?: string;
609
+ stageProgress?: number;
610
+ }
611
+ /** Device update status */
612
+ export interface DeviceUpdateStatus {
613
+ deviceId: string;
614
+ jobId: string;
615
+ status: DeviceUpdateState;
616
+ progress: number;
617
+ currentVersion?: string;
618
+ targetVersion?: string;
619
+ startedAt?: Date;
620
+ completedAt?: Date;
621
+ error?: string;
622
+ retryCount?: number;
623
+ }
624
+ /** Device update state */
625
+ export type DeviceUpdateState = 'pending' | 'downloading' | 'downloaded' | 'installing' | 'rebooting' | 'verifying' | 'succeeded' | 'failed' | 'rolledBack' | 'skipped';
626
+ /** Enrollment */
627
+ export interface Enrollment {
628
+ id: string;
629
+ type: 'individual' | 'group';
630
+ registrationId?: string;
631
+ groupName?: string;
632
+ attestation: EnrollmentAttestation;
633
+ status: EnrollmentStatus;
634
+ devices?: string[];
635
+ initialTwin?: DeviceTwin;
636
+ iotHubs?: string[];
637
+ allocationPolicy?: AllocationPolicy;
638
+ created: Date;
639
+ modified?: Date;
640
+ etag?: string;
641
+ }
642
+ /** Enrollment attestation */
643
+ export interface EnrollmentAttestation {
644
+ type: 'symmetricKey' | 'x509' | 'tpm';
645
+ symmetricKey?: SymmetricKeyAttestation;
646
+ x509?: X509Attestation;
647
+ tpm?: TPMAttestation;
648
+ }
649
+ /** Symmetric key attestation */
650
+ export interface SymmetricKeyAttestation {
651
+ primaryKey: string;
652
+ secondaryKey?: string;
653
+ }
654
+ /** X.509 attestation */
655
+ export interface X509Attestation {
656
+ clientCertificates?: X509Certificates;
657
+ signingCertificates?: X509Certificates;
658
+ caReferences?: CAReference[];
659
+ }
660
+ /** X.509 certificates */
661
+ export interface X509Certificates {
662
+ primary?: X509CertificateInfo;
663
+ secondary?: X509CertificateInfo;
664
+ }
665
+ /** X.509 certificate info */
666
+ export interface X509CertificateInfo {
667
+ certificate?: string;
668
+ thumbprint: string;
669
+ subject?: string;
670
+ notBefore?: Date;
671
+ notAfter?: Date;
672
+ }
673
+ /** CA reference */
674
+ export interface CAReference {
675
+ certificateName: string;
676
+ thumbprint: string;
677
+ }
678
+ /** TPM attestation */
679
+ export interface TPMAttestation {
680
+ endorsementKey: string;
681
+ storageRootKey?: string;
682
+ }
683
+ /** Enrollment status */
684
+ export type EnrollmentStatus = 'enabled' | 'disabled';
685
+ /** Allocation policy */
686
+ export type AllocationPolicy = 'hashed' | 'geoLatency' | 'static' | 'custom';
687
+ /** Registration state */
688
+ export interface RegistrationState {
689
+ registrationId: string;
690
+ status: RegistrationStatus;
691
+ deviceId?: string;
692
+ assignedHub?: string;
693
+ substatus?: RegistrationSubstatus;
694
+ errorCode?: number;
695
+ errorMessage?: string;
696
+ lastUpdated: Date;
697
+ etag?: string;
698
+ }
699
+ /** Registration status */
700
+ export type RegistrationStatus = 'unassigned' | 'assigning' | 'assigned' | 'failed' | 'disabled';
701
+ /** Registration substatus */
702
+ export type RegistrationSubstatus = 'initialAssignment' | 'deviceDataMigrated' | 'deviceDataReset';
703
+ /** Device group */
704
+ export interface DeviceGroup {
705
+ id: string;
706
+ name: string;
707
+ description?: string;
708
+ parent?: string;
709
+ path?: string;
710
+ filter?: DeviceFilter;
711
+ deviceCount?: number;
712
+ icon?: string;
713
+ color?: string;
714
+ metadata?: GroupMetadata;
715
+ }
716
+ /** Group metadata */
717
+ export interface GroupMetadata {
718
+ created: Date;
719
+ createdBy?: string;
720
+ modified?: Date;
721
+ modifiedBy?: string;
722
+ tags?: Record<string, string>;
723
+ }
724
+ /** Group statistics */
725
+ export interface GroupStatistics {
726
+ groupId: string;
727
+ totalDevices: number;
728
+ onlineDevices: number;
729
+ offlineDevices: number;
730
+ errorDevices: number;
731
+ healthyDevices: number;
732
+ unhealthyDevices: number;
733
+ updatedDevices?: number;
734
+ outdatedDevices?: number;
735
+ }
736
+ /** Device event */
737
+ export interface DeviceEvent {
738
+ id: string;
739
+ deviceId: string;
740
+ type: DeviceEventType;
741
+ timestamp: Date;
742
+ data?: unknown;
743
+ properties?: Record<string, string>;
744
+ correlationId?: string;
745
+ }
746
+ /** Device event type */
747
+ export type DeviceEventType = 'connected' | 'disconnected' | 'telemetry' | 'twinChange' | 'command' | 'error' | 'warning' | 'lifecycle' | 'update' | 'location' | 'alert';
748
+ /** Telemetry message */
749
+ export interface TelemetryMessage {
750
+ deviceId: string;
751
+ timestamp: Date;
752
+ enqueuedTime?: Date;
753
+ properties?: Record<string, string>;
754
+ systemProperties?: SystemProperties;
755
+ body: Record<string, unknown>;
756
+ }
757
+ /** System properties */
758
+ export interface SystemProperties {
759
+ contentType?: string;
760
+ contentEncoding?: string;
761
+ correlationId?: string;
762
+ messageId?: string;
763
+ userId?: string;
764
+ }
765
+ /** Telemetry query */
766
+ export interface TelemetryQuery {
767
+ deviceId?: string;
768
+ deviceIds?: string[];
769
+ groupId?: string;
770
+ metrics: string[];
771
+ startTime: Date;
772
+ endTime: Date;
773
+ interval?: string;
774
+ aggregation?: TelemetryAggregation;
775
+ filter?: string;
776
+ limit?: number;
777
+ }
778
+ /** Telemetry result */
779
+ export interface TelemetryResult {
780
+ deviceId: string;
781
+ metric: string;
782
+ timestamps: Date[];
783
+ values: number[];
784
+ aggregation?: TelemetryAggregation;
785
+ count?: number;
786
+ min?: number;
787
+ max?: number;
788
+ avg?: number;
789
+ sum?: number;
790
+ }
791
+ /** Device alert */
792
+ export interface DeviceAlert {
793
+ id: string;
794
+ deviceId: string;
795
+ ruleId?: string;
796
+ severity: AlertSeverity;
797
+ type: AlertType;
798
+ message: string;
799
+ timestamp: Date;
800
+ acknowledged?: boolean;
801
+ acknowledgedBy?: string;
802
+ acknowledgedAt?: Date;
803
+ resolved?: boolean;
804
+ resolvedAt?: Date;
805
+ data?: Record<string, unknown>;
806
+ }
807
+ /** Alert severity */
808
+ export type AlertSeverity = 'info' | 'warning' | 'error' | 'critical';
809
+ /** Alert type */
810
+ export type AlertType = 'connectivity' | 'threshold' | 'anomaly' | 'health' | 'security' | 'update' | 'custom';
811
+ /** Alert rule */
812
+ export interface AlertRule {
813
+ id: string;
814
+ name: string;
815
+ description?: string;
816
+ enabled: boolean;
817
+ target: AlertTarget;
818
+ condition: AlertCondition;
819
+ severity: AlertSeverity;
820
+ actions: AlertAction[];
821
+ cooldown?: number;
822
+ metadata?: RuleMetadata;
823
+ }
824
+ /** Alert target */
825
+ export interface AlertTarget {
826
+ type: 'all' | 'group' | 'device' | 'filter';
827
+ groupId?: string;
828
+ deviceId?: string;
829
+ filter?: DeviceFilter;
830
+ }
831
+ /** Alert condition */
832
+ export interface AlertCondition {
833
+ type: ConditionTypes;
834
+ metric?: string;
835
+ operator?: ComparisonOperator;
836
+ threshold?: number;
837
+ duration?: number;
838
+ evaluationPeriod?: number;
839
+ aggregation?: TelemetryAggregation;
840
+ }
841
+ /** Condition types */
842
+ export type ConditionTypes = 'threshold' | 'change' | 'absence' | 'anomaly' | 'connectivity' | 'expression';
843
+ /** Comparison operator */
844
+ export type ComparisonOperator = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'neq';
845
+ /** Alert action */
846
+ export interface AlertAction {
847
+ type: ActionType;
848
+ config: ActionConfig;
849
+ }
850
+ /** Action type */
851
+ export type ActionType = 'email' | 'sms' | 'webhook' | 'teams' | 'slack' | 'pagerduty' | 'command' | 'function';
852
+ /** Action config */
853
+ export interface ActionConfig {
854
+ recipients?: string[];
855
+ url?: string;
856
+ channel?: string;
857
+ message?: string;
858
+ template?: string;
859
+ command?: string;
860
+ payload?: unknown;
861
+ }
862
+ /** Rule metadata */
863
+ export interface RuleMetadata {
864
+ created: Date;
865
+ createdBy?: string;
866
+ modified?: Date;
867
+ modifiedBy?: string;
868
+ triggerCount?: number;
869
+ lastTriggered?: Date;
870
+ }
871
+ //# sourceMappingURL=device-management.d.ts.map