@kosdev-code/kos-ui-sdk 2.0.31 → 2.0.33
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 +16 -0
- package/common/events/eventBus.d.ts.map +1 -1
- package/common/events/eventBus.functional.d.ts +150 -0
- package/common/events/eventBus.functional.d.ts.map +1 -0
- package/common/events/eventBus.state.d.ts +118 -0
- package/common/events/eventBus.state.d.ts.map +1 -0
- package/common/events/index.d.ts +5 -2
- package/common/events/index.d.ts.map +1 -1
- package/core/core/decorators/kosTopicHandler.d.ts +61 -14
- package/core/core/decorators/kosTopicHandler.d.ts.map +1 -1
- package/core/core/log/log.d.ts +1 -1
- package/core/core/services/app-startup-service.d.ts +74 -0
- package/core/core/services/app-startup-service.d.ts.map +1 -0
- package/core/core/services/index.d.ts +1 -0
- package/core/core/services/index.d.ts.map +1 -1
- package/core/types/utils/kos-fetch.d.ts +10 -2
- package/core/types/utils/kos-fetch.d.ts.map +1 -1
- package/core/util/binary-utils.d.ts +44 -0
- package/core/util/binary-utils.d.ts.map +1 -0
- package/core/util/kos-fetch.d.ts.map +1 -1
- package/index.cjs +76 -76
- package/index.cjs.map +1 -1
- package/index.js +6434 -5370
- package/index.js.map +1 -1
- package/models/decorators/future-service.d.ts +7 -0
- package/models/decorators/future-service.d.ts.map +1 -1
- package/models/index.d.ts +1 -0
- package/models/index.d.ts.map +1 -1
- package/models/models/canvas-dispatcher/utils/renderers/base/video-base-renderer.d.ts +3 -1
- package/models/models/canvas-dispatcher/utils/renderers/base/video-base-renderer.d.ts.map +1 -1
- package/models/models/canvas-dispatcher/utils/renderers/image-renderer.d.ts +3 -1
- package/models/models/canvas-dispatcher/utils/renderers/image-renderer.d.ts.map +1 -1
- package/models/models/software-info/services/software-info-services.d.ts +23 -1
- package/models/models/software-info/services/software-info-services.d.ts.map +1 -1
- package/models/types/cancellable-promise.d.ts +49 -0
- package/models/types/cancellable-promise.d.ts.map +1 -0
- package/models/types/future-interfaces.d.ts +55 -0
- package/models/types/future-interfaces.d.ts.map +1 -0
- package/models/types/index.d.ts +3 -0
- package/models/types/index.d.ts.map +1 -0
- package/models/utils/cancellable-future-call.d.ts +54 -0
- package/models/utils/cancellable-future-call.d.ts.map +1 -0
- package/models/utils/cancellable-service.d.ts +79 -0
- package/models/utils/cancellable-service.d.ts.map +1 -0
- package/models/utils/client.d.ts +15 -7
- package/models/utils/client.d.ts.map +1 -1
- package/models/utils/index.d.ts +2 -0
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/kosmodel-compatible-future-mixin.d.ts +142 -0
- package/models/utils/kosmodel-compatible-future-mixin.d.ts.map +1 -0
- package/models/utils/kosmodel-interface-companion-mixin.d.ts +83 -0
- package/models/utils/kosmodel-interface-companion-mixin.d.ts.map +1 -0
- package/models/utils/openapi.d.ts +9304 -3999
- package/models/utils/service.d.ts +20 -12
- package/models/utils/service.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
interface FutureProps {
|
|
2
2
|
alias?: string;
|
|
3
3
|
namespace?: string;
|
|
4
|
+
/**
|
|
5
|
+
* Enable automatic AbortController integration
|
|
6
|
+
* When true, the decorator will inject an AbortSignal as the last parameter
|
|
7
|
+
* and set up bi-directional cancellation between Future and HTTP requests
|
|
8
|
+
* @default true
|
|
9
|
+
*/
|
|
10
|
+
abortController?: boolean;
|
|
4
11
|
}
|
|
5
12
|
export declare function kosFuture(props?: FutureProps): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => void;
|
|
6
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"future-service.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/decorators/future-service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"future-service.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/decorators/future-service.ts"],"names":[],"mappings":"AAeA,UAAU,WAAW;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAQD,wBAAgB,SAAS,CAAC,KAAK,GAAE,WAAgB,YAE/B,GAAG,eAAe,MAAM,cAAc,kBAAkB,UAyJzE"}
|
package/models/index.d.ts
CHANGED
package/models/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/kos-ui-sdk/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/sdk/kos-ui-sdk/src/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -22,7 +22,9 @@ export declare class VideoRendererBase implements Renderer, DoneAware {
|
|
|
22
22
|
*
|
|
23
23
|
* @param src - The URL or path of the video to play
|
|
24
24
|
*/
|
|
25
|
-
constructor(src:
|
|
25
|
+
constructor({ src }: {
|
|
26
|
+
src: string;
|
|
27
|
+
});
|
|
26
28
|
private handleEnded;
|
|
27
29
|
/**
|
|
28
30
|
* Resets the video to the beginning and pauses playback.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video-base-renderer.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/canvas-dispatcher/utils/renderers/base/video-base-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,QAAQ,EAAE,SAAS;IAC3D,iEAAiE;IACjE,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAElC,iEAAiE;IACjE,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,oDAAoD;IACpD,SAAS,CAAC,GAAG,EAAE,wBAAwB,CAAC;IAExC,mEAAmE;IACnE,SAAS,CAAC,UAAU,SAAK;IAEzB,uDAAuD;IACvD,OAAO,CAAC,YAAY,CAA6B;IAEjD;;;;OAIG;gBACS,GAAG,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"video-base-renderer.d.ts","sourceRoot":"","sources":["../../../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/canvas-dispatcher/utils/renderers/base/video-base-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;;GAKG;AACH,qBAAa,iBAAkB,YAAW,QAAQ,EAAE,SAAS;IAC3D,iEAAiE;IACjE,SAAS,CAAC,KAAK,EAAE,gBAAgB,CAAC;IAElC,iEAAiE;IACjE,SAAS,CAAC,MAAM,EAAE,iBAAiB,CAAC;IAEpC,oDAAoD;IACpD,SAAS,CAAC,GAAG,EAAE,wBAAwB,CAAC;IAExC,mEAAmE;IACnE,SAAS,CAAC,UAAU,SAAK;IAEzB,uDAAuD;IACvD,OAAO,CAAC,YAAY,CAA6B;IAEjD;;;;OAIG;gBACS,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;IAgBpC,OAAO,CAAC,WAAW;IAGnB;;OAEG;IACH,KAAK,IAAI,IAAI;IAMb;;OAEG;IACH,IAAI,IAAI,IAAI;IAIZ;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;;;;OAKG;IACH,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;IAShD;;;;;;OAMG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,iBAAiB;IAI5D;;;;OAIG;IACH,MAAM,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,IAAI;IAIlC,OAAO,IAAI,IAAI;IAUf;;;;;OAKG;IACH,SAAS,CAAC,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO;CAQlD"}
|
|
@@ -5,7 +5,9 @@ declare const Base: import('./mixins/one-shot-renderer-mixin').AbstractConstruct
|
|
|
5
5
|
export declare class ImageRenderer extends Base implements Renderer, OneShotCapable {
|
|
6
6
|
private img;
|
|
7
7
|
private loaded;
|
|
8
|
-
constructor(src:
|
|
8
|
+
constructor({ src }: {
|
|
9
|
+
src: string;
|
|
10
|
+
});
|
|
9
11
|
reset(): void;
|
|
10
12
|
renderFrame(width: number, height: number): void;
|
|
11
13
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image-renderer.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/canvas-dispatcher/utils/renderers/image-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,QAAA,MAAM,IAAI,uGAA6C,CAAC;AAExD,qBAAa,aAAc,SAAQ,IAAK,YAAW,QAAQ,EAAE,cAAc;IACzE,OAAO,CAAC,GAAG,CAAmB;IAC9B,OAAO,CAAC,MAAM,CAAS;gBAEX,GAAG,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"image-renderer.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/canvas-dispatcher/utils/renderers/image-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGjE,QAAA,MAAM,IAAI,uGAA6C,CAAC;AAExD,qBAAa,aAAc,SAAQ,IAAK,YAAW,QAAQ,EAAE,cAAc;IACzE,OAAO,CAAC,GAAG,CAAmB;IAC9B,OAAO,CAAC,MAAM,CAAS;gBAEX,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAA;KAAE;IAY3B,KAAK,IAAI,IAAI;IAKb,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI;CAS1D"}
|
|
@@ -17,6 +17,28 @@ export type DeviceSoftwareInfoResponse = BaseResponseType<"/api/kos/manifest/inf
|
|
|
17
17
|
* @category Service
|
|
18
18
|
* @internal
|
|
19
19
|
* Retrieves the initial software-info data.
|
|
20
|
+
* @param signal - Optional AbortSignal to cancel the request
|
|
20
21
|
*/
|
|
21
|
-
export declare const getSoftwareInfos: () => Promise<DeviceSoftwareInfoResponse>;
|
|
22
|
+
export declare const getSoftwareInfos: (signal?: AbortSignal) => Promise<DeviceSoftwareInfoResponse>;
|
|
23
|
+
/**
|
|
24
|
+
* Cancellable version of getSoftwareInfos
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* // In your model
|
|
28
|
+
* const data = await getSoftwareInfosWithCancel();
|
|
29
|
+
*
|
|
30
|
+
* // Cancel if needed
|
|
31
|
+
* getSoftwareInfosWithCancel.cancel();
|
|
32
|
+
*
|
|
33
|
+
* // Check if active
|
|
34
|
+
* if (getSoftwareInfosWithCancel.isActive()) {
|
|
35
|
+
* console.log('Request in progress');
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare const getSoftwareInfosWithCancel: import('../../../utils/cancellable-service').CancellableFunction<() => Promise<{
|
|
40
|
+
nodes?: {
|
|
41
|
+
empty?: boolean | undefined;
|
|
42
|
+
} | undefined;
|
|
43
|
+
}>>;
|
|
22
44
|
//# sourceMappingURL=software-info-services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"software-info-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/software-info/services/software-info-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAO,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"software-info-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-ui-sdk/src/models/models/software-info/services/software-info-services.ts"],"names":[],"mappings":"AAKA,OAAO,EAAO,KAAK,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAO5D,MAAM,WAAW,KAAK;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,gBAAgB,EAAE,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,8BAA8B,EAAE,CAAC;CAC7C;AAED,MAAM,WAAW,8BAA8B;IAC7C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,0BAA0B,GAAG,gBAAgB,CACvD,wBAAwB,EACxB,KAAK,CACN,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,YAClB,WAAW,KACnB,QAAQ,0BAA0B,CAiBpC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,0BAA0B;;;;GACK,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Promise that can be cancelled and provides progress/state tracking
|
|
3
|
+
*/
|
|
4
|
+
export interface CancellablePromise<T> extends Promise<T> {
|
|
5
|
+
/**
|
|
6
|
+
* Cancel this specific operation
|
|
7
|
+
*/
|
|
8
|
+
cancel(): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Get the underlying AbortController for this operation
|
|
11
|
+
*/
|
|
12
|
+
getController(): AbortController | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Check if this operation is cancelled
|
|
15
|
+
*/
|
|
16
|
+
isCancelled(): boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Current progress of the operation (0-1)
|
|
19
|
+
*/
|
|
20
|
+
readonly progress: number;
|
|
21
|
+
/**
|
|
22
|
+
* Current status of the operation
|
|
23
|
+
*/
|
|
24
|
+
readonly status: string;
|
|
25
|
+
/**
|
|
26
|
+
* Whether the operation is currently running
|
|
27
|
+
*/
|
|
28
|
+
readonly isRunning: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Subscribe to progress updates
|
|
31
|
+
* Returns a dispose function to clean up the subscription
|
|
32
|
+
*/
|
|
33
|
+
onProgressUpdate(callback: (progress: number, status: string) => void): () => void;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Options for creating a cancellable promise with progress tracking
|
|
37
|
+
*/
|
|
38
|
+
export interface CancellablePromiseOptions<T> {
|
|
39
|
+
promise: Promise<T>;
|
|
40
|
+
abortController?: AbortController;
|
|
41
|
+
cancelFuture?: () => Promise<void>;
|
|
42
|
+
future?: any;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Create a cancellable promise wrapper with reactive progress tracking
|
|
46
|
+
*/
|
|
47
|
+
export declare function createCancellablePromise<T>(promise: Promise<T>, abortController?: AbortController, cancelFuture?: () => Promise<void>, future?: any): CancellablePromise<T>;
|
|
48
|
+
export declare function createCancellablePromise<T>(options: CancellablePromiseOptions<T>): CancellablePromise<T>;
|
|
49
|
+
//# sourceMappingURL=cancellable-promise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellable-promise.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/types/cancellable-promise.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,OAAO,CAAC,CAAC,CAAC;IACvD;;OAEG;IACH,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAExB;;OAEG;IACH,aAAa,IAAI,eAAe,GAAG,SAAS,CAAC;IAE7C;;OAEG;IACH,WAAW,IAAI,OAAO,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAE5B;;;OAGG;IACH,gBAAgB,CACd,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GACnD,MAAM,IAAI,CAAC;CACf;AAED;;GAEG;AACH,MAAM,WAAW,yBAAyB,CAAC,CAAC;IAC1C,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,MAAM,CAAC,EAAE,GAAG,CAAC;CACd;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,EACnB,eAAe,CAAC,EAAE,eAAe,EACjC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,EAClC,MAAM,CAAC,EAAE,GAAG,GACX,kBAAkB,CAAC,CAAC,CAAC,CAAC;AACzB,wBAAgB,wBAAwB,CAAC,CAAC,EACxC,OAAO,EAAE,yBAAyB,CAAC,CAAC,CAAC,GACpC,kBAAkB,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { FutureAwareContainer, IFutureModel } from '../models/future/future-types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Core Future handler interface - minimal requirement for @kosFuture methods
|
|
5
|
+
*/
|
|
6
|
+
export interface FutureHandlerContainer<T extends object = Record<string, unknown>> {
|
|
7
|
+
futureHandler: FutureAwareContainer<T>;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Future state getters interface - for accessing Future progress/status
|
|
11
|
+
* This is what external consumers typically need
|
|
12
|
+
*/
|
|
13
|
+
export interface FutureStateAccessor<T extends Record<string, any> = Record<string, any>> {
|
|
14
|
+
readonly future?: IFutureModel<T>;
|
|
15
|
+
readonly progress: number;
|
|
16
|
+
readonly status: string;
|
|
17
|
+
readonly isRunning: boolean;
|
|
18
|
+
readonly isCancelled: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Future control interface - for canceling operations
|
|
22
|
+
*/
|
|
23
|
+
export interface FutureController {
|
|
24
|
+
cancelFuture(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Future update callback interface - for models that need custom behavior
|
|
28
|
+
* This can be separated from the core container if not all models need it
|
|
29
|
+
*/
|
|
30
|
+
export interface FutureUpdateHandler<T extends Record<string, any> = Record<string, any>> {
|
|
31
|
+
onFutureUpdate?(future: IFutureModel<T>): void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Complete Future container - combines all interfaces
|
|
35
|
+
* Use this when you need everything internally
|
|
36
|
+
*/
|
|
37
|
+
export interface CompleteFutureContainer<T extends Record<string, any> = Record<string, any>> extends FutureHandlerContainer<T>, FutureStateAccessor<T>, FutureController, FutureUpdateHandler<T> {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* External Future interface - what external consumers typically need
|
|
41
|
+
* This is perfect for PublicModelInterface usage
|
|
42
|
+
*/
|
|
43
|
+
export interface ExternalFutureInterface<T extends Record<string, any> = Record<string, any>> extends FutureStateAccessor<T>, FutureController {
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Type helper for adding Future support to existing model interfaces
|
|
47
|
+
* Usage: export type MyModel = PublicModelInterface<MyModelImpl> & ExternalFutureInterface;
|
|
48
|
+
*/
|
|
49
|
+
export type WithFutureSupport<T> = T & ExternalFutureInterface;
|
|
50
|
+
/**
|
|
51
|
+
* Type helper for internal model implementations that need minimal Future support
|
|
52
|
+
* Usage: export class MyModelImpl implements IKosDataModel, InternalFutureContainer
|
|
53
|
+
*/
|
|
54
|
+
export type InternalFutureContainer<T extends object = Record<string, unknown>> = FutureHandlerContainer<T> & Partial<FutureStateAccessor & FutureController>;
|
|
55
|
+
//# sourceMappingURL=future-interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"future-interfaces.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/types/future-interfaces.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EACb,MAAM,+BAA+B,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,sBAAsB,CACrC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAE1C,aAAa,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC;CACxC;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEnD,QAAQ,CAAC,MAAM,CAAC,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC;IAClC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC/B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB,CAClC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAEnD,cAAc,CAAC,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAChD;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACnD,SAAQ,sBAAsB,CAAC,CAAC,CAAC,EAC/B,mBAAmB,CAAC,CAAC,CAAC,EACtB,gBAAgB,EAChB,mBAAmB,CAAC,CAAC,CAAC;CAAG;AAE7B;;;GAGG;AACH,MAAM,WAAW,uBAAuB,CACtC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CACnD,SAAQ,mBAAmB,CAAC,CAAC,CAAC,EAC5B,gBAAgB;CAAG;AAEvB;;;GAGG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI,CAAC,GAAG,uBAAuB,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,uBAAuB,CACjC,CAAC,SAAS,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IACxC,sBAAsB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,mBAAmB,GAAG,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { CancellablePromise } from '../types/cancellable-promise';
|
|
2
|
+
import { FutureContainer } from '../models/future/future-types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Wraps a @kosFuture method call to return a CancellablePromise
|
|
6
|
+
* This gives you direct cancellation control without needing to access model.future
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```typescript
|
|
10
|
+
* // Instead of:
|
|
11
|
+
* const promise = model.performOperation('data');
|
|
12
|
+
* // Later: await model.future?.cancelFuture();
|
|
13
|
+
*
|
|
14
|
+
* // Use:
|
|
15
|
+
* const cancellable = makeCancellable(model, m => m.performOperation('data'));
|
|
16
|
+
* // Later: await cancellable.cancel();
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export declare function makeCancellable<T extends FutureContainer, R>(model: T, methodCall: (model: T) => Promise<R>): CancellablePromise<R>;
|
|
20
|
+
/**
|
|
21
|
+
* Alternative approach using method decoration at call time
|
|
22
|
+
* This is more explicit but requires wrapping individual calls
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```typescript
|
|
26
|
+
* const cancellable = withCancellation(model, 'performOperation', 'data');
|
|
27
|
+
* await cancellable.cancel();
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
export declare function withCancellation<T extends FutureContainer, K extends keyof T>(model: T, methodName: K, ...args: T[K] extends (...args: infer A) => any ? A : never): CancellablePromise<T[K] extends (...args: any[]) => Promise<infer R> ? R : never>;
|
|
31
|
+
/**
|
|
32
|
+
* Batch cancellation utility for multiple operations
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```typescript
|
|
36
|
+
* const batch = createCancellationBatch();
|
|
37
|
+
*
|
|
38
|
+
* const op1 = batch.add(model, m => m.performOperation1());
|
|
39
|
+
* const op2 = batch.add(model, m => m.performOperation2());
|
|
40
|
+
*
|
|
41
|
+
* // Cancel all operations at once
|
|
42
|
+
* await batch.cancelAll();
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
export declare class CancellationBatch {
|
|
46
|
+
private operations;
|
|
47
|
+
add<T extends FutureContainer, R>(model: T, methodCall: (model: T) => Promise<R>): CancellablePromise<R>;
|
|
48
|
+
cancelAll(): Promise<void>;
|
|
49
|
+
getAllControllers(): Array<AbortController | undefined>;
|
|
50
|
+
getActiveCount(): number;
|
|
51
|
+
clear(): void;
|
|
52
|
+
}
|
|
53
|
+
export declare function createCancellationBatch(): CancellationBatch;
|
|
54
|
+
//# sourceMappingURL=cancellable-future-call.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellable-future-call.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/cancellable-future-call.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvE;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,EAC1D,KAAK,EAAE,CAAC,EACR,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GACnC,kBAAkB,CAAC,CAAC,CAAC,CAkCvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,SAAS,MAAM,CAAC,EAC3E,KAAK,EAAE,CAAC,EACR,UAAU,EAAE,CAAC,EACb,GAAG,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,MAAM,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,KAAK,GAC1D,kBAAkB,CACnB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,GAAG,KAAK,CAC9D,CAoCA;AAED;;;;;;;;;;;;;GAaG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,UAAU,CAAsC;IAExD,GAAG,CAAC,CAAC,SAAS,eAAe,EAAE,CAAC,EAC9B,KAAK,EAAE,CAAC,EACR,UAAU,EAAE,CAAC,KAAK,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,GACnC,kBAAkB,CAAC,CAAC,CAAC;IAMlB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAWhC,iBAAiB,IAAI,KAAK,CAAC,eAAe,GAAG,SAAS,CAAC;IAIvD,cAAc,IAAI,MAAM;IAIxB,KAAK,IAAI,IAAI;CAGd;AAED,wBAAgB,uBAAuB,IAAI,iBAAiB,CAE3D"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility for creating cancellable service functions
|
|
3
|
+
*/
|
|
4
|
+
export type CancellableFunction<T extends (...args: any[]) => any> = T & {
|
|
5
|
+
/**
|
|
6
|
+
* Cancel any in-flight request
|
|
7
|
+
*/
|
|
8
|
+
cancel: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Get the current AbortController
|
|
11
|
+
*/
|
|
12
|
+
getController: () => AbortController | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Check if there's an active request
|
|
15
|
+
*/
|
|
16
|
+
isActive: () => boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Creates a cancellable version of a service function.
|
|
20
|
+
* The service function must accept an AbortSignal as its last parameter.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```typescript
|
|
24
|
+
* // Original service
|
|
25
|
+
* const getUsers = async (params?: UserParams, signal?: AbortSignal) => {
|
|
26
|
+
* return api.get('/users', params, { signal });
|
|
27
|
+
* };
|
|
28
|
+
*
|
|
29
|
+
* // Make it cancellable
|
|
30
|
+
* const cancellableGetUsers = createCancellableService(getUsers);
|
|
31
|
+
*
|
|
32
|
+
* // Use it
|
|
33
|
+
* const users = await cancellableGetUsers({ page: 1 });
|
|
34
|
+
*
|
|
35
|
+
* // Cancel if needed
|
|
36
|
+
* cancellableGetUsers.cancel();
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function createCancellableService<TArgs extends any[], TReturn>(serviceFunction: (...args: [...TArgs, AbortSignal?]) => Promise<TReturn>): CancellableFunction<(...args: TArgs) => Promise<TReturn>>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates a cancellable service class that manages multiple service functions
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```typescript
|
|
45
|
+
* class UserService extends CancellableServiceManager {
|
|
46
|
+
* getUsers = this.createMethod(async (params?: UserParams, signal?: AbortSignal) => {
|
|
47
|
+
* return api.get('/users', params, { signal });
|
|
48
|
+
* });
|
|
49
|
+
*
|
|
50
|
+
* getUser = this.createMethod(async (id: string, signal?: AbortSignal) => {
|
|
51
|
+
* return api.get(`/users/${id}`, undefined, { signal });
|
|
52
|
+
* });
|
|
53
|
+
* }
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
export declare class CancellableServiceManager {
|
|
57
|
+
private controllers;
|
|
58
|
+
/**
|
|
59
|
+
* Create a cancellable method
|
|
60
|
+
*/
|
|
61
|
+
protected createMethod<TArgs extends any[], TReturn>(name: string, serviceFunction: (...args: [...TArgs, AbortSignal?]) => Promise<TReturn>): CancellableFunction<(...args: TArgs) => Promise<TReturn>>;
|
|
62
|
+
/**
|
|
63
|
+
* Cancel a specific method's request
|
|
64
|
+
*/
|
|
65
|
+
cancelMethod(name: string): void;
|
|
66
|
+
/**
|
|
67
|
+
* Cancel all active requests
|
|
68
|
+
*/
|
|
69
|
+
cancelAll(): void;
|
|
70
|
+
/**
|
|
71
|
+
* Get all active method names
|
|
72
|
+
*/
|
|
73
|
+
getActiveMethods(): string[];
|
|
74
|
+
/**
|
|
75
|
+
* Check if any requests are active
|
|
76
|
+
*/
|
|
77
|
+
hasActiveRequests(): boolean;
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=cancellable-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellable-service.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/cancellable-service.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,mBAAmB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,IAAI,CAAC,GAAG;IACvE;;OAEG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB;;OAEG;IACH,aAAa,EAAE,MAAM,eAAe,GAAG,SAAS,CAAC;IACjD;;OAEG;IACH,QAAQ,EAAE,MAAM,OAAO,CAAC;CACzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO,EACnE,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GACvE,mBAAmB,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC,CAuC3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,yBAAyB;IACpC,OAAO,CAAC,WAAW,CAAsC;IAEzD;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,SAAS,GAAG,EAAE,EAAE,OAAO,EACjD,IAAI,EAAE,MAAM,EACZ,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,GAAG,KAAK,EAAE,WAAW,CAAC,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,GACvE,mBAAmB,CAAC,CAAC,GAAG,IAAI,EAAE,KAAK,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IA4B5D;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAQhC;;OAEG;IACH,SAAS,IAAI,IAAI;IAOjB;;OAEG;IACH,gBAAgB,IAAI,MAAM,EAAE;IAI5B;;OAEG;IACH,iBAAiB,IAAI,OAAO;CAG7B"}
|
package/models/utils/client.d.ts
CHANGED
|
@@ -2,20 +2,22 @@ import { paths } from './types';
|
|
|
2
2
|
import { AvailableMethods, ClientResponse } from '../../core';
|
|
3
3
|
|
|
4
4
|
export declare const api: {
|
|
5
|
-
get: <K extends "/api/kos/
|
|
5
|
+
get: <K extends "/api/kos/network/interfaces" | "/api/app/kosdev.ddk/auth/role" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/select" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/availability" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/availability/groups/{group}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/graph/node/{id}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/graph/beverages" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/graph/nodes" | "/api/kos/localization/context/{*path}" | "/api/kos/localization/contexts" | "/api/kos/browser" | "/api/kos/browser/redirect" | "/api/app/kosdev.ddk/cui" | "/api/app/kosdev.ddk/cui/open" | "/api/kos/future/traces" | "/api/kos/future/traces/{traceId}/events" | "/api/kos/ota/paused" | "/api/kos/ota/artifacts" | "/api/app/kosdev.ddk/copyLogs/volumes/size" | "/api/app/kosdev.ddk/copyLogs/files/size" | "/api/ext/freestyle/can/read/float/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/read/int/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/stats/raw" | "/api/kos/state/paths" | "/api/kos/state/{path}" | "/api/ext/dispense/metrics" | "/api/ext/dispense/metrics/names" | "/api/ext/dispense/metrics/{name}" | "/api/ext/dispense/metrics/{nozzle}/names" | "/api/ext/dispense/metrics/{nozzle}/{name}" | "/api/ext/freestyle/microCalibration/report/{board}" | "/api/ext/freestyle/microCalibration/cal/{pump}" | "/api/kos/config/schema" | "/api/kos/config/schema/{path}" | "/api/kos/config/{path}" | "/api/kos/config/details/{options}" | "/api/kos/config/details/{path}/{options}" | "/api/kos/config/value/merged/{scopedPath}/{attr}" | "/api/kos/config/value/{scopedPath}/{attr}" | "/api/kos/config/bean/defaults/{scopedPath}" | "/api/kos/config/bean/merged/{path}" | "/api/kos/config/bean/overrides/{scopedPath}" | "/api/ext/freestyle/brandset/nutrition/{bevId}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/kos/storage/devices" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline" | "/api/kos/update/available" | "/api/ext/dispense/ingredients" | "/api/ext/dispense/ingredients/sources" | "/api/kos/troubles" | "/api/kos/troubles/{troubleId}" | "/api/kos/handles" | "/api/kos/handles/{path}" | "/api/kos/handles/{path}/{view}" | "/api/kos/handles/views" | "/api/kos/openapi/{*baseUrl}" | "/api/kos/manifest/node" | "/api/kos/manifest/device" | "/api/kos/manifest/info" | "/api/app/kosdev.ddk/network/reports" | "/api/app/kosdev.ddk/network/tests" | "/api/app/kosdev.ddk/network/tests/run/{id}" | "/api/app/kosdev.ddk/network/tests/run/group/{group}" | "/api/kos/time/timezone" | "/api/ext/dispense/soldOuts/troubles" | "/api/ext/dispense/soldOuts/db" | "/api/vfs" | "/api/app/kosdev.ddk/setup/steps" | "/api/app/kosdev.ddk/setup/steps/reset" | "/api/kos/regions" | "/api/kos/regions/info" | "/api/ext/dispense/assignments" | "/api/kos/descriptor/{path}" | "/api/kos/descriptor/{path}/{dotted}" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests" | "/api/kos/nodeMgr/blockedManifests" | "/api/kos/criticalData/sources" | "/api/kos/criticalData/data" | "/api/kos/criticalData/data/{name}" | "/api/app/kosdev.ddk/ncui/plugins" | "/api/app/kosdev.ddk/ncui/open" | "/api/kos/device" | "/api/kos/device/assemblies" | "/api/kos/device/serialNumber" | "/api/ext/freestyle/ice/types" | "/api/app/tccc.fits/medusa/profiles" | "/api/app/tccc.fits/medusa/profiles/{profileId}/recipes" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests" | "/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" | "/api/app/tccc.fits/medusa/profiles/{profileId}/map" | "/api/app/tccc.fits/medusa/profiles/{profileId}/results" | "/api/app/tccc.fits/medusa/profiles/{profileId}/results/{resultsId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/results/{resultsId}/entries/{startIdx}/{endIdx}" | "/api/app/tccc.fits/scales" | "/api/app/tccc.fits/scales/ifaces" | "/api/app/tccc.fits.sim/scales" | "/api/app/tccc.fits.sim/scales/{serialNum}" | "/api/app/tccc.fits.sim/scales/{serialNum}/pour/stop" | "/api/app/tccc.fits.sim/scales/{serialNum}/pour/start" | "/api/app/tccc.fits.sim/scales/{serialNum}/reading" | "/api/app/tccc.fits.sim/pumps" | "/api/app/tccc.fits/persistence/sources" | "/api/ext/cms/screens/context/{*path}" | "/api/ext/cms/screens/contexts" | "/api/kos/troubles/debug" | "/api/kos/troubles/debug/{troubleId}" | "/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/{path}/{intent}" | "/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/{path}/{intent}/volume" | "/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/{path}/{intent}/time" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/engine/nutrition/{bevId}" | "/api/app/tccc.fits/session" | "/api/app/tccc.fits/session/data/{key}">(endpoint: K, params?: (paths[K]["get"] extends {
|
|
6
6
|
parameters: infer P;
|
|
7
7
|
} ? P : never) | undefined, options?: {
|
|
8
8
|
ordered?: boolean | undefined;
|
|
9
9
|
tracker?: string | undefined;
|
|
10
|
+
timeout?: number | undefined;
|
|
10
11
|
destinationAddress?: string | undefined;
|
|
11
12
|
studio?: boolean | undefined;
|
|
12
13
|
fos?: boolean | undefined;
|
|
13
14
|
bridge?: boolean | undefined;
|
|
14
|
-
timeout?: number | undefined;
|
|
15
15
|
headers?: Record<string, string> | undefined;
|
|
16
16
|
signal?: AbortSignal | undefined;
|
|
17
|
+
stream?: boolean | undefined;
|
|
18
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
17
19
|
} | undefined) => Promise<import('../../core').ServiceResponse<ClientResponse<paths, K, "get">>>;
|
|
18
|
-
post: <K_1 extends "/api/
|
|
20
|
+
post: <K_1 extends "/api/app/kosdev.ddk/auth/pincode/{pin}" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/select" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/pour" | "/api/ext/dispense/nozzle/nozzle/pipeline/beverage/fixed/{name}" | "/api/kos/browser/{nodeId}" | "/api/kos/browser/{nodeId}/{name}" | "/api/kos/browser/intent" | "/api/kos/browser/url" | "/api/kos/future/{futureId}/cancel" | "/api/kos/ota/resume/{name}" | "/api/kos/ota/cancel" | "/api/kos/ota/cancel/{name}" | "/api/kos/ota/pause/{name}" | "/api/app/kosdev.ddk/copyLogs/eraseAndCopy/{id}" | "/api/app/kosdev.ddk/copyLogs/{id}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/write/byte/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/short/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/float/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/int/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/fcm/diagnostics/{pump}/pressureTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/opennessTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/flowTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/electricalTest" | "/api/ext/dispense/metrics/{name}" | "/api/ext/dispense/metrics/{nozzle}/{name}" | "/api/ext/freestyle/microCalibration/cal/{pump}/running/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/code/{code}" | "/api/ext/freestyle/microCalibration/cal/{pump}/baseline/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/both/{val}" | "/api/kos/config/{path}" | "/api/kos/config/bulk" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/calibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/preCalibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/verify/{calVolume}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline/{value}" | "/api/ext/freestyle/fcm/calibration/{pump}/complete/{calVolume}/{verifyVolume}" | "/api/kos/update/install" | "/api/kos/troubles/resolve" | "/api/kos/troubles/resolve/{troubleId}" | "/api/ext/dispense/pumpEvents/replaceLine/{holder}" | "/api/ext/dispense/pumpEvents/replacePump/{pump}" | "/api/kos/time/date" | "/api/kos/time/timezone" | "/api/kos/time/time" | "/api/ext/dispense/soldOuts/container/{pump}/{reason}" | "/api/ext/dispense/soldOuts/slice/{pump}/{reason}" | "/api/app/kosdev.ddk/setup/complete/{stepName}" | "/api/ext/dispense/assignments" | "/api/kos/nodeMgr/reboot" | "/api/kos/nodeMgr/node/{nodeId}/reboot" | "/api/kos/nodeMgr/node/{nodeId}/blockedManifests/{manifestId}" | "/api/kos/nodeMgr/blockedManifests/{manifestId}" | "/api/app/kosdev.ddk/lockout/unlock/{pin}" | "/api/kos/criticalData/data" | "/api/kos/criticalData/data/{name}" | "/api/app/kosdev.ddk/ncui/reboot" | "/api/kos/device/serialNumber/{serialNum}" | "/api/ext/freestyle/ice/type/{path}/{type}" | "/api/app/tccc.fits/medusa/profile" | "/api/app/tccc.fits/medusa/profiles/{profileId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/resume" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/exit" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/stop" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/{testId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/{testId}/json" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/{testId}/run" | "/api/app/tccc.fits/medusa/profiles/{profileId}/tests/pause" | "/api/app/tccc.fits/medusa/profiles/{profileId}/test" | "/api/app/tccc.fits/medusa/profiles/{profileId}/activate" | "/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}/recipe" | "/api/app/tccc.fits/medusa/profiles/{profileId}/mapper/discovery" | "/api/app/tccc.fits/medusa/profiles/{profileId}/mapper/builder" | "/api/app/tccc.fits/medusa/profiles/{profileId}/results/{resultsId}" | "/api/app/tccc.fits/medusa/profiles/{profileId}/validate" | "/api/app/tccc.fits/medusa/profiles/{profileId}/validate/all" | "/api/app/tccc.fits/scales/{serialNum}" | "/api/app/tccc.fits.sim/scales/{serialNum}/disconnect" | "/api/app/tccc.fits.sim/scales/{serialNum}/reading/reset" | "/api/app/tccc.fits.sim/scales/{serialNum}/reading/{value}" | "/api/app/tccc.fits.sim/scales/{serialNum}/connect" | "/api/app/tccc.fits.sim/scale" | "/api/app/tccc.fits.sim/pumps/{pumpPath}/disconnect" | "/api/app/tccc.fits.sim/pumps/{pumpPath}/reading/unlock" | "/api/app/tccc.fits.sim/pumps/{pumpPath}/reading/lock" | "/api/app/tccc.fits.sim/pumps/{pumpPath}/connect/{serialNum}" | "/api/app/tccc.fits/persistence/sources/{storageId}/{name}" | "/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/{path}/{intent}" | "/api/app/tccc.fits/session/pop/all" | "/api/app/tccc.fits/session/pop/include/{type}" | "/api/app/tccc.fits/session/pop/to/{type}" | "/api/app/tccc.fits/session/data/{key}" | "/api/handle/assembly:core:board:macro:agitator:agit/test">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
19
21
|
parameters: infer P_1;
|
|
20
22
|
} ? P_1 : never) | undefined, body?: (paths[K_1]["post"] extends {
|
|
21
23
|
requestBody: {
|
|
@@ -24,13 +26,15 @@ export declare const api: {
|
|
|
24
26
|
} ? B[keyof B] : never) | undefined, options?: {
|
|
25
27
|
ordered?: boolean | undefined;
|
|
26
28
|
tracker?: string | undefined;
|
|
29
|
+
timeout?: number | undefined;
|
|
27
30
|
destinationAddress?: string | undefined;
|
|
28
31
|
studio?: boolean | undefined;
|
|
29
32
|
fos?: boolean | undefined;
|
|
30
33
|
bridge?: boolean | undefined;
|
|
31
|
-
timeout?: number | undefined;
|
|
32
34
|
headers?: Record<string, string> | undefined;
|
|
33
35
|
signal?: AbortSignal | undefined;
|
|
36
|
+
stream?: boolean | undefined;
|
|
37
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
34
38
|
} | undefined) => Promise<import('../../core').ServiceResponse<ClientResponse<paths, K_1, "post">>>;
|
|
35
39
|
put: <K_2 extends never>(endpoint: K_2, params?: (paths[K_2]["put"] extends {
|
|
36
40
|
parameters: infer P_2;
|
|
@@ -41,26 +45,30 @@ export declare const api: {
|
|
|
41
45
|
} ? B_1[keyof B_1] : never) | undefined, options?: {
|
|
42
46
|
ordered?: boolean | undefined;
|
|
43
47
|
tracker?: string | undefined;
|
|
48
|
+
timeout?: number | undefined;
|
|
44
49
|
destinationAddress?: string | undefined;
|
|
45
50
|
studio?: boolean | undefined;
|
|
46
51
|
fos?: boolean | undefined;
|
|
47
52
|
bridge?: boolean | undefined;
|
|
48
|
-
timeout?: number | undefined;
|
|
49
53
|
headers?: Record<string, string> | undefined;
|
|
50
54
|
signal?: AbortSignal | undefined;
|
|
55
|
+
stream?: boolean | undefined;
|
|
56
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
51
57
|
} | undefined) => Promise<import('../../core').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
52
|
-
delete: <K_3 extends "/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/
|
|
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 {
|
|
53
59
|
parameters: infer P_3;
|
|
54
60
|
} ? P_3 : never) | undefined, options?: {
|
|
55
61
|
ordered?: boolean | undefined;
|
|
56
62
|
tracker?: string | undefined;
|
|
63
|
+
timeout?: number | undefined;
|
|
57
64
|
destinationAddress?: string | undefined;
|
|
58
65
|
studio?: boolean | undefined;
|
|
59
66
|
fos?: boolean | undefined;
|
|
60
67
|
bridge?: boolean | undefined;
|
|
61
|
-
timeout?: number | undefined;
|
|
62
68
|
headers?: Record<string, string> | undefined;
|
|
63
69
|
signal?: AbortSignal | undefined;
|
|
70
|
+
stream?: boolean | undefined;
|
|
71
|
+
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
64
72
|
} | undefined) => Promise<import('../../core').ServiceResponse<ClientResponse<paths, K_3, "delete">>>;
|
|
65
73
|
};
|
|
66
74
|
export type BaseResponseType<K extends keyof paths, M extends AvailableMethods<paths[K]>> = ClientResponse<paths, K, M>;
|
|
@@ -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"}
|
package/models/utils/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export * from './conversion-utils';
|
|
|
3
3
|
export * from './core-registration-manager';
|
|
4
4
|
export * from './extension-manager';
|
|
5
5
|
export * from './future-manager';
|
|
6
|
+
export * from './kosmodel-compatible-future-mixin';
|
|
7
|
+
export * from './kosmodel-interface-companion-mixin';
|
|
6
8
|
export * from './model-event-utils';
|
|
7
9
|
export * from './persistence-store';
|
|
8
10
|
export * from './prop-utils';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-ui-sdk/src/models/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oCAAoC,CAAC;AACnD,cAAc,sCAAsC,CAAC;AACrD,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC"}
|