@kosdev-code/kos-ui-sdk 2.0.40 → 2.1.0

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 (179) 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 +10060 -8172
  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/components/loading-message/loading-message-styles.d.ts +2 -2
  167. package/ui/components/loading-message/loading-message-styles.d.ts.map +1 -1
  168. package/ui/contexts/state-bean/state-bean-provider.d.ts.map +1 -1
  169. package/ui/hooks/state-bean/use-state-bean.d.ts +2 -2
  170. package/ui/hooks/state-bean/use-state-bean.d.ts.map +1 -1
  171. package/ui/hooks/state-bean/with-state-bean.d.ts.map +1 -1
  172. package/ui/hooks/translation-container/use-translation-container.d.ts +4 -33
  173. package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
  174. package/models/models/trouble-container/trouble-container-registration.d.ts +0 -5
  175. package/models/models/trouble-container/trouble-container-registration.d.ts.map +0 -1
  176. package/models/utils/kosmodel-compatible-future-mixin.d.ts +0 -142
  177. package/models/utils/kosmodel-compatible-future-mixin.d.ts.map +0 -1
  178. package/models/utils/kosmodel-interface-companion-mixin.d.ts +0 -83
  179. package/models/utils/kosmodel-interface-companion-mixin.d.ts.map +0 -1
@@ -2,14 +2,86 @@ import { BrowserRouterOptions } from './types';
2
2
  import { IKosDataModel, IKosIdentifiable, KosCreationContext, KosMethodTypes, KosMiddleware, PublicModelInterface } from '../../../core';
3
3
 
4
4
  export declare const MODEL_TYPE = "browser-router-model";
5
+ /**
6
+ * BrowserRouter - HTTP routing and middleware management for KOS web services.
7
+ *
8
+ * The BrowserRouter model provides a comprehensive HTTP routing system that handles incoming
9
+ * requests via WebSocket topics and routes them through registered middleware and handlers.
10
+ * It enables KOS applications to expose REST APIs, handle device communication, and manage
11
+ * HTTP-based integrations with automatic OpenAPI specification generation.
12
+ *
13
+ * ## Key Features
14
+ * - **Topic-Based HTTP Handling** - Processes HTTP requests via `kos.http.request` topic
15
+ * - **Middleware Support** - Chain multiple middleware functions for request processing
16
+ * - **Route Management** - Dynamic registration, removal, and inspection of routes
17
+ * - **OpenAPI Generation** - Automatic API documentation at `/openapi.json`
18
+ * - **Request/Response Abstraction** - Familiar Express.js-style request/response objects
19
+ * - **Method Support** - Full HTTP method support (GET, POST, PUT, DELETE, PATCH)
20
+ *
21
+ * ## Topic-Based Reactivity
22
+ * The model listens to these KOS topics for HTTP request handling:
23
+ * - **`kos.http.request`** - Incoming HTTP requests from clients or other services
24
+ * - **`kos.http.response`** - Outgoing HTTP responses with status codes and data
25
+ *
26
+ * ## Common Use Cases
27
+ * - **REST API Endpoints** - Expose device data and control APIs
28
+ * - **Webhook Handlers** - Process incoming webhooks from external services
29
+ * - **Inter-Service Communication** - Handle requests between KOS services
30
+ * - **Device Integration** - Bridge HTTP protocols with KOS messaging
31
+ * - **API Gateway** - Route and transform requests to downstream services
32
+ *
33
+ * @interface
34
+ * @example Basic Usage
35
+ * ```typescript
36
+ * const router = KosBrowserRouter.instance('main-router')
37
+ * .options({})
38
+ * .build();
39
+ *
40
+ * // Register HTTP endpoints with middleware support
41
+ * router.use('GET', '/api/status', async (req, res) => {
42
+ * res.send({ status: 'online' });
43
+ * });
44
+ *
45
+ * router.use('POST', '/api/commands', validateAuth, async (req, res) => {
46
+ * res.status(200).send({ success: true });
47
+ * });
48
+ * ```
49
+ *
50
+ * @group KOS Model
51
+ * @category Browser Router
52
+ * @category Service Integration
53
+ * @useDeclaredType
54
+ *
55
+ * @see {@link BrowserRouterOptions} - Configuration options for BrowserRouter instances
56
+ */
5
57
  export type KosBrowserRouter = Omit<PublicModelInterface<BrowserRouterModelImpl>, "load" | "init">;
