@kosdev-code/kos-dispense-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/.kos.json +129 -0
- package/{dispense-registration-manager-ukk4OBeX.cjs → dispense-registration-manager-CfWgJqfq.cjs} +807 -445
- package/dispense-registration-manager-CfWgJqfq.cjs.map +1 -0
- package/{dispense-registration-manager-C4XZ_c3x.js → dispense-registration-manager-DtN0T_JG.js} +846 -484
- package/dispense-registration-manager-DtN0T_JG.js.map +1 -0
- package/{extension-utils-CMVLCSA8.cjs → extension-utils-BWYG2dYG.cjs} +52 -194
- package/extension-utils-BWYG2dYG.cjs.map +1 -0
- package/{extension-utils-FxS68Xu9.js → extension-utils-BoXtjU5_.js} +58 -200
- package/extension-utils-BoXtjU5_.js.map +1 -0
- package/extensions/control-pour-extension.d.ts +8 -9
- package/extensions/control-pour-extension.d.ts.map +1 -1
- package/extensions/index.d.ts.map +1 -1
- package/index.cjs +31 -11
- package/index.cjs.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +118 -98
- package/index.js.map +1 -1
- package/models/constants/constants.d.ts +14 -178
- package/models/constants/constants.d.ts.map +1 -1
- package/models/constants/index.d.ts.map +1 -1
- package/models/index.d.ts.map +1 -1
- package/models/models/assembly/assembly-model.d.ts +12 -5
- package/models/models/assembly/assembly-model.d.ts.map +1 -1
- package/models/models/assembly/assembly-registration.d.ts +12 -71
- package/models/models/assembly/assembly-registration.d.ts.map +1 -1
- package/models/models/assembly/board-utils.d.ts +1 -2
- package/models/models/assembly/board-utils.d.ts.map +1 -1
- package/models/models/assembly/holder-utils.d.ts +1 -2
- package/models/models/assembly/holder-utils.d.ts.map +1 -1
- package/models/models/assembly/index.d.ts.map +1 -1
- package/models/models/assembly/nozzle-utils.d.ts +1 -2
- package/models/models/assembly/nozzle-utils.d.ts.map +1 -1
- package/models/models/assembly/pump-utils.d.ts +2 -3
- package/models/models/assembly/pump-utils.d.ts.map +1 -1
- package/models/models/assembly/services/assembly-services.d.ts +0 -1
- package/models/models/assembly/services/assembly-services.d.ts.map +1 -1
- package/models/models/assembly/services/index.d.ts.map +1 -1
- package/models/models/assembly/types/index.d.ts +8 -3
- package/models/models/availability/availability-model.d.ts +13 -78
- package/models/models/availability/availability-model.d.ts.map +1 -1
- package/models/models/availability/index.d.ts.map +1 -1
- package/models/models/availability/types/index.d.ts +7 -13
- package/models/models/board/board-container-model.d.ts +10 -3
- package/models/models/board/board-container-model.d.ts.map +1 -1
- package/models/models/board/board-container-registration.d.ts +13 -77
- package/models/models/board/board-container-registration.d.ts.map +1 -1
- package/models/models/board/board-model.d.ts +1 -2
- package/models/models/board/board-model.d.ts.map +1 -1
- package/models/models/board/board-registration.d.ts +12 -74
- package/models/models/board/board-registration.d.ts.map +1 -1
- package/models/models/board/index.d.ts.map +1 -1
- package/models/models/board/types/index.d.ts +12 -2
- package/models/models/board/types/services.d.ts.map +1 -1
- package/models/models/board/utils/board-trouble-data-mapper.d.ts +1 -2
- package/models/models/board/utils/board-trouble-data-mapper.d.ts.map +1 -1
- package/models/models/board/utils/board-trouble-resolver.d.ts +0 -1
- package/models/models/board/utils/board-trouble-resolver.d.ts.map +1 -1
- package/models/models/cui-kit-state/cui-kit-state-model.d.ts +133 -0
- package/models/models/cui-kit-state/cui-kit-state-model.d.ts.map +1 -0
- package/models/models/cui-kit-state/index.d.ts +4 -0
- package/models/models/cui-kit-state/index.d.ts.map +1 -0
- package/models/models/cui-kit-state/types/index.d.ts +82 -0
- package/models/models/device-assembly/device-assembly-model.d.ts +6 -3
- package/models/models/device-assembly/device-assembly-model.d.ts.map +1 -1
- package/models/models/device-assembly/device-assembly-registration.d.ts +14 -79
- package/models/models/device-assembly/device-assembly-registration.d.ts.map +1 -1
- package/models/models/device-assembly/index.d.ts.map +1 -1
- package/models/models/device-assembly/types/index.d.ts +4 -0
- package/models/models/generic-pour/generic-pour-model.d.ts +19 -4
- package/models/models/generic-pour/generic-pour-model.d.ts.map +1 -1
- package/models/models/generic-pour/generic-pour-registration.d.ts +13 -75
- package/models/models/generic-pour/generic-pour-registration.d.ts.map +1 -1
- package/models/models/generic-pour/index.d.ts.map +1 -1
- package/models/models/generic-pour/services/generic-pour-services.d.ts.map +1 -1
- package/models/models/generic-pour/services/index.d.ts.map +1 -1
- package/models/models/generic-pour/types/index.d.ts +4 -0
- package/models/models/holder/holder-model.d.ts +16 -75
- package/models/models/holder/holder-model.d.ts.map +1 -1
- package/models/models/holder/index.d.ts.map +1 -1
- package/models/models/holder/services/assignment-services.d.ts.map +1 -1
- package/models/models/holder/services/holder-services.d.ts.map +1 -1
- package/models/models/holder/services/index.d.ts.map +1 -1
- package/models/models/holder/types/index.d.ts +11 -7
- package/models/models/holder/utils/holder-utils.d.ts +0 -1
- package/models/models/holder/utils/holder-utils.d.ts.map +1 -1
- package/models/models/holder-container/holder-container-model.d.ts +12 -70
- package/models/models/holder-container/holder-container-model.d.ts.map +1 -1
- package/models/models/holder-container/index.d.ts.map +1 -1
- package/models/models/holder-container/types/index.d.ts +16 -5
- package/models/models/index.d.ts +1 -0
- package/models/models/index.d.ts.map +1 -1
- package/models/models/ingredient/index.d.ts.map +1 -1
- package/models/models/ingredient/ingredient-model.d.ts +12 -76
- package/models/models/ingredient/ingredient-model.d.ts.map +1 -1
- package/models/models/ingredient/services/index.d.ts.map +1 -1
- package/models/models/ingredient/services/ingredient-services.d.ts.map +1 -1
- package/models/models/ingredient/types/index.d.ts +7 -13
- package/models/models/ingredient-container/index.d.ts.map +1 -1
- package/models/models/ingredient-container/ingredient-container-model.d.ts +12 -70
- package/models/models/ingredient-container/ingredient-container-model.d.ts.map +1 -1
- package/models/models/ingredient-container/types/index.d.ts +7 -3
- package/models/models/nozzle/index.d.ts.map +1 -1
- package/models/models/nozzle/nozzle-model.d.ts +20 -81
- package/models/models/nozzle/nozzle-model.d.ts.map +1 -1
- package/models/models/nozzle/services/index.d.ts.map +1 -1
- package/models/models/nozzle/services/nozzle-services.d.ts +11 -65
- package/models/models/nozzle/services/nozzle-services.d.ts.map +1 -1
- package/models/models/nozzle/types/index.d.ts +7 -3
- package/models/models/pump/index.d.ts.map +1 -1
- package/models/models/pump/pump-model.d.ts +12 -81
- package/models/models/pump/pump-model.d.ts.map +1 -1
- package/models/models/pump/services/index.d.ts.map +1 -1
- package/models/models/pump/services/pump-services.d.ts +3 -5
- package/models/models/pump/services/pump-services.d.ts.map +1 -1
- package/models/models/pump/types/index.d.ts +7 -3
- package/models/models/pump/utils/pump-trouble-resolver.d.ts +0 -1
- package/models/models/pump/utils/pump-trouble-resolver.d.ts.map +1 -1
- package/models/models/pump-container/index.d.ts.map +1 -1
- package/models/models/pump-container/pump-container-model.d.ts +16 -70
- package/models/models/pump-container/pump-container-model.d.ts.map +1 -1
- package/models/models/pump-container/types/index.d.ts +7 -3
- package/models/models/types/assembly.d.ts.map +1 -1
- package/models/models/types/index.d.ts.map +1 -1
- package/models/models/types/intent.d.ts +11 -79
- package/models/models/types/intent.d.ts.map +1 -1
- package/models/models/types/pouring.d.ts.map +1 -1
- package/models/utils/dispense-registration-manager.d.ts +34 -10
- package/models/utils/dispense-registration-manager.d.ts.map +1 -1
- package/models/utils/extension-utils.d.ts +66 -173
- package/models/utils/extension-utils.d.ts.map +1 -1
- package/models/utils/openapi-index.d.ts +1 -1
- package/models/utils/openapi-index.d.ts.map +1 -1
- package/models/utils/pour-context.d.ts +8 -0
- package/models/utils/pour-context.d.ts.map +1 -0
- package/models/utils/registration.d.ts +0 -1
- package/models/utils/registration.d.ts.map +1 -1
- package/models/utils/service.d.ts +34 -35
- package/models/utils/service.d.ts.map +1 -1
- package/models/utils/services/dispense/1.6.5/service.d.ts +34 -35
- package/models/utils/services/dispense/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/dispense/1.8.1/service.d.ts +34 -35
- package/models/utils/services/dispense/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/dispense/daily/openapi.d.ts +1941 -1812
- package/models/utils/services/dispense/daily/service.d.ts +127 -37
- package/models/utils/services/dispense/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +1 -1
- package/models/utils/services-index.d.ts.map +1 -1
- package/models.cjs +4 -5
- package/models.cjs.map +1 -1
- package/models.d.ts +1 -0
- package/models.js +29 -30
- package/models.js.map +1 -1
- package/package.json +11 -12
- package/{pump-provider-BAQXIUuP.cjs → pump-provider-B4WR3LiY.cjs} +480 -544
- package/pump-provider-B4WR3LiY.cjs.map +1 -0
- package/{pump-provider-9rUgev7q.js → pump-provider-CPUsLke5.js} +541 -605
- package/pump-provider-CPUsLke5.js.map +1 -0
- package/ui/contexts/assembly/assembly-provider.d.ts +9 -2
- package/ui/contexts/assembly/assembly-provider.d.ts.map +1 -1
- package/ui/contexts/assembly/index.d.ts.map +1 -1
- package/ui/contexts/availability/availability-provider.d.ts +9 -2
- package/ui/contexts/availability/availability-provider.d.ts.map +1 -1
- package/ui/contexts/availability/index.d.ts.map +1 -1
- package/ui/contexts/board/board-provider.d.ts +9 -2
- package/ui/contexts/board/board-provider.d.ts.map +1 -1
- package/ui/contexts/board/index.d.ts.map +1 -1
- package/ui/contexts/board-container/board-container-provider.d.ts +9 -2
- package/ui/contexts/board-container/board-container-provider.d.ts.map +1 -1
- package/ui/contexts/board-container/index.d.ts.map +1 -1
- package/ui/contexts/cui-kit/cui-kit.d.ts +17 -3
- package/ui/contexts/cui-kit/cui-kit.d.ts.map +1 -1
- package/ui/contexts/cui-kit/index.d.ts.map +1 -1
- package/ui/contexts/device-assembly/device-assembly-provider.d.ts +9 -2
- package/ui/contexts/device-assembly/device-assembly-provider.d.ts.map +1 -1
- package/ui/contexts/device-assembly/index.d.ts.map +1 -1
- package/ui/contexts/holder/holder-provider.d.ts +9 -2
- package/ui/contexts/holder/holder-provider.d.ts.map +1 -1
- package/ui/contexts/holder/index.d.ts.map +1 -1
- package/ui/contexts/holder-container/holder-container-provider.d.ts +9 -2
- package/ui/contexts/holder-container/holder-container-provider.d.ts.map +1 -1
- package/ui/contexts/holder-container/index.d.ts.map +1 -1
- package/ui/contexts/index.d.ts.map +1 -1
- package/ui/contexts/ingredient/index.d.ts.map +1 -1
- package/ui/contexts/ingredient/ingredient-provider.d.ts +9 -2
- package/ui/contexts/ingredient/ingredient-provider.d.ts.map +1 -1
- package/ui/contexts/ingredient-container/index.d.ts.map +1 -1
- package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts +9 -2
- package/ui/contexts/ingredient-container/ingredient-container-provider.d.ts.map +1 -1
- package/ui/contexts/nozzle/index.d.ts.map +1 -1
- package/ui/contexts/nozzle/nozzle-provider.d.ts +9 -2
- package/ui/contexts/nozzle/nozzle-provider.d.ts.map +1 -1
- package/ui/contexts/pump/index.d.ts.map +1 -1
- package/ui/contexts/pump/pump-provider.d.ts +9 -2
- package/ui/contexts/pump/pump-provider.d.ts.map +1 -1
- package/ui/hooks/assembly/index.d.ts.map +1 -1
- package/ui/hooks/assembly/use-assembly.d.ts +5 -2
- package/ui/hooks/assembly/use-assembly.d.ts.map +1 -1
- package/ui/hooks/assembly/with-assembly.d.ts +4 -1
- package/ui/hooks/assembly/with-assembly.d.ts.map +1 -1
- package/ui/hooks/availability/index.d.ts.map +1 -1
- package/ui/hooks/availability/use-availability.d.ts +5 -2
- package/ui/hooks/availability/use-availability.d.ts.map +1 -1
- package/ui/hooks/availability/with-availability.d.ts +0 -1
- package/ui/hooks/availability/with-availability.d.ts.map +1 -1
- package/ui/hooks/board/index.d.ts.map +1 -1
- package/ui/hooks/board/use-board.d.ts +5 -2
- package/ui/hooks/board/use-board.d.ts.map +1 -1
- package/ui/hooks/board/with-board.d.ts +4 -1
- package/ui/hooks/board/with-board.d.ts.map +1 -1
- package/ui/hooks/board-container/index.d.ts.map +1 -1
- package/ui/hooks/board-container/use-board-container.d.ts +5 -2
- package/ui/hooks/board-container/use-board-container.d.ts.map +1 -1
- package/ui/hooks/board-container/with-board-container.d.ts +4 -1
- package/ui/hooks/board-container/with-board-container.d.ts.map +1 -1
- package/ui/hooks/cui-kit/dispense-topics.d.ts +0 -1
- package/ui/hooks/cui-kit/dispense-topics.d.ts.map +1 -1
- package/ui/hooks/cui-kit/index.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts +0 -1
- package/ui/hooks/cui-kit/use-ambient-attract-timers.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-beverages.d.ts +1 -2
- package/ui/hooks/cui-kit/use-beverages.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-brands.d.ts +1 -2
- package/ui/hooks/cui-kit/use-brands.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-cui-kit.d.ts +51 -7
- package/ui/hooks/cui-kit/use-cui-kit.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts +16 -44
- package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts +0 -1
- package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-dispense-timers.d.ts +0 -1
- package/ui/hooks/cui-kit/use-dispense-timers.d.ts.map +1 -1
- package/ui/hooks/cui-kit/use-flavors.d.ts +1 -2
- package/ui/hooks/cui-kit/use-flavors.d.ts.map +1 -1
- package/ui/hooks/device-assembly/index.d.ts.map +1 -1
- package/ui/hooks/device-assembly/use-device-assembly.d.ts +5 -2
- package/ui/hooks/device-assembly/use-device-assembly.d.ts.map +1 -1
- package/ui/hooks/device-assembly/with-device-assembly.d.ts +4 -1
- package/ui/hooks/device-assembly/with-device-assembly.d.ts.map +1 -1
- package/ui/hooks/generic-pour/index.d.ts.map +1 -1
- package/ui/hooks/generic-pour/use-generic-pour.d.ts +6 -3
- package/ui/hooks/generic-pour/use-generic-pour.d.ts.map +1 -1
- package/ui/hooks/generic-pour/with-generic-pour.d.ts +5 -2
- package/ui/hooks/generic-pour/with-generic-pour.d.ts.map +1 -1
- package/ui/hooks/holder/index.d.ts.map +1 -1
- package/ui/hooks/holder/use-holder.d.ts +5 -2
- package/ui/hooks/holder/use-holder.d.ts.map +1 -1
- package/ui/hooks/holder/with-holder.d.ts +4 -1
- package/ui/hooks/holder/with-holder.d.ts.map +1 -1
- package/ui/hooks/holder-container/index.d.ts.map +1 -1
- package/ui/hooks/holder-container/use-holder-container.d.ts +7 -4
- package/ui/hooks/holder-container/use-holder-container.d.ts.map +1 -1
- package/ui/hooks/holder-container/with-holder-container.d.ts +4 -1
- package/ui/hooks/holder-container/with-holder-container.d.ts.map +1 -1
- package/ui/hooks/index.d.ts.map +1 -1
- package/ui/hooks/ingredient/index.d.ts.map +1 -1
- package/ui/hooks/ingredient/use-ingredient-pour.d.ts +16 -22
- package/ui/hooks/ingredient/use-ingredient-pour.d.ts.map +1 -1
- package/ui/hooks/ingredient/use-ingredient.d.ts +5 -2
- package/ui/hooks/ingredient/use-ingredient.d.ts.map +1 -1
- package/ui/hooks/ingredient/with-ingredient.d.ts +4 -1
- package/ui/hooks/ingredient/with-ingredient.d.ts.map +1 -1
- package/ui/hooks/ingredient-container/index.d.ts.map +1 -1
- package/ui/hooks/ingredient-container/use-ingredient-container.d.ts +5 -2
- package/ui/hooks/ingredient-container/use-ingredient-container.d.ts.map +1 -1
- package/ui/hooks/ingredient-container/with-ingredient-container.d.ts +4 -1
- package/ui/hooks/ingredient-container/with-ingredient-container.d.ts.map +1 -1
- package/ui/hooks/nozzle/index.d.ts.map +1 -1
- package/ui/hooks/nozzle/use-dispense-kit.d.ts +0 -1
- package/ui/hooks/nozzle/use-dispense-kit.d.ts.map +1 -1
- package/ui/hooks/nozzle/use-nozzle.d.ts +5 -2
- package/ui/hooks/nozzle/use-nozzle.d.ts.map +1 -1
- package/ui/hooks/nozzle/with-nozzle.d.ts +4 -1
- package/ui/hooks/nozzle/with-nozzle.d.ts.map +1 -1
- package/ui/hooks/nozzle-pour/index.d.ts.map +1 -1
- package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +16 -22
- package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -1
- package/ui/hooks/pour/index.d.ts.map +1 -1
- package/ui/hooks/pour/use-pour.d.ts +11 -23
- package/ui/hooks/pour/use-pour.d.ts.map +1 -1
- package/ui/hooks/pump/index.d.ts.map +1 -1
- package/ui/hooks/pump/use-pump.d.ts +1 -2
- package/ui/hooks/pump/use-pump.d.ts.map +1 -1
- package/ui/hooks/pump/with-pump.d.ts +0 -1
- package/ui/hooks/pump/with-pump.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts +5 -2
- package/ui/hooks/utils/pour-strategy/hold-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts +4 -1
- package/ui/hooks/utils/pour-strategy/hold-to-pour-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/index.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts +11 -2
- package/ui/hooks/utils/pour-strategy/pour-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts +5 -2
- package/ui/hooks/utils/pour-strategy/tap-or-hold-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts +5 -2
- package/ui/hooks/utils/pour-strategy/tap-to-pour-intent-strategy.d.ts.map +1 -1
- package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts +4 -1
- package/ui/hooks/utils/pour-strategy/tap-to-pour-strategy.d.ts.map +1 -1
- package/ui/index.d.ts.map +1 -1
- package/ui/utils/pour-context.d.ts +1 -7
- package/ui/utils/pour-context.d.ts.map +1 -1
- package/ui.cjs +3 -7
- package/ui.cjs.map +1 -1
- package/ui.d.ts +1 -0
- package/ui.js +64 -68
- package/ui.js.map +1 -1
- package/dispense-registration-manager-C4XZ_c3x.js.map +0 -1
- package/dispense-registration-manager-ukk4OBeX.cjs.map +0 -1
- package/extension-utils-CMVLCSA8.cjs.map +0 -1
- package/extension-utils-FxS68Xu9.js.map +0 -1
- package/kos-models.json +0 -180
- package/pump-provider-9rUgev7q.js.map +0 -1
- package/pump-provider-BAQXIUuP.cjs.map +0 -1
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { NozzleOptions, PourStrategyAware, SelectedPourable } from './types';
|
|
2
|
-
import { AvailabilityResponse } from './services';
|
|
3
|
-
import { PourState } from '../types/pouring';
|
|
4
|
-
import { AvailabilityModel } from '../availability';
|
|
5
1
|
import { FutureAwareContainer, FutureContainer, IFutureModel, IKosDataModel, IKosModelLogger, KosContext, KosLoggerAware, KosModelRegistrationBean, KosStateMachineAware, PublicModelInterface } from '@kosdev-code/kos-ui-sdk';
|
|
6
|
-
|
|
2
|
+
import { AvailabilityModel } from '../availability';
|
|
3
|
+
import { PourState } from '../types/pouring';
|
|
4
|
+
import { AvailabilityResponse } from './services';
|
|
5
|
+
import { NozzleOptions, PourStrategyAware, SelectedPourable } from './types';
|
|
7
6
|
export declare const TOPIC_NOZZLE_POUR_STARTED = "/kos/nozzle/pour/started";
|
|
8
7
|
export declare const TOPIC_NOZZLE_POUR_PROGRESS = "/kos/nozzle/pour/progress";
|
|
9
8
|
export declare const TOPIC_NOZZLE_POUR_CANCEL = "/kos/nozzle/pour/cancel";
|
|
@@ -92,7 +91,7 @@ declare class NozzleModelImpl implements PourStrategyAware {
|
|
|
92
91
|
* @returns The availability nodes that are available to be dispensed from this nozzle
|
|
93
92
|
* and are in the specified group.
|
|
94
93
|
* */
|
|
95
|
-
getGroupAvailabilityItems<D extends object = any>(groupId: string): AvailabilityModel<D
|
|
94
|
+
getGroupAvailabilityItems<D extends object = any>(groupId: string): AvailabilityModel<D>[];
|
|
96
95
|
/**
|
|
97
96
|
* Utility method that will return the availability nodes that are tagged with the specified parent id.
|
|
98
97
|
*
|
|
@@ -102,7 +101,7 @@ declare class NozzleModelImpl implements PourStrategyAware {
|
|
|
102
101
|
* @param parentId - The parent id to filter by.
|
|
103
102
|
* @returns the availability nodes that are tagged with the specified parent id.
|
|
104
103
|
*/
|
|
105
|
-
getAvailabilityByParent<D extends object = any>(parentId: string): AvailabilityModel<D
|
|
104
|
+
getAvailabilityByParent<D extends object = any>(parentId: string): AvailabilityModel<D>[];
|
|
106
105
|
/**
|
|
107
106
|
* @kosApiLevel 12
|
|
108
107
|
*/
|
|
@@ -188,90 +187,30 @@ declare class NozzleModelImpl implements PourStrategyAware {
|
|
|
188
187
|
*
|
|
189
188
|
* @category Model
|
|
190
189
|
* @interface
|
|
191
|
-
*
|
|
192
|
-
|
|
190
|
+
* @kosService dispense.nozzle
|
|
191
|
+
* @kosApiLevel 2
|
|
193
192
|
*/
|
|
194
193
|
export type NozzleModel = PublicModelInterface<NozzleModelImpl>;
|
|
195
194
|
/**
|
|
195
|
+
* Registration bean for {@link NozzleModel}.
|
|
196
196
|
*
|
|
197
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
198
|
+
* - `factory`: curried factory, `Nozzle.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
|
|
199
|
+
* - `predicate`: type guard that narrows an `IKosDataModel` to `NozzleModel`.
|
|
200
|
+
* - `registration`: registry entry that can be spread into an `IKosRegistry["models"]` map.
|
|
197
201
|
*
|
|
198
|
-
*
|
|
199
|
-
*
|
|
200
|
-
* The registration bean includes convenience methods for creating and working with NozzleModel instances.
|
|
201
|
-
*
|
|
202
|
-
* ## type
|
|
203
|
-
* The type property is a string that identifies the model type.
|
|
204
|
-
* 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
|
|
205
|
-
* used when declaring dependencies on models.
|
|
206
|
-
*
|
|
207
|
-
* @example
|
|
208
|
-
* ```typescript
|
|
209
|
-
*
|
|
210
|
-
* @kosDependency({modelType: Nozzle.type, id: "nozzleId"})
|
|
211
|
-
* private nozzleModel: NozzleModel;
|
|
212
|
-
* ```
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* ## factory
|
|
216
|
-
*
|
|
217
|
-
* The factory method creates a factory function that can be used to create new NozzleModel instances.
|
|
218
|
-
*
|
|
219
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
220
|
-
*
|
|
221
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
222
|
-
* in this case and the existing model will be returned in its current state.
|
|
223
|
-
*
|
|
224
|
-
* @example
|
|
225
|
-
*
|
|
226
|
-
* ```typescript
|
|
227
|
-
* const model = Nozzle.factory("S1")({
|
|
228
|
-
* path: "core.assemby.nozzle.nozzle1",
|
|
229
|
-
* });
|
|
230
|
-
* ```
|
|
231
|
-
*
|
|
232
|
-
* ## predicate
|
|
233
|
-
*
|
|
234
|
-
* [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 NozzleModel.
|
|
202
|
+
* Nozzle is not a singleton: each id has its own instance. `KosModelRegistry.dispense.models()` registers it.
|
|
235
203
|
*
|
|
236
204
|
* @example
|
|
237
205
|
* ```typescript
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
* if (Nozzle.predicate(model)) {
|
|
242
|
-
* // if the function evaluates to true, the model is narrowed down to NozzleModel
|
|
243
|
-
* // and the compiler will know that the model has the NozzleModel interface
|
|
244
|
-
* model.pour();
|
|
245
|
-
* }
|
|
206
|
+
* @kosDependency({ modelType: Nozzle.type, id: "nozzleId" })
|
|
207
|
+
* private nozzle!: NozzleModel;
|
|
246
208
|
* ```
|
|
247
209
|
*
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
*
|
|
251
|
-
|
|
252
|
-
*
|
|
253
|
-
*
|
|
254
|
-
* @example
|
|
255
|
-
*
|
|
256
|
-
* In an application registration file you can declare the model registration as follows:
|
|
257
|
-
*
|
|
258
|
-
* **registration.ts**
|
|
259
|
-
* ```typescript
|
|
260
|
-
* import { Nozzle } from "@kosdev-code/kos-dispense-sdk";
|
|
261
|
-
* ...
|
|
262
|
-
* import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
263
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
264
|
-
* ...Nozzle.registration,
|
|
265
|
-
* };
|
|
266
|
-
* ```
|
|
267
|
-
*
|
|
268
|
-
* ## registration.singleton
|
|
269
|
-
*
|
|
270
|
-
* The nozzle 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.
|
|
271
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
272
|
-
*
|
|
273
|
-
* @category KOS Model Registration
|
|
274
|
-
* */
|
|
210
|
+
* @category KOS Model Registration
|
|
211
|
+
* @kosService dispense.nozzle
|
|
212
|
+
* @kosApiLevel 2
|
|
213
|
+
*/
|
|
275
214
|
export declare const Nozzle: Readonly<KosModelRegistrationBean<NozzleModel, NozzleOptions>>;
|
|
276
215
|
export {};
|
|
277
216
|
//# sourceMappingURL=nozzle-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nozzle-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"nozzle-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/nozzle/nozzle-model.ts"],"names":[],"mappings":"AACA,OAAO,EAuBL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,aAAa,EAElB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAC1B,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAEL,KAAK,iBAAiB,EAEvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAML,KAAK,oBAA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AACH,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,eAAe,CAAC,CAAC;AAEhE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,eAAO,MAAM,MAAM,EAAE,QAAQ,CAC3B,wBAAwB,CAAC,WAAW,EAAE,aAAa,CAAC,CAWrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/nozzle/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
@@ -60,31 +60,21 @@ export interface AvailabilityResponse {
|
|
|
60
60
|
*
|
|
61
61
|
* Initiates a pour for the specified nozzle.
|
|
62
62
|
*
|
|
63
|
-
* Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/pour`
|
|
63
|
+
* Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/pour/selected/maxVolume`
|
|
64
64
|
*
|
|
65
65
|
* @param nozzleId - the nozzle id to pour from.
|
|
66
66
|
* @param tracker - the tracker to use for the pour. It will be returned in the future to allow consumers
|
|
67
67
|
* to track the pour.
|
|
68
68
|
* @category Service
|
|
69
|
-
*
|
|
70
|
-
* @example
|
|
71
|
-
* ```typescript
|
|
72
|
-
* import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
|
|
73
|
-
* ...
|
|
74
|
-
*
|
|
75
|
-
* await NozzleServices.pourPourable("nozzle-1", "my-tracker");
|
|
76
|
-
* ```
|
|
77
69
|
* @see {@link FutureManager.initiateFuture}
|
|
78
|
-
* @returns -
|
|
70
|
+
* @returns - the service response. Its data is the future that tracks the pour, which is registered with the {@link FutureManager}.
|
|
79
71
|
**/
|
|
80
72
|
export declare const pourPourable: (nozzleId: string, tracker: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
|
|
81
73
|
/**
|
|
82
74
|
*
|
|
83
75
|
* Initiates a fixed named pour for the specified nozzle.
|
|
84
76
|
*
|
|
85
|
-
* Typically used for
|
|
86
|
-
* dictated by the name.
|
|
87
|
-
*
|
|
77
|
+
* Typically used for a named cup size, where the name determines the volume of the pour.
|
|
88
78
|
*
|
|
89
79
|
* Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/fixed/${name}`
|
|
90
80
|
*
|
|
@@ -93,37 +83,18 @@ export declare const pourPourable: (nozzleId: string, tracker: string) => Promis
|
|
|
93
83
|
* @param tracker - the tracker to use for the pour. It will be returned in the future to allow consumers
|
|
94
84
|
* to track the pour.
|
|
95
85
|
* @category Service
|
|
96
|
-
*
|
|
97
|
-
* @example
|
|
98
|
-
* ```typescript
|
|
99
|
-
* import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
|
|
100
|
-
* ...
|
|
101
|
-
*
|
|
102
|
-
* await NozzleServices.pourPourable("nozzle-1", "my-tracker");
|
|
103
|
-
* ```
|
|
104
86
|
* @see {@link FutureManager.initiateFuture}
|
|
105
|
-
* @returns -
|
|
87
|
+
* @returns - the service response. Its data is the future that tracks the pour, which is registered with the {@link FutureManager}.
|
|
106
88
|
**/
|
|
107
89
|
export declare const pourNamedPourable: (name: string, nozzleId: string, tracker: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
|
|
108
90
|
/**
|
|
109
91
|
* Retrieves the availability nodes for a specified nozzle.
|
|
110
92
|
*
|
|
111
|
-
* Uses the KOS endpoint [GET] `${URL}
|
|
93
|
+
* Uses the KOS endpoint [GET] `${URL}${urlPrefix}/pipeline/beverage/availability`
|
|
112
94
|
*
|
|
113
|
-
* @param
|
|
95
|
+
* @param urlPrefix - the nozzle's URL prefix (the `urlPrefix` of the {@link NozzleModel}).
|
|
114
96
|
* @returns - the availability nodes for the specified nozzle.
|
|
115
97
|
* @category Service
|
|
116
|
-
*
|
|
117
|
-
* @example
|
|
118
|
-
* ```typescript
|
|
119
|
-
* import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
|
|
120
|
-
* ...
|
|
121
|
-
*
|
|
122
|
-
* const availability = await NozzleServices.getAvailability("nozzle-1");
|
|
123
|
-
* if (availability?.status !== 200) {
|
|
124
|
-
* throw new Error("Failed to load nozzle availability");
|
|
125
|
-
* }
|
|
126
|
-
* ```
|
|
127
98
|
*/
|
|
128
99
|
export declare const getAvailability: (urlPrefix: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<AvailabilityResponse> | undefined>;
|
|
129
100
|
/**
|
|
@@ -131,29 +102,17 @@ export declare const getAvailability: (urlPrefix: string) => Promise<import('@ko
|
|
|
131
102
|
*
|
|
132
103
|
* Uses the KOS endpoint [POST] `${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/select`
|
|
133
104
|
*
|
|
134
|
-
*
|
|
135
105
|
* @param nozzleId - the nozzle id to select a pourable for.
|
|
136
106
|
* @param payload - the payload to send to the endpoint. The shape of the payload is determined by the
|
|
137
107
|
* {@link ExtensionType.SelectedPourableMapper} extension.
|
|
138
108
|
* @category Service
|
|
139
109
|
* @see {@link ExtensionType.SelectedPourableMapper}
|
|
140
|
-
* @returns - an
|
|
110
|
+
* @returns - an empty response.
|
|
141
111
|
*
|
|
142
|
-
*
|
|
112
|
+
* @example
|
|
143
113
|
* ```typescript
|
|
144
|
-
*
|
|
145
|
-
*
|
|
146
|
-
* try {
|
|
147
|
-
* const response = await NozzleServices.selectPourable("nozzle-1", {
|
|
148
|
-
* beverage: "beverage-1",
|
|
149
|
-
* additional: ["flavor-1"],
|
|
150
|
-
* });
|
|
151
|
-
* if (response?.status !== 200) {
|
|
152
|
-
* throw new Error("Failed to select pourable");
|
|
153
|
-
* }
|
|
154
|
-
* } catch (e) {
|
|
155
|
-
* console.error(e);
|
|
156
|
-
* }
|
|
114
|
+
* // the default payload when no SelectedPourableMapper is registered
|
|
115
|
+
* await NozzleServices.selectPourable("nozzle-1", { bevId: "beverage-1" });
|
|
157
116
|
* ```
|
|
158
117
|
* */
|
|
159
118
|
export declare const selectPourable: (nozzleId: string, payload: object) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<any> | undefined>;
|
|
@@ -163,20 +122,7 @@ export declare const selectPourable: (nozzleId: string, payload: object) => Prom
|
|
|
163
122
|
*
|
|
164
123
|
* @param nozzleId - the nozzle id to clear the selected pourable for.
|
|
165
124
|
* @category Service
|
|
166
|
-
* @returns - an
|
|
167
|
-
* @example
|
|
168
|
-
* ```typescript
|
|
169
|
-
* import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
|
|
170
|
-
* ...
|
|
171
|
-
* try {
|
|
172
|
-
* const response = await NozzleServices.clearPourable("nozzle-1");
|
|
173
|
-
* if (response?.status !== 200) {
|
|
174
|
-
* throw new Error("Failed to clear pourable");
|
|
175
|
-
* }
|
|
176
|
-
* } catch (e) {
|
|
177
|
-
* console.error(e);
|
|
178
|
-
* }
|
|
179
|
-
* ```
|
|
125
|
+
* @returns - an empty response.
|
|
180
126
|
* */
|
|
181
127
|
export declare const clearPourable: (nozzleId: string) => Promise<import('@kosdev-code/kos-ui-sdk').KosServiceResponse<unknown> | undefined>;
|
|
182
128
|
//# sourceMappingURL=nozzle-services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nozzle-services.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"nozzle-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/nozzle/services/nozzle-services.ts"],"names":[],"mappings":"AAUA;;KAEK;AACL,MAAM,WAAW,gBAAgB,CAC/B,UAAU,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAE5D;;SAEK;IACL,SAAS,EAAE,OAAO,CAAC;IACnB;;;;SAIK;IACL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
2
|
+
import { AvailabilityModel } from '../../availability';
|
|
3
|
+
/**
|
|
4
|
+
* @kosService dispense.pour-strategy
|
|
5
|
+
* @kosApiLevel 4
|
|
6
|
+
*/
|
|
5
7
|
export interface PourStrategyAware extends IKosIdentifiable {
|
|
6
8
|
canPour: boolean;
|
|
7
9
|
isPouring: boolean;
|
|
@@ -11,6 +13,8 @@ export interface PourStrategyAware extends IKosIdentifiable {
|
|
|
11
13
|
}
|
|
12
14
|
/**
|
|
13
15
|
* Options for a nozzle.
|
|
16
|
+
* @kosService dispense.nozzle
|
|
17
|
+
* @kosApiLevel 2
|
|
14
18
|
*/
|
|
15
19
|
export interface NozzleOptions {
|
|
16
20
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/pump/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,mBAAmB,SAAS,CAAC;AAC7B,OAAO,KAAK,YAAY,MAAM,YAAY,CAAC"}
|
|
@@ -1,91 +1,22 @@
|
|
|
1
|
-
import { PumpModel, PumpOptions } from './types';
|
|
2
1
|
import { KosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
|
|
2
|
+
import { PumpModel, PumpOptions } from './types';
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The registration bean includes convenience methods for creating and working with PumpModel instances.
|
|
8
|
-
*
|
|
9
|
-
* ## type
|
|
10
|
-
* The type property is a string that identifies the model type.
|
|
11
|
-
* 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
|
|
12
|
-
* used when declaring dependencies on models.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```typescript
|
|
16
|
-
*
|
|
17
|
-
* @kosDependency({modelType: Pump.type, id: "pumpId"})
|
|
18
|
-
* private pumpModel: PumpModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new PumpModel instances.
|
|
25
|
-
*
|
|
26
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
27
|
-
*
|
|
28
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
29
|
-
* in this case and the existing model will be returned in its current state.
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
4
|
+
* Registration bean for {@link PumpModel}.
|
|
32
5
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* beveragePour: true,
|
|
38
|
-
* type: "syrup",
|
|
39
|
-
* ingredientId: "1234532",
|
|
40
|
-
* holderPath: "core.dispenser.holder.s1",
|
|
41
|
-
* boardPath: "core.dispenser.board.s1",
|
|
42
|
-
* nozzlePath: "core.dispenser.nozzle.s1",
|
|
43
|
-
* inserted: true,
|
|
44
|
-
* category: "flavor",
|
|
45
|
-
* prevIngredientId: "1234567",
|
|
46
|
-
* });
|
|
47
|
-
* ```
|
|
48
|
-
*
|
|
49
|
-
* ## predicate
|
|
50
|
-
*
|
|
51
|
-
* [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 PumpModel.
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* ```typescript
|
|
55
|
-
*
|
|
56
|
-
* const model: IKosDataModel = ...; // some model
|
|
57
|
-
*
|
|
58
|
-
* if (Pump.predicate(model)) {
|
|
59
|
-
* // if the function evaluates to true, the model is narrowed down to PumpModel
|
|
60
|
-
* // and the compiler will know that the model has the PumpModel interface
|
|
61
|
-
* model.updateAvailability(false);
|
|
62
|
-
* }
|
|
63
|
-
* ```
|
|
64
|
-
*
|
|
65
|
-
* ## registration
|
|
66
|
-
*
|
|
67
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
68
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
6
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
7
|
+
* - `factory`: curried factory, `Pump.factory(id)(options)`. Returns the existing model when the id is already in use and ignores the options.
|
|
8
|
+
* - `predicate`: type guard that narrows an `IKosDataModel` to `PumpModel`.
|
|
9
|
+
* - `registration`: registry entry that can be spread into an `IKosRegistry["models"]` map.
|
|
69
10
|
*
|
|
11
|
+
* Pump is not a singleton: each id has its own instance. `KosModelRegistry.dispense.models()` registers it.
|
|
70
12
|
*
|
|
71
13
|
* @example
|
|
72
|
-
*
|
|
73
|
-
* In an application registration file you can declare the model registration as follows:
|
|
74
|
-
*
|
|
75
|
-
* **registration.ts**
|
|
76
14
|
* ```typescript
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
80
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
81
|
-
* ...Pump.registration,
|
|
82
|
-
* };
|
|
15
|
+
* @kosDependency({ modelType: Pump.type, id: "pumpId" })
|
|
16
|
+
* private pump!: PumpModel;
|
|
83
17
|
* ```
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
|
|
87
|
-
* The pump 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.
|
|
88
|
-
* If the factory function is called with an ID that already exists, the existing model will be returned.
|
|
89
|
-
* */
|
|
18
|
+
* @kosService dispense.pump
|
|
19
|
+
* @kosApiLevel 2
|
|
20
|
+
*/
|
|
90
21
|
export declare const Pump: Readonly<KosModelRegistrationBean<PumpModel, PumpOptions>>;
|
|
91
22
|
//# sourceMappingURL=pump-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pump-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"pump-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/pump/pump-model.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAIV,wBAAwB,EAEzB,MAAM,yBAAyB,CAAC;AAajC,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AA+LtD;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,IAAI,EAAE,QAAQ,CAAC,wBAAwB,CAAC,SAAS,EAAE,WAAW,CAAC,CAWzE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/pump/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FutureResponse, KosServiceResponse } from '@kosdev-code/kos-ui-sdk';
|
|
2
|
-
|
|
3
2
|
export interface PumpResponse {
|
|
4
3
|
inserted: boolean;
|
|
5
4
|
beveragePour: boolean;
|
|
@@ -18,10 +17,9 @@ interface IntentRequest {
|
|
|
18
17
|
pumpId: string;
|
|
19
18
|
tracker: string;
|
|
20
19
|
}
|
|
21
|
-
interface IntentVolumeResponse {
|
|
22
|
-
volume: number;
|
|
23
|
-
}
|
|
24
20
|
export declare const sendIntent: ({ intent, pumpId, tracker, }: IntentRequest) => Promise<KosServiceResponse<FutureResponse> | undefined>;
|
|
25
|
-
export declare const getIntentVolume: (pumpId: string, intent: string) => Promise<
|
|
21
|
+
export declare const getIntentVolume: (pumpId: string, intent: string) => Promise<{
|
|
22
|
+
volume: number;
|
|
23
|
+
}>;
|
|
26
24
|
export {};
|
|
27
25
|
//# sourceMappingURL=pump-services.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pump-services.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"pump-services.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/pump/services/pump-services.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,kBAAkB,EAGnB,MAAM,yBAAyB,CAAC;AAMjC,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,cAAc,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,UAAU,aAAa;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD,eAAO,MAAM,UAAU,GAAU,8BAI9B,aAAa,4DAQf,CAAC;AAEF,eAAO,MAAM,eAAe,GAAU,QAAQ,MAAM,EAAE,QAAQ,MAAM;;EAQnE,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { IntentAware } from '../../types';
|
|
2
1
|
import { IKosDataModel, TroubleAware } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { IntentAware } from '../../types';
|
|
5
3
|
export enum PourStatus {
|
|
6
4
|
IDLE = "idle",
|
|
7
5
|
POURING = "pouring",
|
|
8
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* @kosService dispense.pump
|
|
9
|
+
* @kosApiLevel 2
|
|
10
|
+
*/
|
|
9
11
|
export interface PumpOptions<AdditionalData extends object = any> {
|
|
10
12
|
inserted: boolean;
|
|
11
13
|
type: string;
|
|
@@ -32,6 +34,8 @@ interface IntentResponse {
|
|
|
32
34
|
|
|
33
35
|
/**
|
|
34
36
|
* @category Model
|
|
37
|
+
* @kosService dispense.pump
|
|
38
|
+
* @kosApiLevel 2
|
|
35
39
|
*/
|
|
36
40
|
export interface PumpModel<AdditionalData extends object = any>
|
|
37
41
|
extends IKosDataModel,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pump-trouble-resolver.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"pump-trouble-resolver.d.ts","sourceRoot":"","sources":["../../../../../../../packages/kos-dispense-sdk/src/models/models/pump/utils/pump-trouble-resolver.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAI5D,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,eAAO,MAAM,mBAAmB,GAAU,UAAU,MAAM,sBASzD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,SAAS,YAAY,CAAC,eAAe,CAAC,sBAOvC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/pump-container/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAClE,mBAAmB,SAAS,CAAC"}
|
|
@@ -1,85 +1,31 @@
|
|
|
1
|
-
import { PumpContainerModel, PumpContainerOptions } from './types';
|
|
2
1
|
import { SingletonKosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
|
|
2
|
+
import { PumpContainerModel, PumpContainerOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* @kosService dispense.pump
|
|
5
|
+
* @kosApiLevel 2
|
|
6
|
+
*/
|
|
4
7
|
export declare enum PumpIndex {
|
|
5
8
|
byBoard = "byBoard",
|
|
6
9
|
byType = "byType",
|
|
7
10
|
byNozzle = "byNozzle"
|
|
8
11
|
}
|
|
9
12
|
/**
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* The registration bean includes convenience methods for creating and working with PumpContainerModel instances.
|
|
13
|
-
*
|
|
14
|
-
* ## type
|
|
15
|
-
* The type property is a string that identifies the model type.
|
|
16
|
-
* 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
|
|
17
|
-
* used when declaring dependencies on models.
|
|
18
|
-
*
|
|
19
|
-
* @example
|
|
20
|
-
* ```typescript
|
|
21
|
-
*
|
|
22
|
-
* @kosDependency({modelType: PumpContainer.type})
|
|
23
|
-
* private holderContainerModel: PumpContainerModel;
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* ## factory
|
|
28
|
-
*
|
|
29
|
-
* The factory function that can be used to create new PumpContainerModel instances.
|
|
30
|
-
*
|
|
31
|
-
* As this is a singleton model, the factory function accepts the model options as its argument.
|
|
32
|
-
*
|
|
33
|
-
* If a model with the same model type already exists, the factory function will return the existing model. The options will be ignored
|
|
34
|
-
* in this case and the existing model will be returned in its current state.
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
13
|
+
* Registration bean for {@link PumpContainerModel}.
|
|
38
14
|
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
15
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
16
|
+
* - `factory`: `PumpContainer.factory(options)` returns the single instance, creating it on the first call.
|
|
17
|
+
* - `predicate`: type guard that narrows an `IKosDataModel` to `PumpContainerModel`.
|
|
18
|
+
* - `registration`: registry entry that can be spread into an `IKosRegistry["models"]` map.
|
|
42
19
|
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* [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 PumpContainerModel.
|
|
20
|
+
* PumpContainer is a singleton. `KosModelRegistry.dispense.models()` registers it.
|
|
46
21
|
*
|
|
47
22
|
* @example
|
|
48
23
|
* ```typescript
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
* if (PumpContainer.predicate(model)) {
|
|
53
|
-
* // if the function evaluates to true, the model is narrowed down to PumpContainerModel
|
|
54
|
-
* // and the compiler will know that the model has the PumpContainerModel interface
|
|
55
|
-
* model.updateAvailability(false);
|
|
56
|
-
* }
|
|
24
|
+
* @kosDependency({ modelType: PumpContainer.type })
|
|
25
|
+
* private pumpContainer!: PumpContainerModel;
|
|
57
26
|
* ```
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
|
|
61
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
62
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* @example
|
|
66
|
-
*
|
|
67
|
-
* In an application registration file you can declare the model registration as follows:
|
|
68
|
-
*
|
|
69
|
-
* **registration.ts**
|
|
70
|
-
* ```typescript
|
|
71
|
-
* import { PumpContainer } from "@kosdev-code/kos-dispense-sdk";
|
|
72
|
-
* ...
|
|
73
|
-
* import { IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
74
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
75
|
-
* ...PumpContainer.registration,
|
|
76
|
-
* };
|
|
77
|
-
* ```
|
|
78
|
-
*
|
|
79
|
-
* ## registration.singleton
|
|
80
|
-
* The PumpContainer model is a singleton. 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
|
-
* * */
|
|
27
|
+
* @kosService dispense.pump
|
|
28
|
+
* @kosApiLevel 2
|
|
29
|
+
*/
|
|
84
30
|
export declare const PumpContainer: SingletonKosModelRegistrationBean<PumpContainerModel, PumpContainerOptions>;
|
|
85
31
|
//# sourceMappingURL=pump-container-model.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pump-container-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"pump-container-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/pump-container/pump-container-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,iCAAiC,EAClC,MAAM,yBAAyB,CAAC;AASjC,OAAO,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAQxE;;;GAGG;AACH,oBAAY,SAAS;IACnB,OAAO,YAAY;IACnB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAqED;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,aAAa,EAAE,iCAAiC,CAC3D,kBAAkB,EAClB,oBAAoB,CAarB,CAAC"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { PumpModel } from '../../pump/types';
|
|
2
1
|
import { IKosDataModel, IKosModelContainer, IKosModelHolder } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { PumpModel } from '../../pump/types';
|
|
3
|
+
/**
|
|
4
|
+
* @kosService dispense.pump
|
|
5
|
+
* @kosApiLevel 2
|
|
6
|
+
*/
|
|
5
7
|
export interface PumpContainerOptions {}
|
|
6
8
|
|
|
7
9
|
/**
|
|
@@ -11,6 +13,8 @@ export interface PumpContainerOptions {}
|
|
|
11
13
|
*
|
|
12
14
|
*
|
|
13
15
|
* @category Model
|
|
16
|
+
* @kosService dispense.pump
|
|
17
|
+
* @kosApiLevel 2
|
|
14
18
|
*/
|
|
15
19
|
export interface PumpContainerModel<T extends object = unknown>
|
|
16
20
|
extends IKosDataModel,
|