@kosdev-code/kos-ui-sdk 2.0.41 → 2.1.1

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 (177) hide show
  1. package/core/core/decorators/index.d.ts +4 -0
  2. package/core/core/decorators/index.d.ts.map +1 -1
  3. package/core/core/decorators/kos-companion.d.ts +125 -8
  4. package/core/core/decorators/kos-companion.d.ts.map +1 -1
  5. package/core/core/decorators/kos-container-aware.d.ts +465 -0
  6. package/core/core/decorators/kos-container-aware.d.ts.map +1 -0
  7. package/core/core/decorators/kos-future-aware.d.ts +150 -0
  8. package/core/core/decorators/kos-future-aware.d.ts.map +1 -0
  9. package/core/core/decorators/kos-logger-aware.d.ts +96 -0
  10. package/core/core/decorators/kos-logger-aware.d.ts.map +1 -0
  11. package/core/core/decorators/kos-trouble-aware.d.ts +71 -0
  12. package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -0
  13. package/core/core/decorators/kosModel.d.ts +8 -2
  14. package/core/core/decorators/kosModel.d.ts.map +1 -1
  15. package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
  16. package/core/core/decorators/propKeys.d.ts +4 -0
  17. package/core/core/decorators/propKeys.d.ts.map +1 -1
  18. package/core/core/extension/extension-manager.d.ts +1 -1
  19. package/core/core/extension/extension-manager.d.ts.map +1 -1
  20. package/core/core/kosCore.d.ts.map +1 -1
  21. package/core/core/registration/index.d.ts +1 -0
  22. package/core/core/registration/index.d.ts.map +1 -1
  23. package/core/index.d.ts +1 -1
  24. package/core/index.d.ts.map +1 -1
  25. package/core/util/container-utils.d.ts +3 -2
  26. package/core/util/container-utils.d.ts.map +1 -1
  27. package/core/util/observable-proxy-map.d.ts.map +1 -1
  28. package/index.cjs +79 -76
  29. package/index.cjs.map +1 -1
  30. package/index.d.cts +1 -0
  31. package/index.d.ts +1 -0
  32. package/index.d.ts.map +1 -1
  33. package/index.js +9672 -7760
  34. package/index.js.map +1 -1
  35. package/models/models/browser-router/browser-router-model.d.ts +80 -1
  36. package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
  37. package/models/models/browser-router/types/index.d.ts +25 -1
  38. package/models/models/config-bean/config-bean-model-builder.d.ts +4 -2
  39. package/models/models/config-bean/config-bean-model-builder.d.ts.map +1 -1
  40. package/models/models/config-bean/config-bean-model.d.ts +117 -13
  41. package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
  42. package/models/models/config-bean/config-bean-types.d.ts +6 -3
  43. package/models/models/config-bean/config-bean-types.d.ts.map +1 -1
  44. package/models/models/config-bean/types/index.d.ts +33 -0
  45. package/models/models/config-bean-prop/config-bean-prop-model.d.ts +112 -1
  46. package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
  47. package/models/models/config-bean-prop/types/index.d.ts +293 -17
  48. package/models/models/device/device-model.d.ts +219 -9
  49. package/models/models/device/device-model.d.ts.map +1 -1
  50. package/models/models/device/device-registration.d.ts +61 -48
  51. package/models/models/device/device-registration.d.ts.map +1 -1
  52. package/models/models/device/types/index.d.ts +41 -0
  53. package/models/models/future/future-aware.d.ts +82 -0
  54. package/models/models/future/future-aware.d.ts.map +1 -1
  55. package/models/models/future/future-model.d.ts +34 -5
  56. package/models/models/future/future-model.d.ts.map +1 -1
  57. package/models/models/future/future-types.d.ts +186 -7
  58. package/models/models/future/future-types.d.ts.map +1 -1
  59. package/models/models/future-container/future-container-model.d.ts +2 -2
  60. package/models/models/index.d.ts +1 -0
  61. package/models/models/index.d.ts.map +1 -1
  62. package/models/models/key-value/index.d.ts +4 -0
  63. package/models/models/key-value/index.d.ts.map +1 -1
  64. package/models/models/key-value/key-value-model.d.ts +111 -0
  65. package/models/models/key-value/key-value-model.d.ts.map +1 -1
  66. package/models/models/key-value/services/key-value-services.d.ts +124 -2
  67. package/models/models/key-value/services/key-value-services.d.ts.map +1 -1
  68. package/models/models/key-value/types/index.d.ts +56 -0
  69. package/models/models/kos-expression-evaluator/index.d.ts +4 -0
  70. package/models/models/kos-expression-evaluator/index.d.ts.map +1 -0
  71. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts +209 -0
  72. package/models/models/kos-expression-evaluator/kos-expression-evaluator-model.d.ts.map +1 -0
  73. package/models/models/kos-expression-evaluator/services/index.d.ts +6 -0
  74. package/models/models/kos-expression-evaluator/services/index.d.ts.map +1 -0
  75. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts +15 -0
  76. package/models/models/kos-expression-evaluator/services/kos-expression-evaluator-services.d.ts.map +1 -0
  77. package/models/models/kos-expression-evaluator/types/index.d.ts +1 -0
  78. package/models/models/kos-log-manager/kos-log-manager-model.d.ts +61 -14
  79. package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -1
  80. package/models/models/kos-log-manager/types/index.d.ts +187 -0
  81. package/models/models/kos-time/kos-time-model.d.ts +64 -0
  82. package/models/models/kos-time/kos-time-model.d.ts.map +1 -1
  83. package/models/models/kos-time/types/index.d.ts +80 -0
  84. package/models/models/log-block/log-block-container-model.d.ts +132 -0
  85. package/models/models/log-block/log-block-container-model.d.ts.map +1 -1
  86. package/models/models/log-block/log-block-model.d.ts +185 -0
  87. package/models/models/log-block/log-block-model.d.ts.map +1 -1
  88. package/models/models/log-block/types/index.d.ts +129 -0
  89. package/models/models/log-stream/index.d.ts +6 -2
  90. package/models/models/log-stream/index.d.ts.map +1 -1
  91. package/models/models/log-stream/log-stream-container-model.d.ts +62 -0
  92. package/models/models/log-stream/log-stream-container-model.d.ts.map +1 -1
  93. package/models/models/log-stream/log-stream-model.d.ts +55 -0
  94. package/models/models/log-stream/log-stream-model.d.ts.map +1 -1
  95. package/models/models/log-stream/services/log-stream-services.d.ts +2 -1
  96. package/models/models/log-stream/services/log-stream-services.d.ts.map +1 -1
  97. package/models/models/log-stream/types/index.d.ts +77 -0
  98. package/models/models/network-interface/index.d.ts +6 -2
  99. package/models/models/network-interface/index.d.ts.map +1 -1
  100. package/models/models/network-interface/network-interface-container-model.d.ts +62 -0
  101. package/models/models/network-interface/network-interface-container-model.d.ts.map +1 -1
  102. package/models/models/network-interface/network-interface-container-registration.d.ts +2 -1
  103. package/models/models/network-interface/network-interface-container-registration.d.ts.map +1 -1
  104. package/models/models/network-interface/network-interface-model.d.ts +77 -0
  105. package/models/models/network-interface/network-interface-model.d.ts.map +1 -1
  106. package/models/models/network-interface/network-interface-registration.d.ts +2 -1
  107. package/models/models/network-interface/network-interface-registration.d.ts.map +1 -1
  108. package/models/models/network-interface/services/network-interface-services.d.ts +54 -0
  109. package/models/models/network-interface/services/network-interface-services.d.ts.map +1 -1
  110. package/models/models/network-interface/types/index.d.ts +21 -0
  111. package/models/models/ota/ota-model.d.ts +82 -3
  112. package/models/models/ota/ota-model.d.ts.map +1 -1
  113. package/models/models/ota/types/index.d.ts +146 -0
  114. package/models/models/region-info/region-info-model.d.ts +7 -3
  115. package/models/models/region-info/region-info-model.d.ts.map +1 -1
  116. package/models/models/region-info/services/region-info-services.d.ts.map +1 -1
  117. package/models/models/region-info/types/index.d.ts +141 -13
  118. package/models/models/region-info/types/index.d.ts.map +1 -1
  119. package/models/models/software-info/software-info-model.d.ts +74 -2
  120. package/models/models/software-info/software-info-model.d.ts.map +1 -1
  121. package/models/models/software-info/types/index.d.ts +48 -16
  122. package/models/models/state-bean/state-bean-model.d.ts +86 -9
  123. package/models/models/state-bean/state-bean-model.d.ts.map +1 -1
  124. package/models/models/state-bean/types/index.d.ts +114 -6
  125. package/models/models/state-prop/state-prop-model.d.ts +78 -1
  126. package/models/models/state-prop/state-prop-model.d.ts.map +1 -1
  127. package/models/models/state-prop/types/index.d.ts +55 -7
  128. package/models/models/storage-device/storage-device-container-model.d.ts +289 -2
  129. package/models/models/storage-device/storage-device-container-model.d.ts.map +1 -1
  130. package/models/models/storage-device/storage-device-model.d.ts +84 -2
  131. package/models/models/storage-device/storage-device-model.d.ts.map +1 -1
  132. package/models/models/storage-device/types/index.d.ts +112 -0
  133. package/models/models/studio-properties/studio-properties-model.d.ts +75 -0
  134. package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
  135. package/models/models/studio-properties/types/index.d.ts +29 -0
  136. package/models/models/translation/services/translation-services.d.ts +128 -2
  137. package/models/models/translation/services/translation-services.d.ts.map +1 -1
  138. package/models/models/translation/translation-container-model.d.ts +100 -10
  139. package/models/models/translation/translation-container-model.d.ts.map +1 -1
  140. package/models/models/translation/translation-container-registration.d.ts +2 -1
  141. package/models/models/translation/translation-container-registration.d.ts.map +1 -1
  142. package/models/models/translation/translation-context.d.ts +1 -16
  143. package/models/models/translation/translation-context.d.ts.map +1 -1
  144. package/models/models/translation/translation-model.d.ts +113 -1
  145. package/models/models/translation/translation-model.d.ts.map +1 -1
  146. package/models/models/translation/types/index.d.ts +340 -0
  147. package/models/models/trouble/services/trouble-services.d.ts +3 -3
  148. package/models/models/trouble/services/trouble-services.d.ts.map +1 -1
  149. package/models/models/trouble/trouble-model.d.ts +2 -1
  150. package/models/models/trouble/trouble-model.d.ts.map +1 -1
  151. package/models/models/trouble/types/index.d.ts +22 -93
  152. package/models/models/trouble/utils/is-trouble-aware.d.ts +2 -2
  153. package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -1
  154. package/models/models/trouble-container/index.d.ts +4 -3
  155. package/models/models/trouble-container/index.d.ts.map +1 -1
  156. package/models/models/trouble-container/trouble-container-model.d.ts +9 -5
  157. package/models/models/trouble-container/trouble-container-model.d.ts.map +1 -1
  158. package/models/models/trouble-container/types/index.d.ts +2 -15
  159. package/models/utils/client.d.ts +8 -8
  160. package/models/utils/core-registration-manager.d.ts +1 -1
  161. package/models/utils/core-registration-manager.d.ts.map +1 -1
  162. package/models/utils/index.d.ts +0 -2
  163. package/models/utils/index.d.ts.map +1 -1
  164. package/models/utils/service.d.ts +9 -9
  165. package/package.json +2 -2
  166. package/ui/contexts/state-bean/state-bean-provider.d.ts.map +1 -1
  167. package/ui/hooks/state-bean/use-state-bean.d.ts +2 -2
  168. package/ui/hooks/state-bean/use-state-bean.d.ts.map +1 -1
  169. package/ui/hooks/state-bean/with-state-bean.d.ts.map +1 -1
  170. package/ui/hooks/translation-container/use-translation-container.d.ts +4 -33
  171. package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
  172. package/models/models/trouble-container/trouble-container-registration.d.ts +0 -5
  173. package/models/models/trouble-container/trouble-container-registration.d.ts.map +0 -1
  174. package/models/utils/kosmodel-compatible-future-mixin.d.ts +0 -142
  175. package/models/utils/kosmodel-compatible-future-mixin.d.ts.map +0 -1
  176. package/models/utils/kosmodel-interface-companion-mixin.d.ts +0 -83
  177. package/models/utils/kosmodel-interface-companion-mixin.d.ts.map +0 -1
