@kosdev-code/kos-ddk-models 2.0.1 → 2.0.2
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/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +1 -1
- package/index.mjs +1345 -1161
- package/lib/agitation-control/agitation-control-model.d.ts.map +1 -1
- package/lib/spm-pump/index.d.ts +5 -0
- package/lib/spm-pump/index.d.ts.map +1 -0
- package/lib/spm-pump/services/index.d.ts +2 -0
- package/lib/spm-pump/services/index.d.ts.map +1 -0
- package/lib/spm-pump/services/spm-pump-services.d.ts +7 -0
- package/lib/spm-pump/services/spm-pump-services.d.ts.map +1 -0
- package/lib/spm-pump/spm-pump-model.d.ts +26 -0
- package/lib/spm-pump/spm-pump-model.d.ts.map +1 -0
- package/lib/spm-pump/spm-pump-registration.d.ts +87 -0
- package/lib/spm-pump/spm-pump-registration.d.ts.map +1 -0
- package/lib/spm-pump/types/index.d.ts +5 -0
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agitation-control-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/agitation-control/agitation-control-model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,eAAe,EAEf,aAAa,EACb,gBAAgB,EAGhB,kBAAkB,EAOlB,oBAAoB,EAIpB,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AASvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AACpD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAElD,qBACa,yBACX,YAAW,aAAa,EAAE,gBAAgB,EAAE,eAAe;IAE3D,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,oBAAoB,CAAC;IACpC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,gBAAgB,CAAwB;IAChD,OAAO,CAAC,kBAAkB,CAAC,CAAS;IACpC,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,CAAe;IAEhC,OAAO,CAAC,WAAW,CAAoB;gBAErC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,uBAAuB,EAChC,OAAO,EAAE,kBAAkB;IAY7B,IAAI,QAAQ,CAAC,KAAK,EAAE,OAAO,EAE1B;IACD,IAAI,QAAQ,IAHQ,OAAO,CAK1B;IACD,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"agitation-control-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/agitation-control/agitation-control-model.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,eAAe,EAEf,aAAa,EACb,gBAAgB,EAGhB,kBAAkB,EAOlB,oBAAoB,EAIpB,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AASvD,eAAO,MAAM,UAAU,4BAA4B,CAAC;AACpD,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,MAAM,MAAM,qBAAqB,GAC/B,oBAAoB,CAAC,yBAAyB,CAAC,CAAC;AAElD,qBACa,yBACX,YAAW,aAAa,EAAE,gBAAgB,EAAE,eAAe;IAE3D,EAAE,EAAE,MAAM,CAAC;IACX,aAAa,EAAE,oBAAoB,CAAC;IACpC,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,gBAAgB,CAAwB;IAChD,OAAO,CAAC,kBAAkB,CAAC,CAAS;IACpC,OAAO,CAAC,QA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":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,mBAAmB,SAAS,CAAC;AAC7B,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,eAAe,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ddk/kos-ddk-models/src/lib/spm-pump/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FutureResponse } from '../../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
2
|
+
|
|
3
|
+
export declare const performPreCalibrate: (pump: string, tracker?: string) => Promise<FutureResponse>;
|
|
4
|
+
export declare const performCalibrate: (pump: string, tracker?: string) => Promise<FutureResponse>;
|
|
5
|
+
export declare const performVerify: (pump: string, volume: string, payload: any, tracker?: string) => Promise<FutureResponse>;
|
|
6
|
+
export declare const performComplete: (pump: string, volume1: string, volume2: string, payload: any) => Promise<any>;
|
|
7
|
+
//# sourceMappingURL=spm-pump-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spm-pump-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/ddk/kos-ddk-models/src/lib/spm-pump/services/spm-pump-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,cAAc,EAEpB,MAAM,yBAAyB,CAAC;AAYjC,eAAO,MAAM,mBAAmB,SAAgB,MAAM,YAAY,MAAM,4BAoCvE,CAAC;AAEF,eAAO,MAAM,gBAAgB,SAAgB,MAAM,YAAY,MAAM,4BAoCpE,CAAC;AAEF,eAAO,MAAM,aAAa,SAClB,MAAM,UACJ,MAAM,WACL,GAAG,YACF,MAAM,4BA4CjB,CAAC;AAEF,eAAO,MAAM,eAAe,SACpB,MAAM,WACH,MAAM,WACN,MAAM,WACN,GAAG,iBA8Bb,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { IntentAware, IntentAwareProps } from '../../../../../sdk/kos-dispense-sdk/src/index.ts';
|
|
2
|
+
import { SpmPumpOptions } from './types';
|
|
3
|
+
import { KosCreationContext, IKosDataModel, IKosIdentifiable, PublicModelInterface, FutureContainer, FutureAwareContainer, FutureResponse } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
4
|
+
|
|
5
|
+
export declare const MODEL_TYPE = "spm-pump-model";
|
|
6
|
+
export type SpmPumpModel = PublicModelInterface<SpmPumpModelImpl>;
|
|
7
|
+
export declare class SpmPumpModelImpl implements IKosDataModel, IKosIdentifiable, IntentAware, FutureContainer {
|
|
8
|
+
id: string;
|
|
9
|
+
private logger;
|
|
10
|
+
private pump;
|
|
11
|
+
futureHandler: FutureAwareContainer;
|
|
12
|
+
constructor(modelId: string, options: SpmPumpOptions, context: KosCreationContext);
|
|
13
|
+
get name(): string;
|
|
14
|
+
get canPour(): boolean;
|
|
15
|
+
get isPouring(): boolean;
|
|
16
|
+
cancelPour(): Promise<void>;
|
|
17
|
+
performIntent(props: IntentAwareProps | string): Promise<FutureResponse | undefined>;
|
|
18
|
+
get future(): import('../../../../../sdk/kos-ui-sdk/src/index.ts').IFutureModel<Record<string, unknown>> | undefined;
|
|
19
|
+
performPreCalibrate(tracker?: string): Promise<FutureResponse>;
|
|
20
|
+
performCalibrate(tracker?: string): Promise<FutureResponse>;
|
|
21
|
+
performVerify(volume: string, payload: any, tracker?: string): Promise<FutureResponse>;
|
|
22
|
+
performComplete(volume1: string, volume2: string, payload: any): Promise<any>;
|
|
23
|
+
init(): Promise<void>;
|
|
24
|
+
load(): Promise<void>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=spm-pump-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spm-pump-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/sp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
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { SpmPumpModel } from './spm-pump-model';
|
|
2
|
+
import { SpmPumpOptions } from './types';
|
|
3
|
+
import { KosModelRegistrationFactory } from '../../../../../sdk/kos-ui-sdk/src/index.ts';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # SpmPump
|
|
7
|
+
*
|
|
8
|
+
* The registration bean includes convenience methods for creating and working with SpmPumpModel instances.
|
|
9
|
+
*
|
|
10
|
+
* ## type
|
|
11
|
+
* The type property is a string that identifies the model type.
|
|
12
|
+
* The type is used to identify the model type in the model registry and to narrow down the model type in type predicates. It's most frequently
|
|
13
|
+
* used when declaring dependencies on models.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
*
|
|
18
|
+
* @kosDependency({modelType: SpmPump.type, id: "spmPumpId"})
|
|
19
|
+
* private spmPumpModel: SpmPumpModel;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* ## factory
|
|
24
|
+
*
|
|
25
|
+
* The factory method creates a factory function that can be used to create new SpmPumpModel instances.
|
|
26
|
+
*
|
|
27
|
+
|
|
28
|
+
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
29
|
+
*
|
|
30
|
+
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
31
|
+
* in this case and the existing model will be returned in its current state.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```typescript
|
|
35
|
+
* const model = SpmPump.factory("spmPumpId")({
|
|
36
|
+
* // Add option data
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
*
|
|
42
|
+
* ## predicate
|
|
43
|
+
*
|
|
44
|
+
* [Typescript type predicate](https://www.typescriptlang.org/docs/handbook/2/narrowing.html#using-type-predicates) function that will identify and narrow down a model to a SpmPumpModel.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
*
|
|
49
|
+
* const model: IKosDataModel = ...; // some model
|
|
50
|
+
*
|
|
51
|
+
* if (SpmPump.predicate(model)) {
|
|
52
|
+
* // if the function evaluates to true, the model is narrowed down to SpmPumpModel
|
|
53
|
+
* // and the compiler will know that the model has the SpmPumpModel interface
|
|
54
|
+
* model.updateAvailability(false);
|
|
55
|
+
* }
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
58
|
+
* ## registration
|
|
59
|
+
*
|
|
60
|
+
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
61
|
+
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
62
|
+
*
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
*
|
|
66
|
+
* In an application registration file you can declare the model registration as follows:
|
|
67
|
+
*
|
|
68
|
+
* **registration.ts**
|
|
69
|
+
* ```typescript
|
|
70
|
+
* import { SpmPump } from "@kos-ui/project-models";
|
|
71
|
+
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
72
|
+
*
|
|
73
|
+
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
74
|
+
*
|
|
75
|
+
* KosModelRegistry.dispense
|
|
76
|
+
* .models()
|
|
77
|
+
* .model(SpmPump);
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* ## registration.singleton
|
|
81
|
+
|
|
82
|
+
* The spmPump model is NOT a singleton model. This means that each time the factory function is called with a unique ID, a new model instance will be created.
|
|
83
|
+
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
84
|
+
|
|
85
|
+
* */
|
|
86
|
+
export declare const SpmPump: KosModelRegistrationFactory<SpmPumpModel, SpmPumpOptions>;
|
|
87
|
+
//# sourceMappingURL=spm-pump-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spm-pump-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/ddk/kos-ddk-models/src/lib/spm-pump/spm-pump-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,OAAO,2DAMlB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-ddk-models",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"dependencies": {
|
|
5
|
-
"@kosdev-code/kos-ui-sdk": "~2.0.
|
|
6
|
-
"@kosdev-code/kos-dispense-sdk": "~2.0.
|
|
7
|
-
"@kosdev-code/kos-freestyle-sdk": "~2.0.
|
|
5
|
+
"@kosdev-code/kos-ui-sdk": "~2.0.18",
|
|
6
|
+
"@kosdev-code/kos-dispense-sdk": "~2.0.18",
|
|
7
|
+
"@kosdev-code/kos-freestyle-sdk": "~2.0.18"
|
|
8
8
|
},
|
|
9
9
|
"main": "./index.js",
|
|
10
10
|
"module": "./index.mjs",
|
|
11
11
|
"typings": "./index.d.ts",
|
|
12
12
|
"kos": {
|
|
13
13
|
"build": {
|
|
14
|
-
"gitHash": "
|
|
14
|
+
"gitHash": "6d5033cbef412a98aef14c695c39ea48b5625e8a"
|
|
15
15
|
}
|
|
16
16
|
},
|
|
17
17
|
"publishConfig": {
|