@kosdev-code/kos-ui-sdk 2.1.37 → 2.1.38
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/fsm-injection-utils.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-helpers.d.ts +4 -2
- package/core/core/decorators/kos-service-request-helpers.d.ts.map +1 -1
- package/core/core/decorators/kos-service-request.d.ts +44 -3
- 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 +34 -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/model/kos-service-request-manager.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/services/browser-router.d.ts.map +1 -1
- package/core/core/transport/webSocketTransport.d.ts +2 -1
- package/core/core/transport/webSocketTransport.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 +121 -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/index.d.ts +2 -0
- package/core/util/index.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-org-utils.d.ts +3 -0
- package/core/util/kos-org-utils.d.ts.map +1 -0
- package/core/util/kos-service-request.d.ts +34 -2
- 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 +60 -0
- package/core/util/service-request-error.d.ts.map +1 -0
- 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 +79 -79
- package/index.cjs.map +1 -1
- package/index.d.cts +6 -4
- package/index.d.ts +6 -4
- package/index.d.ts.map +1 -1
- package/index.js +6347 -5918
- package/index.js.map +1 -1
- package/kos-models.json +52 -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/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/types/index.d.ts +7 -1
- 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/gpio-chip-container-model.d.ts +25 -0
- package/models/models/gpio-chip/gpio-chip-container-model.d.ts.map +1 -0
- package/models/models/gpio-chip/gpio-chip-model.d.ts +30 -0
- package/models/models/gpio-chip/gpio-chip-model.d.ts.map +1 -0
- package/models/models/gpio-chip/index.d.ts +7 -0
- package/models/models/gpio-chip/index.d.ts.map +1 -0
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts +86 -0
- package/models/models/gpio-chip/services/gpio-chip-services.d.ts.map +1 -0
- package/models/models/gpio-chip/services/index.d.ts +2 -0
- package/models/models/gpio-chip/services/index.d.ts.map +1 -0
- package/models/models/gpio-chip/types/index.d.ts +24 -0
- package/models/models/gpio-pin/gpio-pin-container-model.d.ts +23 -0
- package/models/models/gpio-pin/gpio-pin-container-model.d.ts.map +1 -0
- package/models/models/gpio-pin/gpio-pin-model.d.ts +26 -0
- package/models/models/gpio-pin/gpio-pin-model.d.ts.map +1 -0
- package/models/models/gpio-pin/index.d.ts +6 -0
- package/models/models/gpio-pin/index.d.ts.map +1 -0
- package/models/models/gpio-pin/types/index.d.ts +23 -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/services/network-interface-services.d.ts.map +1 -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/services/software-info-services.d.ts.map +1 -1
- package/models/models/software-info/types/index.d.ts +4 -1
- 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/services/trouble-services.d.ts.map +1 -1
- 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/models/utils/client.d.ts +4 -0
- package/models/utils/client.d.ts.map +1 -1
- package/models/utils/get-kos-connection-id.d.ts +2 -0
- package/models/utils/get-kos-connection-id.d.ts.map +1 -0
- package/models/utils/index.d.ts +1 -0
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +2 -2
- package/models/utils/service-accessor.d.ts +4 -0
- package/models/utils/service-accessor.d.ts.map +1 -1
- package/models/utils/service.d.ts +4 -0
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/kos/1.6.5/service.d.ts +4 -0
- package/models/utils/services/kos/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/kos/1.8.1/service.d.ts +4 -0
- package/models/utils/services/kos/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/kos/1.9.x/openapi.d.ts +4597 -0
- package/models/utils/services/kos/1.9.x/service.d.ts +124 -0
- package/models/utils/services/kos/1.9.x/service.d.ts.map +1 -0
- package/models/utils/services/kos/daily/service.d.ts +4 -0
- package/models/utils/services/kos/daily/service.d.ts.map +1 -1
- package/models/utils/services/vfs/1.6.5/service.d.ts +4 -0
- package/models/utils/services/vfs/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/vfs/1.8.1/service.d.ts +4 -0
- package/models/utils/services/vfs/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/vfs/1.9.x/openapi.d.ts +51 -0
- package/models/utils/services/vfs/1.9.x/service.d.ts +124 -0
- package/models/utils/services/vfs/1.9.x/service.d.ts.map +1 -0
- package/models/utils/services/vfs/daily/service.d.ts +4 -0
- package/models/utils/services/vfs/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +2 -0
- package/models/utils/services-index.d.ts.map +1 -1
- 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,11 +1,15 @@
|
|
|
1
1
|
import { Transitions } from './model-transition-utils';
|
|
2
2
|
import { DependencyLifecycle, KosDependencyParams } from '../types/kos-dependency';
|
|
3
|
-
import {
|
|
3
|
+
import { IKosModel } from '../core/kosModel';
|
|
4
4
|
|
|
5
|
-
export {
|
|
6
|
-
export { isPrintable, isKosDataModel, isKosModelContainer, resolveChild, } from './model-type-guards';
|
|
7
|
-
export { ModelError } from './promise-utils';
|
|
5
|
+
export { TransitionMap, Transitions } from './model-transition-utils';
|
|
8
6
|
export type { ModelPromiseResolver } from './model-transition-utils';
|
|
7
|
+
export { isKosDataModel, isKosModelContainer, isPrintable, resolveChild, } from './model-type-guards';
|
|
8
|
+
export { ModelError } from './promise-utils';
|
|
9
|
+
/**
|
|
10
|
+
* @kosService core.utils
|
|
11
|
+
* @kosApiLevel 2
|
|
12
|
+
*/
|
|
9
13
|
export interface ModelPromise {
|
|
10
14
|
promise?: Promise<void>;
|
|
11
15
|
modelId?: string;
|
|
@@ -13,20 +17,40 @@ export interface ModelPromise {
|
|
|
13
17
|
type?: string;
|
|
14
18
|
status?: string;
|
|
15
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* @kosService core.utils
|
|
22
|
+
* @kosApiLevel 2
|
|
23
|
+
*/
|
|
16
24
|
export declare const createModelDependency: (model: IKosModel, dependency: KosDependencyParams<any>) => {
|
|
17
25
|
dependentModel: null;
|
|
18
26
|
dataModelId: string;
|
|
19
27
|
success: boolean;
|
|
20
28
|
} | {
|
|
21
29
|
dependentModel: {
|
|
22
|
-
model: IKosModel<IKosDataModel>;
|
|
23
|
-
data: IKosDataModel;
|
|
30
|
+
model: IKosModel<import('../core/kosModel').IKosDataModel>;
|
|
31
|
+
data: import('../core/kosModel').IKosDataModel;
|
|
24
32
|
};
|
|
25
33
|
dataModelId: string;
|
|
26
34
|
success: boolean;
|
|
27
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* @kosService core.utils
|
|
38
|
+
* @kosApiLevel 2
|
|
39
|
+
*/
|
|
28
40
|
export declare const getDependenciesByLifecycle: (model: IKosModel, lifecycle?: DependencyLifecycle) => (Promise<void> | null)[];
|
|
41
|
+
/**
|
|
42
|
+
* @kosService core.utils
|
|
43
|
+
* @kosApiLevel 2
|
|
44
|
+
*/
|
|
29
45
|
export declare const executeListLifecycle: (sourceModel: IKosModel, models: (IKosModel | undefined)[], target: Transitions, sourceLifecycle: DependencyLifecycle) => Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* @kosService core.utils
|
|
48
|
+
* @kosApiLevel 2
|
|
49
|
+
*/
|
|
30
50
|
export declare const executeChildrenModelLifecycle: (model: IKosModel, target: Transitions, sourceLifecycle: DependencyLifecycle) => Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* @kosService core.utils
|
|
53
|
+
* @kosApiLevel 2
|
|
54
|
+
*/
|
|
31
55
|
export declare const executeDependentModelLifecycle: (model: IKosModel, lifecycle: DependencyLifecycle) => Promise<void>;
|
|
32
56
|
//# sourceMappingURL=model-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/model-utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"model-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/model-utils.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EACL,mBAAmB,EAEnB,mBAAmB,EACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAiB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAItE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACtE,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,WAAW,EACX,YAAY,GACb,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,UACzB,SAAS,cACJ,oBAAoB,GAAG,CAAC;;;;;;;;;;;CA+KrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,0BAA0B,UAC9B,SAAS,cACL,mBAAmB,6BAqE/B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,gBAClB,SAAS,UACd,CAAC,SAAS,GAAG,SAAS,CAAC,EAAE,UACzB,WAAW,mBACF,mBAAmB,kBAqHrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,6BAA6B,UACjC,SAAS,UACR,WAAW,mBACF,mBAAmB,kBAQrC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,8BAA8B,UAClC,SAAS,aACL,mBAAmB,kBAa/B,CAAC"}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @kosService core.utils
|
|
3
|
+
* @kosApiLevel 2
|
|
4
|
+
*/
|
|
1
5
|
export declare const KosObservableData: unique symbol;
|
|
6
|
+
/**
|
|
7
|
+
* @kosService core.utils
|
|
8
|
+
*/
|
|
2
9
|
export type KosData<T extends Record<any, any>> = T & {
|
|
3
10
|
setValues: (initialData?: T) => void;
|
|
4
11
|
keys: (keyof T)[];
|
|
@@ -6,5 +13,9 @@ export type KosData<T extends Record<any, any>> = T & {
|
|
|
6
13
|
values: T[keyof T][];
|
|
7
14
|
has: (key: keyof T) => boolean;
|
|
8
15
|
};
|
|
16
|
+
/**
|
|
17
|
+
* @kosService core.utils
|
|
18
|
+
* @kosApiLevel 2
|
|
19
|
+
*/
|
|
9
20
|
export declare const ObservableData: <T extends Record<string, any>>(initialData?: T) => KosData<T>;
|
|
10
21
|
//# sourceMappingURL=observable-proxy-map.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observable-proxy-map.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/observable-proxy-map.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAyI7D,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG;IACpD,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IACrB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,cAAc,gDACX,CAAC,KACd,QAAQ,CAAC,CAGX,CAAC"}
|
|
1
|
+
{"version":3,"file":"observable-proxy-map.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/observable-proxy-map.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,eAA8B,CAAC;AAyI7D;;GAEG;AACH,MAAM,MAAM,OAAO,CAAC,CAAC,SAAS,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG;IACpD,SAAS,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC;IACrC,IAAI,EAAE,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IAClB,OAAO,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC;IACjC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC;IACrB,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,OAAO,CAAC;CAChC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,gDACX,CAAC,KACd,QAAQ,CAAC,CAGX,CAAC"}
|
|
@@ -10,6 +10,8 @@ interface HeartbeatOptions {
|
|
|
10
10
|
* if one is closed, the other is notified of its closure.
|
|
11
11
|
*
|
|
12
12
|
* @category Utility
|
|
13
|
+
* @kosService core.utils
|
|
14
|
+
* @kosApiLevel 2
|
|
13
15
|
*/
|
|
14
16
|
export declare const pairedClientHeartbeat: ({ relationshipId, destinationAddress, onAbort, waitTime, beatTime, }: HeartbeatOptions) => {
|
|
15
17
|
cleanUpHeartbeat: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paired-client-heartbeat.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/paired-client-heartbeat.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IAExB,cAAc,EAAE,MAAM,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAGrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"paired-client-heartbeat.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/paired-client-heartbeat.ts"],"names":[],"mappings":"AAKA,UAAU,gBAAgB;IAExB,cAAc,EAAE,MAAM,CAAC;IAEvB,kBAAkB,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IAGrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAGlB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,yEAM/B,gBAAgB;;CA2DlB,CAAC"}
|
package/core/util/pipe.d.ts
CHANGED
package/core/util/pipe.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/pipe.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;AAChC,eAAO,MAAM,IAAI,WACN,MAAM,EAAE,SACb,GAAG,QACwB,CAAC"}
|
|
1
|
+
{"version":3,"file":"pipe.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/core/util/pipe.ts"],"names":[],"mappings":"AAAA,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,CAAC;AAChC;;;GAGG;AACH,eAAO,MAAM,IAAI,WACN,MAAM,EAAE,SACb,GAAG,QACwB,CAAC"}
|
|
@@ -12,6 +12,9 @@ interface BackoffOptions {
|
|
|
12
12
|
* @param options - optional backoff options
|
|
13
13
|
* @returns - the result of the operation if successful
|
|
14
14
|
* @throws - the last error if all attempts fail
|
|
15
|
+
*
|
|
16
|
+
* @kosService core.fetch
|
|
17
|
+
* @kosApiLevel 2
|
|
15
18
|
*/
|
|
16
19
|
export declare function retryWithExponentialBackoff<T>(operation: () => Promise<T>, options?: Partial<BackoffOptions>): Promise<T>;
|
|
17
20
|
export {};
|
|
@@ -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,iBAAkB,SAAQ,YAAY;IAC9C,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyED;;GAEG;AACH,KAAK,YAAY,GAAG,OAAO,CAAC,SAAS,CAAC,GACpC,OAAO,CAAC,aAAa,CAAC,GACtB,OAAO,CAAC,UAAU,CAAC,GACnB,OAAO,CAAC,eAAe,CAAC,GACxB,OAAO,CAAC,YAAY,CAAC,GACrB,OAAO,CAAC,gBAAgB,CAAC,CAAC;AAE5B;;GAEG;AACH,UAAU,YAAa,SAAQ,YAAY;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,kBAAmB,SAAQ,YAAY;IAC/C,EAAE,EAAE,MAAM,CAAC;CACZ;AAgQD,UAAU,SAAS;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,UAAU,gBAAgB;IACxB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,UAAU,UAAU;IAClB,GAAG,EAAE,OAAO,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,UAAU,eAAe;IACvB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AACD,UAAU,cAAc,CAAC,OAAO,CAC9B,SAAQ,OAAO,CAAC,SAAS,CAAC,EACxB,OAAO,CAAC,aAAa,CAAC,EACtB,OAAO,CAAC,UAAU,CAAC,EACnB,OAAO,CAAC,eAAe,CAAC,EACxB,OAAO,CAAC,YAAY,CAAC,EACrB,OAAO,CAAC,gBAAgB,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,iBAAiB,CAAC,OAAO,CACjC,SAAQ,OAAO,CAAC,SAAS,CAAC,EACxB,OAAO,CAAC,aAAa,CAAC,EACtB,OAAO,CAAC,UAAU,CAAC,EACnB,OAAO,CAAC,eAAe,CAAC,EACxB,OAAO,CAAC,YAAY,CAAC,EACrB,OAAO,CAAC,gBAAgB,CAAC;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,qBAAa,UAAU,CACrB,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAC1D,SAAQ,KAAK;IACb,OAAO,CAAC,EAAE,CAAC,CAAC;gBACA,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC;CAKzC;AAyJD;;GAEG;AACH,UAAU,oBAAoB;IAC5B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc;IACzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;6HAUA,oBAAoB;QAGnB;;;;;WAKG;4IAxdJ,YAAY;QA2dX;;;;;WAKG;wJAxVJ,kBAAkB;QA+VjB;;;;;WAKG;uJAvaJ,YAAY;QA0aX;;;;;WAKG;6JAjOJ,eAAe,OAAO,CAAC;QAoOtB;;;;;WAKG;4KAzoBJ,iBAAiB;QAgpBhB;;;;;WAKG;;QAQH;;;;;WAKG;;QAQH;;;;;WAKG;8JA/QJ,eAAe,OAAO,CAAC;;CAmR3B,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* (C) Copyright 2025, TCCC, All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Rich error class for service request failures.
|
|
6
|
+
*
|
|
7
|
+
* Extends `Error` so it is backward-compatible with any code that expects
|
|
8
|
+
* a plain `Error`. Adds HTTP response context so `onError` handlers in
|
|
9
|
+
* `@kosServiceRequest` can inspect status codes, response bodies, and headers.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```typescript
|
|
13
|
+
* errorHandler: {
|
|
14
|
+
* strategy: 'log',
|
|
15
|
+
* defaultValue: [],
|
|
16
|
+
* onError: (error, model) => {
|
|
17
|
+
* if (error instanceof ServiceRequestError) {
|
|
18
|
+
* console.error('HTTP', error.status, error.responseBody);
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Service Request
|
|
25
|
+
* @kosService core.service-request
|
|
26
|
+
* @kosApiLevel 22
|
|
27
|
+
*/
|
|
28
|
+
export declare class ServiceRequestError extends Error {
|
|
29
|
+
/** HTTP status code (e.g. 404, 500) */
|
|
30
|
+
readonly status: number;
|
|
31
|
+
/** HTTP status text (e.g. "Not Found") */
|
|
32
|
+
readonly statusText: string;
|
|
33
|
+
/**
|
|
34
|
+
* Parsed response body (JSON) or raw text.
|
|
35
|
+
* `undefined` if the body could not be read.
|
|
36
|
+
*/
|
|
37
|
+
readonly responseBody: unknown;
|
|
38
|
+
/** Response headers as a plain key/value map */
|
|
39
|
+
readonly responseHeaders: Record<string, string>;
|
|
40
|
+
constructor(message: string, details: {
|
|
41
|
+
status: number;
|
|
42
|
+
statusText: string;
|
|
43
|
+
responseBody?: unknown;
|
|
44
|
+
responseHeaders?: Record<string, string>;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Context captured from an HTTP error response.
|
|
49
|
+
* Used internally to thread rich error info through the service request pipeline.
|
|
50
|
+
* @internal
|
|
51
|
+
* @kosService core.service-request
|
|
52
|
+
* @kosApiLevel 22
|
|
53
|
+
*/
|
|
54
|
+
export interface ErrorResponseContext {
|
|
55
|
+
status: number;
|
|
56
|
+
statusText: string;
|
|
57
|
+
responseBody: unknown;
|
|
58
|
+
responseHeaders: Record<string, string>;
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=service-request-error.d.ts.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;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"}
|