@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5880 → 0.1.0-next.1008
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/extension-utils-BLjVB2bu.cjs +344 -0
- package/extension-utils-BLjVB2bu.cjs.map +1 -0
- package/extension-utils-CV3CeJXI.js +345 -0
- package/extension-utils-CV3CeJXI.js.map +1 -0
- package/index.cjs +42 -1
- package/index.cjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +40 -48
- package/index.js.map +1 -1
- package/models/constants/index.d.ts.map +1 -1
- package/models/index.d.ts.map +1 -1
- package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts +14 -80
- package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts.map +1 -1
- package/models/models/agitation-required-trouble/index.d.ts.map +1 -1
- package/models/models/agitation-required-trouble/types/index.d.ts +1 -3
- package/models/models/carb-agitator/carb-agitator-model.d.ts +4 -24
- package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
- package/models/models/carb-agitator/index.d.ts.map +1 -1
- package/models/models/carb-agitator/services/carb-tank-services.d.ts +1 -15
- package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -1
- package/models/models/cartridge-agitator/cartridge-agitator-container-model.d.ts +2 -3
- package/models/models/cartridge-agitator/cartridge-agitator-container-model.d.ts.map +1 -1
- package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts +12 -77
- package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts.map +1 -1
- package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts +1 -2
- package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts.map +1 -1
- package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts +12 -79
- package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts.map +1 -1
- package/models/models/cartridge-agitator/index.d.ts.map +1 -1
- package/models/models/cartridge-agitator/services/cartridge-agitator-services.d.ts +0 -1
- package/models/models/cartridge-agitator/services/cartridge-agitator-services.d.ts.map +1 -1
- package/models/models/cgp-pump/cgp-pump-model.d.ts +3 -4
- package/models/models/cgp-pump/cgp-pump-model.d.ts.map +1 -1
- package/models/models/cgp-pump/index.d.ts.map +1 -1
- package/models/models/cgp-pump/types/index.d.ts +1 -3
- package/models/models/fcm-pump/fcm-pump-model.d.ts +7 -4
- package/models/models/fcm-pump/fcm-pump-model.d.ts.map +1 -1
- package/models/models/fcm-pump/fcm-pump-registration.d.ts +12 -77
- package/models/models/fcm-pump/fcm-pump-registration.d.ts.map +1 -1
- package/models/models/fcm-pump/index.d.ts.map +1 -1
- package/models/models/fcm-pump/services/fcm-pump-services.d.ts +0 -1
- package/models/models/fcm-pump/services/fcm-pump-services.d.ts.map +1 -1
- package/models/models/fcm-pump/services/index.d.ts.map +1 -1
- package/models/models/fcm-pump/types/index.d.ts +1 -3
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +7 -8
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -1
- package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts +12 -79
- package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts.map +1 -1
- package/models/models/freestyle-assembly/index.d.ts.map +1 -1
- package/models/models/freestyle-assembly/types/index.d.ts +1 -3
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts +2 -3
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts.map +1 -1
- package/models/models/freestyle-holder/freestyle-holder-registration.d.ts +12 -77
- package/models/models/freestyle-holder/freestyle-holder-registration.d.ts.map +1 -1
- package/models/models/freestyle-holder/index.d.ts.map +1 -1
- package/models/models/freestyle-holder/types/index.d.ts +1 -3
- package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts +2 -3
- package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts.map +1 -1
- package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts +12 -77
- package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts.map +1 -1
- package/models/models/freestyle-nozzle/index.d.ts.map +1 -1
- package/models/models/freestyle-nozzle/services/freestyle-nozzle-services.d.ts.map +1 -1
- package/models/models/freestyle-nozzle/services/index.d.ts.map +1 -1
- package/models/models/freestyle-nozzle/types/index.d.ts +1 -3
- package/models/models/freestyle-pump/freestyle-pump-model.d.ts +2 -3
- package/models/models/freestyle-pump/freestyle-pump-model.d.ts.map +1 -1
- package/models/models/freestyle-pump/freestyle-pump-registration.d.ts +12 -77
- package/models/models/freestyle-pump/freestyle-pump-registration.d.ts.map +1 -1
- package/models/models/freestyle-pump/index.d.ts.map +1 -1
- package/models/models/freestyle-pump/services/freestyle-pump-services.d.ts.map +1 -1
- package/models/models/freestyle-pump/services/index.d.ts.map +1 -1
- package/models/models/freestyle-pump/types/index.d.ts +1 -3
- package/models/models/ice-agitator/ice-agitator-model.d.ts +2 -3
- package/models/models/ice-agitator/ice-agitator-model.d.ts.map +1 -1
- package/models/models/ice-agitator/index.d.ts.map +1 -1
- package/models/models/ice-agitator/services/ice-agitator-services.d.ts +0 -1
- package/models/models/ice-agitator/services/ice-agitator-services.d.ts.map +1 -1
- package/models/models/ice-agitator/services/index.d.ts.map +1 -1
- package/models/models/index.d.ts.map +1 -1
- package/models/models/lfcv-pump/index.d.ts.map +1 -1
- package/models/models/lfcv-pump/lfcv-pump-model.d.ts +8 -5
- package/models/models/lfcv-pump/lfcv-pump-model.d.ts.map +1 -1
- package/models/models/lfcv-pump/types/index.d.ts +1 -3
- package/models/models/remote-tray/index.d.ts.map +1 -1
- package/models/models/remote-tray/remote-tray-container-model.d.ts +1 -2
- package/models/models/remote-tray/remote-tray-container-model.d.ts.map +1 -1
- package/models/models/remote-tray/remote-tray-container-registration.d.ts +12 -77
- package/models/models/remote-tray/remote-tray-container-registration.d.ts.map +1 -1
- package/models/models/remote-tray/remote-tray-model.d.ts +11 -93
- package/models/models/remote-tray/remote-tray-model.d.ts.map +1 -1
- package/models/models/remote-tray/remote-tray-registration.d.ts +12 -80
- package/models/models/remote-tray/remote-tray-registration.d.ts.map +1 -1
- package/models/models/spm-pump/index.d.ts.map +1 -1
- package/models/models/spm-pump/services/index.d.ts.map +1 -1
- package/models/models/spm-pump/services/spm-pump-services.d.ts +0 -1
- package/models/models/spm-pump/services/spm-pump-services.d.ts.map +1 -1
- package/models/models/spm-pump/spm-pump-model.d.ts +7 -4
- package/models/models/spm-pump/spm-pump-model.d.ts.map +1 -1
- package/models/models/spm-pump/spm-pump-registration.d.ts +12 -77
- package/models/models/spm-pump/spm-pump-registration.d.ts.map +1 -1
- package/models/models/spm-pump/types/index.d.ts +1 -3
- package/models/models/types/assembly.d.ts +3 -4
- package/models/models/types/assembly.d.ts.map +1 -1
- package/models/models/types/ingredients.d.ts +0 -1
- package/models/models/types/ingredients.d.ts.map +1 -1
- package/models/models/types/pumps.d.ts +0 -1
- package/models/models/types/pumps.d.ts.map +1 -1
- package/models/utils/extension-utils.d.ts +2 -3
- package/models/utils/extension-utils.d.ts.map +1 -1
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +2 -3
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -1
- package/models/utils/extensions/assembly/types.d.ts +6 -90
- package/models/utils/extensions/assembly/types.d.ts.map +1 -1
- package/models/utils/extensions/availability/freestyle-loader.d.ts +1 -2
- package/models/utils/extensions/availability/freestyle-loader.d.ts.map +1 -1
- package/models/utils/extensions/availability/freestyle-mapper.d.ts +2 -3
- package/models/utils/extensions/availability/freestyle-mapper.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/assets.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/assets.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/beverage-screen.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/beverage-screen.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/beverages.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/beverages.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/brand-screen.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/brand-screen.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/brands.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/brands.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/copy-input.d.ts +0 -1
- package/models/utils/extensions/availability/middleware/copy-input.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/flavors.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/flavors.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/nutrition.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/nutrition.d.ts.map +1 -1
- package/models/utils/extensions/availability/middleware/related-brands.d.ts +1 -2
- package/models/utils/extensions/availability/middleware/related-brands.d.ts.map +1 -1
- package/models/utils/extensions/availability/types.d.ts.map +1 -1
- package/models/utils/extensions/availability/util/locate-brand.d.ts.map +1 -1
- package/models/utils/extensions/availability/util/process-related-brand.d.ts +0 -1
- package/models/utils/extensions/availability/util/process-related-brand.d.ts.map +1 -1
- package/models/utils/extensions/ingredient/index.d.ts.map +1 -1
- package/models/utils/extensions/ingredient/model-extension.d.ts +1 -2
- package/models/utils/extensions/ingredient/model-extension.d.ts.map +1 -1
- package/models/utils/extensions/pourable/select-pourable-mapper.d.ts +0 -1
- package/models/utils/extensions/pourable/select-pourable-mapper.d.ts.map +1 -1
- package/models/utils/extensions/trouble/trouble-utils.d.ts +0 -1
- package/models/utils/extensions/trouble/trouble-utils.d.ts.map +1 -1
- package/models/utils/freestyle-registration-manager.d.ts +22 -13
- package/models/utils/freestyle-registration-manager.d.ts.map +1 -1
- package/models/utils/index.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +2 -2
- package/models/utils/openapi-index.d.ts.map +1 -1
- package/models/utils/services/freestyle/1.6.5/service.d.ts +34 -35
- package/models/utils/services/freestyle/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/freestyle/1.8.1/service.d.ts +34 -35
- package/models/utils/services/freestyle/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/freestyle/daily/openapi.d.ts +477 -475
- package/models/utils/services/freestyle/daily/service.d.ts +127 -37
- package/models/utils/services/freestyle/daily/service.d.ts.map +1 -1
- package/models/utils/services/handle/1.8.1/service.d.ts +34 -35
- package/models/utils/services/handle/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/handle/daily/openapi.d.ts +102 -110
- package/models/utils/services/handle/daily/service.d.ts +128 -38
- package/models/utils/services/handle/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +2 -6
- package/models/utils/services-index.d.ts.map +1 -1
- package/models.cjs +34 -1
- package/models.cjs.map +1 -1
- package/models.d.ts +1 -0
- package/models.js +31 -37
- package/models.js.map +1 -1
- package/package.json +9 -10
- package/service-Dfj0KrIU.cjs +2323 -0
- package/service-Dfj0KrIU.cjs.map +1 -0
- package/service-VBsCe4jt.js +2324 -0
- package/service-VBsCe4jt.js.map +1 -0
- package/ui/contexts/index.d.ts.map +1 -1
- package/ui/hooks/freestyle-assembly/index.d.ts.map +1 -1
- package/ui/hooks/freestyle-assembly/use-freestyle-assembly.d.ts +0 -1
- package/ui/hooks/freestyle-assembly/use-freestyle-assembly.d.ts.map +1 -1
- package/ui/hooks/freestyle-nozzle/index.d.ts.map +1 -1
- package/ui/hooks/freestyle-nozzle/use-freestyle-nozzle.d.ts +0 -1
- package/ui/hooks/freestyle-nozzle/use-freestyle-nozzle.d.ts.map +1 -1
- package/ui/hooks/ice-agitator/index.d.ts.map +1 -1
- package/ui/hooks/ice-agitator/use-ice-agitator.d.ts +1 -2
- package/ui/hooks/ice-agitator/use-ice-agitator.d.ts.map +1 -1
- package/ui/hooks/ice-agitator/with-ice-agitator.d.ts +0 -1
- package/ui/hooks/ice-agitator/with-ice-agitator.d.ts.map +1 -1
- package/ui/hooks/index.d.ts.map +1 -1
- package/ui/hooks/nutrition/index.d.ts.map +1 -1
- package/ui/hooks/nutrition/use-nutrition-info.d.ts +0 -1
- package/ui/hooks/nutrition/use-nutrition-info.d.ts.map +1 -1
- package/ui/index.d.ts.map +1 -1
- package/ui.cjs +8 -1
- package/ui.cjs.map +1 -1
- package/ui.d.ts +1 -0
- package/ui.js +6 -11
- package/ui.js.map +1 -1
- package/use-nutrition-info-6ijRu88p.cjs +67 -0
- package/use-nutrition-info-6ijRu88p.cjs.map +1 -0
- package/use-nutrition-info-Rc_SHgBZ.js +68 -0
- package/use-nutrition-info-Rc_SHgBZ.js.map +1 -0
- package/extension-utils-BmYlSFBk.js +0 -237
- package/extension-utils-BmYlSFBk.js.map +0 -1
- package/extension-utils-CfoCVS2Q.cjs +0 -2
- package/extension-utils-CfoCVS2Q.cjs.map +0 -1
- package/kos-models.json +0 -180
- package/service-CWOr4GoM.js +0 -1909
- package/service-CWOr4GoM.js.map +0 -1
- package/service-DSYXBBUw.cjs +0 -2
- package/service-DSYXBBUw.cjs.map +0 -1
- package/use-nutrition-info-C-xQQgQc.js +0 -52
- package/use-nutrition-info-C-xQQgQc.js.map +0 -1
- package/use-nutrition-info-CkwUK6FN.cjs +0 -2
- package/use-nutrition-info-CkwUK6FN.cjs.map +0 -1
|
@@ -1,87 +1,22 @@
|
|
|
1
|
-
import { FreestylePumpOptions } from './types';
|
|
2
|
-
import { FreestylePumpModel } from './freestyle-pump-model';
|
|
3
1
|
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { FreestylePumpModel } from './freestyle-pump-model';
|
|
3
|
+
import { FreestylePumpOptions } from './types';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The registration bean includes convenience methods for creating and working with FreestylePumpModel 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: FreestylePump.type, id: "freestylePumpId"})
|
|
19
|
-
* private freestylePumpModel: FreestylePumpModel;
|
|
20
|
-
* ```
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* ## factory
|
|
24
|
-
*
|
|
25
|
-
* The factory method creates a factory function that can be used to create new FreestylePumpModel 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 = FreestylePump.factory("freestylePumpId")({
|
|
36
|
-
* // Add option data
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
|
|
40
|
-
|
|
5
|
+
* Registration bean for {@link FreestylePumpModel}.
|
|
41
6
|
*
|
|
42
|
-
*
|
|
7
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
8
|
+
* - `factory`: curried factory, `FreestylePump.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
|
|
9
|
+
* - `guard`: type guard that narrows an `IKosDataModel` to `FreestylePumpModel`.
|
|
10
|
+
* - `instance(id)`: reads the model, or builds it from options.
|
|
11
|
+
* - `register()`: registers the model, and any related models, with the model registry.
|
|
43
12
|
*
|
|
44
|
-
*
|
|
13
|
+
* FreestylePump is not a singleton: each id has its own instance. `KosModelRegistry.freestyle.models()` registers it.
|
|
45
14
|
*
|
|
46
15
|
* @example
|
|
47
16
|
* ```typescript
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
* if (FreestylePump.predicate(model)) {
|
|
52
|
-
* // if the function evaluates to true, the model is narrowed down to FreestylePumpModel
|
|
53
|
-
* // and the compiler will know that the model has the FreestylePumpModel interface
|
|
54
|
-
* model.updateAvailability(false);
|
|
55
|
-
* }
|
|
17
|
+
* @kosDependency({ modelType: FreestylePump.type, id: "freestylePumpId" })
|
|
18
|
+
* private freestylePump!: FreestylePumpModel;
|
|
56
19
|
* ```
|
|
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 { FreestylePump } 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(FreestylePump);
|
|
78
|
-
* ```
|
|
79
|
-
*
|
|
80
|
-
* ## registration.singleton
|
|
81
|
-
|
|
82
|
-
* The freestylePump 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
|
-
* */
|
|
20
|
+
*/
|
|
86
21
|
export declare const FreestylePump: KosModelRegistrationFactory<FreestylePumpModel, FreestylePumpOptions>;
|
|
87
22
|
//# sourceMappingURL=freestyle-pump-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"freestyle-pump-registration.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"freestyle-pump-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-pump/freestyle-pump-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAEjE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,aAAa,uEAMxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-pump/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,mBAAmB,SAAS,CAAC;AAC7B,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,KAAK,qBAAqB,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"freestyle-pump-services.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"freestyle-pump-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-pump/services/freestyle-pump-services.ts"],"names":[],"mappings":"AAgBA,MAAM,MAAM,oBAAoB,GAAG,cAAc,GAAG,SAAS,CAAC;AAC9D,MAAM,MAAM,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAC9B,CAAC;AACF,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB,GAAG,SAAS;IAChC,eAAe;CAChB,CAAC;AACF,eAAO,MAAM,WAAW,GACtB,QAAQ,MAAM,EACd,MAAM,MAAM,KACX,OAAO,CAAC,mBAAmB,CAoC7B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-freestyle-sdk/src/models/models/freestyle-pump/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { IKosCompanionOptions } from '@kosdev-code/kos-ui-sdk';
|
|
2
1
|
import { PumpModel, PumpOptions } from '@kosdev-code/kos-dispense-sdk';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { IKosCompanionOptions } from '@kosdev-code/kos-ui-sdk';
|
|
5
3
|
export type FreestylePumpOptions = IKosCompanionOptions<PumpModel, PumpOptions>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { IceAgitatorOptions } from './types';
|
|
2
|
-
import { PourState } from '@kosdev-code/kos-dispense-sdk';
|
|
3
1
|
import { IKosDataModel, KosConfigProperty, KosLoggerAware, KosModelRegistrationType, KosMultipleFutureAwareFull, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { PourState } from '@kosdev-code/kos-dispense-sdk';
|
|
3
|
+
import { IceAgitatorOptions } from './types';
|
|
5
4
|
export type IceAgitatorModel = PublicModelInterface<IceAgitatorModelImpl>;
|
|
6
5
|
export declare class IceAgitatorEvents {
|
|
7
6
|
static TOPIC_AGITATION_STARTED: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ice-agitator-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ice-agitator-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/ice-agitator/ice-agitator-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,wBAAwB,EACxB,0BAA0B,EAE1B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAejC,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAS1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,CAAC;AAE1E,qBAAa,iBAAiB;IAC5B,MAAM,CAAC,uBAAuB,SAA2C;IACzE,MAAM,CAAC,qBAAqB,SAAyC;CACtE;AAED,eAAO,MAAM,UAAU,uBAAuB,CAAC;AAI/C,KAAK,oBAAoB,GAAG,0BAA0B,CACpD,MAAM,GAAG,SAAS,GAAG,MAAM,CAC5B,CAAC;AAGF,MAAM,WAAW,oBACf,SAAQ,oBAAoB,EAC1B,cAAc;CAAG;AAErB,qBAGa,oBAAqB,YAAW,aAAa;IACxD,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAC3C,oBAAoB,EACpB,kBAAkB,CACnB,CAAC;IACF,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IAOb,eAAe,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAS5C,WAAW,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAMxC,mBAAmB,EAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAMjD,uBAAuB,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAMpD,wBAAwB,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAMrD,6BAA6B,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAM1D,cAAc,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAM3C,IAAI,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAMjC,cAAc,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAS3C,aAAa,EAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAE1C,OAAO,CAAC,SAAS,CAAyB;IAG1C,OAAO,CAAC,YAAY,CAAyB;IAE7C,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,YAAY,CAAW;IAE/B,YAAY,EAAE,SAAS,CAAkB;gBAC7B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB;IAQxD,IAAI,QAAQ,IAAI,MAAM,EAAE,CAEvB;IAED,IAAI,WAAW,IAAI,OAAO,CAEzB;IAED,IAAI,cAAc,IAAI,OAAO,CAE5B;IAID;;;OAGG;IACH,IAAI,SAAS,YAOZ;IAED;;;;;SAKK;IACL,IAAI,OAAO,YAEV;IACD,OAAO,CAAC,eAAe;IAQV,OAAO,CAAC,OAAO,CAAC,EAAE,MAAM;IAyBrC;;SAEK;IACQ,iBAAiB;IAkBxB,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM;IAc5B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM;IAa/B,qBAAqB;IAaf,aAAa,CAAC,IAAI,EAAE,MAAM;IAIhC,kBAAkB,6FAGhB;IAEI,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAa5B;AAED,eAAO,MAAM,WAAW,oEAAoC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/ice-agitator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,mBAAmB,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ice-agitator-services.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"ice-agitator-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-freestyle-sdk/src/models/models/ice-agitator/services/ice-agitator-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAWjC;;;GAGG;AACH,eAAO,MAAM,WAAW,GAAU,MAAM,MAAM,sDAM7C,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,UAAU,MAAM,EAAE,MAAM,MAAM,iDAOjE,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,MAAM,MAAM,uDAKjD,CAAC;AAEF,eAAO,MAAM,IAAI,GAAU,MAAM,MAAM,EAAE,SAAS,MAAM,4BAYvD,CAAC;AAEF,eAAO,MAAM,OAAO,GAAU,MAAM,MAAM,EAAE,SAAS,MAAM,4BAY1D,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAU,MAAM,MAAM,EAAE,SAAS,MAAM,4BAY3D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-freestyle-sdk/src/models/models/ice-agitator/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-freestyle-sdk/src/models/models/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,qBAAqB,CAAC;AACpC,cAAc,eAAe,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/lfcv-pump/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACjE,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IntentAware, IntentAwareProps, PumpModel, IntentContainer } from '@kosdev-code/kos-dispense-sdk';
|
|
2
2
|
import { FutureResponse, IKosDataModel, IKosIdentifiable, KosCompanionComposition, KosLoggerAware, KosModelRegistrationType, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
import {
|
|
4
|
-
|
|
3
|
+
import { LfcvPumpOptions } from './types';
|
|
5
4
|
export declare const MODEL_TYPE = "lfcv-pump-model";
|
|
6
5
|
export type LfcvPumpModel = PublicModelInterface<LfcvPumpModelImpl>;
|
|
7
6
|
export interface LfcvPumpModelImpl extends KosLoggerAware, KosCompanionComposition<PumpModel> {
|
|
8
7
|
pumpModel: PumpModel;
|
|
9
8
|
}
|
|
10
|
-
export declare class LfcvPumpModelImpl implements IKosDataModel, IKosIdentifiable, IntentAware {
|
|
9
|
+
export declare class LfcvPumpModelImpl implements IKosDataModel, IKosIdentifiable, IntentAware, IntentContainer {
|
|
11
10
|
static Registration: KosModelRegistrationType<LfcvPumpModel, LfcvPumpOptions>;
|
|
12
11
|
id: string;
|
|
13
|
-
constructor(modelId: string
|
|
12
|
+
constructor(modelId: string);
|
|
14
13
|
get name(): string;
|
|
15
14
|
get canPour(): boolean;
|
|
16
15
|
get isPouring(): boolean;
|
|
17
16
|
cancelPour(): Promise<void>;
|
|
18
17
|
performIntent(props: IntentAwareProps | string): Promise<FutureResponse | undefined>;
|
|
18
|
+
get ingredientId(): string | undefined;
|
|
19
|
+
resolveIntentVolume(intent: string): Promise<{
|
|
20
|
+
volume: number;
|
|
21
|
+
}>;
|
|
19
22
|
}
|
|
20
23
|
export declare const LfcvPump: KosModelRegistrationType<LfcvPumpModel, LfcvPumpOptions>;
|
|
21
24
|
//# sourceMappingURL=lfcv-pump-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lfcv-pump-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"lfcv-pump-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/lfcv-pump/lfcv-pump-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,eAAe,EAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,uBAAuB,EACvB,cAAc,EACd,wBAAwB,EACxB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,UAAU,oBAAoB,CAAC;AAE5C,MAAM,MAAM,aAAa,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAGpE,MAAM,WAAW,iBACf,SAAQ,cAAc,EACpB,uBAAuB,CAAC,SAAS,CAAC;IACpC,SAAS,EAAE,SAAS,CAAC;CACtB;AACD,qBAMa,iBACX,YAAW,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,eAAe;IAExE,MAAM,CAAC,YAAY,EAAE,wBAAwB,CAAC,aAAa,EAAE,eAAe,CAAC,CAAC;IAC9E,EAAE,EAAE,MAAM,CAAC;gBAEC,OAAO,EAAE,MAAM;IAI3B,IAAI,IAAI,WAEP;IAED,IAAI,OAAO,YAEV;IAED,IAAI,SAAS,YAEZ;IAEK,UAAU;IAIhB,aAAa,CACX,KAAK,EAAE,gBAAgB,GAAG,MAAM,GAC/B,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC;IAItC,IAAI,YAAY,uBAEf;IAED,mBAAmB,CAAC,MAAM,EAAE,MAAM;;;CAGnC;AAED,eAAO,MAAM,QAAQ,0DAAiC,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { IKosCompanionOptions } from '@kosdev-code/kos-ui-sdk';
|
|
2
1
|
import { PumpModel, PumpOptions } from '@kosdev-code/kos-dispense-sdk';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { IKosCompanionOptions } from '@kosdev-code/kos-ui-sdk';
|
|
5
3
|
export type LfcvPumpOptions = IKosCompanionOptions<PumpModel, PumpOptions>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/remote-tray/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAC9E,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAC3E,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { RemoteTrayModel } from './remote-tray-model';
|
|
2
1
|
import { IKosDataModel, IKosIdentifiable, KosContainerAware, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
|
|
2
|
+
import { RemoteTrayModel } from './remote-tray-model';
|
|
4
3
|
export declare const MODEL_TYPE = "remote-tray-container-model";
|
|
5
4
|
export type RemoteTrayContainerModel = PublicModelInterface<RemoteTrayContainerModelImpl>;
|
|
6
5
|
export interface RemoteTrayContainerModelImpl extends KosContainerAware<RemoteTrayModel> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-tray-container-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"remote-tray-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-container-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAE3D,eAAO,MAAM,UAAU,gCAAgC,CAAC;AAExD,MAAM,MAAM,wBAAwB,GAClC,oBAAoB,CAAC,4BAA4B,CAAC,CAAC;AAGrD,MAAM,WAAW,4BACf,SAAQ,iBAAiB,CAAC,eAAe,CAAC;CAAG;AAC/C,qBAGa,4BACX,YAAW,gBAAgB,EAAE,aAAa;IAE1C,EAAE,EAAE,MAAM,CAAC;gBAEC,OAAO,EAAE,MAAM;CAG5B"}
|
|
@@ -1,87 +1,22 @@
|
|
|
1
|
-
import { RemoteTrayContainerModel } from './remote-tray-container-model';
|
|
2
|
-
import { RemoteTrayContainerOptions } from './types';
|
|
3
1
|
import { SingletonKosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { RemoteTrayContainerOptions } from './types';
|
|
3
|
+
import { RemoteTrayContainerModel } from './remote-tray-container-model';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
5
|
+
* Registration bean for {@link RemoteTrayContainerModel}.
|
|
7
6
|
*
|
|
8
|
-
*
|
|
7
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
8
|
+
* - `factory`: `RemoteTrayContainer.factory(options)` returns the single instance, creating it on the first call.
|
|
9
|
+
* - `guard`: type guard that narrows an `IKosDataModel` to `RemoteTrayContainerModel`.
|
|
10
|
+
* - `instance()`: reads the model, or builds it from options.
|
|
11
|
+
* - `register()`: registers the model, and any related models, with the model registry.
|
|
9
12
|
*
|
|
10
|
-
*
|
|
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.
|
|
13
|
+
* RemoteTrayContainer is a singleton. `KosModelRegistry.freestyle.models()` registers it.
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
16
|
* ```typescript
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* private remoteTrayContainerModel: RemoteTrayContainerModel;
|
|
17
|
+
* @kosDependency({ modelType: RemoteTrayContainer.type })
|
|
18
|
+
* private remoteTrayContainer!: RemoteTrayContainerModel;
|
|
20
19
|
* ```
|
|
21
|
-
|
|
22
|
-
*
|
|
23
|
-
* ## factory
|
|
24
|
-
*
|
|
25
|
-
* The factory method creates a factory function that can be used to create new RemoteTrayContainerModel instances.
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
29
|
-
*
|
|
30
|
-
* If a model with the same model type 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 = RemoteTrayContainer.factory({
|
|
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 RemoteTrayContainerModel.
|
|
45
|
-
*
|
|
46
|
-
* @example
|
|
47
|
-
* ```typescript
|
|
48
|
-
*
|
|
49
|
-
* const model: IKosDataModel = ...; // some model
|
|
50
|
-
*
|
|
51
|
-
* if (RemoteTrayContainer.predicate(model)) {
|
|
52
|
-
* // if the function evaluates to true, the model is narrowed down to RemoteTrayContainerModel
|
|
53
|
-
* // and the compiler will know that the model has the RemoteTrayContainerModel 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 { RemoteTrayContainer } from "@kosdev-code/kos-freestyle-sdk";
|
|
71
|
-
* ...
|
|
72
|
-
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
73
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
74
|
-
* ...RemoteTrayContainer.registration,
|
|
75
|
-
* };
|
|
76
|
-
* ```
|
|
77
|
-
*
|
|
78
|
-
* ## registration.singleton
|
|
79
|
-
|
|
80
|
-
* The remoteTrayContainer model is a singleton model. This means that each time the factory function is called , the same instance will be returned.
|
|
81
|
-
* If the model does not yet exist, it will be created passing in the provided options to initialize it.
|
|
82
|
-
*
|
|
83
|
-
* Singleton models don't require an ID as they will use the model type as their ID to guarantee uniqueness throughout the system.
|
|
84
|
-
|
|
85
|
-
* */
|
|
20
|
+
*/
|
|
86
21
|
export declare const RemoteTrayContainer: SingletonKosModelRegistrationFactory<RemoteTrayContainerModel, RemoteTrayContainerOptions>;
|
|
87
22
|
//# sourceMappingURL=remote-tray-container-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-tray-container-registration.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"remote-tray-container-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-container-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,yBAAyB,CAAC;AAC/E,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAM1D,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAE9E;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,mBAAmB,4FAM9B,CAAC"}
|
|
@@ -1,89 +1,15 @@
|
|
|
1
|
-
import { RemoteTrayOptions } from './types';
|
|
2
|
-
import { ActiveAware } from '../types/assembly';
|
|
3
|
-
import { HolderModel } from '@kosdev-code/kos-dispense-sdk';
|
|
4
1
|
import { IKosDataModel, IKosIdentifiable, KosConfigProperty, KosCreationContext, PublicModelInterface, TroubleAware, TroubleModel } from '@kosdev-code/kos-ui-sdk';
|
|
5
|
-
|
|
2
|
+
import { HolderModel } from '@kosdev-code/kos-dispense-sdk';
|
|
3
|
+
import { ActiveAware } from '../types/assembly';
|
|
4
|
+
import { RemoteTrayOptions } from './types';
|
|
6
5
|
export declare const MODEL_TYPE = "remote-tray-model";
|
|
7
6
|
/**
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* A remote tray represents a physical or virtual tray that can be enabled/disabled
|
|
11
|
-
* remotely and is associated with a holder in the dispensing system. This model
|
|
12
|
-
* manages the tray's configuration, activation state, and trouble propagation
|
|
13
|
-
* from its associated holder.
|
|
14
|
-
*
|
|
15
|
-
* ## Key Features
|
|
16
|
-
* - Remote enable/disable capability through configuration properties
|
|
17
|
-
* - Automatic trouble propagation from associated holder
|
|
18
|
-
* - Active state management based on configuration
|
|
19
|
-
* - Integration with the KOS dispensing system through holder references
|
|
20
|
-
*
|
|
21
|
-
* ## Properties
|
|
22
|
-
* - `id` - Unique identifier for the remote tray
|
|
23
|
-
* - `name` - Display name of the tray
|
|
24
|
-
* - `holderPath` - Path reference to the associated holder model
|
|
25
|
-
* - `configPath` - Configuration path for tray settings
|
|
26
|
-
* - `remoteTrayEnabled` - Configuration property controlling tray activation
|
|
27
|
-
* - `active` - Computed property indicating if the tray is currently active
|
|
28
|
-
* - `holder` - Reference to the associated holder model
|
|
29
|
-
* - `troubles` - Propagated troubles from the associated holder
|
|
30
|
-
*
|
|
31
|
-
* ## Methods
|
|
32
|
-
* - `updateModel(options)` - Updates the model with new configuration options
|
|
33
|
-
* - `init()` - Initializes the remote tray model
|
|
34
|
-
* - `load()` - Loads the remote tray configuration and data
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* ```typescript
|
|
38
|
-
* // Create a new remote tray instance
|
|
39
|
-
* const remoteTray = RemoteTray.instance('tray-1')
|
|
40
|
-
* .options({
|
|
41
|
-
* name: 'Remote Tray 1',
|
|
42
|
-
* holderPath: '/holders/holder-1',
|
|
43
|
-
* configPath: '/config/trays/tray-1'
|
|
44
|
-
* })
|
|
45
|
-
* .build();
|
|
46
|
-
*
|
|
47
|
-
* // Check if tray is active
|
|
48
|
-
* if (remoteTray.active) {
|
|
49
|
-
* console.log(`${remoteTray.name} is enabled`);
|
|
50
|
-
* }
|
|
51
|
-
*
|
|
52
|
-
* // Access associated holder
|
|
53
|
-
* const holder = remoteTray.holder;
|
|
54
|
-
* console.log(`Holder status: ${holder?.status}`);
|
|
55
|
-
* ```
|
|
7
|
+
* A tray that can be enabled or disabled remotely and is associated with a holder. The tray is
|
|
8
|
+
* active when its `enabled` config property is set, and it reports its holder's troubles as its own.
|
|
56
9
|
*
|
|
57
10
|
* @example
|
|
58
11
|
* ```typescript
|
|
59
|
-
*
|
|
60
|
-
* const TrayStatus = ({ tray }: { tray: RemoteTrayModel }) => {
|
|
61
|
-
* const troubles = tray.troubles;
|
|
62
|
-
* const isEnabled = tray.remoteTrayEnabled.value;
|
|
63
|
-
*
|
|
64
|
-
* return (
|
|
65
|
-
* <div>
|
|
66
|
-
* <h3>{tray.name}</h3>
|
|
67
|
-
* <p>Status: {isEnabled ? 'Enabled' : 'Disabled'}</p>
|
|
68
|
-
* {troubles.length > 0 && (
|
|
69
|
-
* <Alert severity="warning">
|
|
70
|
-
* {troubles.length} issue(s) detected
|
|
71
|
-
* </Alert>
|
|
72
|
-
* )}
|
|
73
|
-
* </div>
|
|
74
|
-
* );
|
|
75
|
-
* };
|
|
76
|
-
* ```
|
|
77
|
-
*
|
|
78
|
-
* @example
|
|
79
|
-
* ```typescript
|
|
80
|
-
* // Programmatically enable/disable tray
|
|
81
|
-
* async function toggleRemoteTray(tray: RemoteTrayModel) {
|
|
82
|
-
* const currentState = tray.remoteTrayEnabled.value;
|
|
83
|
-
* await tray.remoteTrayEnabled.setValue(!currentState);
|
|
84
|
-
*
|
|
85
|
-
* console.log(`Tray ${tray.name} is now ${!currentState ? 'enabled' : 'disabled'}`);
|
|
86
|
-
* }
|
|
12
|
+
* tray.remoteTrayEnabled.updateProperty(!tray.active);
|
|
87
13
|
* ```
|
|
88
14
|
*
|
|
89
15
|
* @category KOS Model
|
|
@@ -122,8 +48,7 @@ export declare class RemoteTrayModelImpl implements IKosDataModel, IKosIdentifia
|
|
|
122
48
|
*/
|
|
123
49
|
get troubles(): TroubleModel<any>[];
|
|
124
50
|
/**
|
|
125
|
-
*
|
|
126
|
-
* Currently returns empty string as troubles are managed by the holder.
|
|
51
|
+
* Always an empty string; trouble status is reported by the holder.
|
|
127
52
|
*
|
|
128
53
|
* @returns Empty string (trouble status handled by holder)
|
|
129
54
|
*/
|
|
@@ -135,38 +60,31 @@ export declare class RemoteTrayModelImpl implements IKosDataModel, IKosIdentifia
|
|
|
135
60
|
*/
|
|
136
61
|
get troublesByType(): Record<string, TroubleModel<any>[]>;
|
|
137
62
|
/**
|
|
138
|
-
*
|
|
139
|
-
* Can be used to modify the holder path, config path, or name after initialization.
|
|
63
|
+
* Accepts updated options. The tray keeps its original holder path, config path and name.
|
|
140
64
|
*
|
|
141
65
|
* @param _options - New configuration options for the remote tray
|
|
142
66
|
*/
|
|
143
67
|
updateModel(_options: RemoteTrayOptions): void;
|
|
144
68
|
/**
|
|
145
|
-
*
|
|
146
|
-
* Uses synchronous model lookup to retrieve the holder by path.
|
|
69
|
+
* The holder model referenced by `holderPath`.
|
|
147
70
|
*
|
|
148
71
|
* @returns The HolderModel instance referenced by holderPath, or undefined if not found
|
|
149
72
|
*/
|
|
150
73
|
get holder(): HolderModel<any>;
|
|
151
74
|
/**
|
|
152
|
-
*
|
|
153
|
-
* Active state is based on the remoteTrayEnabled configuration property.
|
|
75
|
+
* Whether the tray is enabled, from the `remoteTrayEnabled` config property.
|
|
154
76
|
*
|
|
155
77
|
* @returns true if the tray is enabled, false otherwise
|
|
156
78
|
*/
|
|
157
79
|
get active(): boolean;
|
|
158
80
|
/**
|
|
159
81
|
* Initializes the remote tray model.
|
|
160
|
-
* Called during the model lifecycle initialization phase.
|
|
161
|
-
* Sets up initial state and prepares the model for use.
|
|
162
82
|
*
|
|
163
83
|
* @returns Promise that resolves when initialization is complete
|
|
164
84
|
*/
|
|
165
85
|
init(): Promise<void>;
|
|
166
86
|
/**
|
|
167
|
-
* Loads the remote tray
|
|
168
|
-
* Called during the model lifecycle load phase.
|
|
169
|
-
* Typically loads configuration settings and establishes holder references.
|
|
87
|
+
* Loads the remote tray model.
|
|
170
88
|
*
|
|
171
89
|
* @returns Promise that resolves when loading is complete
|
|
172
90
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-tray-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"remote-tray-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAEjB,kBAAkB,EAClB,oBAAoB,EACpB,YAAY,EACZ,YAAY,EACb,MAAM,yBAAyB,CAAC;AAQjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,eAAO,MAAM,UAAU,sBAAsB,CAAC;AAE9C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,MAAM,eAAe,GAAG,oBAAoB,CAAC,mBAAmB,CAAC,CAAC;AAKxE;;;;;;GAMG;AACH,qBACa,mBACX,YAAW,aAAa,EAAE,gBAAgB,EAAE,WAAW,EAAE,YAAY;IAErE,qDAAqD;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IAEjC,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,gFAAgF;IAKhF,iBAAiB,EAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;gBAG7C,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,iBAAiB,EAC1B,OAAO,EAAE,kBAAkB;IAU7B;;;;;OAKG;IACH,IAAI,QAAQ,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE,CAElC;IAED;;;;OAIG;IACH,IAAI,aAAa,WAEhB;IAED;;;;OAIG;IACH,IAAI,cAAc,wCAEjB;IAED;;;;OAIG;IACH,WAAW,CAAC,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAI9C;;;;OAIG;IACH,IAAI,MAAM,qBAET;IAED;;;;OAIG;IACH,IAAI,MAAM,IAAI,OAAO,CAEpB;IAID;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B;;;;OAIG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|
|
@@ -1,90 +1,22 @@
|
|
|
1
|
-
import { RemoteTrayModel } from './remote-tray-model';
|
|
2
|
-
import { RemoteTrayOptions } from './types';
|
|
3
1
|
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
-
|
|
2
|
+
import { RemoteTrayOptions } from './types';
|
|
3
|
+
import { RemoteTrayModel } from './remote-tray-model';
|
|
5
4
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* The registration bean includes convenience methods for creating and working with RemoteTrayModel instances.
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
* ## type
|
|
12
|
-
* The type property is a string that identifies the model type.
|
|
13
|
-
* 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
|
|
14
|
-
* used when declaring dependencies on models.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```typescript
|
|
18
|
-
*
|
|
19
|
-
* @kosDependency({modelType: RemoteTray.type, id: "remoteTrayId"})
|
|
20
|
-
* private remoteTrayModel: RemoteTrayModel;
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
* ## factory
|
|
25
|
-
*
|
|
26
|
-
* The factory method creates a factory function that can be used to create new RemoteTrayModel instances.
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
30
|
-
*
|
|
31
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
32
|
-
* in this case and the existing model will be returned in its current state.
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* const model = RemoteTray.factory("remoteTrayId")({
|
|
37
|
-
* // Add option data
|
|
38
|
-
* });
|
|
39
|
-
|
|
40
|
-
* ```
|
|
41
|
-
|
|
42
|
-
|
|
5
|
+
* Registration bean for {@link RemoteTrayModel}.
|
|
43
6
|
*
|
|
44
|
-
*
|
|
7
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
8
|
+
* - `factory`: curried factory, `RemoteTray.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
|
|
9
|
+
* - `guard`: type guard that narrows an `IKosDataModel` to `RemoteTrayModel`.
|
|
10
|
+
* - `instance(id)`: reads the model, or builds it from options.
|
|
11
|
+
* - `register()`: registers the model, and any related models, with the model registry.
|
|
45
12
|
*
|
|
46
|
-
*
|
|
13
|
+
* RemoteTray is not a singleton: each id has its own instance. `KosModelRegistry.freestyle.models()` registers it.
|
|
47
14
|
*
|
|
48
15
|
* @example
|
|
49
16
|
* ```typescript
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
* if (RemoteTray.predicate(model)) {
|
|
54
|
-
* // if the function evaluates to true, the model is narrowed down to RemoteTrayModel
|
|
55
|
-
* // and the compiler will know that the model has the RemoteTrayModel interface
|
|
56
|
-
* model.updateAvailability(false);
|
|
57
|
-
|
|
58
|
-
* }
|
|
17
|
+
* @kosDependency({ modelType: RemoteTray.type, id: "remoteTrayId" })
|
|
18
|
+
* private remoteTray!: RemoteTrayModel;
|
|
59
19
|
* ```
|
|
60
|
-
|
|
61
|
-
* ## registration
|
|
62
|
-
*
|
|
63
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
64
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
*
|
|
69
|
-
* In an application registration file you can declare the model registration as follows:
|
|
70
|
-
*
|
|
71
|
-
* **registration.ts**
|
|
72
|
-
* ```typescript
|
|
73
|
-
* import { RemoteTray } from "@kos-ui/project-models";
|
|
74
|
-
* import { KosModelRegistry } from "@kosdev-code/kos-dispense-sdk";
|
|
75
|
-
*
|
|
76
|
-
* import { initKosProvider } from "@kosdev-code/kos-ui-sdk";
|
|
77
|
-
*
|
|
78
|
-
* KosModelRegistry.dispense
|
|
79
|
-
* .models()
|
|
80
|
-
* .model(RemoteTray);
|
|
81
|
-
* ```
|
|
82
|
-
*
|
|
83
|
-
* ## registration.singleton
|
|
84
|
-
|
|
85
|
-
* The remoteTray 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.
|
|
86
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
87
|
-
|
|
88
|
-
* */
|
|
20
|
+
*/
|
|
89
21
|
export declare const RemoteTray: KosModelRegistrationFactory<RemoteTrayModel, RemoteTrayOptions>;
|
|
90
22
|
//# sourceMappingURL=remote-tray-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-tray-registration.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"remote-tray-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-freestyle-sdk/src/models/models/remote-tray/remote-tray-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAGL,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAE7B;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,iEAMrB,CAAC"}
|