@@ -2,26 +2,108 @@ import { StorageDeviceOptions } from './types';
2
2
  import { IKosDataModel, IKosIdentifiable, KosCreationContext, PublicModelInterface } from '../../../core';
3
3
 
4
4
  export declare const MODEL_TYPE = "storage-device-model";
5
+ /**
6
+ * StorageDevice - Manages individual USB/external storage device information and state.
7
+ *
8
+ * The StorageDevice model represents individual storage devices (USB drives, SD cards,
9
+ * external drives) connected to the KOS system. It tracks device hardware information,
10
+ * mount status, and provides access to device metadata including vendor, model, runtime
11
+ * statistics, and file system details.
12
+ *
13
+ * ## Key Features
14
+ * - **Hardware Information** - Vendor, model, and system path details
15
+ * - **Mount Management** - Track mount directory and removal status
16
+ * - **Runtime Statistics** - Device runtime and usage metrics
17
+ * - **Node Awareness** - Multi-node device distribution tracking
18
+ * - **File System Integration** - Label and mount point management
19
+ * - **Parent-Aware Architecture** - Designed for container model management
20
+ *
21
+ * ## Device Properties
22
+ * Storage devices expose comprehensive hardware and state information:
23
+ * - **Physical Details**: vendor, model, syspath for hardware identification
24
+ * - **Mount Information**: mountDir, label for file system access
25
+ * - **Status Tracking**: removed flag, local/remote node distribution
26
+ * - **Runtime Metrics**: runTimeMs for usage analytics
27
+ *
28
+ * ## Common Use Cases
29
+ * - **Storage Management UI** - Display available storage devices and capacity
30
+ * - **File Transfer Operations** - Access mount points for file operations
31
+ * - **System Monitoring** - Track device insertion/removal events
32
+ * - **Backup Management** - Identify backup destination devices
33
+ * - **Multi-node Systems** - Manage storage across distributed KOS nodes
34
+ * - **Device Diagnostics** - Runtime statistics and health monitoring
35
+ *
36
+ * @interface
37
+ * @example Basic Usage
38
+ * ```typescript
39
+ * const usbDrive = StorageDevice.instance('usb-drive-1')
40
+ * .options({
41
+ * mountDir: '/media/usb1',
42
+ * vendor: 'SanDisk',
43
+ * model: 'Ultra USB 3.0',
44
+ * label: 'BACKUP_DRIVE',
45
+ * nodeId: 'primary',
46
+ * local: true,
47
+ * removed: false,
48
+ * runTimeMs: 1800000,
49
+ * syspath: '/sys/devices/usb1'
50
+ * })
51
+ * .build();
52
+ *
53
+ * // Access device properties
54
+ * console.log(`${usbDrive.vendor} ${usbDrive.model} at ${usbDrive.mountDir}`);
55
+ * ```
56
+ *
57
+ * @group KOS Model
58
+ * @category Device Management
59
+ * @useDeclaredType
60
+ *
61
+ * @see {@link StorageDeviceOptions} - Configuration options for StorageDevice instances
62
+ * @see {@link StorageDeviceContainerModel} - Container for managing multiple storage devices
63
+ * @see {@link StorageDeviceResponse} - API response structure for device data
64
+ */
65
+ export type StorageDevice = PublicModelInterface<StorageDeviceModelImpl>;
5
66
  export type StorageDeviceModel = PublicModelInterface<StorageDeviceModelImpl>;
