@kosdev-code/kos-ui-sdk 0.1.0-dev.5789 → 0.1.0-dev.5796
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/eventBus.d.ts +30 -0
- package/common/events/eventBus.d.ts.map +1 -1
- package/common/events/eventBus.functional.d.ts +48 -0
- package/common/events/eventBus.functional.d.ts.map +1 -1
- package/common/events/eventBus.state.d.ts +33 -0
- package/common/events/eventBus.state.d.ts.map +1 -1
- package/core/core/decorators/kos-child.d.ts +2 -0
- package/core/core/decorators/kos-child.d.ts.map +1 -1
- package/core/core/decorators/kos-companion.d.ts +14 -0
- package/core/core/decorators/kos-companion.d.ts.map +1 -1
- package/core/core/decorators/kos-container-aware.d.ts +21 -0
- package/core/core/decorators/kos-container-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-context.d.ts +6 -0
- package/core/core/decorators/kos-context.d.ts.map +1 -1
- package/core/core/decorators/kos-execution-context.d.ts +4 -1
- package/core/core/decorators/kos-execution-context.d.ts.map +1 -1
- package/core/core/decorators/kos-future-aware.d.ts +12 -0
- package/core/core/decorators/kos-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-http-decorators.d.ts +15 -0
- package/core/core/decorators/kos-http-decorators.d.ts.map +1 -1
- package/core/core/decorators/kos-log.d.ts +4 -0
- package/core/core/decorators/kos-log.d.ts.map +1 -1
- package/core/core/decorators/kos-logger-aware.d.ts +9 -0
- package/core/core/decorators/kos-logger-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-model-effect.d.ts +9 -0
- package/core/core/decorators/kos-model-effect.d.ts.map +1 -1
- package/core/core/decorators/kos-multiple-future-aware.d.ts +14 -0
- package/core/core/decorators/kos-multiple-future-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-parent.d.ts +4 -0
- package/core/core/decorators/kos-parent.d.ts.map +1 -1
- package/core/core/decorators/kos-reference.d.ts +9 -0
- package/core/core/decorators/kos-reference.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +25 -0
- package/core/core/decorators/kos-service-request.d.ts.map +1 -1
- package/core/core/decorators/kos-state-machine.d.ts +24 -0
- package/core/core/decorators/kos-state-machine.d.ts.map +1 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts +17 -1
- package/core/core/decorators/kos-topic-handler-flow-control.d.ts.map +1 -1
- package/core/core/decorators/kos-trouble-aware.d.ts +6 -0
- package/core/core/decorators/kos-trouble-aware.d.ts.map +1 -1
- package/core/core/decorators/kos-view-model.d.ts +14 -0
- package/core/core/decorators/kos-view-model.d.ts.map +1 -1
- package/core/core/decorators/kosDependency.d.ts +2 -0
- package/core/core/decorators/kosDependency.d.ts.map +1 -1
- package/core/core/decorators/kosModel.d.ts +2 -0
- package/core/core/decorators/kosModel.d.ts.map +1 -1
- package/core/core/decorators/kosSubscribe.d.ts +9 -0
- package/core/core/decorators/kosSubscribe.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +27 -0
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/extension/extension-manager.d.ts +49 -0
- package/core/core/extension/extension-manager.d.ts.map +1 -1
- package/core/core/extension/initialize-extension.d.ts +24 -0
- package/core/core/extension/initialize-extension.d.ts.map +1 -1
- package/core/core/extension/plugin-extension-manager.d.ts +11 -0
- package/core/core/extension/plugin-extension-manager.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +38 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/services/browser-router.d.ts.map +1 -1
- package/core/types/kos-dependency.d.ts +10 -1
- package/core/types/kos-dependency.d.ts.map +1 -1
- package/core/types/service-response-store.d.ts +10 -0
- package/core/types/service-response-store.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +59 -0
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/ancestor-path-visitor.d.ts +2 -0
- package/core/util/ancestor-path-visitor.d.ts.map +1 -1
- package/core/util/api-request-id.d.ts +4 -0
- package/core/util/api-request-id.d.ts.map +1 -1
- package/core/util/apply-mixins.d.ts +4 -0
- package/core/util/apply-mixins.d.ts.map +1 -1
- package/core/util/array-utils.d.ts +4 -0
- package/core/util/array-utils.d.ts.map +1 -1
- package/core/util/container-utils.d.ts +14 -0
- package/core/util/container-utils.d.ts.map +1 -1
- package/core/util/date-utils.d.ts +29 -0
- package/core/util/date-utils.d.ts.map +1 -1
- package/core/util/debounce.d.ts +3 -0
- package/core/util/debounce.d.ts.map +1 -1
- package/core/util/feature-flags.d.ts +19 -0
- package/core/util/feature-flags.d.ts.map +1 -1
- package/core/util/get-query-params.d.ts +4 -0
- package/core/util/get-query-params.d.ts.map +1 -1
- package/core/util/hsl-to-hex.d.ts +16 -0
- package/core/util/hsl-to-hex.d.ts.map +1 -1
- package/core/util/kos-config-init.d.ts +36 -0
- package/core/util/kos-config-init.d.ts.map +1 -1
- package/core/util/kos-data-mapper-utils.d.ts +9 -0
- package/core/util/kos-data-mapper-utils.d.ts.map +1 -1
- package/core/util/kos-fetch.d.ts +12 -0
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/core/util/kos-message-utils.d.ts +88 -0
- package/core/util/kos-message-utils.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +46 -0
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/core/util/kos-model-visitor.d.ts +2 -0
- package/core/util/kos-model-visitor.d.ts.map +1 -1
- package/core/util/kos-service-request.d.ts +31 -0
- package/core/util/kos-service-request.d.ts.map +1 -1
- package/core/util/log-utils.d.ts +12 -0
- package/core/util/log-utils.d.ts.map +1 -1
- package/core/util/middleware.d.ts +15 -0
- package/core/util/middleware.d.ts.map +1 -1
- package/core/util/model-attribute-utils.d.ts +7 -0
- package/core/util/model-attribute-utils.d.ts.map +1 -1
- package/core/util/model-factory.d.ts +4 -0
- package/core/util/model-factory.d.ts.map +1 -1
- package/core/util/model-registration-utils.d.ts +8 -0
- package/core/util/model-registration-utils.d.ts.map +1 -1
- package/core/util/model-utils.d.ts +30 -6
- package/core/util/model-utils.d.ts.map +1 -1
- package/core/util/observable-proxy-map.d.ts +11 -0
- package/core/util/observable-proxy-map.d.ts.map +1 -1
- package/core/util/paired-client-heartbeat.d.ts +2 -0
- package/core/util/paired-client-heartbeat.d.ts.map +1 -1
- package/core/util/pipe.d.ts +4 -0
- package/core/util/pipe.d.ts.map +1 -1
- package/core/util/retry-with-exponential-backoff.d.ts +3 -0
- package/core/util/retry-with-exponential-backoff.d.ts.map +1 -1
- package/core/util/service-factory.d.ts +10 -0
- package/core/util/service-factory.d.ts.map +1 -1
- package/core/util/service-request-error.d.ts +4 -0
- package/core/util/service-request-error.d.ts.map +1 -1
- package/core/util/service-response.d.ts +15 -0
- package/core/util/service-response.d.ts.map +1 -1
- package/core/util/session-utils.d.ts +8 -0
- package/core/util/session-utils.d.ts.map +1 -1
- package/core/util/wait-for-request.d.ts +16 -0
- package/core/util/wait-for-request.d.ts.map +1 -1
- package/core/util/when-ready.d.ts +3 -0
- package/core/util/when-ready.d.ts.map +1 -1
- package/index.cjs +34 -34
- package/index.cjs.map +1 -1
- package/index.d.cts +5 -5
- package/index.d.ts +5 -5
- package/index.d.ts.map +1 -1
- package/index.js +3864 -3858
- package/index.js.map +1 -1
- package/kos-models.json +1 -1
- package/models/models/browser-router/types/index.d.ts +1 -0
- package/models/models/canvas-dispatcher/types/index.d.ts +5 -0
- package/models/models/canvas-renderer/types/index.d.ts +5 -0
- package/models/models/config-bean/types/index.d.ts +1 -0
- package/models/models/config-bean-prop/types/index.d.ts +6 -0
- package/models/models/device/types/index.d.ts +1 -0
- package/models/models/future/future-types.d.ts +14 -0
- package/models/models/future/future-types.d.ts.map +1 -1
- package/models/models/gpio-chip/types/index.d.ts +10 -0
- package/models/models/gpio-pin/types/index.d.ts +10 -0
- package/models/models/key-value/types/index.d.ts +1 -0
- package/models/models/kos-expression-evaluator/types/index.d.ts +5 -0
- package/models/models/kos-log-manager/types/index.d.ts +4 -0
- package/models/models/kos-time/types/index.d.ts +3 -0
- package/models/models/log-block/types/index.d.ts +4 -0
- package/models/models/log-stream/types/index.d.ts +3 -1
- package/models/models/network-interface/types/index.d.ts +1 -0
- package/models/models/ota/types/index.d.ts +31 -0
- package/models/models/region-info/types/index.d.ts +49 -0
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +4 -0
- package/models/models/state-bean/types/index.d.ts +3 -0
- package/models/models/state-prop/types/index.d.ts +2 -0
- package/models/models/storage-device/types/index.d.ts +2 -0
- package/models/models/translation/types/index.d.ts +3 -0
- package/models/models/trouble/types/index.d.ts +8 -0
- package/models/models/trouble-container/types/index.d.ts +5 -0
- package/models/models/usb-update/types/index.d.ts +10 -0
- package/package.json +3 -2
- package/ui/hooks/device/use-device.d.ts +6 -0
- package/ui/hooks/device/use-device.d.ts.map +1 -1
- package/ui/hooks/kos-time/use-kos-time.d.ts +6 -0
- package/ui/hooks/kos-time/use-kos-time.d.ts.map +1 -1
- package/ui/hooks/network-interface-container/use-network-interface-container.d.ts +6 -0
- package/ui/hooks/network-interface-container/use-network-interface-container.d.ts.map +1 -1
- package/ui/hooks/ota/use-ota.d.ts +6 -0
- package/ui/hooks/ota/use-ota.d.ts.map +1 -1
- package/ui/hooks/software-info/use-software-info.d.ts +6 -0
- package/ui/hooks/software-info/use-software-info.d.ts.map +1 -1
- package/ui/hooks/storage-device-container/use-storage-device-container.d.ts +6 -0
- package/ui/hooks/storage-device-container/use-storage-device-container.d.ts.map +1 -1
- package/ui/hooks/translation-container/trans.d.ts +6 -0
- package/ui/hooks/translation-container/trans.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation-container.d.ts +6 -0
- package/ui/hooks/translation-container/use-translation-container.d.ts.map +1 -1
- package/ui/hooks/translation-container/use-translation.d.ts +7 -0
- package/ui/hooks/translation-container/use-translation.d.ts.map +1 -1
- package/ui/hooks/translation-container/with-translation-container.d.ts +6 -0
- package/ui/hooks/translation-container/with-translation-container.d.ts.map +1 -1
- package/ui/hooks/usb-update-container/use-usb-update-container.d.ts +6 -0
- package/ui/hooks/usb-update-container/use-usb-update-container.d.ts.map +1 -1
- package/ui/hooks/use-config-bean.d.ts +6 -0
- package/ui/hooks/use-config-bean.d.ts.map +1 -1
- package/ui/hooks/use-config-property.d.ts +6 -0
- package/ui/hooks/use-config-property.d.ts.map +1 -1
- package/ui/hooks/use-kos-model.d.ts +6 -0
- package/ui/hooks/use-kos-model.d.ts.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retry-with-exponential-backoff.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/retry-with-exponential-backoff.ts"],"names":[],"mappings":"AAEA,UAAU,cAAc;IACtB,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IAEpB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IAEpB,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAC;CACvB;AAUD
|
|
1
|
+
{"version":3,"file":"retry-with-exponential-backoff.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/retry-with-exponential-backoff.ts"],"names":[],"mappings":"AAEA,UAAU,cAAc;IACtB,6CAA6C;IAC7C,WAAW,EAAE,MAAM,CAAC;IAEpB,8CAA8C;IAC9C,WAAW,EAAE,MAAM,CAAC;IAEpB,kEAAkE;IAClE,aAAa,EAAE,MAAM,CAAC;CACvB;AAUD;;;;;;;;;GASG;AACH,wBAAsB,2BAA2B,CAAC,CAAC,EACjD,SAAS,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAChC,OAAO,CAAC,CAAC,CAAC,CA0BZ"}
|
|
@@ -4,6 +4,9 @@ import { KosServiceResponse } from './kos-fetch';
|
|
|
4
4
|
* Resolves the service URL configuration.
|
|
5
5
|
* @param _service - The optional service name (not used).
|
|
6
6
|
* @returns An object with `isMock` and `URL` properties.
|
|
7
|
+
*
|
|
8
|
+
* @kosService core.service-request
|
|
9
|
+
* @kosApiLevel 2
|
|
7
10
|
*/
|
|
8
11
|
export declare const resolveServiceUrl: (_service?: string) => {
|
|
9
12
|
isMock: boolean;
|
|
@@ -63,6 +66,10 @@ interface ModifyModelParams<Request> extends Partial<Orderable>, Partial<StudioR
|
|
|
63
66
|
id: string;
|
|
64
67
|
urlOverride?: string;
|
|
65
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* @kosService core.service-request
|
|
71
|
+
* @kosApiLevel 2
|
|
72
|
+
*/
|
|
66
73
|
export declare class FetchError<T extends Record<string, any> | string = {
|
|
67
74
|
error: string;
|
|
68
75
|
}> extends Error {
|
|
@@ -84,6 +91,9 @@ interface ServiceFactoryParams {
|
|
|
84
91
|
}
|
|
85
92
|
/**
|
|
86
93
|
* A factory for creating service instances with common configurations.
|
|
94
|
+
*
|
|
95
|
+
* @kosService core.service-request
|
|
96
|
+
* @kosApiLevel 2
|
|
87
97
|
*/
|
|
88
98
|
export declare const ServiceFactory: {
|
|
89
99
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD
|
|
1
|
+
{"version":3,"file":"service-factory.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAOH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAItD;;;;;;;GAOG;AACH,eAAO,MAAM,iBAAiB,cAAe,MAAM;;;CAIlD,CAAC;AAWF;;GAEG;AACH,UAAU,iBAAk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;;;;WAKG;;QAQH;;;;;WAKG;8JA/QJ,eAAe,OAAO,CAAC;;CAmR3B,CAAC"}
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
* ```
|
|
23
23
|
*
|
|
24
24
|
* @category Service Request
|
|
25
|
+
* @kosService core.service-request
|
|
26
|
+
* @kosApiLevel 22
|
|
25
27
|
*/
|
|
26
28
|
export declare class ServiceRequestError extends Error {
|
|
27
29
|
/** HTTP status code (e.g. 404, 500) */
|
|
@@ -46,6 +48,8 @@ export declare class ServiceRequestError extends Error {
|
|
|
46
48
|
* Context captured from an HTTP error response.
|
|
47
49
|
* Used internally to thread rich error info through the service request pipeline.
|
|
48
50
|
* @internal
|
|
51
|
+
* @kosService core.service-request
|
|
52
|
+
* @kosApiLevel 22
|
|
49
53
|
*/
|
|
50
54
|
export interface ErrorResponseContext {
|
|
51
55
|
status: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-request-error.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-request-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH
|
|
1
|
+
{"version":3,"file":"service-request-error.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-request-error.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;IAC5C,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB,0CAA0C;IAC1C,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAE5B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAE/B,gDAAgD;IAChD,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAG/C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,YAAY,CAAC,EAAE,OAAO,CAAC;QACvB,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;KAC1C;CASJ;AAED;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACzC"}
|
|
@@ -34,6 +34,8 @@ import { ApiPath, HttpMethod } from '../core/decorators/kos-service-request';
|
|
|
34
34
|
* @param method - The HTTP method (defaults to 'get')
|
|
35
35
|
* @returns The cached response data, or undefined if not found/expired
|
|
36
36
|
*
|
|
37
|
+
* @kosService core.service-response
|
|
38
|
+
*
|
|
37
39
|
* @example Standard usage (types inferred from OpenAPI)
|
|
38
40
|
* ```typescript
|
|
39
41
|
* const status = getServiceResponse(this, PATH_DEVICE_STATUS, 'get');
|
|
@@ -45,6 +47,7 @@ import { ApiPath, HttpMethod } from '../core/decorators/kos-service-request';
|
|
|
45
47
|
* // Studio models using different OpenAPI than main SDK
|
|
46
48
|
* const vms = getServiceResponse<StudioVMResponse>(this, PATH_VMS, 'get');
|
|
47
49
|
* ```
|
|
50
|
+
* @kosApiLevel 15
|
|
48
51
|
*/
|
|
49
52
|
export declare function getServiceResponse<T = any>(model: IKosDataModel, path: ApiPath, method?: HttpMethod): T | undefined;
|
|
50
53
|
/**
|
|
@@ -55,6 +58,8 @@ export declare function getServiceResponse<T = any>(model: IKosDataModel, path:
|
|
|
55
58
|
* @param method - The HTTP method (defaults to 'get')
|
|
56
59
|
* @returns true if a valid cached response exists
|
|
57
60
|
*
|
|
61
|
+
* @kosService core.service-response
|
|
62
|
+
*
|
|
58
63
|
* @example
|
|
59
64
|
* ```typescript
|
|
60
65
|
* if (hasCachedResponse(this, PATH_DEVICE_STATUS, 'get')) {
|
|
@@ -65,6 +70,7 @@ export declare function getServiceResponse<T = any>(model: IKosDataModel, path:
|
|
|
65
70
|
* await this.refreshStatus();
|
|
66
71
|
* }
|
|
67
72
|
* ```
|
|
73
|
+
* @kosApiLevel 15
|
|
68
74
|
*/
|
|
69
75
|
export declare function hasCachedResponse(model: IKosDataModel, path: ApiPath, method?: HttpMethod): boolean;
|
|
70
76
|
/**
|
|
@@ -74,11 +80,14 @@ export declare function hasCachedResponse(model: IKosDataModel, path: ApiPath, m
|
|
|
74
80
|
* @param path - The API path constant
|
|
75
81
|
* @param method - The HTTP method (defaults to 'get')
|
|
76
82
|
*
|
|
83
|
+
* @kosService core.service-response
|
|
84
|
+
*
|
|
77
85
|
* @example
|
|
78
86
|
* ```typescript
|
|
79
87
|
* // Clear cached response to force refresh on next request
|
|
80
88
|
* clearServiceResponse(this, PATH_TEMP_DATA, 'post');
|
|
81
89
|
* ```
|
|
90
|
+
* @kosApiLevel 15
|
|
82
91
|
*/
|
|
83
92
|
export declare function clearServiceResponse(model: IKosDataModel, path: ApiPath, method?: HttpMethod): void;
|
|
84
93
|
/**
|
|
@@ -87,12 +96,15 @@ export declare function clearServiceResponse(model: IKosDataModel, path: ApiPath
|
|
|
87
96
|
* @param model - The KOS model instance
|
|
88
97
|
* @param path - The API path constant
|
|
89
98
|
*
|
|
99
|
+
* @kosService core.service-response
|
|
100
|
+
*
|
|
90
101
|
* @example
|
|
91
102
|
* ```typescript
|
|
92
103
|
* // Clear all cached responses for this endpoint
|
|
93
104
|
* clearPath(this, PATH_INGREDIENTS);
|
|
94
105
|
* // Clears GET, POST, PUT, DELETE responses for this path
|
|
95
106
|
* ```
|
|
107
|
+
* @kosApiLevel 15
|
|
96
108
|
*/
|
|
97
109
|
export declare function clearPath(model: IKosDataModel, path: ApiPath): void;
|
|
98
110
|
/**
|
|
@@ -100,11 +112,14 @@ export declare function clearPath(model: IKosDataModel, path: ApiPath): void;
|
|
|
100
112
|
*
|
|
101
113
|
* @param model - The KOS model instance
|
|
102
114
|
*
|
|
115
|
+
* @kosService core.service-response
|
|
116
|
+
*
|
|
103
117
|
* @example
|
|
104
118
|
* ```typescript
|
|
105
119
|
* // Clear all cached responses (typically during model cleanup)
|
|
106
120
|
* clearAllServiceResponses(this);
|
|
107
121
|
* ```
|
|
122
|
+
* @kosApiLevel 15
|
|
108
123
|
*/
|
|
109
124
|
export declare function clearAllServiceResponses(model: IKosDataModel): void;
|
|
110
125
|
//# sourceMappingURL=service-response.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service-response.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACX,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AAEH
|
|
1
|
+
{"version":3,"file":"service-response.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/service-response.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,UAAU,EACX,MAAM,wCAAwC,CAAC;AAChD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;;;;;;;;;;;;GAkBG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,GAAG,GAAG,EACxC,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,OAAO,EACb,MAAM,GAAE,UAAkB,GACzB,CAAC,GAAG,SAAS,CAOf;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,OAAO,EACb,MAAM,GAAE,UAAkB,GACzB,OAAO,CAOT;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,aAAa,EACpB,IAAI,EAAE,OAAO,EACb,MAAM,GAAE,UAAkB,GACzB,IAAI,CAON;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,OAAO,GAAG,IAAI,CAOnE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI,CAOnE"}
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kosService core.utils
|
|
3
|
+
* @kosApiLevel 2
|
|
4
|
+
*/
|
|
1
5
|
export declare const getKosSessionKey: () => string;
|
|
6
|
+
/**
|
|
7
|
+
* @kosService core.utils
|
|
8
|
+
* @kosApiLevel 2
|
|
9
|
+
*/
|
|
2
10
|
export declare const isLocalRefId: (id?: string) => boolean;
|
|
3
11
|
//# sourceMappingURL=session-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/session-utils.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,QAAO,MAA8B,CAAC;AAEnE,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,OAC8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"session-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/session-utils.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,MAA8B,CAAC;AAEnE;;;GAGG;AACH,eAAO,MAAM,YAAY,QAAS,MAAM,KAAG,OAC8B,CAAC"}
|
|
@@ -1,15 +1,31 @@
|
|
|
1
1
|
import { KosServiceResponse } from './kos-fetch';
|
|
2
2
|
|
|
3
|
+
/**
|
|
4
|
+
* @kosService core.utils
|
|
5
|
+
* @kosApiLevel 2
|
|
6
|
+
*/
|
|
3
7
|
export interface ErrorResponse {
|
|
4
8
|
error?: string;
|
|
5
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @kosService core.utils
|
|
12
|
+
* @kosApiLevel 2
|
|
13
|
+
*/
|
|
6
14
|
export declare const waitForRequest: <ResponseType extends ErrorResponse>(requestId: string, timeout?: number) => Promise<ResponseType>;
|
|
15
|
+
/**
|
|
16
|
+
* @kosService core.utils
|
|
17
|
+
* @kosApiLevel 2
|
|
18
|
+
*/
|
|
7
19
|
export declare const sendRequest: <R, T extends KosServiceResponse<any>>(requestPromise: (param: R) => Promise<T | undefined>, params: R, refId: string) => Promise<T | undefined>;
|
|
8
20
|
interface SyncPublishParams<T> {
|
|
9
21
|
topic: string;
|
|
10
22
|
msg: T;
|
|
11
23
|
requestId?: string;
|
|
12
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* @kosService core.utils
|
|
27
|
+
* @kosApiLevel 2
|
|
28
|
+
*/
|
|
13
29
|
export declare const syncPublish: <T, R extends ErrorResponse>({ topic, msg, requestId, }: SyncPublishParams<T>) => Promise<R>;
|
|
14
30
|
export {};
|
|
15
31
|
//# sourceMappingURL=wait-for-request.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wait-for-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/wait-for-request.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,cAAc,kDACd,MAAM,4CAqBf,CAAC;AAEL,eAAO,MAAM,WAAW,yDACN,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,GAAG,SAAS,CAAC,UAC5C,CAAC,SACF,MAAM,2BAqBd,CAAC;AAEF,UAAU,iBAAiB,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,CAAC,CAAC;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD,eAAO,MAAM,WAAW,2DAIrB,kBAAkB,CAAC,CAAC,eAStB,CAAC"}
|
|
1
|
+
{"version":3,"file":"wait-for-request.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/wait-for-request.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD;;;GAGG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,kDACd,MAAM,4CAqBf,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,WAAW,yDACN,CAAC,KAAK,EAAE,CAAC,KAAK,QAAQ,CAAC,GAAG,SAAS,CAAC,UAC5C,CAAC,SACF,MAAM,2BAqBd,CAAC;AAEF,UAAU,iBAAiB,CAAC,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,CAAC,CAAC;IACP,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;;GAGG;AACH,eAAO,MAAM,WAAW,2DAIrB,kBAAkB,CAAC,CAAC,eAStB,CAAC"}
|
|
@@ -13,9 +13,12 @@ import { IKosDataModel } from '../core/kosModel';
|
|
|
13
13
|
* @throws {Error} If the specified data model is not found or if it has no ID.
|
|
14
14
|
* @returns A promise that resolves to the same data model when it becomes ready.
|
|
15
15
|
*
|
|
16
|
+
* @kosService core.utils
|
|
17
|
+
*
|
|
16
18
|
* @example
|
|
17
19
|
* // Wait for the 'dataModel' to become ready before using it.
|
|
18
20
|
* const dataModel = await whenReady(dataModel);
|
|
21
|
+
* @kosApiLevel 2
|
|
19
22
|
*/
|
|
20
23
|
export declare const whenReady: (dataModel: IKosDataModel) => Promise<IKosDataModel>;
|
|
21
24
|
//# sourceMappingURL=when-ready.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"when-ready.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/when-ready.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD
|
|
1
|
+
{"version":3,"file":"when-ready.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/when-ready.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,SAAS,cAAqB,aAAa,2BAmBvD,CAAC"}
|