@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5053
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-BE0Y1Zlv.js +201 -0
- package/extension-utils-BE0Y1Zlv.js.map +1 -0
- package/extension-utils-BVDLwtKr.cjs +2 -0
- package/extension-utils-BVDLwtKr.cjs.map +1 -0
- package/freestyle-registration-manager-CDbljuRk.cjs +2 -0
- package/freestyle-registration-manager-CDbljuRk.cjs.map +1 -0
- package/freestyle-registration-manager-z0aYdMcC.js +1069 -0
- package/freestyle-registration-manager-z0aYdMcC.js.map +1 -0
- package/index.cjs +2 -0
- package/index.cjs.map +1 -0
- package/index.d.ts +4 -0
- package/index.d.ts.map +1 -0
- package/index.js +36 -0
- package/index.js.map +1 -0
- package/models/constants/index.d.ts +2 -0
- package/models/constants/index.d.ts.map +1 -0
- package/models/index.d.ts +6 -0
- package/models/index.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts +25 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts +87 -0
- package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/index.d.ts +4 -0
- package/models/models/agitation-required-trouble/index.d.ts.map +1 -0
- package/models/models/agitation-required-trouble/types/index.d.ts +8 -0
- package/models/models/carb-agitator/carb-agitator-model.d.ts +14 -0
- package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -0
- package/models/models/carb-agitator/carb-agitator-registration.d.ts +84 -0
- package/models/models/carb-agitator/carb-agitator-registration.d.ts.map +1 -0
- package/models/models/carb-agitator/index.d.ts +3 -0
- package/models/models/carb-agitator/index.d.ts.map +1 -0
- package/models/models/carb-agitator/types/index.d.ts +14 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-model.d.ts +20 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-model.d.ts.map +1 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts +87 -0
- package/models/models/cartridge-agitator/cartridge-agitator-container-registration.d.ts.map +1 -0
- package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts +23 -0
- package/models/models/cartridge-agitator/cartridge-agitator-model.d.ts.map +1 -0
- package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts +89 -0
- package/models/models/cartridge-agitator/cartridge-agitator-registration.d.ts.map +1 -0
- package/models/models/cartridge-agitator/index.d.ts +6 -0
- package/models/models/cartridge-agitator/index.d.ts.map +1 -0
- package/models/models/cartridge-agitator/services/cartridge-agitator-services.d.ts +8 -0
- package/models/models/cartridge-agitator/services/cartridge-agitator-services.d.ts.map +1 -0
- package/models/models/cartridge-agitator/types/index.d.ts +14 -0
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +43 -0
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -0
- package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts +89 -0
- package/models/models/freestyle-assembly/freestyle-assembly-registration.d.ts.map +1 -0
- package/models/models/freestyle-assembly/index.d.ts +4 -0
- package/models/models/freestyle-assembly/index.d.ts.map +1 -0
- package/models/models/freestyle-assembly/types/index.d.ts +8 -0
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts +21 -0
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts.map +1 -0
- package/models/models/freestyle-holder/freestyle-holder-registration.d.ts +87 -0
- package/models/models/freestyle-holder/freestyle-holder-registration.d.ts.map +1 -0
- package/models/models/freestyle-holder/index.d.ts +4 -0
- package/models/models/freestyle-holder/index.d.ts.map +1 -0
- package/models/models/freestyle-holder/types/index.d.ts +8 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts +25 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-model.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts +87 -0
- package/models/models/freestyle-nozzle/freestyle-nozzle-registration.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/index.d.ts +5 -0
- package/models/models/freestyle-nozzle/index.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/services/freestyle-nozzle-services.d.ts +32 -0
- package/models/models/freestyle-nozzle/services/freestyle-nozzle-services.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/services/index.d.ts +2 -0
- package/models/models/freestyle-nozzle/services/index.d.ts.map +1 -0
- package/models/models/freestyle-nozzle/types/index.d.ts +8 -0
- package/models/models/freestyle-pump/freestyle-pump-model.d.ts +14 -0
- package/models/models/freestyle-pump/freestyle-pump-model.d.ts.map +1 -0
- package/models/models/freestyle-pump/freestyle-pump-registration.d.ts +87 -0
- package/models/models/freestyle-pump/freestyle-pump-registration.d.ts.map +1 -0
- package/models/models/freestyle-pump/index.d.ts +5 -0
- package/models/models/freestyle-pump/index.d.ts.map +1 -0
- package/models/models/freestyle-pump/services/freestyle-pump-services.d.ts +10 -0
- package/models/models/freestyle-pump/services/freestyle-pump-services.d.ts.map +1 -0
- package/models/models/freestyle-pump/services/index.d.ts +2 -0
- package/models/models/freestyle-pump/services/index.d.ts.map +1 -0
- package/models/models/freestyle-pump/types/index.d.ts +5 -0
- package/models/models/ice-agitator/ice-agitator-model.d.ts +65 -0
- package/models/models/ice-agitator/ice-agitator-model.d.ts.map +1 -0
- package/models/models/ice-agitator/ice-agitator-registration.d.ts +85 -0
- package/models/models/ice-agitator/ice-agitator-registration.d.ts.map +1 -0
- package/models/models/ice-agitator/index.d.ts +4 -0
- package/models/models/ice-agitator/index.d.ts.map +1 -0
- package/models/models/ice-agitator/services/ice-agitator-services.d.ts +13 -0
- package/models/models/ice-agitator/services/ice-agitator-services.d.ts.map +1 -0
- package/models/models/ice-agitator/services/index.d.ts +2 -0
- package/models/models/ice-agitator/services/index.d.ts.map +1 -0
- package/models/models/ice-agitator/types/index.d.ts +7 -0
- package/models/models/index.d.ts +11 -0
- package/models/models/index.d.ts.map +1 -0
- package/models/models/remote-tray/index.d.ts +6 -0
- package/models/models/remote-tray/index.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-container-model.d.ts +12 -0
- package/models/models/remote-tray/remote-tray-container-model.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-container-registration.d.ts +87 -0
- package/models/models/remote-tray/remote-tray-container-registration.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-model.d.ts +175 -0
- package/models/models/remote-tray/remote-tray-model.d.ts.map +1 -0
- package/models/models/remote-tray/remote-tray-registration.d.ts +90 -0
- package/models/models/remote-tray/remote-tray-registration.d.ts.map +1 -0
- package/models/models/remote-tray/types/index.d.ts +10 -0
- package/models/models/types/assembly.d.ts +21 -0
- package/models/models/types/assembly.d.ts.map +1 -0
- package/models/models/types/ingredients.d.ts +33 -0
- package/models/models/types/ingredients.d.ts.map +1 -0
- package/models/models/types/pumps.d.ts +6 -0
- package/models/models/types/pumps.d.ts.map +1 -0
- package/models/utils/extension-utils.d.ts +37 -0
- package/models/utils/extension-utils.d.ts.map +1 -0
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +19 -0
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -0
- package/models/utils/extensions/assembly/types.d.ts +141 -0
- package/models/utils/extensions/assembly/types.d.ts.map +1 -0
- package/models/utils/extensions/availability/freestyle-loader.d.ts +31 -0
- package/models/utils/extensions/availability/freestyle-loader.d.ts.map +1 -0
- package/models/utils/extensions/availability/freestyle-mapper.d.ts +14 -0
- package/models/utils/extensions/availability/freestyle-mapper.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/assets.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/assets.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/beverage-screen.d.ts +14 -0
- package/models/utils/extensions/availability/middleware/beverage-screen.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/beverages.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/beverages.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/brand-screen.d.ts +5 -0
- package/models/utils/extensions/availability/middleware/brand-screen.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/brands.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/brands.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/copy-input.d.ts +4 -0
- package/models/utils/extensions/availability/middleware/copy-input.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/flavors.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/flavors.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/nutrition.d.ts +10 -0
- package/models/utils/extensions/availability/middleware/nutrition.d.ts.map +1 -0
- package/models/utils/extensions/availability/middleware/related-brands.d.ts +14 -0
- package/models/utils/extensions/availability/middleware/related-brands.d.ts.map +1 -0
- package/models/utils/extensions/availability/types.d.ts +251 -0
- package/models/utils/extensions/availability/types.d.ts.map +1 -0
- package/models/utils/extensions/availability/util/locate-brand.d.ts +2 -0
- package/models/utils/extensions/availability/util/locate-brand.d.ts.map +1 -0
- package/models/utils/extensions/availability/util/process-related-brand.d.ts +4 -0
- package/models/utils/extensions/availability/util/process-related-brand.d.ts.map +1 -0
- package/models/utils/extensions/ingredient/index.d.ts +2 -0
- package/models/utils/extensions/ingredient/index.d.ts.map +1 -0
- package/models/utils/extensions/ingredient/model-extension.d.ts +7 -0
- package/models/utils/extensions/ingredient/model-extension.d.ts.map +1 -0
- package/models/utils/extensions/pourable/select-pourable-mapper.d.ts +6 -0
- package/models/utils/extensions/pourable/select-pourable-mapper.d.ts.map +1 -0
- package/models/utils/freestyle-registration-manager.d.ts +39 -0
- package/models/utils/freestyle-registration-manager.d.ts.map +1 -0
- package/models/utils/index.d.ts +5 -0
- package/models/utils/index.d.ts.map +1 -0
- package/models.cjs +2 -0
- package/models.cjs.map +1 -0
- package/models.d.ts +1 -0
- package/models.js +26 -0
- package/models.js.map +1 -0
- package/package.json +37 -0
- package/ui/contexts/index.d.ts +2 -0
- package/ui/contexts/index.d.ts.map +1 -0
- package/ui/hooks/freestyle-assembly/index.d.ts +2 -0
- package/ui/hooks/freestyle-assembly/index.d.ts.map +1 -0
- package/ui/hooks/freestyle-assembly/use-freestyle-assembly.d.ts +4 -0
- package/ui/hooks/freestyle-assembly/use-freestyle-assembly.d.ts.map +1 -0
- package/ui/hooks/freestyle-nozzle/index.d.ts +2 -0
- package/ui/hooks/freestyle-nozzle/index.d.ts.map +1 -0
- package/ui/hooks/freestyle-nozzle/use-freestyle-nozzle.d.ts +4 -0
- package/ui/hooks/freestyle-nozzle/use-freestyle-nozzle.d.ts.map +1 -0
- package/ui/hooks/ice-agitator/index.d.ts +3 -0
- package/ui/hooks/ice-agitator/index.d.ts.map +1 -0
- package/ui/hooks/ice-agitator/use-ice-agitator.d.ts +14 -0
- package/ui/hooks/ice-agitator/use-ice-agitator.d.ts.map +1 -0
- package/ui/hooks/ice-agitator/with-ice-agitator.d.ts +7 -0
- package/ui/hooks/ice-agitator/with-ice-agitator.d.ts.map +1 -0
- package/ui/hooks/index.d.ts +5 -0
- package/ui/hooks/index.d.ts.map +1 -0
- package/ui/hooks/nutrition/index.d.ts +2 -0
- package/ui/hooks/nutrition/index.d.ts.map +1 -0
- package/ui/hooks/nutrition/use-nutrition-info.d.ts +4 -0
- package/ui/hooks/nutrition/use-nutrition-info.d.ts.map +1 -0
- package/ui/index.d.ts +3 -0
- package/ui/index.d.ts.map +1 -0
- package/ui.cjs +2 -0
- package/ui.cjs.map +1 -0
- package/ui.d.ts +1 -0
- package/ui.js +14 -0
- package/ui.js.map +1 -0
- package/use-nutrition-info-CjXNGbCN.js +52 -0
- package/use-nutrition-info-CjXNGbCN.js.map +1 -0
- package/use-nutrition-info-DjIGT-mE.cjs +2 -0
- package/use-nutrition-info-DjIGT-mE.cjs.map +1 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { FreestyleHolderOptions } from './types';
|
|
2
|
+
import { FreestyleHolderModel } from './freestyle-holder-model';
|
|
3
|
+
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # FreestyleHolder
|
|
7
|
+
*
|
|
8
|
+
* The registration bean includes convenience methods for creating and working with FreestyleHolderModel 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: FreestyleHolder.type, id: "freestyleHolderId"})
|
|
19
|
+
* private freestyleHolderModel: FreestyleHolderModel;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* ## factory
|
|
24
|
+
*
|
|
25
|
+
* The factory method creates a factory function that can be used to create new FreestyleHolderModel 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 = FreestyleHolder.factory("freestyleHolderId")({
|
|
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 FreestyleHolderModel.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
*
|
|
49
|
+
* const model: IKosDataModel = ...; // some model
|
|
50
|
+
*
|
|
51
|
+
* if (FreestyleHolder.predicate(model)) {
|
|
52
|
+
* // if the function evaluates to true, the model is narrowed down to FreestyleHolderModel
|
|
53
|
+
* // and the compiler will know that the model has the FreestyleHolderModel 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 { FreestyleHolder } 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(FreestyleHolder);
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* ## registration.singleton
|
|
81
|
+
|
|
82
|
+
* The freestyleHolder 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 FreestyleHolder: KosModelRegistrationFactory<FreestyleHolderModel, FreestyleHolderOptions>;
|
|
87
|
+
//# sourceMappingURL=freestyle-holder-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-holder-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-holder/freestyle-holder-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,eAAe,2EAM1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-holder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,mBAAmB,SAAS,CAAC;AAC7B,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { FreestyleNozzleOptions } from './types';
|
|
2
|
+
import { FreestyleNutritionInfoResponse } from './services';
|
|
3
|
+
import { IKosDataModel, IKosIdentifiable, KosCreationContext, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
export declare const MODEL_TYPE = "freestyle-nozzle-model";
|
|
6
|
+
export type FreestyleNozzleModel = PublicModelInterface<FreestyleNozzleModelImpl>;
|
|
7
|
+
export declare class FreestyleNozzleModelImpl implements IKosDataModel, IKosIdentifiable {
|
|
8
|
+
id: string;
|
|
9
|
+
private logger;
|
|
10
|
+
private nozzleModel;
|
|
11
|
+
private _cupSizes;
|
|
12
|
+
private _nutritionInfo?;
|
|
13
|
+
constructor(modelId: string, options: FreestyleNozzleOptions, context: KosCreationContext);
|
|
14
|
+
set cupSizes(cupSizes: number[]);
|
|
15
|
+
get nutritionInfo(): FreestyleNutritionInfoResponse | undefined;
|
|
16
|
+
get selectedPourable(): {
|
|
17
|
+
beverage: import('@kosdev-code/kos-dispense-sdk').AvailabilityModel<any, Record<string, any>> | undefined;
|
|
18
|
+
additional: import('@kosdev-code/kos-dispense-sdk').AvailabilityModel<any, Record<string, any>>[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
handleBeverageSelection(): Promise<void>;
|
|
21
|
+
init(): Promise<void>;
|
|
22
|
+
unload(): void;
|
|
23
|
+
load(): Promise<void>;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=freestyle-nozzle-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-nozzle-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/freestyle-nozzle-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAQjC,OAAO,EAEL,KAAK,8BAA8B,EACpC,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD,eAAO,MAAM,UAAU,2BAA2B,CAAC;AAEnD,MAAM,MAAM,oBAAoB,GAC9B,oBAAoB,CAAC,wBAAwB,CAAC,CAAC;AAEjD,qBAEa,wBACX,YAAW,aAAa,EAAE,gBAAgB;IAE1C,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,SAAS,CAAW;IAC5B,OAAO,CAAC,cAAc,CAAC,CAAiC;gBAEtD,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,sBAAsB,EAC/B,OAAO,EAAE,kBAAkB;IAQ7B,IAAI,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,EAE9B;IACD,IAAI,aAAa,+CAEhB;IAED,IAAI,gBAAgB;;;MAEnB;IAOK,uBAAuB;IA0BvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,MAAM,IAAI,IAAI;IAGR,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAG5B"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { FreestyleNozzleOptions } from './types';
|
|
2
|
+
import { FreestyleNozzleModel } from './freestyle-nozzle-model';
|
|
3
|
+
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # FreestyleNozzle
|
|
7
|
+
*
|
|
8
|
+
* The registration bean includes convenience methods for creating and working with FreestyleNozzleModel 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: FreestyleNozzle.type, id: "freestyleNozzleId"})
|
|
19
|
+
* private freestyleNozzleModel: FreestyleNozzleModel;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* ## factory
|
|
24
|
+
*
|
|
25
|
+
* The factory method creates a factory function that can be used to create new FreestyleNozzleModel 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 = FreestyleNozzle.factory("freestyleNozzleId")({
|
|
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 FreestyleNozzleModel.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
*
|
|
49
|
+
* const model: IKosDataModel = ...; // some model
|
|
50
|
+
*
|
|
51
|
+
* if (FreestyleNozzle.predicate(model)) {
|
|
52
|
+
* // if the function evaluates to true, the model is narrowed down to FreestyleNozzleModel
|
|
53
|
+
* // and the compiler will know that the model has the FreestyleNozzleModel 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 { FreestyleNozzle } 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(FreestyleNozzle);
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* ## registration.singleton
|
|
81
|
+
|
|
82
|
+
* The freestyleNozzle 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 FreestyleNozzle: KosModelRegistrationFactory<FreestyleNozzleModel, FreestyleNozzleOptions>;
|
|
87
|
+
//# sourceMappingURL=freestyle-nozzle-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-nozzle-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/freestyle-nozzle-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAErE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,eAAe,2EAM1B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,mBAAmB,SAAS,CAAC;AAC7B,YAAY,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,uBAAuB,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
interface NutritionValue {
|
|
2
|
+
displayValue: string;
|
|
3
|
+
units: string;
|
|
4
|
+
type: string;
|
|
5
|
+
}
|
|
6
|
+
interface NutritionVolume {
|
|
7
|
+
volume: number;
|
|
8
|
+
values: NutritionValue[];
|
|
9
|
+
}
|
|
10
|
+
export interface FreestyleNutritionInfoResponse {
|
|
11
|
+
labels?: {
|
|
12
|
+
allergens: string;
|
|
13
|
+
legalDescriptor: string;
|
|
14
|
+
ingredients: string;
|
|
15
|
+
ingredientsHeading: string;
|
|
16
|
+
};
|
|
17
|
+
volumes: NutritionVolume[];
|
|
18
|
+
error?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare class NutritionInfoError extends Error {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
export declare class InvalidRequestError extends Error {
|
|
24
|
+
constructor(message: string);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* @category Service
|
|
28
|
+
* Retrieves the initial freestyle-nozzle data.
|
|
29
|
+
*/
|
|
30
|
+
export declare const getFreestyleNutritionInfo: (nozzleUrlPrefix: string, beverageId: string, volumes: number[], baseUrl?: string) => Promise<FreestyleNutritionInfoResponse>;
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=freestyle-nozzle-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-nozzle-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/services/freestyle-nozzle-services.ts"],"names":[],"mappings":"AAeA,UAAU,cAAc;IACtB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AACD,UAAU,eAAe;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,cAAc,EAAE,CAAC;CAC1B;AACD,MAAM,WAAW,8BAA8B;IAC7C,MAAM,CAAC,EAAE;QACP,SAAS,EAAE,MAAM,CAAC;QAClB,eAAe,EAAE,MAAM,CAAC;QACxB,WAAW,EAAE,MAAM,CAAC;QACpB,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC;IACF,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AACD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,oBACnB,MAAM,cACX,MAAM,WACT,MAAM,EAAE,8DA8BlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-nozzle/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReplacePumpData, ReplacePumpErrorType } from './services';
|
|
2
|
+
import { FreestylePumpOptions } from './types';
|
|
3
|
+
import { IKosDataModel, IKosIdentifiable, KosCreationContext, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
export declare const MODEL_TYPE = "freestyle-pump-model";
|
|
6
|
+
export type FreestylePumpModel = PublicModelInterface<FreestylePumpModelImpl>;
|
|
7
|
+
export declare class FreestylePumpModelImpl implements IKosDataModel, IKosIdentifiable {
|
|
8
|
+
id: string;
|
|
9
|
+
private logger;
|
|
10
|
+
private pump;
|
|
11
|
+
constructor(modelId: string, options: FreestylePumpOptions, context: KosCreationContext);
|
|
12
|
+
replacePump(code: string): Promise<[ReplacePumpErrorType, ReplacePumpData]>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=freestyle-pump-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-pump-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-pump/freestyle-pump-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAEhB,kBAAkB,EAClB,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,YAAY,CAAC;AAEpB,eAAO,MAAM,UAAU,yBAAyB,CAAC;AAEjD,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,sBAAsB,CAAC,CAAC;AAE9E,qBACa,sBAAuB,YAAW,aAAa,EAAE,gBAAgB;IAC5E,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,MAAM,CAAmB;IACjC,OAAO,CAAC,IAAI,CAAY;gBAEtB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,kBAAkB;IASvB,WAAW,CACf,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,CAAC,oBAAoB,EAAE,eAAe,CAAC,CAAC;CAQpD"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { FreestylePumpOptions } from './types';
|
|
2
|
+
import { FreestylePumpModel } from './freestyle-pump-model';
|
|
3
|
+
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # FreestylePump
|
|
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
|
+
|
|
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 FreestylePumpModel.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
*
|
|
49
|
+
* const model: IKosDataModel = ...; // some model
|
|
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
|
+
* }
|
|
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 { 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
|
+
* */
|
|
86
|
+
export declare const FreestylePump: KosModelRegistrationFactory<FreestylePumpModel, FreestylePumpOptions>;
|
|
87
|
+
//# sourceMappingURL=freestyle-pump-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-pump-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAgFK;AACL,eAAO,MAAM,aAAa,uEAMxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/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"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type ReplacePumpErrorType = "unknownError" | undefined;
|
|
2
|
+
export type ReplacePumpData = {
|
|
3
|
+
error?: ReplacePumpErrorType;
|
|
4
|
+
};
|
|
5
|
+
export type ReplacePumpResponse = [
|
|
6
|
+
ReplacePumpErrorType | undefined,
|
|
7
|
+
ReplacePumpData
|
|
8
|
+
];
|
|
9
|
+
export declare const replacePump: (pumpId: string, code: string) => Promise<ReplacePumpResponse>;
|
|
10
|
+
//# sourceMappingURL=freestyle-pump-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"freestyle-pump-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-pump/services/freestyle-pump-services.ts"],"names":[],"mappings":"AAeA,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,WACd,MAAM,QACR,MAAM,KACX,QAAQ,mBAAmB,CAoC7B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/freestyle-pump/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { IceAgitatorOptions } from './types';
|
|
2
|
+
import { PourState } from '@kosdev-code/kos-dispense-sdk';
|
|
3
|
+
import { IKosDataModel, KosConfigProperty, KosCreationContext, KosMultipleFutureAwareFull, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
export type IceAgitatorModel = PublicModelInterface<IceAgitatorModelImpl>;
|
|
6
|
+
export declare class IceAgitatorEvents {
|
|
7
|
+
static TOPIC_AGITATION_STARTED: string;
|
|
8
|
+
static TOPIC_AGITATION_ENDED: string;
|
|
9
|
+
}
|
|
10
|
+
export declare const MODEL_TYPE = "ice-agitator-model";
|
|
11
|
+
type IceAgitatorModelType = KosMultipleFutureAwareFull<"pour" | "agitate" | "gate">;
|
|
12
|
+
export interface IceAgitatorModelImpl extends IceAgitatorModelType {
|
|
13
|
+
}
|
|
14
|
+
export declare class IceAgitatorModelImpl implements IKosDataModel {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
path: string;
|
|
18
|
+
volWithoutIceMl: KosConfigProperty<number>;
|
|
19
|
+
durationSec: KosConfigProperty<number>;
|
|
20
|
+
enableIceChuteClear: KosConfigProperty<boolean>;
|
|
21
|
+
iceChuteClearDurationMs: KosConfigProperty<number>;
|
|
22
|
+
iceChuteClearIntervalSec: KosConfigProperty<number>;
|
|
23
|
+
iceChuteClearRetryIntervalSec: KosConfigProperty<number>;
|
|
24
|
+
maxDispenseSec: KosConfigProperty<number>;
|
|
25
|
+
type: KosConfigProperty<string>;
|
|
26
|
+
dilutionOffset: KosConfigProperty<number>;
|
|
27
|
+
inactivitySec: KosConfigProperty<number>;
|
|
28
|
+
private agitating;
|
|
29
|
+
private iceChuteOpen;
|
|
30
|
+
statePath: string;
|
|
31
|
+
private _allIceTypes;
|
|
32
|
+
private logger;
|
|
33
|
+
currentState: PourState;
|
|
34
|
+
constructor(modelId: string, options: IceAgitatorOptions, context: KosCreationContext);
|
|
35
|
+
get iceTypes(): string[];
|
|
36
|
+
get isAgitating(): boolean;
|
|
37
|
+
get isIceChuteOpen(): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* A derived value that indicates if the nozzle is currently pouring a beverage.
|
|
40
|
+
* @readonly
|
|
41
|
+
*/
|
|
42
|
+
get isPouring(): boolean;
|
|
43
|
+
/**
|
|
44
|
+
* A derived value that indicates if it is possible to dispense ice.
|
|
45
|
+
*
|
|
46
|
+
* The value is observable and will change as the current dispense state changes
|
|
47
|
+
* @readonly
|
|
48
|
+
* */
|
|
49
|
+
get canPour(): boolean;
|
|
50
|
+
private updateIfCurrent;
|
|
51
|
+
pourIce(tracker?: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* An action that will cancel the ice dispense if it is currently in progress.
|
|
54
|
+
* */
|
|
55
|
+
cancelIceDispense(): Promise<void>;
|
|
56
|
+
testAgitate(tracker?: string): Promise<import('@kosdev-code/kos-ui-sdk').FutureResponse>;
|
|
57
|
+
testGate(tracker?: string): Promise<import('@kosdev-code/kos-ui-sdk').FutureResponse>;
|
|
58
|
+
handleAgitationChange(): void;
|
|
59
|
+
updateIceType(type: string): Promise<void>;
|
|
60
|
+
resetDefaultValues: () => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<unknown[]> | undefined>;
|
|
61
|
+
init(): Promise<void>;
|
|
62
|
+
load(): Promise<void>;
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=ice-agitator-model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ice-agitator-model.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/ice-agitator-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EAEjB,kBAAkB,EAClB,0BAA0B,EAE1B,oBAAoB,EACrB,MAAM,yBAAyB,CAAC;AAcjC,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,oBAAqB,SAAQ,oBAAoB;CAAG;AAErE,qBAEa,oBAAqB,YAAW,aAAa;IACxD,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;IAC/B,OAAO,CAAC,MAAM,CAAmB;IACjC,YAAY,EAAE,SAAS,CAAkB;gBAEvC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,kBAAkB;IAW7B,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;CAS5B"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { IceAgitatorOptions } from './types';
|
|
2
|
+
import { IceAgitatorModel } from './ice-agitator-model';
|
|
3
|
+
import { KosModelRegistrationFactory } from '@kosdev-code/kos-ui-sdk';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* # IceAgitator
|
|
7
|
+
*
|
|
8
|
+
* The registration bean includes convenience methods for creating and working with IceAgitatorModel 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: IceAgitator.type, id: "iceAgitatorId"})
|
|
19
|
+
* private iceAgitatorModel: IceAgitatorModel;
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
*
|
|
23
|
+
* ## factory
|
|
24
|
+
*
|
|
25
|
+
* The factory method creates a factory function that can be used to create new IceAgitatorModel 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 = IceAgitator.factory("iceAgitatorId")({
|
|
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 IceAgitatorModel.
|
|
45
|
+
*
|
|
46
|
+
* @example
|
|
47
|
+
* ```typescript
|
|
48
|
+
*
|
|
49
|
+
* const model: IKosDataModel = ...; // some model
|
|
50
|
+
*
|
|
51
|
+
* if (IceAgitator.predicate(model)) {
|
|
52
|
+
* // if the function evaluates to true, the model is narrowed down to IceAgitatorModel
|
|
53
|
+
* // and the compiler will know that the model has the IceAgitatorModel 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 { IceAgitator } from "@kos-ui/kos-dispenser-model";
|
|
71
|
+
* ...
|
|
72
|
+
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
73
|
+
* export const kosModels: IKosRegistry["models"] = {
|
|
74
|
+
* ...IceAgitator.registration,
|
|
75
|
+
* };
|
|
76
|
+
* ```
|
|
77
|
+
*
|
|
78
|
+
* ## registration.singleton
|
|
79
|
+
|
|
80
|
+
* The iceAgitator 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.
|
|
81
|
+
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
82
|
+
|
|
83
|
+
* */
|
|
84
|
+
export declare const IceAgitator: KosModelRegistrationFactory<IceAgitatorModel, IceAgitatorOptions>;
|
|
85
|
+
//# sourceMappingURL=ice-agitator-registration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ice-agitator-registration.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/ice-agitator-registration.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAGL,KAAK,gBAAgB,EACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA8EK;AAEL,eAAO,MAAM,WAAW,mEAMtB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,MAAM,6BAA6B,CAAC;AAC1D,mBAAmB,SAAS,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FutureResponse, KosServiceResponse } from '@kosdev-code/kos-ui-sdk';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @category Service
|
|
5
|
+
* Retrieves the initial dispenser data.
|
|
6
|
+
*/
|
|
7
|
+
export declare const getIceTypes: (path: string) => Promise<KosServiceResponse<string[]> | undefined>;
|
|
8
|
+
export declare const updateIceType: (agitator: string, type: string) => Promise<KosServiceResponse<any> | undefined>;
|
|
9
|
+
export declare const resetIceSetting: (path: string) => Promise<KosServiceResponse<unknown[]> | undefined>;
|
|
10
|
+
export declare const pour: (path: string, tracker: string) => Promise<FutureResponse>;
|
|
11
|
+
export declare const agitate: (path: string, tracker: string) => Promise<FutureResponse>;
|
|
12
|
+
export declare const testGate: (path: string, tracker: string) => Promise<FutureResponse>;
|
|
13
|
+
//# sourceMappingURL=ice-agitator-services.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ice-agitator-services.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/models/ice-agitator/services/ice-agitator-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EACxB,MAAM,yBAAyB,CAAC;AAWjC;;;GAGG;AACH,eAAO,MAAM,WAAW,SAAgB,MAAM,sDAM7C,CAAC;AAEF,eAAO,MAAM,aAAa,aAAoB,MAAM,QAAQ,MAAM,iDAOjE,CAAC;AAEF,eAAO,MAAM,eAAe,SAAgB,MAAM,uDAKjD,CAAC;AAEF,eAAO,MAAM,IAAI,SAAgB,MAAM,WAAW,MAAM,4BAYvD,CAAC;AAEF,eAAO,MAAM,OAAO,SAAgB,MAAM,WAAW,MAAM,4BAY1D,CAAC;AAEF,eAAO,MAAM,QAAQ,SAAgB,MAAM,WAAW,MAAM,4BAY3D,CAAC"}
|