6
67
  /**
7
- * Storage Device Model
8
- * @category Model
68
+ * @ignore
69
+ * @internal
9
70
  */
10
71
  export declare class StorageDeviceModelImpl implements IKosDataModel, IKosIdentifiable {
72
+ /** Unique identifier for the storage device model instance */
11
73
  id: string;
74
+ /** File system mount directory path where device is accessible */
12
75
  mountDir: string;
76
+ /** Whether the device has been physically removed from the system */
13
77
  removed: boolean;
78
+ /** Device manufacturer name (e.g., 'SanDisk', 'Western Digital') */
14
79
  vendor: string;
80
+ /** Total device runtime in milliseconds for usage tracking */
15
81
  runTimeMs: number;
82
+ /** Device model name or identifier (e.g., 'Ultra USB 3.0', 'My Passport') */
16
83
  model: string;
84
+ /** KOS node identifier where this device is connected */
17
85
  nodeId: string;
86
+ /** Whether the device is connected to the local node */
18
87
  local: boolean;
88
+ /** File system label or volume name for the device */
19
89
  label: string;
90
+ /** System path for hardware identification and low-level access */
20
91
  syspath: string;
92
+ /** Context logger for debugging and diagnostics */
21
93
  private logger;
22
94
  constructor(modelId: string, options: StorageDeviceOptions, context: KosCreationContext);
95
+ /**
96
+ * Updates the storage device model with new configuration options.
97
+ * @param options New configuration options to apply to the device
98
+ */
23
99
  updateModel(options: StorageDeviceOptions): void;
100
+ /**
101
+ * @internal
102
+ */
24
103
  init(): Promise<void>;
104
+ /**
105
+ * @internal
106
+ */
25
107
  load(): Promise<void>;
26
108
  }
