@kosdev-code/kos-ui-sdk 2.0.33 → 2.0.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/common/events/async-event-bus.d.ts +96 -0
- package/common/events/async-event-bus.d.ts.map +1 -0
- package/core/core/context/kos-context-manager.d.ts +1 -0
- package/core/core/context/kos-context-manager.d.ts.map +1 -1
- package/core/core/decorators/index.d.ts +1 -0
- package/core/core/decorators/index.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +110 -0
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -0
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +130 -0
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -0
- package/core/core/decorators/kosTopicHandler.d.ts +97 -3
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/decorators/propKeys.d.ts +1 -0
- package/core/core/decorators/propKeys.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +4 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/log/log.d.ts +3 -3
- package/core/core/log/log.d.ts.map +1 -1
- package/core/core/model/kos-http-route-manager.d.ts +85 -0
- package/core/core/model/kos-http-route-manager.d.ts.map +1 -0
- package/core/core/model/kos-model-component-factory.d.ts +2 -0
- package/core/core/model/kos-model-component-factory.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +11 -0
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/model/model-introspection-utils.d.ts +1 -0
- package/core/core/model/model-introspection-utils.d.ts.map +1 -1
- package/core/core/model-instantiator.d.ts.map +1 -1
- package/core/core/services/browser-router.d.ts +20 -0
- package/core/core/services/browser-router.d.ts.map +1 -1
- package/core/core/services/index.d.ts +1 -0
- package/core/core/services/index.d.ts.map +1 -1
- package/core/util/feature-flags.d.ts +3 -0
- package/core/util/feature-flags.d.ts.map +1 -1
- package/core/util/kos-service-request.d.ts +1 -1
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/index.cjs +73 -73
- package/index.cjs.map +1 -1
- package/index.d.cts +1 -0
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +7716 -6468
- package/index.js.map +1 -1
- package/models/models/browser-router/browser-router-model.d.ts +20 -0
- package/models/models/browser-router/browser-router-model.d.ts.map +1 -1
- package/models/models/canvas-dispatcher/canvas-dispatcher-model.d.ts +5 -1
- package/models/models/canvas-dispatcher/canvas-dispatcher-model.d.ts.map +1 -1
- package/models/models/canvas-dispatcher/types/index.d.ts +48 -3
- package/models/models/canvas-dispatcher/utils/renderers/looping-video-renderer.d.ts +30 -0
- package/models/models/canvas-dispatcher/utils/renderers/looping-video-renderer.d.ts.map +1 -0
- package/models/models/canvas-dispatcher/utils/renderers/matrix-renderer.d.ts +16 -1
- package/models/models/canvas-dispatcher/utils/renderers/matrix-renderer.d.ts.map +1 -1
- package/models/models/canvas-dispatcher/utils/renderers/renderer-factory.d.ts.map +1 -1
- package/models/models/canvas-dispatcher/utils/renderers/scrolling-image-renderer.d.ts +38 -0
- package/models/models/canvas-dispatcher/utils/renderers/scrolling-image-renderer.d.ts.map +1 -0
- package/models/models/canvas-dispatcher/utils/renderers/sequence-renderer.d.ts +46 -0
- package/models/models/canvas-dispatcher/utils/renderers/sequence-renderer.d.ts.map +1 -0
- package/models/models/canvas-renderer/canvas-renderer-model.d.ts +4 -1
- package/models/models/canvas-renderer/canvas-renderer-model.d.ts.map +1 -1
- package/models/models/index.d.ts +1 -0
- package/models/models/index.d.ts.map +1 -1
- package/models/models/kos-log-manager/index.d.ts +5 -0
- package/models/models/kos-log-manager/index.d.ts.map +1 -0
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts +92 -0
- package/models/models/kos-log-manager/kos-log-manager-model.d.ts.map +1 -0
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts +92 -0
- package/models/models/kos-log-manager/kos-log-manager-registration.d.ts.map +1 -0
- package/models/models/kos-log-manager/services/index.d.ts +2 -0
- package/models/models/kos-log-manager/services/index.d.ts.map +1 -0
- package/models/models/kos-log-manager/services/kos-log-manager-services.d.ts +12 -0
- package/models/models/kos-log-manager/services/kos-log-manager-services.d.ts.map +1 -0
- package/models/models/kos-log-manager/types/index.d.ts +14 -0
- package/models/models/studio-properties/services/studio-properties-services.d.ts +3 -3
- package/models/models/studio-properties/services/studio-properties-services.d.ts.map +1 -1
- package/models/models/studio-properties/studio-properties-model.d.ts.map +1 -1
- package/models/models/trouble/index.d.ts +1 -0
- package/models/models/trouble/index.d.ts.map +1 -1
- package/models/models/trouble/trouble-model.d.ts.map +1 -1
- package/models/models/trouble/types/index.d.ts +353 -9
- package/models/models/trouble/utils/is-trouble-aware.d.ts +98 -0
- package/models/models/trouble/utils/is-trouble-aware.d.ts.map +1 -0
- package/models/utils/client.d.ts +5 -1
- package/models/utils/client.d.ts.map +1 -1
- package/models/utils/core-registration-manager.d.ts.map +1 -1
- package/models/utils/service.d.ts +11 -6
- package/models/utils/service.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ApiPath,
|
|
2
|
-
import {
|
|
1
|
+
import { ApiPath, ApiResponse } from '../../../utils/service';
|
|
2
|
+
import { ServiceResponse } from '../../../../core';
|
|
3
3
|
|
|
4
4
|
declare const SERVICE_PATH: ApiPath;
|
|
5
|
-
export type StudioPropertiesClientResponse =
|
|
5
|
+
export type StudioPropertiesClientResponse = ApiResponse<typeof SERVICE_PATH, "get">;
|
|
6
6
|
export interface StudioPropertiesResponse {
|
|
7
7
|
data?: Record<string, any>;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"studio-properties-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/studio-properties/services/studio-properties-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,
|
|
1
|
+
{"version":3,"file":"studio-properties-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/studio-properties/services/studio-properties-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAY,EAAE,KAAK,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAO7E,QAAA,MAAM,YAAY,EAAE,OAAsC,CAAC;AAC3D,MAAM,MAAM,8BAA8B,GAAG,WAAW,CAAC,OAAO,YAAY,EAAE,KAAK,CAAC,CAAC;AACrF,MAAM,WAAW,wBAAwB;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,iBAChB,MAAM,KACnB,QAAQ,gBAAgB,wBAAwB,CAAC,CAcnD,CAAC"}
|
|
@@ -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;
|
|
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,6 +1,7 @@
|
|
|
1
1
|
import * as TroubleServices from "./services";
|
|
2
2
|
export { Trouble } from './trouble-registration';
|
|
3
3
|
export type { DeferAware, ResolveAware, TroubleAware, TroubleModel, TroubleOptions, } from './types';
|
|
4
|
+
export * from './utils/is-trouble-aware';
|
|
4
5
|
export { EXTENSION_TROUBLE_DATA_MAPPER } from './utils/trouble-data-extension';
|
|
5
6
|
export { EXTENSION_TROUBLE_MAPPER } from './utils/trouble-extension';
|
|
6
7
|
export * from './utils/trouble-reducer';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EACV,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,cAAc,GACf,MAAM,SAAS,CAAC;AACjB,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AACrE,cAAc,yBAAyB,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trouble-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/trouble-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAInE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,UAAU,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"trouble-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/trouble-model.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACxB,MAAM,eAAe,CAAC;AAGvB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAInE,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAExE,eAAO,MAAM,UAAU,kBAAkB,CAAC;AAM1C,qBACa,gBAAgB,CAAC,cAAc,SAAS,MAAM,GAAG,GAAG,CAC/D,YAAW,YAAY,CAAC,cAAc,CAAC,EAAE,eAAe;IAExD,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,gBAAgB,CAAC;IACzB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAU;IAE7B,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,EAAE,oBAAoB,CAAC;IACpC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,IAAI,EAAE,cAAc,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IAEb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,OAAO,CAAwB;gBAErC,OAAO,EAAE,MAAM,EACf,EACE,UAAU,EACV,IAAI,EACJ,IAAI,EACJ,EAAE,EACF,UAAU,EACV,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,EACV,IAAI,EACJ,KAAK,EACL,GAAG,IAAI,EACR,EAAE,cAAc,EACjB,OAAO,EAAE,kBAAkB;IAyB7B,mBAAmB,CAAC,OAAO,EAAE,MAAM;IAWnC,sBAAsB,CAAC,OAAO,EAAE,MAAM;IAWtC,IAAI,KAAK,WAER;IACD,IAAI,KAAK,WAER;IAED,IAAI,QAAQ,WAEX;IAED,IAAI,SAAS,WAEZ;IAED,IAAI,UAAU,YAEb;IAED,IAAI,MAAM,uFAET;IAEK,iBAAiB;IAIvB,IAAI,iBAAiB,qEAMpB;IACD,IAAI,QAAQ,YAKX;IACD,IAAI,WAAW,IAAI,OAAO,CAMzB;IAED,UAAU;IAGV,KAAK;IAIL,WAAW;IAML,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM;CAc/B"}
|
|
@@ -3,98 +3,442 @@ import { FutureResponse } from '../../../services/future';
|
|
|
3
3
|
import { IKosDataModel } from '../../../core';
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
/**
|
|
7
|
+
* Configuration options for creating or updating a Trouble model.
|
|
8
|
+
*
|
|
9
|
+
* This interface defines all the properties that can be set when initializing
|
|
10
|
+
* a trouble instance. Troubles represent issues, alerts, or conditions that
|
|
11
|
+
* require attention in the KOS system.
|
|
12
|
+
*
|
|
13
|
+
* @template AdditionalData - Optional type parameter for domain-specific trouble data
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* const troubleOptions: TroubleOptions = {
|
|
18
|
+
* id: 'low-fluid-001',
|
|
19
|
+
* type: 'FLUID_LEVEL',
|
|
20
|
+
* reason: 'Fluid level below minimum threshold',
|
|
21
|
+
* rank: 7,
|
|
22
|
+
* role: 'operator',
|
|
23
|
+
* color: 'orange',
|
|
24
|
+
* resolvable: true,
|
|
25
|
+
* ifaces: ['fluid-monitor', 'alert-system'],
|
|
26
|
+
* tags: ['maintenance', 'fluid', 'warning'],
|
|
27
|
+
* createTime: new Date().toISOString()
|
|
28
|
+
* };
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @category Trouble Management
|
|
32
|
+
* @subcategory Types
|
|
33
|
+
*/
|
|
6
34
|
export interface TroubleOptions<AdditionalData extends object = any> {
|
|
35
|
+
/** Whether this trouble can be resolved through user action */
|
|
7
36
|
resolvable?: boolean;
|
|
37
|
+
/** Human-readable description of why the trouble occurred */
|
|
8
38
|
reason?: string;
|
|
39
|
+
/** ISO timestamp when the trouble was created */
|
|
9
40
|
createTime?: string;
|
|
41
|
+
/** List of interface identifiers this trouble affects */
|
|
10
42
|
ifaces: string[];
|
|
43
|
+
/** Unique identifier for the trouble instance */
|
|
11
44
|
id: string;
|
|
45
|
+
/** Priority rank from 1-10 (10 being most critical) */
|
|
12
46
|
rank: number;
|
|
47
|
+
/** User role required to view/resolve this trouble */
|
|
13
48
|
role: string;
|
|
49
|
+
/** Display color for UI representation (e.g., 'red', 'yellow', 'orange') */
|
|
14
50
|
color: string;
|
|
51
|
+
/** Client-specific data attached to the trouble */
|
|
15
52
|
clientData: unknown;
|
|
53
|
+
/** Classification type of the trouble (e.g., 'ERROR', 'WARNING', 'INFO') */
|
|
16
54
|
type: string;
|
|
55
|
+
/** Searchable tags for categorizing troubles */
|
|
17
56
|
tags: string[];
|
|
57
|
+
/** Additional information about the trouble state */
|
|
18
58
|
info: unknown;
|
|
59
|
+
/** Optional grouping identifier for related troubles */
|
|
19
60
|
group?: string;
|
|
61
|
+
/** Index signature for additional domain-specific data */
|
|
20
62
|
[key: keyof AdditionalData]: AdditionalData[key];
|
|
21
63
|
}
|
|
22
64
|
|
|
23
65
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
66
|
+
* Represents a trouble (issue, alert, or condition) in the KOS system.
|
|
67
|
+
*
|
|
68
|
+
* TroubleModel is the core interface for managing system issues, warnings, and
|
|
69
|
+
* alerts throughout the KOS platform. It provides a unified way to track,
|
|
70
|
+
* display, resolve, and defer various types of operational issues.
|
|
71
|
+
*
|
|
72
|
+
* ## Key Features
|
|
73
|
+
* - **Priority ranking** - Troubles are ranked 1-10 for severity
|
|
74
|
+
* - **Role-based visibility** - Troubles can be filtered by user role
|
|
75
|
+
* - **Resolution support** - Resolvable troubles can be cleared through actions
|
|
76
|
+
* - **Deferral capability** - Troubles can be temporarily deferred
|
|
77
|
+
* - **Future integration** - Async resolution through futures
|
|
78
|
+
* - **Type categorization** - Troubles grouped by type for filtering
|
|
79
|
+
* - **Visual indicators** - Color coding for UI representation
|
|
80
|
+
*
|
|
81
|
+
* @template AdditionalData - Type parameter for domain-specific trouble data
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```typescript
|
|
85
|
+
* // Check trouble severity
|
|
86
|
+
* function handleTrouble(trouble: TroubleModel) {
|
|
87
|
+
* if (trouble.rank >= 8) {
|
|
88
|
+
* console.error(`Critical trouble: ${trouble.reason}`);
|
|
89
|
+
* notifyOperator(trouble);
|
|
90
|
+
* } else if (trouble.rank >= 5) {
|
|
91
|
+
* console.warn(`Warning: ${trouble.reason}`);
|
|
92
|
+
* }
|
|
93
|
+
*
|
|
94
|
+
* // Check if user can resolve
|
|
95
|
+
* if (trouble.resolvable && hasRole(trouble.role)) {
|
|
96
|
+
* showResolveButton(trouble);
|
|
97
|
+
* }
|
|
98
|
+
* }
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* @example
|
|
102
|
+
* ```typescript
|
|
103
|
+
* // Resolve a trouble with proper future handling
|
|
104
|
+
* async function resolveTrouble(trouble: TroubleModel) {
|
|
105
|
+
* if (!trouble.resolvable) {
|
|
106
|
+
* throw new Error('Trouble is not resolvable');
|
|
107
|
+
* }
|
|
108
|
+
*
|
|
109
|
+
* try {
|
|
110
|
+
* // Resolution returns a FutureResponse with future tracking
|
|
111
|
+
* const futureResponse = await trouble.resolve();
|
|
112
|
+
* if (futureResponse) {
|
|
113
|
+
* console.log(`Resolution started, future ID: ${futureResponse.id}`);
|
|
114
|
+
*
|
|
115
|
+
* // The trouble's future property will be updated with the resolution future
|
|
116
|
+
* // You can track progress through the future model
|
|
117
|
+
* if (trouble.future) {
|
|
118
|
+
* const endState = await trouble.future.waitForCompletion();
|
|
119
|
+
* if (endState === 'COMPLETED') {
|
|
120
|
+
* console.log('Trouble resolved successfully');
|
|
121
|
+
* } else if (endState === 'FAILED') {
|
|
122
|
+
* console.error('Resolution failed');
|
|
123
|
+
* }
|
|
124
|
+
* }
|
|
125
|
+
* }
|
|
126
|
+
* } catch (error) {
|
|
127
|
+
* console.error('Failed to initiate resolution:', error);
|
|
128
|
+
* }
|
|
129
|
+
* }
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @example
|
|
133
|
+
* ```typescript
|
|
134
|
+
* // Using cancellable promise utilities with trouble resolution
|
|
135
|
+
* import { createCancellablePromise } from '@kosdev-code/kos-ui-sdk';
|
|
136
|
+
*
|
|
137
|
+
* async function resolveTroubleWithCancel(trouble: TroubleModel) {
|
|
138
|
+
* const futureResponse = await trouble.resolve();
|
|
139
|
+
*
|
|
140
|
+
* if (futureResponse && trouble.future) {
|
|
141
|
+
* // Create a cancellable promise for the resolution
|
|
142
|
+
* const cancellableResolve = createCancellablePromise(
|
|
143
|
+
* trouble.future.waitForCompletion(),
|
|
144
|
+
* undefined,
|
|
145
|
+
* () => trouble.future?.cancelFuture(),
|
|
146
|
+
* trouble.future
|
|
147
|
+
* );
|
|
148
|
+
*
|
|
149
|
+
* // Subscribe to progress updates
|
|
150
|
+
* const unsubscribe = cancellableResolve.onProgressUpdate((progress, status) => {
|
|
151
|
+
* console.log(`Resolution progress: ${(progress * 100).toFixed(0)}% - ${status}`);
|
|
152
|
+
* });
|
|
153
|
+
*
|
|
154
|
+
* try {
|
|
155
|
+
* const endState = await cancellableResolve;
|
|
156
|
+
* console.log(`Resolution completed with state: ${endState}`);
|
|
157
|
+
* } catch (error) {
|
|
158
|
+
* if (cancellableResolve.isCancelled()) {
|
|
159
|
+
* console.log('Resolution was cancelled');
|
|
160
|
+
* } else {
|
|
161
|
+
* console.error('Resolution failed:', error);
|
|
162
|
+
* }
|
|
163
|
+
* } finally {
|
|
164
|
+
* unsubscribe();
|
|
165
|
+
* }
|
|
166
|
+
* }
|
|
167
|
+
* }
|
|
168
|
+
* ```
|
|
169
|
+
*
|
|
170
|
+
*
|
|
171
|
+
* @category KOS Model
|
|
172
|
+
* @subcategory Trouble Management
|
|
173
|
+
*
|
|
174
|
+
* @see {@link TroubleAware} - Interface for models that can have troubles
|
|
175
|
+
* @see {@link DeferAware} - Deferral capabilities
|
|
176
|
+
* @see {@link ResolveAware} - Resolution capabilities
|
|
26
177
|
*/
|
|
27
178
|
export interface TroubleModel<AdditionalData extends object = any>
|
|
28
179
|
extends IKosDataModel,
|
|
29
180
|
DeferAware,
|
|
30
181
|
FutureContainer {
|
|
182
|
+
/** Unique identifier for the trouble instance */
|
|
31
183
|
id: string;
|
|
184
|
+
/** Whether this trouble can be resolved through user action */
|
|
32
185
|
resolvable?: boolean;
|
|
186
|
+
/** Human-readable description of why the trouble occurred */
|
|
33
187
|
reason?: string;
|
|
188
|
+
/** ISO timestamp when the trouble was created */
|
|
34
189
|
createTime?: string;
|
|
190
|
+
/** List of interface identifiers this trouble affects */
|
|
35
191
|
ifaces: string[];
|
|
36
|
-
|
|
192
|
+
/** Client-specific data attached to the trouble */
|
|
37
193
|
clientData: unknown;
|
|
194
|
+
/** Associated future for async resolution operations */
|
|
38
195
|
future?: IFutureModel;
|
|
196
|
+
/** Classification type of the trouble (e.g., 'ERROR', 'WARNING', 'INFO') */
|
|
39
197
|
type: string;
|
|
198
|
+
/** Searchable tags for categorizing troubles */
|
|
40
199
|
tags: string[];
|
|
200
|
+
/** Additional information about the trouble state */
|
|
41
201
|
info: unknown;
|
|
202
|
+
/** Original trouble ID before any transformations */
|
|
42
203
|
rawId: string;
|
|
204
|
+
/** Resolves the trouble, returning a promise with the resolution response */
|
|
43
205
|
resolve: () => Promise<FutureResponse | undefined>;
|
|
206
|
+
/** Domain-specific additional data attached to the trouble */
|
|
44
207
|
data: AdditionalData;
|
|
208
|
+
/** Priority rank from 1-10 (10 being most critical) */
|
|
45
209
|
rank: number;
|
|
210
|
+
/** User role required to view/resolve this trouble */
|
|
46
211
|
role: string;
|
|
212
|
+
/** Display color for UI representation (e.g., 'red', 'yellow', 'orange') */
|
|
47
213
|
color: string;
|
|
214
|
+
/** Whether this trouble has been deferred */
|
|
48
215
|
deferred: boolean;
|
|
216
|
+
/** Optional grouping identifier for related troubles */
|
|
49
217
|
group?: string;
|
|
50
218
|
}
|
|
51
219
|
|
|
220
|
+
/**
|
|
221
|
+
* Domain-specific trouble data for handle-related issues.
|
|
222
|
+
*
|
|
223
|
+
* @category Trouble Management
|
|
224
|
+
* @subcategory Domain Data
|
|
225
|
+
*/
|
|
52
226
|
export interface HandleTroubleData {
|
|
227
|
+
/** Path to the affected handle component */
|
|
53
228
|
path: string;
|
|
54
229
|
}
|
|
55
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Domain-specific trouble data for nozzle-related issues.
|
|
233
|
+
*
|
|
234
|
+
* @category Trouble Management
|
|
235
|
+
* @subcategory Domain Data
|
|
236
|
+
*/
|
|
56
237
|
export interface NozzleTroubleData {
|
|
238
|
+
/** Path to the affected nozzle component */
|
|
57
239
|
nozzlePath: string;
|
|
58
240
|
}
|
|
59
241
|
|
|
242
|
+
/**
|
|
243
|
+
* Domain-specific trouble data for container-related issues.
|
|
244
|
+
*
|
|
245
|
+
* @category Trouble Management
|
|
246
|
+
* @subcategory Domain Data
|
|
247
|
+
*/
|
|
60
248
|
export interface ContainerTroubleData {
|
|
249
|
+
/** Identifier of the affected container */
|
|
61
250
|
containerId: string;
|
|
251
|
+
/** List of ingredients involved in the trouble */
|
|
62
252
|
ingredients: string[];
|
|
63
253
|
}
|
|
64
254
|
|
|
255
|
+
/**
|
|
256
|
+
* Interface for objects that can be resolved asynchronously.
|
|
257
|
+
*
|
|
258
|
+
* Provides a standard resolution mechanism for troubles and other
|
|
259
|
+
* resolvable conditions in the KOS system. Resolution typically
|
|
260
|
+
* involves sending a command to clear the condition.
|
|
261
|
+
*
|
|
262
|
+
* @example
|
|
263
|
+
* ```typescript
|
|
264
|
+
* class ResolvableTrouble implements ResolveAware {
|
|
265
|
+
* async resolve(tracker?: string) {
|
|
266
|
+
* console.log(`Resolving with tracker: ${tracker}`);
|
|
267
|
+
* const response = await sendResolveCommand(this.id, tracker);
|
|
268
|
+
* return response;
|
|
269
|
+
* }
|
|
270
|
+
* }
|
|
271
|
+
* ```
|
|
272
|
+
*
|
|
273
|
+
* @category Trouble Management
|
|
274
|
+
* @subcategory Capabilities
|
|
275
|
+
*/
|
|
65
276
|
export interface ResolveAware {
|
|
277
|
+
/**
|
|
278
|
+
* Resolves the condition asynchronously.
|
|
279
|
+
*
|
|
280
|
+
* @param tracker - Optional tracking identifier for the resolution operation
|
|
281
|
+
* @returns Promise resolving to the future response, or undefined if resolution fails
|
|
282
|
+
*/
|
|
66
283
|
resolve: (tracker?: string) => Promise<FutureResponse | undefined>;
|
|
67
284
|
}
|
|
68
285
|
|
|
286
|
+
/**
|
|
287
|
+
* Interface for objects that support deferral of actions.
|
|
288
|
+
*
|
|
289
|
+
* Deferral allows temporary postponement of trouble handling or
|
|
290
|
+
* other actions. Deferred items can be cleared to restore normal
|
|
291
|
+
* processing. This is useful for managing low-priority issues
|
|
292
|
+
* during critical operations.
|
|
293
|
+
*
|
|
294
|
+
* @example
|
|
295
|
+
* ```typescript
|
|
296
|
+
* class DeferrableTrouble implements DeferAware {
|
|
297
|
+
* shouldDefer = false;
|
|
298
|
+
* deferred = false;
|
|
299
|
+
*
|
|
300
|
+
* defer() {
|
|
301
|
+
* this.deferred = true;
|
|
302
|
+
* console.log('Trouble deferred');
|
|
303
|
+
* }
|
|
304
|
+
*
|
|
305
|
+
* clearDefer() {
|
|
306
|
+
* this.deferred = false;
|
|
307
|
+
* console.log('Deferral cleared');
|
|
308
|
+
* }
|
|
309
|
+
* }
|
|
310
|
+
*
|
|
311
|
+
* // Usage
|
|
312
|
+
* if (trouble.shouldDefer && !trouble.deferred) {
|
|
313
|
+
* trouble.defer();
|
|
314
|
+
* }
|
|
315
|
+
* ```
|
|
316
|
+
*
|
|
317
|
+
* @category Trouble Management
|
|
318
|
+
* @subcategory Capabilities
|
|
319
|
+
*/
|
|
69
320
|
export interface DeferAware {
|
|
321
|
+
/** Whether this item should be deferred based on current conditions */
|
|
70
322
|
shouldDefer: boolean;
|
|
323
|
+
/** Current deferral state */
|
|
71
324
|
deferred: boolean;
|
|
325
|
+
/** Defers the item, preventing normal processing */
|
|
72
326
|
defer: VoidFunction;
|
|
327
|
+
/** Clears the deferral, allowing normal processing to resume */
|
|
73
328
|
clearDefer: VoidFunction;
|
|
74
329
|
}
|
|
75
330
|
/**
|
|
76
|
-
*
|
|
331
|
+
* Interface for models that can track and expose trouble states.
|
|
332
|
+
*
|
|
333
|
+
* TroubleAware provides a standardized way for KOS models to expose
|
|
334
|
+
* their trouble states, making it easy to monitor, display, and react
|
|
335
|
+
* to issues throughout the system. Any model implementing this interface
|
|
336
|
+
* can be monitored for troubles and integrated with trouble management UI.
|
|
337
|
+
*
|
|
338
|
+
* ## Key Concepts
|
|
339
|
+
* - **Trouble aggregation** - Models can aggregate troubles from multiple sources
|
|
340
|
+
* - **Status summary** - Provides a single status string for quick checks
|
|
341
|
+
* - **Type grouping** - Troubles organized by type for filtering and display
|
|
342
|
+
* - **Read-only access** - Troubles are exposed as readonly for safety
|
|
343
|
+
*
|
|
344
|
+
* @example
|
|
345
|
+
* ```typescript
|
|
346
|
+
* // Check if a model has troubles
|
|
347
|
+
* function checkModelHealth(model: TroubleAware) {
|
|
348
|
+
* if (model.troubles.length > 0) {
|
|
349
|
+
* console.warn(`Model has ${model.troubles.length} troubles`);
|
|
350
|
+
* console.warn(`Status: ${model.troubleStatus}`);
|
|
351
|
+
*
|
|
352
|
+
* // Check specific trouble types
|
|
353
|
+
* const errors = model.troublesByType['ERROR'] || [];
|
|
354
|
+
* const warnings = model.troublesByType['WARNING'] || [];
|
|
355
|
+
*
|
|
356
|
+
* if (errors.length > 0) {
|
|
357
|
+
* handleCriticalErrors(errors);
|
|
358
|
+
* }
|
|
359
|
+
* }
|
|
360
|
+
* }
|
|
361
|
+
* ```
|
|
362
|
+
*
|
|
363
|
+
* @example
|
|
364
|
+
* ```typescript
|
|
365
|
+
* // React component using TroubleAware
|
|
366
|
+
* const TroubleIndicator: React.FC<{ model: TroubleAware }> = ({ model }) => {
|
|
367
|
+
* const troubles = model.troubles;
|
|
368
|
+
* const highPriority = troubles.filter(t => t.rank >= 7);
|
|
369
|
+
*
|
|
370
|
+
* if (troubles.length === 0) {
|
|
371
|
+
* return <StatusIcon color="green" />;
|
|
372
|
+
* }
|
|
373
|
+
*
|
|
374
|
+
* return (
|
|
375
|
+
* <div className="trouble-indicator">
|
|
376
|
+
* <StatusIcon color={highPriority.length > 0 ? 'red' : 'yellow'} />
|
|
377
|
+
* <span>{model.troubleStatus}</span>
|
|
378
|
+
* <Badge count={troubles.length} />
|
|
379
|
+
* </div>
|
|
380
|
+
* );
|
|
381
|
+
* };
|
|
382
|
+
* ```
|
|
383
|
+
*
|
|
384
|
+
* @example
|
|
385
|
+
* ```typescript
|
|
386
|
+
* // Implementing TroubleAware
|
|
387
|
+
* class MyModel implements TroubleAware {
|
|
388
|
+
* private _troubles: TroubleModel[] = [];
|
|
77
389
|
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
390
|
+
* get troubles(): readonly TroubleModel[] {
|
|
391
|
+
* return this._troubles;
|
|
392
|
+
* }
|
|
80
393
|
*
|
|
394
|
+
* get troubleStatus(): string {
|
|
395
|
+
* if (this._troubles.length === 0) return 'OK';
|
|
396
|
+
* const highest = this._troubles.reduce((max, t) =>
|
|
397
|
+
* t.rank > max.rank ? t : max
|
|
398
|
+
* );
|
|
399
|
+
* return highest.reason || 'Unknown issue';
|
|
400
|
+
* }
|
|
81
401
|
*
|
|
402
|
+
* get troublesByType(): Record<string, TroubleModel[]> {
|
|
403
|
+
* return this._troubles.reduce((groups, trouble) => {
|
|
404
|
+
* const type = trouble.type;
|
|
405
|
+
* groups[type] = groups[type] || [];
|
|
406
|
+
* groups[type].push(trouble);
|
|
407
|
+
* return groups;
|
|
408
|
+
* }, {} as Record<string, TroubleModel[]>);
|
|
409
|
+
* }
|
|
410
|
+
* }
|
|
411
|
+
* ```
|
|
82
412
|
*
|
|
413
|
+
* @category Trouble Management
|
|
414
|
+
* @subcategory Interfaces
|
|
83
415
|
*
|
|
416
|
+
* @see {@link TroubleModel} - The trouble model interface
|
|
417
|
+
* @see {@link isTroubleAware} - Type guard for checking TroubleAware
|
|
418
|
+
* @see {@link useTroubleDecoration} - Hook for trouble-based styling
|
|
84
419
|
*/
|
|
85
420
|
export interface TroubleAware {
|
|
86
421
|
/**
|
|
87
|
-
*
|
|
422
|
+
* Array of troubles directly related to this model.
|
|
423
|
+
* Troubles are typically sorted by rank (highest priority first).
|
|
88
424
|
*/
|
|
89
425
|
readonly troubles: TroubleModel[];
|
|
90
426
|
|
|
91
427
|
/**
|
|
92
|
-
*
|
|
428
|
+
* Summary status string representing the highest priority trouble.
|
|
429
|
+
* Returns a human-readable status or 'OK' if no troubles exist.
|
|
93
430
|
*/
|
|
94
431
|
readonly troubleStatus: string;
|
|
95
432
|
|
|
96
433
|
/**
|
|
97
|
-
*
|
|
434
|
+
* Troubles organized by their type property.
|
|
435
|
+
* Useful for filtering and categorized display of issues.
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* ```typescript
|
|
439
|
+
* const errorTroubles = model.troublesByType['ERROR'] || [];
|
|
440
|
+
* const warningTroubles = model.troublesByType['WARNING'] || [];
|
|
441
|
+
* ```
|
|
98
442
|
*/
|
|
99
443
|
readonly troublesByType: Record<string, TroubleModel[]>;
|
|
100
444
|
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { TroubleAware } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Type guard function to check if an object implements the TroubleAware interface.
|
|
5
|
+
*
|
|
6
|
+
* This function performs runtime validation to determine whether a given object
|
|
7
|
+
* has the necessary properties and structure to be considered trouble-aware.
|
|
8
|
+
* It checks for the presence of both the `troubles` array and `troublesByType`
|
|
9
|
+
* object, which are required by the TroubleAware interface.
|
|
10
|
+
*
|
|
11
|
+
* @category Utilities
|
|
12
|
+
* @subcategory Trouble Management
|
|
13
|
+
*
|
|
14
|
+
* @param obj - The object to check for trouble awareness. Can be any type.
|
|
15
|
+
*
|
|
16
|
+
* @returns `true` if the object implements TroubleAware interface, `false` otherwise.
|
|
17
|
+
* When this function returns true, TypeScript will narrow the type of `obj`
|
|
18
|
+
* to `TroubleAware` in the current scope.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* // Basic type guard usage
|
|
23
|
+
* function processModel(model: IKosDataModel) {
|
|
24
|
+
* if (isTroubleAware(model)) {
|
|
25
|
+
* // TypeScript now knows model has troubles property
|
|
26
|
+
* console.log(`Found ${model.troubles.length} troubles`);
|
|
27
|
+
* console.log(`Trouble status: ${model.troubleStatus}`);
|
|
28
|
+
* } else {
|
|
29
|
+
* console.log('Model is not trouble-aware');
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
* ```
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* // Using with React hooks for conditional trouble handling
|
|
37
|
+
* const TroubleDisplay: React.FC<{ model: IKosDataModel }> = ({ model }) => {
|
|
38
|
+
* if (!isTroubleAware(model)) {
|
|
39
|
+
* return <div>No trouble tracking available</div>;
|
|
40
|
+
* }
|
|
41
|
+
*
|
|
42
|
+
* // Safe to access trouble properties here
|
|
43
|
+
* const criticalTroubles = model.troubles.filter(t => t.rank > 8);
|
|
44
|
+
* const troubleTypes = Object.keys(model.troublesByType);
|
|
45
|
+
*
|
|
46
|
+
* return (
|
|
47
|
+
* <div>
|
|
48
|
+
* <h3>Trouble Status: {model.troubleStatus}</h3>
|
|
49
|
+
* <p>Critical issues: {criticalTroubles.length}</p>
|
|
50
|
+
* <p>Types: {troubleTypes.join(', ')}</p>
|
|
51
|
+
* </div>
|
|
52
|
+
* );
|
|
53
|
+
* };
|
|
54
|
+
* ```
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```typescript
|
|
58
|
+
* // Filtering trouble-aware models from a collection
|
|
59
|
+
* const models: IKosDataModel[] = getAllModels();
|
|
60
|
+
* const troubleAwareModels = models.filter(isTroubleAware);
|
|
61
|
+
*
|
|
62
|
+
* // TypeScript knows troubleAwareModels is TroubleAware[]
|
|
63
|
+
* troubleAwareModels.forEach(model => {
|
|
64
|
+
* const troublesByType = model.troublesByType;
|
|
65
|
+
* Object.entries(troublesByType).forEach(([type, troubles]) => {
|
|
66
|
+
* console.log(`Type ${type}: ${troubles.length} troubles`);
|
|
67
|
+
* });
|
|
68
|
+
* });
|
|
69
|
+
* ```
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```typescript
|
|
73
|
+
* // Early return pattern for non-trouble-aware models
|
|
74
|
+
* function calculateTroubleSeverity(model: any): number {
|
|
75
|
+
* if (!isTroubleAware(model)) {
|
|
76
|
+
* return 0; // No troubles means no severity
|
|
77
|
+
* }
|
|
78
|
+
*
|
|
79
|
+
* // Calculate weighted severity based on trouble ranks
|
|
80
|
+
* return model.troubles.reduce((total, trouble) => {
|
|
81
|
+
* return total + (trouble.rank * (trouble.deferred ? 0.5 : 1));
|
|
82
|
+
* }, 0);
|
|
83
|
+
* }
|
|
84
|
+
* ```
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* - This is a runtime check, not a compile-time check
|
|
88
|
+
* - The function checks for structural compatibility, not nominal typing
|
|
89
|
+
* - It validates that `troubles` is specifically an Array instance, not just array-like
|
|
90
|
+
* - The `troublesByType` property must be an object (not null or undefined)
|
|
91
|
+
* - Does not validate the contents of the arrays or object, only their presence and type
|
|
92
|
+
* - This function is commonly used as a guard before accessing trouble-related properties
|
|
93
|
+
*
|
|
94
|
+
* @see {@link TroubleAware} - The interface this function checks for
|
|
95
|
+
* @see {@link useTroubleDecoration} - Hook that uses this guard internally
|
|
96
|
+
*/
|
|
97
|
+
export declare function isTroubleAware(obj: any): obj is TroubleAware;
|
|
98
|
+
//# sourceMappingURL=is-trouble-aware.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"is-trouble-aware.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/trouble/utils/is-trouble-aware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6FG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,YAAY,CAO5D"}
|
package/models/utils/client.d.ts
CHANGED
|
@@ -57,7 +57,11 @@ export declare const api: {
|
|
|
57
57
|
} | undefined) => Promise<import('../../core').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
58
58
|
delete: <K_3 extends "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/select" | "/api/app/kosdev.ddk/copyLogs/{id}" | "/api/ext/dispense/metrics/{name}" | "/api/ext/dispense/metrics/{nozzle}/{name}" | "/api/ext/dispense/assignments/{holderPath}" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests/{manifestId}" | "/api/kos/nodeMgr/blockedManifests/{manifestId}" | "/api/kos/criticalData/data/{name}" | "/api/app/tccc.fits/medusa/profiles/{profileId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/recipes/{name}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/{testId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/builder/blocks" | "/api/app/tccc.fits/medusa/profiles/{profileId}/builder/bevs/{bevId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/results/{resultsId}" | "/api/app/tccc.fits/scales/{serialNum}" | "/api/app/tccc.fits.sim/scales/{serialNum}" | "/api/app/tccc.fits/session/data/{key}">(endpoint: K_3, params?: (paths[K_3]["delete"] extends {
|
|
59
59
|
parameters: infer P_3;
|
|
60
|
-
} ? P_3 : never) | undefined,
|
|
60
|
+
} ? P_3 : never) | undefined, body?: (paths[K_3]["put"] extends {
|
|
61
|
+
requestBody: {
|
|
62
|
+
content: infer B_1;
|
|
63
|
+
};
|
|
64
|
+
} ? B_1[keyof B_1] : never) | undefined, options?: {
|
|
61
65
|
ordered?: boolean | undefined;
|
|
62
66
|
tracker?: string | undefined;
|
|
63
67
|
timeout?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/client.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACpB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAEzC,MAAM,MAAM,gBAAgB,CAC1B,CAAC,SAAS,MAAM,KAAK,EACrB,CAAC,SAAS,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAClC,cAAc,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-registration-manager.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/core-registration-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,KAAK,kBAAkB,EACxB,MAAM,YAAY,CAAC;AAkBpB,eAAO,MAAM,kBAAkB,YACnB,CAAC;;;;;
|
|
1
|
+
{"version":3,"file":"core-registration-manager.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/core-registration-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EAGnB,KAAK,kBAAkB,EACxB,MAAM,YAAY,CAAC;AAkBpB,eAAO,MAAM,kBAAkB,YACnB,CAAC;;;;;CA8BV,CAAC;AAEJ,KAAK,aAAa,CAAC,CAAC,IAAI;IACtB,IAAI,EAAE;QAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,CAAA;KAAE,CAAC;IAC9C,OAAO,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IACnE,KAAK,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7D,SAAS,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;CACtE,CAAC;AAEF,QAAA,MAAM,iBAAiB,IAAK,CAAC;AAc7B,KAAK,oBAAoB,GAAG,aAAa,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEpE,QAAA,MAAM,gBAAgB,EAAE,oBAA+C,CAAC;AAExE,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
|