58
+ /**
59
+ * @ignore
60
+ * @internal
61
+ */
6
62
  export declare class BrowserRouterModelImpl implements IKosDataModel, IKosIdentifiable {
63
+ /** Unique identifier for the router model instance */
7
64
  private _id;
65
+ /** Context logger for debugging HTTP requests and routing */
8
66
  private logger;
67
+ /** Internal HTTP router instance handling middleware chains */
9
68
  private router;
10
69
  constructor(modelId: string, _options: BrowserRouterOptions, context: KosCreationContext);
70
+ /** Model instance identifier */
11
71
  get id(): string;
72
+ /**
73
+ * Handles incoming HTTP requests from WebSocket topics.
74
+ * @param data Request body data
75
+ * @param payload Request headers and metadata
76
+ * @internal
77
+ */
12
78
  private handleRequest;
79
+ /**
80
+ * Registers a route with optional middleware chain.
81
+ * @param method HTTP method (GET, POST, PUT, DELETE, PATCH)
82
+ * @param path Route path pattern with parameter support
83
+ * @param middlewares Middleware functions and final handler
84
+ */
13
85
  use<TPath extends string = string>(method: KosMethodTypes, path: TPath, ...middlewares: KosMiddleware<TPath>[]): void;
14
86
  /**
15
87
  * Remove routes matching the given method and path
@@ -25,13 +97,20 @@ export declare class BrowserRouterModelImpl implements IKosDataModel, IKosIdenti
25
97
  */
26
98
  removeAllForPath(path: string): number;
27
99
  /**
28
- * Get all registered routes (for debugging/monitoring)
100
+ * Gets all registered routes for debugging and monitoring.
101
+ * @returns Array of route objects with method and path
29
102
  */
30
103
  getRoutes(): Array<{
31
104
  method: string;
32
105
  path: string;
33
106
  }>;
107
+ /**
108
+ * @internal
109
+ */
34
110
  init(): Promise<void>;
111
+ /**
112
+ * @internal
113
+ */
35
114
  load(): Promise<void>;
36
115
  }
37
116
  //# sourceMappingURL=browser-router-model.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"browser-router-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/browser-router/browser-router-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAIjD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,CAAC,sBAAsB,CAAC,EAC5C,MAAM,GAAG,MAAM,CAChB,CAAC;AAEF,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,OAAO,CAAC,GAAG,CAAS;IACpB,OAAO,CAAC,MAAM,CAAmB;IAEjC,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,kBAAkB;IAO7B,IAAI,EAAE,IAAI,MAAM,CAEf;YAKa,aAAa;IA0C3B,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,KAAK,EACX,GAAG,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,GACrC,IAAI;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIpD;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAItC;;OAEG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAK9C,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