27
109
  //# sourceMappingURL=storage-device-model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"storage-device-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/storage-device/storage-device-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAE9E;;;GAGG;AACH,qBAEa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IAEjB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,kBAAkB;IAe7B,WAAW,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAc1C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
1
+ {"version":3,"file":"storage-device-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/storage-device/storage-device-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2DG;AACH,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAEzE,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAE9E;;;GAGG;AACH,qBAEa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,qEAAqE;IACrE,OAAO,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,sDAAsD;IACtD,KAAK,EAAE,MAAM,CAAC;IACd,mEAAmE;IACnE,OAAO,EAAE,MAAM,CAAC;IAChB,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,kBAAkB;IAe7B;;;OAGG;IACH,WAAW,CAAC,OAAO,EAAE,oBAAoB,GAAG,IAAI;IAchD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -3,18 +3,130 @@ import { KosParentAware } from '../../../../core';
3
3
 
4
4
  // --------------- StorageDevice ---------------
5
5
 
6
+ /**
7
+ * Configuration options for StorageDevice model instances.
8
+ *
9
+ * This interface defines the complete configuration structure for individual storage devices,
10
+ * including hardware identification, mount information, and runtime metrics. These options
11
+ * are typically populated from storage device discovery services and WebSocket updates.
12
+ *
13
+ * @example Basic Usage
14
+ * ```typescript
15
+ * const device = StorageDevice.instance('usb-backup')
16
+ * .options({
17
+ * mountDir: '/media/usb-drive',
18
+ * vendor: 'SanDisk',
19
+ * model: 'Ultra USB 3.0',
20
+ * label: 'BACKUP_DRIVE',
21
+ * nodeId: 'primary',
22
+ * local: true,
23
+ * removed: false,
24
+ * runTimeMs: 1800000,
25
+ * syspath: '/sys/devices/usb1'
26
+ * })
27
+ * .build();
28
+ * ```
29
+ *
30
+ * @category Model Configuration
31
+ * @category Device Management
32
+ */
6
33
  export interface StorageDeviceOptions extends KosParentAware {
34
+ /**
35
+ * File system mount directory path where the device is accessible.
36
+ * Empty string indicates the device is not currently mounted.
37
+ *
38
+ * @example "/media/usb-drive"
39
+ * @example "/mnt/backup-storage"
40
+ * @example "" // Not mounted
41
+ */
7
42
  mountDir: string;
43
+
44
+ /**
45
+ * Indicates whether the storage device has been physically removed.
46
+ * When true, the device is no longer accessible and mount operations will fail.
47
+ *
48
+ * @default false
49
+ */
8
50
  removed: boolean;
51
+
52
+ /**
53
+ * Hardware vendor/manufacturer name of the storage device.
54
+ * Used for device identification and display purposes.
55
+ *
56
+ * @example "SanDisk"
57
+ * @example "Western Digital"
58
+ * @example "Samsung"
59
+ */
9
60
  vendor: string;
61
+
62
+ /**
63
+ * Total runtime in milliseconds since the device was first connected.
64
+ * Tracks cumulative usage time for analytics and maintenance scheduling.
65
+ *
66
+ * @example 1800000 // 30 minutes
67
+ * @example 3600000 // 1 hour
68
+ */
10
69
  runTimeMs: number;
70
+
71
+ /**
72
+ * Hardware model name/number of the storage device.
73
+ * Combined with vendor for complete device identification.
74
+ *
75
+ * @example "Ultra USB 3.0"
76
+ * @example "My Passport"
77
+ * @example "EVO Select 64GB"
78
+ */
11
79
  model: string;
80
+
81
+ /**
82
+ * KOS node identifier where this storage device is physically connected.
83
+ * Used in multi-node systems to track device distribution.
84
+ *
85
+ * @example "primary"
86
+ * @example "secondary"
87
+ * @example "embedded-node-1"
88
+ */
12
89
  nodeId: string;
90
+
91
+ /**
92
+ * Indicates if the device is connected to the local node (true) or remote node (false).
93
+ * Determines accessibility and operation capabilities from current context.
94
+ *
95
+ * @default true
96
+ */
13
97
  local: boolean;
98
+
99
+ /**
100
+ * File system label/name assigned to the storage device.
101
+ * Used for user-friendly identification and mount point organization.
102
+ *
103
+ * @example "BACKUP_DRIVE"
104
+ * @example "CONFIG_STORAGE"
105
+ * @example "DATA_ARCHIVE"
106
+ */
14
107
  label: string;
108
+
109
+ /**
110
+ * System device path in the Linux device tree.
111
+ * Low-level hardware identifier for device tracking and diagnostics.
112
+ *
113
+ * @example "/sys/devices/pci0000:00/usb1/1-2"
114
+ * @example "/sys/devices/mmc0/mmc0:0001"
115
+ * @example "/sys/devices/platform/sdhci"
116
+ */
15
117
  syspath: string;
16
118
  }
17
119
 
18
120
  // --------------- StorageDeviceContainer ---------------
19
121
 
122
+ /**
123
+ * Configuration options for StorageDeviceContainer model instances.
124
+ *
125
+ * The container model manages collections of storage devices and handles real-time
126
+ * updates via WebSocket topics. Currently uses an empty configuration object as
127
+ * the container's behavior is primarily driven by discovered storage devices.
128
+ *
129
+ * @category Model Configuration
130
+ * @category Device Management
131
+ */
20
132
  export type StorageDeviceContainerOptions = object;
@@ -4,19 +4,94 @@ import { IKosIdentifiable } from '../../../core/core/types';
4
4
  import { IKosDataModel, KosCreationContext } from '../../../core/core/kosModel';
5
5
 
6
6
  export declare const MODEL_TYPE = "studio-properties-model";
7
+ /**
8
+ * StudioPropertiesModel - Real-time KOS Studio properties management with WebSocket synchronization.
9
+ *
10
+ * This model provides centralized access to KOS Studio's runtime properties and configuration
11
+ * values, enabling applications to access Studio-specific settings, tool states, and integration
12
+ * parameters. Properties are synchronized in real-time via WebSocket topics, ensuring all
13
+ * connected clients maintain consistent Studio state information.
14
+ *
15
+ * ## Key Features
16
+ * - **Real-time synchronization** - Properties update automatically via `/kos/studio/properties` topic
17
+ * - **Connection-scoped access** - Properties are specific to individual Studio VM connections
18
+ * - **Fallback handling** - Graceful degradation with default values when Studio is unavailable
19
+ * - **Observable properties** - Create reactive computed values for any property key
20
+ * - **Session management** - Automatic WebSocket session lifecycle with proper cleanup
21
+ *
22
+ * ## Topic-Based Reactivity
23
+ * The model listens to this KOS topic for real-time synchronization:
24
+ * - **`/kos/studio/properties`** - Broadcasts Studio property changes with connection-specific routing
25
+ *
26
+ * ## Common Use Cases
27
+ * - **Studio integration status** - Check if legacy tools or specific Studio features are enabled
28
+ * - **Tool configuration** - Access Studio tool settings and preferences for UI adaptation
29
+ * - **Connection management** - Track Studio connection state and properties for diagnostics
30
+ * - **Feature flags** - Access Studio-specific feature toggles and experimental settings
31
+ *
32
+ * @interface
33
+ * @example Basic Usage
34
+ * ```typescript
35
+ * const studioProps = StudioPropertiesModel.instance('studio-conn-1')
36
+ * .options({ connectionId: 'vm-connection-abc123' })
37
+ * .build();
38
+ *
39
+ * await studioProps.initializePropertiesSession();
40
+ * const legacyToolSupport = studioProps.get('kos.studio.tool.legacy');
41
+ * ```
42
+ *
43
+ * @group KOS Model
44
+ * @category System Integration
45
+ * @useDeclaredType
46
+ *
47
+ * @see {@link StudioPropertiesOptions} - Configuration options for StudioPropertiesModel instances
48
+ */
7
49
  export type StudioPropertiesModel = PublicModelInterface<StudioPropertiesModelImpl>;
50
+ /**
51
+ * @ignore
52
+ * @internal
53
+ */
8
54
  export declare class StudioPropertiesModelImpl implements IKosDataModel, IKosIdentifiable {
55
+ /** Unique identifier for the model instance */
9
56
  id: string;
57
+ /** Studio VM connection identifier for property routing */
10
58
  connectionId: string;
59
+ /** WebSocket subscription cleanup function */
11
60
  private unsubscribe;
61
+ /** Context logger for debugging and diagnostics */
12
62
  private logger;
63
+ /** Observable data store for Studio properties */
13
64
  private data;
14
65
  constructor(modelId: string, options: StudioPropertiesOptions, context: KosCreationContext);
66
+ /**
67
+ * @internal
68
+ */
15
69
  init(): Promise<void>;
70
+ /**
71
+ * @internal
72
+ */
16
73
  load(): Promise<void>;
74
+ /**
75
+ * Terminates the WebSocket session for Studio properties.
76
+ * Cleans up subscriptions to prevent memory leaks.
77
+ */
17
78
  terminatePropertiesSession(): Promise<void>;
79
+ /**
80
+ * Initializes WebSocket session for real-time Studio property synchronization.
81
+ * Loads initial properties and subscribes to update topics.
82
+ */
18
83
  initializePropertiesSession(): Promise<void>;
84
+ /**
85
+ * Retrieves a Studio property value by key.
86
+ * @param key Property key to retrieve
87
+ * @returns The property value or undefined if not set
88
+ */
19
89
  get(key: string): any;
90
+ /**
91
+ * Creates an observable computed property for reactive updates.
92
+ * @param key Property key to observe
93
+ * @returns Observable that emits when the property changes
94
+ */
20
95
  createObservableProperty(key: string): import('mobx').IComputedValue<any>;
21
96
  }
22
97
  //# sourceMappingURL=studio-properties-model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"studio-properties-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/studio-properties/studio-properties-model.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAGpD,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAMlD,qBACa,yBACX,YAAW,aAAa,EAAE,gBAAgB;IAE1C,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,WAAW,CAA6B;IAChD,OAAO,CAAC,MAAM,CAAmB;IAEjC,OAAO,CAAC,IAAI,CAA+B;gBAEzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,kBAAkB;IAWvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC;IAG3C,2BAA2B;IA8BjC,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAIrB,wBAAwB,CAAC,GAAG,EAAE,MAAM;CAGrC"}
1
+ {"version":3,"file":"studio-properties-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/studio-properties/studio-properties-model.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,aAAa,EAEb,kBAAkB,EACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAGhE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAEvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AAIpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAMlD;;;GAGG;AACH,qBACa,yBACX,YAAW,aAAa,EAAE,gBAAgB;IAE1C,+CAA+C;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,2DAA2D;IAC3D,YAAY,EAAE,MAAM,CAAC;IACrB,8CAA8C;IAC9C,OAAO,CAAC,WAAW,CAA6B;IAChD,mDAAmD;IACnD,OAAO,CAAC,MAAM,CAAmB;IACjC,kDAAkD;IAClD,OAAO,CAAC,IAAI,CAA+B;gBAEzC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,kBAAkB;IAW7B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;OAGG;IACG,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC;IAIjD;;;OAGG;IACG,2BAA2B;IA8BjC;;;;OAIG;IACH,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG;IAIrB;;;;OAIG;IACH,wBAAwB,CAAC,GAAG,EAAE,MAAM;CAGrC"}
@@ -1,3 +1,32 @@
1
+ /**
2
+ * Configuration options for StudioPropertiesModel instances.
3
+ *
4
+ * This interface defines the configuration structure for Studio properties models,
5
+ * which manage real-time access to KOS Studio runtime properties and settings.
6
+ * The connection ID serves as the primary routing mechanism for Studio-specific
7
+ * property synchronization.
8
+ *
9
+ * @example Basic Usage
10
+ * ```typescript
11
+ * const studioProps = StudioPropertiesModel.instance('dev-studio')
12
+ * .options({ connectionId: 'vm-development-001' })
13
+ * .build();
14
+ * ```
15
+ *
16
+ * @category Model Configuration
17
+ * @category System Integration
18
+ */
1
19
  export interface StudioPropertiesOptions {
20
+ /**
21
+ * Studio VM connection identifier for property routing and WebSocket targeting.
22
+ *
23
+ * This ID corresponds to an active Studio connection and determines which Studio
24
+ * instance provides the properties. Each Studio VM connection has unique runtime
25
+ * properties and configuration values.
26
+ *
27
+ * @example "vm-development-local-001"
28
+ * @example "studio-connection-abc123"
29
+ * @example "primary-studio-instance"
30
+ */
2
31
  connectionId: string;
3
32
  }
@@ -1,25 +1,151 @@
1
+ /**
2
+ * @fileoverview Translation service functions for internationalization and localization.
3
+ *
4
+ * This module provides service functions for loading translation data, managing locale
5
+ * descriptors, and handling multi-language content in KOS applications. Supports both
6
+ * static file-based translations and dynamic translation service integration.
7
+ *
8
+ * @module TranslationServices
9
+ */
10
+ /**
11
+ * Generic translation data response format.
12
+ *
13
+ * Represents the structure of translation data returned from various translation
14
+ * endpoints, supporting flexible key-value structures for different locales
15
+ * and translation namespaces.
16
+ *
17
+ * @group KOS Model
18
+ * @category i18n
19
+ */
1
20
  export type TranslationResponse = Record<string, any>;
21
+ /**
22
+ * Locale descriptor defining translation file location and fallback behavior.
23
+ *
24
+ * Describes how to locate and load translation files for a specific locale,
25
+ * including fallback chains for graceful degradation when translations are
26
+ * missing or incomplete.
27
+ *
28
+ * @group KOS Model
29
+ * @category i18n
30
+ */
2
31
  export interface LocaleDescriptor {
32
+ /** Default locale to use when this locale's translations are unavailable */
3
33
  defaultLocale: string;
34
+ /** Path to the translation file for this locale */
4
35
  file: string;
36
+ /** Optional array of fallback locales to try in order */
5
37
  fallbacks?: string[];
6
38
  }
39
+ /**
40
+ * Complete localization configuration for organizing translation namespaces.
41
+ *
42
+ * Defines the structure for managing multiple translation namespaces with
43
+ * locale-specific configurations. Enables organized translation management
44
+ * across different features or components of an application.
45
+ *
46
+ * @group KOS Model
47
+ * @category i18n
48
+ */
7
49
  export interface Localization {
50
+ /**
51
+ * Translation namespaces organized by feature or component.
52
+ * Each namespace contains locale configurations and file paths.
53
+ */
8
54
  namespaces: {
9
55
  [key: string]: {
56
+ /** Locale-specific configuration for this namespace */
10
57
  locales: {
11
58
  [key: string]: LocaleDescriptor;
12
59
  };
60
+ /** Base path for translation files in this namespace */
13
61
  basePath: string;
14
62
  };
15
63
  };
64
+ /** Root path for the localization configuration */
16
65
  path: string;
17
66
  }
18
67
  /**
19
- * @category Service
20
- * Retrieves the initial translation data.
68
+ * Loads translation data from a specified URL.
69
+ *
70
+ * Fetches translation JSON files from static resources or translation services.
71
+ * Handles network errors gracefully by returning empty objects rather than
72
+ * throwing exceptions, enabling fallback behavior in translation systems.
73
+ *
74
+ * @param url - Relative or absolute URL to the translation file
75
+ * @param root - Optional root URL override (defaults to current window origin)
76
+ * @returns Promise resolving to translation data object
77
+ *
78
+ * @throws {Error} When network request fails unexpectedly (non-200 responses return empty object)
79
+ *
80
+ * @example Load Translation File
81
+ * ```typescript
82
+ * const frenchTranslations = await getTranslations('/assets/locales/fr/common.json');
83
+ * console.log('Welcome message:', frenchTranslations.welcome);
84
+ *
85
+ * const customTranslations = await getTranslations('/api/translations/dashboard', 'https://translations.example.com');
86
+ * ```
87
+ *
88
+ * @group KOS Model
89
+ * @category i18n
21
90
  */
22
91
  export declare const getTranslations: (url: string, root?: string) => Promise<any>;
92
+ /**
93
+ * Retrieves the system-wide localization configuration descriptor.
94
+ *
95
+ * Fetches the complete localization configuration from the KOS system,
96
+ * including namespace definitions, locale mappings, and file path information.
97
+ * Used for initializing translation containers with proper configuration.
98
+ *
99
+ * @returns Promise resolving to complete localization descriptor
100
+ *
101
+ * @throws {Error} When service request fails or returns non-200 status
102
+ *
103
+ * @example Initialize Translation System
104
+ * ```typescript
105
+ * const localizationConfig = await getLocalizationDescriptor();
106
+ * const translationContainer = TranslationContainer.instance('app-i18n')
107
+ * .options({
108
+ * lang: 'en',
109
+ * descriptor: localizationConfig
110
+ * })
111
+ * .build();
112
+ * ```
113
+ *
114
+ * @group KOS Model
115
+ * @category i18n
116
+ */
23
117
  export declare const getLocalizationDescriptor: () => Promise<Localization>;
118
+ /**
119
+ * Creates a context-specific localization descriptor retrieval function.
120
+ *
121
+ * Returns a curried function that fetches localization configuration for a
122
+ * specific context from the KOS system. Useful for creating context-aware
123
+ * translation loaders that can be configured once and used multiple times.
124
+ *
125
+ * @param context - Context identifier for localization configuration
126
+ * @returns Async function that retrieves context-specific localization descriptor
127
+ *
128
+ * @throws {Error} When service request fails or context is not found
129
+ *
130
+ * @example Create Context-Specific Loader
131
+ * ```typescript
132
+ * const getStudioTranslations = getKosLocalizationDescriptor('studio');
133
+ * const studioConfig = await getStudioTranslations();
134
+ *
135
+ * const getDeviceTranslations = getKosLocalizationDescriptor('device');
136
+ * const deviceConfig = await getDeviceTranslations();
137
+ *
138
+ * // Use in translation container initialization
139
+ * const container = TranslationContainer.instance('context-aware')
140
+ * .options({
141
+ * lang: 'es',
142
+ * descriptor: studioConfig
143
+ * })
144
+ * .build();
145
+ * ```
146
+ *
147
+ * @group KOS Model
148
+ * @category i18n
149
+ */
24
150
  export declare const getKosLocalizationDescriptor: (context: string) => () => Promise<Localization>;
25
151
  //# sourceMappingURL=translation-services.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"translation-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/translation/services/translation-services.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtD,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AACD,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,OAAO,EAAE;gBACP,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;aACjC,CAAC;YACF,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;CACd;AASD;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAe,MAAM,SAAS,MAAM,iBAgB/D,CAAC;AAEF,eAAO,MAAM,yBAAyB,6BAYrC,CAAC;AAEF,eAAO,MAAM,4BAA4B,YAAa,MAAM,gCAY3D,CAAC"}
1
+ {"version":3,"file":"translation-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/translation/services/translation-services.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAuBH;;;;;;;;;GASG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAEtD;;;;;;;;;GASG;AACH,MAAM,WAAW,gBAAgB;IAC/B,4EAA4E;IAC5E,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;IACb,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,UAAU,EAAE;QACV,CAAC,GAAG,EAAE,MAAM,GAAG;YACb,uDAAuD;YACvD,OAAO,EAAE;gBACP,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,CAAC;aACjC,CAAC;YACF,wDAAwD;YACxD,QAAQ,EAAE,MAAM,CAAC;SAClB,CAAC;KACH,CAAC;IACF,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAC;CACd;AAoBD;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,eAAe,QAAe,MAAM,SAAS,MAAM,iBAgB/D,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,yBAAyB,6BAYrC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,4BAA4B,YAAa,MAAM,gCAY3D,CAAC"}