1
+ {"version":3,"file":"browser-router-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/browser-router/browser-router-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,gBAAgB,EAErB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAKlB,KAAK,oBAAoB,EAE1B,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAKjD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CACjC,oBAAoB,CAAC,sBAAsB,CAAC,EAC5C,MAAM,GAAG,MAAM,CAChB,CAAC;AAEF;;;GAGG;AACH,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,sDAAsD;IACtD,OAAO,CAAC,GAAG,CAAS;IACpB,6DAA6D;IAC7D,OAAO,CAAC,MAAM,CAAmB;IACjC,+DAA+D;IAC/D,OAAO,CAAC,MAAM,CAAmB;gBAE/B,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,oBAAoB,EAC9B,OAAO,EAAE,kBAAkB;IAO7B,gCAAgC;IAChC,IAAI,EAAE,IAAI,MAAM,CAEf;IAED;;;;;OAKG;YAIW,aAAa;IA0C3B;;;;;OAKG;IACH,GAAG,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,EAC/B,MAAM,EAAE,cAAc,EACtB,IAAI,EAAE,KAAK,EACX,GAAG,WAAW,EAAE,aAAa,CAAC,KAAK,CAAC,EAAE,GACrC,IAAI;IAIP;;;;;OAKG;IACH,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM;IAIpD;;;;OAIG;IACH,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IAItC;;;OAGG;IACH,SAAS,IAAI,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
@@ -1 +1,25 @@
1
- export interface BrowserRouterOptions {}
1
+ /**
2
+ * Configuration options for BrowserRouter model instances.
3
+ *
4
+ * The BrowserRouter operates without specific configuration options, providing
5
+ * a zero-configuration HTTP routing solution. All routing behavior is controlled
6
+ * through route registration and middleware during model initialization.
7
+ *
8
+ * @example Basic Usage
9
+ * ```typescript
10
+ * const router = KosBrowserRouter.instance('api-router')
11
+ * .options({})
12
+ * .build();
13
+ *
14
+ * router.use('GET', '/api/status', async (req, res) => {
15
+ * res.send({ status: 'healthy' });
16
+ * });
17
+ * ```
18
+ *
19
+ * @group KOS Model
20
+ * @category Service Integration
21
+ * @category Browser Router
22
+ */
23
+ export interface BrowserRouterOptions {
24
+ [key: string]: never;
25
+ }
@@ -32,7 +32,8 @@ export declare const mapUpdateDtoToConfigBeanModel: (dto: ConfigBeanUpdateRespon
32
32
  * instantiate a new model.
33
33
  *
34
34
  * @internal
35
- * @category Config Bean
35
+ * @group KOS Model
36
+ * @category Configuration
36
37
  */
37
38
  export declare const mapConfigBeanModelToDto: (model: IConfigBeanModel) => ConfigBeanRequest;
38
39
  /**
@@ -51,7 +52,8 @@ export declare const mapConfigBeanModelToDto: (model: IConfigBeanModel) => Confi
51
52
  * or retrieved from the KOS Model framework if already existing.
52
53
  *
53
54
  * @internal
54
- * @category Config Bean
55
+ * @group KOS Model
56
+ * @category Configuration
55
57
  */
56
58
  export declare const buildConfigBeanModel: (factory: ModelFactory<IConfigBeanModel, IConfigBeanModelOptions>) => (modelId: string) => (configBeanOptions: IConfigBeanModelOptions) => IConfigBeanModel;
57
59
  //# sourceMappingURL=config-bean-model-builder.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-bean-model-builder.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean/config-bean-model-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAW,EAAO,MAQxD;AAsBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,QAC7B,kBAAkB,SAChB,gBAAgB,SAWxB,CAAC;AAEF,eAAO,MAAM,6BAA6B,QACnC,wBAAwB,SACtB,gBAAgB,SAsBxB,CAAC;AAEF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,UAAW,gBAAgB,sBAI9D,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,YACrB,aAAa,gBAAgB,EAAE,uBAAuB,CAAC,eACvD,MAAM,yBACI,uBAAuB,qBAG1C,CAAC"}
1
+ {"version":3,"file":"config-bean-model-builder.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean/config-bean-model-builder.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,WAAW,EACjB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,wBAAgB,cAAc,CAAC,MAAM,GAAE,WAAW,EAAO,MAQxD;AAsBD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,uBAAuB,QAC7B,kBAAkB,SAChB,gBAAgB,SAWxB,CAAC;AAEF,eAAO,MAAM,6BAA6B,QACnC,wBAAwB,SACtB,gBAAgB,SAsBxB,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,UAAW,gBAAgB,sBAI9D,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,oBAAoB,YACrB,aAAa,gBAAgB,EAAE,uBAAuB,CAAC,eACvD,MAAM,yBACI,uBAAuB,qBAG1C,CAAC"}
@@ -3,24 +3,81 @@ import { ConfigBeanUpdateResponse } from '../../services/config-bean';
3
3
  import { ConfigBeanKeys, IConfigBeanModelOptions } from './config-bean-types';
4
4
  import { IKosDataModel, KosData, PublicModelInterface, KosModelRegistrationFactory } from '../../../core';
5
5
 
6
+ /**
7
+ * ConfigBean - Reactive hierarchical configuration management for KOS devices.
8
+ *
9
+ * The ConfigBean model provides reactive access to hierarchical configuration data from KOS devices
10
+ * with real-time synchronization via WebSocket topics, schema-based validation, and transactional
11
+ * updates. Essential for building configuration interfaces and managing device operational parameters.
12
+ *
13
+ * ## Key Features
14
+ * - **Hierarchical Configuration** - Access nested configuration structures using path notation
15
+ * - **Real-Time Synchronization** - Automatic updates via `/kos/config/{path}` WebSocket topic
16
+ * - **Schema-Based Validation** - Built-in validation using device configuration schemas
17
+ * - **Transactional Updates** - Atomic configuration changes with rollback support
18
+ * - **Type-Safe Access** - Strongly typed property access with TypeScript support
19
+ * - **Reactive Properties** - Automatic UI updates when configuration changes
20
+ *
21
+ * ## Configuration Path Patterns
22
+ * ConfigBean supports hierarchical paths that mirror device system organization:
23
+ * - **System Level**: `system:app` - Machine identity, operational modes
24
+ * - **Service Level**: `kos:service:CANPumpMgr` - KOS service configurations
25
+ * - **Hardware Level**: `assembly:core:board:macro:pump:water` - Component settings
26
+ * - **Application Level**: `app:scheduling:dayWiseLockConfigMap` - Application-specific settings
27
+ *
28
+ * ## Common Use Cases
29
+ * - **Configuration Interfaces** - Build reactive configuration management screens
30
+ * - **Operational Parameter Control** - Real-time adjustment of device behavior
31
+ * - **Schema-Driven Forms** - Generate configuration UIs from device schemas
32
+ * - **System Administration** - Centralized device configuration management
33
+ * - **Bulk Configuration Updates** - Transactional updates across multiple properties
34
+ *
35
+ * @example Basic Configuration Management
36
+ * ```typescript
37
+ * const systemConfig = ConfigBean.instance('system-config')
38
+ * .options({ path: 'system:app' })
39
+ * .build();
40
+ *
41
+ * // Access current configuration values
42
+ * const machineId = systemConfig.values.machineId;
43
+ * const debugMode = systemConfig.values.debugMode;
44
+ *
45
+ * // Update configuration properties
46
+ * await systemConfig.updateProperty('debugMode', true);
47
+ * await systemConfig.updateProperty('machineId', 'MACHINE-001');
48
+ * ```
49
+ *
50
+ * @interface
51
+ * @group KOS Model
52
+ * @category Configuration
53
+ * @useDeclaredType
54
+ *
55
+ * @see {@link IConfigBeanModelOptions} - Configuration options for ConfigBean instances
56
+ * @see {@link ConfigBeanKeys} - Type-safe property key access
57
+ * @see {@link ConfigPropertyTypes} - Supported configuration property types
58
+ */
6
59
  export type IConfigBeanModel<T extends {} = any> = PublicModelInterface<ConfigBeanModelImpl<T>>;
7
60
  export declare const CONFIG_BEAN_MODEL_TYPE = "config-bean-model";
8
61
  /**
9
- * @category Model
10
- * @name ConfigBeanModel
11
- * @version 1.0.0
12
- * @author Mark Pomerant <mpomerant@coca-cola.com>
13
- *
14
- * Represents a config bean.
62
+ * @ignore
63
+ * @internal
15
64
  */
16
65
  declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
66
+ /** Service function for modifying configuration beans */
17
67
  private _modifyConfigBean;
68
+ /** Service function for retrieving configuration beans */
18
69
  private _getConfigBean;
70
+ /** Schema response containing configuration property definitions */
19
71
  private _schema?;
72
+ /** Unique identifier for this configuration model instance */
20
73
  id: string;
74
+ /** Hierarchical configuration path (e.g., 'system:app', 'kos:service:CANPumpMgr') */
21
75
  path: string;
76
+ /** Observable configuration properties with current values */
22
77
  props: KosData<Record<ConfigBeanKeys<T>, ConfigPropertyTypes>>;
78
+ /** Observable configuration properties with previous values (before last update) */
23
79
  prevProps: KosData<Record<ConfigBeanKeys<T>, ConfigPropertyTypes>>;
80
+ /** Optional custom base path for configuration service endpoints */
24
81
  serviceBasePath?: string;
25
82
  /**
26
83
  * @category Constructor
@@ -32,19 +89,68 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
32
89
  *
33
90
  */
34
91
  constructor(modelId: string, options: IConfigBeanModelOptions);
92
+ /**
93
+ * Gets current configuration property values.
94
+ *
95
+ * @returns Object containing all configuration properties with their current values
96
+ *
97
+ * @example Access Configuration Values
98
+ * ```typescript
99
+ * const currentValues = systemConfig.values;
100
+ * console.log('Machine ID:', currentValues.machineId);
101
+ * console.log('Debug Mode:', currentValues.debugMode);
102
+ * ```
103
+ */
35
104
  get values(): Record<keyof T, unknown>[keyof T][];
105
+ /**
106
+ * @internal
107
+ */
36
108
  ready(): Promise<void>;
37
109
  /**
38
- * @category Lifecycle
110
+ * @internal
39
111
  *
40
112
  * @remarks
41
113
  * No action is taken as part of the load lifecycle method.
42
114
  *
43
- * In future additional information about the worksapce could be loaded
115
+ * In future additional information about the workspace could be loaded
44
116
  */
45
117
  load(): Promise<void>;
118
+ /**
119
+ * Gets all available schema property keys.
120
+ *
121
+ * @returns Array of property keys from the configuration schema
122
+ */
46
123
  get schemaKeys(): string[];
124
+ /**
125
+ * Retrieves schema definition for a specific property.
126
+ *
127
+ * @param key - Property key to get schema for
128
+ * @returns Schema definition if found, undefined otherwise
129
+ *
130
+ * @example Get Property Schema
131
+ * ```typescript
132
+ * const schema = systemConfig.getSchemaForProperty('debugMode');
133
+ * if (schema) {
134
+ * console.log('Type:', schema.type);
135
+ * console.log('Description:', schema.description);
136
+ * }
137
+ * ```
138
+ */
47
139
  getSchemaForProperty(key: string): import('../../services/config-bean').SchemaNodeDef | undefined;
140
+ /**
141
+ * Updates a specific configuration property value.
142
+ *
143
+ * @category Action
144
+ *
145
+ * @param key - The configuration property key to update
146
+ * @param value - The new value to set for the property
147
+ *
148
+ * @example Update Configuration Property
149
+ * ```typescript
150
+ * await systemConfig.updateProperty('debugMode', true);
151
+ * await systemConfig.updateProperty('machineId', 'MACHINE-001');
152
+ * ```
153
+ */
48
154
  updateProperty(key: ConfigBeanKeys<T>, value: ConfigPropertyTypes): Promise<void>;
49
155
  /**
50
156
  * @category Action
@@ -60,12 +166,10 @@ declare class ConfigBeanModelImpl<T extends {} = any> implements IKosDataModel {
60
166
  updateConfigBean(): Promise<void>;
61
167
  /**
62
168
  * @category Subscription
63
- * Updates the Config Bean model when a `/kos/config//update` event
64
- * is recieved from the server.
65
- *
169
+ * Updates the Config Bean model when a `/kos/config/{path}` event
170
+ * is received from the server.
66
171
  *
67
- * @param data - the raw callback
68
- * @param data.body - the Config Bean that was updated.
172
+ * @param configBean - the Config Bean that was updated.
69
173
  * @see ConfigBeanResponse
70
174
  */
71
175
  handleConfigBeanUpdated(configBean: ConfigBeanUpdateResponse): void;
@@ -1 +1 @@
1
- {"version":3,"file":"config-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean/config-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,oBAAoB,CACrE,mBAAmB,CAAC,CAAC,CAAC,CACvB,CAAC;AAYF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAI1D;;;;;;;GAOG;AAEH,cACM,mBAAmB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,CAAE,YAAW,aAAa;IACpE,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,OAAO,CAAC,cAAc,CAA8B;IAEpD,OAAO,CAAC,OAAO,CAAC,CAAiB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE/D,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEnE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAqB7D,IAAI,MAAM,wCAET;IAEK,KAAK;IAIX;;;;;;;OAOG;IACG,IAAI;IAgBV,IAAI,UAAU,aAEb;IAED,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAa1B,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAIvE;;;;;;;;;;OAUG;IACG,gBAAgB;IAOtB;;;;;;;;;OASG;IAKH,uBAAuB,CAAC,UAAU,EAAE,wBAAwB;CAG7D;AAED,eAAO,MAAM,UAAU,6EAMrB,CAAC"}
1
+ {"version":3,"file":"config-bean-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean/config-bean-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,OAAO,EACP,oBAAoB,EACrB,MAAM,eAAe,CAAC;AACvB,OAAO,EAIL,2BAA2B,EAG5B,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EACV,cAAc,EACd,uBAAuB,EACxB,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EAGL,KAAK,wBAAwB,EAE9B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAO/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,IAAI,oBAAoB,CACrE,mBAAmB,CAAC,CAAC,CAAC,CACvB,CAAC;AAYF,eAAO,MAAM,sBAAsB,sBAAsB,CAAC;AAK1D;;;GAGG;AACH,cACM,mBAAmB,CAAC,CAAC,SAAS,EAAE,GAAG,GAAG,CAAE,YAAW,aAAa;IACpE,yDAAyD;IACzD,OAAO,CAAC,iBAAiB,CAAiC;IAE1D,0DAA0D;IAC1D,OAAO,CAAC,cAAc,CAA8B;IAEpD,oEAAoE;IACpE,OAAO,CAAC,OAAO,CAAC,CAAiB;IACjC,8DAA8D;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,8DAA8D;IAC9D,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAE/D,oFAAoF;IACpF,SAAS,EAAE,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEnE,oEAAoE;IACpE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;;;;;OAQG;gBACS,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,uBAAuB;IAqB7D;;;;;;;;;;;OAWG;IACH,IAAI,MAAM,wCAET;IAED;;OAEG;IACG,KAAK;IAIX;;;;;;;OAOG;IACG,IAAI;IAgBV;;;;OAIG;IACH,IAAI,UAAU,aAEb;IAED;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,GAAG,EAAE,MAAM;IAahC;;;;;;;;;;;;;OAaG;IACG,cAAc,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,mBAAmB;IAIvE;;;;;;;;;;OAUG;IACG,gBAAgB;IAOtB;;;;;;;OAOG;IAKH,uBAAuB,CAAC,UAAU,EAAE,wBAAwB;CAG7D;AAED,eAAO,MAAM,UAAU,6EAMrB,CAAC"}
@@ -10,7 +10,8 @@ import { KosServiceResponse } from '../../../core';
10
10
  * implementations of services that can be used in the event that these overrides are
11
11
  * not provided
12
12
  *
13
- * @category Model
13
+ * @group KOS Model
14
+ * @category Configuration
14
15
  */
15
16
  export interface IConfigBeanModelOptionsActions {
16
17
  /**
@@ -50,7 +51,8 @@ export interface IConfigBeanModelOptionsActions {
50
51
  * in the constructor. The value <strong>might</strong> be overriden by
51
52
  * subsequent lifecycle methods or updates.
52
53
  *
53
- * @category Options
54
+ * @group KOS Model
55
+ * @category Configuration
54
56
  * @internal
55
57
  */
56
58
  export interface IConfigBeanModelOptions extends Partial<IConfigBeanModelOptionsActions> {
@@ -61,6 +63,7 @@ export type ConfigBeanKeys<T> = keyof T;
61
63
  /**
62
64
  * Represents the public interface of a `IConfigBeanModel`
63
65
  *
64
- * @category Config Bean
66
+ * @group KOS Model
67
+ * @category Configuration
65
68
  */
66
69
  //# sourceMappingURL=config-bean-types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"config-bean-types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean/config-bean-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,CACjB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,iBAAiB,KACrB,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IAEtD;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,CACd,EAAE,EAAE,MAAM,KACP,OAAO,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC,CAAC;CAClE;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,uBACf,SAAQ,OAAO,CAAC,8BAA8B,CAAC;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AACxC;;;;GAIG"}
1
+ {"version":3,"file":"config-bean-types.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean/config-bean-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;;;;;;;;OAWG;IACH,gBAAgB,CAAC,EAAE,CACjB,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,iBAAiB,KACrB,OAAO,CAAC,kBAAkB,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;IAEtD;;;;;;;;;;;OAWG;IACH,aAAa,CAAC,EAAE,CACd,EAAE,EAAE,MAAM,KACP,OAAO,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,GAAG,SAAS,CAAC,CAAC;CAClE;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,uBACf,SAAQ,OAAO,CAAC,8BAA8B,CAAC;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI,MAAM,CAAC,CAAC;AACxC;;;;;GAKG"}
@@ -0,0 +1,33 @@
1
+ import { ConfigBeanRequest, ConfigBeanResponse } from '../../../services/config-bean';
2
+ import { KosServiceResponse } from '../../../../core';
3
+
4
+
5
+ /**
6
+ * Configuration options for ConfigBeanModel instances.
7
+ *
8
+ * Specifies which configuration path to access and optionally provides custom
9
+ * service implementations for testing or alternative backends.
10
+ *
11
+ * @category Model Configuration
12
+ * @category System Integration
13
+ */
14
+ export interface IConfigBeanModelOptions {
15
+ /** The hierarchical configuration path using colon-separated notation (e.g., 'system:app', 'kos:service:CANPumpMgr') */
16
+ path: string;
17
+
18
+ /** Optional custom base path for configuration service endpoints */
19
+ serviceBasePath?: string;
20
+
21
+ /** Optional custom service implementation for retrieving configuration data */
22
+ getConfigBean?: (
23
+ path: string,
24
+ serviceBasePath?: string
25
+ ) => Promise<KosServiceResponse<ConfigBeanResponse> | undefined>;
26
+
27
+ /** Optional custom service implementation for updating configuration data */
28
+ modifyConfigBean?: (
29
+ path: string,
30
+ data: ConfigBeanRequest,
31
+ serviceBasePath?: string
32
+ ) => Promise<KosServiceResponse<unknown> | undefined>;
33
+ }
@@ -6,7 +6,8 @@ import { IConfigBeanModel } from '../config-bean/config-bean-model';
6
6
  import { UnitConverter } from '../../decorators/kos-config-bean-prop';
7
7
 
8
8
  /**
9
- * @inheritdoc
9
+ * @ignore
10
+ * @internal
10
11
  */
11
12
  declare class KosConfigPropertyImpl implements KosConfigProperty {
12
13
  id: string;
@@ -39,8 +40,32 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
39
40
  * @throws Error if the default unit for the given measure is not found
40
41
  **/
41
42
  getDefaultUnitForMeasure(measure: string, unitSystem: string): string;
43
+ /**
44
+ * Gets the schema data type for this property.
45
+ *
46
+ * @returns Schema type string (e.g., "String", "Number", "Boolean", "enum")
47
+ */
42
48
  get schemaType(): import('../../services/config-bean').SchemaNodeType | "enum";
49
+ /**
50
+ * Gets the schema format hint for this property.
51
+ *
52
+ * @returns Format string (e.g., "second", "milliliter", "hour") or empty string if not specified
53
+ */
43
54
  get schemaFormat(): string;
55
+ /**
56
+ * Gets available options for enumerated properties.
57
+ *
58
+ * @returns Array of options with label/value pairs for dropdowns and selection controls
59
+ *
60
+ * @example Get Property Options
61
+ * ```typescript
62
+ * const options = statusProperty.options;
63
+ * // Returns: [
64
+ * // { label: "Active", value: "active" },
65
+ * // { label: "Inactive", value: "inactive" }
66
+ * // ]
67
+ * ```
68
+ */
44
69
  get options(): OptionsType[];
45
70
  convertUnit(converter?: UnitConverter, defaultSystem?: string, defaultMeasure?: string): {
46
71
  measure: string | undefined;
@@ -55,21 +80,107 @@ declare class KosConfigPropertyImpl implements KosConfigProperty {
55
80
  unit: string | undefined;
56
81
  };
57
82
  };
83
+ /**
84
+ * Sets the configuration property value with automatic unit conversion.
85
+ *
86
+ * @param value - The new value to set (in regional units)
87
+ *
88
+ * @example Update Property Value
89
+ * ```typescript
90
+ * pumpRateProperty.value = 1.2; // Sets rate to 1.2 mL/s (converted to backend units)
91
+ * ```
92
+ */
58
93
  set value(value: ConfigPropertyTypes);
94
+ /**
95
+ * Gets the configuration property value converted to regional units.
96
+ *
97
+ * @returns Property value in regional display units
98
+ *
99
+ * @example Get Property Value
100
+ * ```typescript
101
+ * const currentRate = pumpRateProperty.value; // Gets rate in mL/s (regional units)
102
+ * ```
103
+ */
59
104
  get value(): ConfigPropertyTypes;
105
+ /**
106
+ * Gets the raw backend value without unit conversion.
107
+ *
108
+ * @returns Raw property value as stored in backend (typically SI units)
109
+ */
60
110
  get rawValue(): unknown;
111
+ /**
112
+ * Gets the property value with appropriate decimal precision for display.
113
+ *
114
+ * @returns Property value formatted with significant digits based on regional settings
115
+ */
61
116
  get significantValue(): unknown;
117
+ /**
118
+ * Gets the previous property value before the last update.
119
+ *
120
+ * @returns Previous property value in regional display units
121
+ *
122
+ * @example Track Value Changes
123
+ * ```typescript
124
+ * const oldValue = pumpRateProperty.previousValue; // Previous rate value
125
+ * const newValue = pumpRateProperty.value; // Current rate value
126
+ * console.log(`Rate changed from ${oldValue} to ${newValue}`);
127
+ * ```
128
+ */
62
129
  get previousValue(): {};
63
130
  getValue(current: boolean): {};
131
+ /**
132
+ * @internal
133
+ */
64
134
  activate(): Promise<void>;
135
+ /**
136
+ * Gets the formatted display string with units and localization.
137
+ *
138
+ * @returns Localized string representation with appropriate units (e.g., "1.2 mL/s", "150 °F")
139
+ *
140
+ * @example Display Formatted Value
141
+ * ```typescript
142
+ * const display = temperatureProperty.displayValue; // "72.5 °F"
143
+ * const rate = pumpRateProperty.displayValue; // "1.2 mL/s"
144
+ * ```
145
+ */
65
146
  get displayValue(): string;
147
+ /**
148
+ * Gets the unit of measure for the property value.
149
+ *
150
+ * @returns Unit string (e.g., "°F", "mL/s", "seconds") or empty string for unitless properties
151
+ *
152
+ * @example Get Property Unit
153
+ * ```typescript
154
+ * const unit = temperatureProperty.unit; // "°F" or "°C" based on regional settings
155
+ * const rateUnit = pumpRateProperty.unit; // "mL/s"
156
+ * ```
157
+ */
66
158
  get unit(): string | undefined;
159
+ /**
160
+ * Gets display formatting options from the backend schema.
161
+ *
162
+ * @returns Display options object with formatting preferences (decimals, style, etc.)
163
+ */
67
164
  get displayOptions(): import('../../services/config-bean').SchemaOptionsType | undefined;
68
165
  private getMeasureFromFormat;
69
166
  private getConverterFromFormat;
70
167
  private getDefaultUnit;
71
168
  getFormatterOptions(converter?: ConfigPropConverter): Intl.NumberFormat | null;
72
169
  private getConverter;
170
+ /**
171
+ * Updates the configuration property value with automatic unit conversion.
172
+ *
173
+ * @param value - The new value to set (in regional display units)
174
+ *
175
+ * @example Update Property
176
+ * ```typescript
177
+ * // Set temperature in Fahrenheit (regional unit)
178
+ * await temperatureProperty.updateProperty(75.5);
179
+ *
180
+ * // Set pump rate in mL/s (regional unit)
181
+ * await pumpRateProperty.updateProperty(1.2);
182
+ * ```
183
+ */
73
184
  updateProperty(value: ConfigPropertyTypes): Promise<void>;
74
185
  }
75
186
  declare const Registration: {
@@ -1 +1 @@
1
- {"version":3,"file":"config-bean-prop-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean-prop/config-bean-prop-model.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAS3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,WAAW,EACZ,MAAM,SAAS,CAAC;AAkDjB;;GAEG;AACH,cACM,qBAAsB,YAAW,iBAAiB;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,UAAU,EAAG,eAAe,CAAC;IAG7B,IAAI,EAAG,gBAAgB,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;IAY3D;;;;;;;QAOI;IACJ,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM;IAgBf;;;;;;;;;QASI;IACJ,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAW5D,IAAI,UAAU,iEAOb;IAED,IAAI,YAAY,WAMf;IAED,IAAI,OAAO,kBAwBV;IAED,WAAW,CACT,SAAS,CAAC,EAAE,aAAa,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM;;;;;IAazB,iBAAiB;;;;;;;;IAajB,IAAI,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAEnC;IACD,IAAI,KAAK,IAHQ,mBAAmB,CAKnC;IAED,IAAI,QAAQ,YAEX;IAED,IAAI,gBAAgB,YA8BnB;IAED,IAAI,aAAa,OAEhB;IAED,QAAQ,CAAC,OAAO,EAAE,OAAO;IAcnB,QAAQ;IAId,IAAI,YAAY,WA2Bf;IAED,IAAI,IAAI,uBAWP;IAED,IAAI,cAAc,uEAMjB;IAED,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,cAAc;IAgBtB,mBAAmB,CAAC,SAAS,CAAC,EAAE,mBAAmB;IAuDnD,OAAO,CAAC,YAAY;IAsDd,cAAc,CAAC,KAAK,EAAE,mBAAmB;CAgBhD;AAED,QAAA,MAAM,YAAY;;;;;;;;;CAWjB,CAAC;AACF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"config-bean-prop-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/config-bean-prop/config-bean-prop-model.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAS3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAKpD,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,WAAW,EACZ,MAAM,SAAS,CAAC;AAmDjB;;;GAGG;AACH,cACM,qBAAsB,YAAW,iBAAiB;IACtD,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,UAAU,EAAG,eAAe,CAAC;IAG7B,IAAI,EAAG,gBAAgB,CAAC;gBAEZ,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,qBAAqB;IAY3D;;;;;;;QAOI;IACJ,2BAA2B,CACzB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,IAAI,CAAC,EAAE,MAAM;IAgBf;;;;;;;;;QASI;IACJ,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;IAW5D;;;;OAIG;IACH,IAAI,UAAU,iEAOb;IAED;;;;OAIG;IACH,IAAI,YAAY,WAMf;IAED;;;;;;;;;;;;;OAaG;IACH,IAAI,OAAO,kBAwBV;IAED,WAAW,CACT,SAAS,CAAC,EAAE,aAAa,EACzB,aAAa,CAAC,EAAE,MAAM,EACtB,cAAc,CAAC,EAAE,MAAM;;;;;IAazB,iBAAiB;;;;;;;;IAajB;;;;;;;;;OASG;IACH,IAAI,KAAK,CAAC,KAAK,EAAE,mBAAmB,EAEnC;IAED;;;;;;;;;OASG;IACH,IAAI,KAAK,IAdQ,mBAAmB,CAgBnC;IAED;;;;OAIG;IACH,IAAI,QAAQ,YAEX;IAED;;;;OAIG;IACH,IAAI,gBAAgB,YA8BnB;IAED;;;;;;;;;;;OAWG;IACH,IAAI,aAAa,OAEhB;IAED,QAAQ,CAAC,OAAO,EAAE,OAAO;IAczB;;OAEG;IACG,QAAQ;IAId;;;;;;;;;;OAUG;IACH,IAAI,YAAY,WA2Bf;IAED;;;;;;;;;;OAUG;IACH,IAAI,IAAI,uBAWP;IAED;;;;OAIG;IACH,IAAI,cAAc,uEAMjB;IAED,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,cAAc;IAgBtB,mBAAmB,CAAC,SAAS,CAAC,EAAE,mBAAmB;IAuDnD,OAAO,CAAC,YAAY;IAsDpB;;;;;;;;;;;;;OAaG;IACG,cAAc,CAAC,KAAK,EAAE,mBAAmB;CAgBhD;AAED,QAAA,MAAM,YAAY;;;;;;;;;CAWjB,CAAC;AACF,eAAe,YAAY,CAAC"}