@kosdev-code/kos-dispense-sdk 0.1.0-dev.5873 → 0.1.0-next.1000
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
package/index.js
CHANGED
|
@@ -1,119 +1,139 @@
|
|
|
1
1
|
import { registerApiLevels } from "@kosdev-code/kos-api-levels";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import "
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { createExtensionSchema, extensionPointId, defineExtensionPoint, createViewAwareTransform, validateWithSchema } from "@kosdev-code/kos-ui-plugin/utilities";
|
|
3
|
+
import { A, a, B, b, c, C, d, e, D, f, q, E, G, H, g, I, h, K, N, P, i, j, k, l, T, m, n, o, p, q as q2, r, s } from "./dispense-registration-manager-DtN0T_JG.js";
|
|
4
|
+
import { i as i2, a as a2, D as D2, b as b2, c as c2, d as d2, K as K2, e as e2, f as f2, g as g2 } from "./extension-utils-BoXtjU5_.js";
|
|
5
|
+
import { A as A2, a as a3, B as B2, b as b3, C as C2, c as c3, D as D3, d as d3, e as e3, f as f3, H as H2, g as g3, h as h2, i as i3, I as I2, j as j2, N as N2, P as P2, T as T2, k as k2, l as l2, m as m2, u, n as n2, o as o2, p as p2, q as q3, r as r2, s as s2, t, v, w, x, y, z, E as E2, F, G as G2, J, K as K3, L, M, O, Q, R, S, U, V, W, X, Y, Z, _, $, a0, a1, a2 as a22, a3 as a32, a4, a5, a6, a7, a8, a9, aa } from "./pump-provider-CPUsLke5.js";
|
|
6
|
+
const ControlPourSchema = createExtensionSchema({}, { rankable: false });
|
|
7
|
+
const EXTENSION_ID = extensionPointId("cui", "control", "pour");
|
|
8
|
+
const ControlPourExtension = defineExtensionPoint({
|
|
9
|
+
id: EXTENSION_ID,
|
|
10
|
+
contributionKey: "controlPour",
|
|
11
|
+
displayName: "Control Pour",
|
|
12
|
+
description: "Extension point for controlled pour plugin configurations with view support",
|
|
13
|
+
hasView: true,
|
|
14
|
+
isRankable: false,
|
|
15
|
+
schema: ControlPourSchema,
|
|
16
|
+
metadata: {
|
|
17
|
+
exportName: "ControlPourExtension",
|
|
18
|
+
category: "Dispense",
|
|
19
|
+
tags: ["pour", "control", "beverage"]
|
|
20
|
+
},
|
|
21
|
+
validate: (data, context) => {
|
|
22
|
+
validateWithSchema(ControlPourSchema, data, context);
|
|
23
|
+
},
|
|
24
|
+
transform: createViewAwareTransform()
|
|
25
|
+
});
|
|
26
|
+
const EXTENSION_POINT_CONTROL_POUR = EXTENSION_ID;
|
|
27
|
+
registerApiLevels({ "kos-dispense-sdk": 17 });
|
|
10
28
|
export {
|
|
11
29
|
A as Assembly,
|
|
12
30
|
A2 as AssemblyProvider,
|
|
13
31
|
i2 as AssemblyServices,
|
|
14
|
-
|
|
15
|
-
|
|
32
|
+
a2 as AssemblyTypes,
|
|
33
|
+
a as Availability,
|
|
16
34
|
a3 as AvailabilityProvider,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
35
|
+
B as Board,
|
|
36
|
+
b as BoardContainer,
|
|
37
|
+
c as BoardContainerModel,
|
|
38
|
+
B2 as BoardContainerProvider,
|
|
39
|
+
b3 as BoardProvider,
|
|
22
40
|
C as CONTEXT_ASSEMBLY_DATA,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
41
|
+
d as CONTEXT_ASSEMBLY_RAW_DATA,
|
|
42
|
+
ControlPourExtension,
|
|
43
|
+
C2 as CuiKit,
|
|
44
|
+
e as CuiKitState,
|
|
45
|
+
c3 as CuiKitWrapper,
|
|
46
|
+
D3 as DISPENSE_GROUP_BEVERAGE,
|
|
47
|
+
d3 as DISPENSE_GROUP_BRAND,
|
|
48
|
+
e3 as DISPENSE_GROUP_FLAVOR,
|
|
49
|
+
D as DeviceAssembly,
|
|
50
|
+
f3 as DeviceAssemblyProvider,
|
|
32
51
|
D2 as DispenseExtensionManager,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
52
|
+
f as DispenseModelType,
|
|
53
|
+
q as DispenserModels,
|
|
54
|
+
EXTENSION_POINT_CONTROL_POUR,
|
|
36
55
|
E as ExtensionType,
|
|
37
56
|
G as GenericPour,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
b2 as GenericPourServices,
|
|
58
|
+
H2 as HoldToPourIntentStrategy,
|
|
59
|
+
g3 as HoldToPourStrategy,
|
|
41
60
|
H as Holder,
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
61
|
+
g as HolderContainer,
|
|
62
|
+
h2 as HolderContainerProvider,
|
|
63
|
+
i3 as HolderProvider,
|
|
64
|
+
c2 as HolderServices,
|
|
46
65
|
I as Ingredient,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
66
|
+
h as IngredientContainer,
|
|
67
|
+
I2 as IngredientContainerProvider,
|
|
68
|
+
j2 as IngredientProvider,
|
|
69
|
+
d2 as IngredientServices,
|
|
51
70
|
K2 as KosExtensionManager,
|
|
52
71
|
K as KosModelRegistry,
|
|
53
72
|
N as Nozzle,
|
|
54
73
|
N2 as NozzleProvider,
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
e2 as NozzleServices,
|
|
75
|
+
P as PourContext,
|
|
76
|
+
i as PourState,
|
|
77
|
+
j as Pump,
|
|
78
|
+
k as PumpContainer,
|
|
79
|
+
l as PumpIndex,
|
|
61
80
|
P2 as PumpProvider,
|
|
62
|
-
|
|
81
|
+
f2 as PumpServices,
|
|
63
82
|
T as TOPIC_BOARD_LINKED,
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
83
|
+
m as TOPIC_BOARD_UNLINKED,
|
|
84
|
+
n as TOPIC_GENERIC_POUR_CANCEL,
|
|
85
|
+
o as TOPIC_GENERIC_POUR_PROGRESS,
|
|
86
|
+
p as TOPIC_GENERIC_POUR_STARTED,
|
|
87
|
+
T2 as TapOrHoldIntentStrategy,
|
|
88
|
+
k2 as TapToPourIntentStrategy,
|
|
89
|
+
l2 as TapToPourStrategy,
|
|
71
90
|
g2 as getFuelGaugeValue,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
r as
|
|
75
|
-
|
|
76
|
-
u as
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
91
|
+
m2 as initializeCuiKit,
|
|
92
|
+
q2 as kosModels,
|
|
93
|
+
r as registerCuiKitModels,
|
|
94
|
+
s as registerDispenseModels,
|
|
95
|
+
u as useAssembly,
|
|
96
|
+
n2 as useAssemblyContext,
|
|
97
|
+
o2 as useAvailability,
|
|
98
|
+
p2 as useAvailabilityContext,
|
|
99
|
+
q3 as useBeverages,
|
|
100
|
+
r2 as useBoard,
|
|
101
|
+
s2 as useBoardContainer,
|
|
102
|
+
t as useBoardContainerContext,
|
|
103
|
+
v as useBoardContext,
|
|
104
|
+
w as useBrands,
|
|
105
|
+
x as useCuiKit,
|
|
106
|
+
y as useCuiKitTimers,
|
|
107
|
+
z as useDefaultCuiKitLifecycle,
|
|
108
|
+
E2 as useDeviceAssembly,
|
|
109
|
+
F as useDeviceAssemblyContext,
|
|
110
|
+
G2 as useDispenseLifecycle,
|
|
111
|
+
J as useFlavors,
|
|
112
|
+
K3 as useGenericPour,
|
|
113
|
+
L as useHolder,
|
|
114
|
+
M as useHolderContainer,
|
|
115
|
+
O as useHolderContainerContext,
|
|
116
|
+
Q as useHolderContext,
|
|
117
|
+
R as useIngredient,
|
|
118
|
+
S as useIngredientContainer,
|
|
119
|
+
U as useIngredientContainerContext,
|
|
120
|
+
V as useIngredientContext,
|
|
121
|
+
W as useIngredientPour,
|
|
122
|
+
X as useNozzle,
|
|
123
|
+
Y as useNozzleContext,
|
|
124
|
+
Z as useNozzlePour,
|
|
125
|
+
_ as usePourTarget,
|
|
126
|
+
$ as usePumpContext,
|
|
127
|
+
a0 as withAssembly,
|
|
128
|
+
a1 as withBeverage,
|
|
129
|
+
a22 as withBoard,
|
|
130
|
+
a32 as withBoardContainer,
|
|
131
|
+
a4 as withDeviceAssembly,
|
|
132
|
+
a5 as withGenericPour,
|
|
133
|
+
a6 as withHolder,
|
|
134
|
+
a7 as withHolderContainer,
|
|
135
|
+
a8 as withIngredient,
|
|
136
|
+
a9 as withIngredientContainer,
|
|
137
|
+
aa as withNozzle
|
|
118
138
|
};
|
|
119
139
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../packages/kos-dispense-sdk/src/extensions/control-pour-extension.ts","../../../packages/kos-dispense-sdk/src/index.ts"],"sourcesContent":["// eslint-disable-next-line @nx/enforce-module-boundaries\nimport type { ValidationContext } from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport {\n createExtensionSchema,\n extensionPointId,\n createViewAwareTransform,\n defineExtensionPoint,\n validateWithSchema,\n} from \"@kosdev-code/kos-ui-plugin/utilities\";\nimport { z } from \"zod\";\n\n// Define the Zod schema for Control Pour contributions\nconst ControlPourSchema = createExtensionSchema({}, { rankable: false });\n\n// Define the control pour types locally\ntype ControlPourDefinition = z.infer<typeof ControlPourSchema>;\n\nconst EXTENSION_ID = extensionPointId(\"cui\", \"control\", \"pour\");\n\n/**\n * Control Pour extension point for beverage dispensing interfaces\n *\n * Allows plugin developers to contribute controlled pour functionality\n * to CUI applications that register this extension point.\n */\nexport const ControlPourExtension = defineExtensionPoint<\n ControlPourDefinition,\n ControlPourDefinition\n>({\n id: EXTENSION_ID,\n contributionKey: \"controlPour\",\n displayName: \"Control Pour\",\n description:\n \"Extension point for controlled pour plugin configurations with view support\",\n hasView: true,\n isRankable: false,\n\n schema: ControlPourSchema,\n metadata: {\n exportName: \"ControlPourExtension\",\n category: \"Dispense\",\n tags: [\"pour\", \"control\", \"beverage\"],\n },\n\n validate: (data: ControlPourDefinition, context: ValidationContext) => {\n // Use Zod validation\n validateWithSchema(ControlPourSchema, data, context);\n },\n\n transform: createViewAwareTransform<ControlPourDefinition>(),\n});\n\n// Export constants for backward compatibility\nexport const EXTENSION_POINT_CONTROL_POUR = EXTENSION_ID;\nexport type { ControlPourDefinition };\n","import { registerApiLevels } from \"@kosdev-code/kos-api-levels\";\n\n// Registers the package-level API integer for this SDK.\n// The per-service catalog (which services changed and why) lives in\n// kos-api-levels/generated/api-archaeology-report.md, produced by the archaeology scanner.\nregisterApiLevels({ \"kos-dispense-sdk\": 17 });\n\nexport * from \"./extensions\";\nexport * from \"./models\";\nexport { kosModels as DispenserModels } from \"./models\";\nexport * from \"./models/models/generic-pour\";\nexport * from \"./ui\";\n"],"names":[],"mappings":";;;;;AAYA,MAAM,oBAAoB,sBAAsB,CAAA,GAAI,EAAE,UAAU,OAAO;AAKvE,MAAM,eAAe,iBAAiB,OAAO,WAAW,MAAM;AAQvD,MAAM,uBAAuB,qBAGlC;AAAA,EACA,IAAI;AAAA,EACJ,iBAAiB;AAAA,EACjB,aAAa;AAAA,EACb,aACE;AAAA,EACF,SAAS;AAAA,EACT,YAAY;AAAA,EAEZ,QAAQ;AAAA,EACR,UAAU;AAAA,IACR,YAAY;AAAA,IACZ,UAAU;AAAA,IACV,MAAM,CAAC,QAAQ,WAAW,UAAU;AAAA,EAAA;AAAA,EAGtC,UAAU,CAAC,MAA6B,YAA+B;AAErE,uBAAmB,mBAAmB,MAAM,OAAO;AAAA,EACrD;AAAA,EAEA,WAAW,yBAAA;AACb,CAAC;AAGM,MAAM,+BAA+B;AChD5C,kBAAkB,EAAE,oBAAoB,IAAI;"}
|
|
@@ -3,73 +3,14 @@
|
|
|
3
3
|
* */
|
|
4
4
|
export declare enum ExtensionType {
|
|
5
5
|
/**
|
|
6
|
-
* Loads data that
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
* The following example shows how to load the brandset data, normalize it into a map and then provide it back to the framework
|
|
10
|
-
* where it can be used by the other extension points.
|
|
11
|
-
*
|
|
12
|
-
* In the ingredient container model, the data is provided to the {@link IngredientMapper} extension point in order to augment ingredient data
|
|
13
|
-
* and also loaded into the ingredient container model context in order to make the data available throughout the code.
|
|
14
|
-
*
|
|
15
|
-
* ```typescript
|
|
16
|
-
* export const ingredientContextLoader = async (): Promise<BeverageContext> => {
|
|
17
|
-
* const response = await kosFetch('kos:/system/some/ingredient/endpoint.json');
|
|
18
|
-
*
|
|
19
|
-
* if (response.status !== 200) {
|
|
20
|
-
* KosLog.error('Failed to load ingredient data');
|
|
21
|
-
* return {};
|
|
22
|
-
* }
|
|
23
|
-
* const json = await response.json();
|
|
24
|
-
* return json;
|
|
25
|
-
* };
|
|
26
|
-
* ```
|
|
27
|
-
* */
|
|
6
|
+
* Loads data that is passed as context to the {@link IngredientMapper}. Register with
|
|
7
|
+
* {@link DispenseExtensionManager.registerIngredientLoader}.
|
|
8
|
+
*/
|
|
28
9
|
IngredientLoader = "kos.ingredient.loader",
|
|
29
10
|
/**
|
|
30
|
-
* Maps data into the {@link IngredientModel}
|
|
31
|
-
*
|
|
32
|
-
|
|
33
|
-
* not provided by the base KOS Ingredient model. The {@link IngredientMapper} extension point allows for the data to be mapped
|
|
34
|
-
* into the {@link IngredientModel} and the {@link IngredientModel.data} property to be augmented with additional properties.
|
|
35
|
-
*
|
|
36
|
-
* @example
|
|
37
|
-
* The following example shows how to map the data from the service response into the {@link IngredientModel}.
|
|
38
|
-
* The context is provided by the {@link IngredientLoader} extension point with its data being used to optionally augment the
|
|
39
|
-
* ingredient data.
|
|
40
|
-
*
|
|
41
|
-
* The result of the mapping will be available in the `data` property of the {@link IngredientModel}.
|
|
42
|
-
*
|
|
43
|
-
* In this case the `IngedientReponseData` interface represents the data being returned by the ingredient service and the
|
|
44
|
-
* `IngredientData` interface represents the data that will be available in the {@link IngredientModel.data} property. The `ingredientDataMapper`
|
|
45
|
-
* is responsible for mapping from one format to the other.
|
|
46
|
-
*
|
|
47
|
-
* ```typescript
|
|
48
|
-
*
|
|
49
|
-
* interface IngredientResponseData extends NozzleServices.IngredientResponse {
|
|
50
|
-
* chilled: boolean;
|
|
51
|
-
* carbonated: boolean;
|
|
52
|
-
* highYield: boolean;
|
|
53
|
-
* }
|
|
54
|
-
*
|
|
55
|
-
* interface IngredientData {
|
|
56
|
-
* chilled: boolean;
|
|
57
|
-
* carbonated: boolean;
|
|
58
|
-
* highYield: boolean;
|
|
59
|
-
* }
|
|
60
|
-
*
|
|
61
|
-
* export const ingredientDataMapper = async (
|
|
62
|
-
* data: IngredientResponseData,
|
|
63
|
-
* context: IngredientContext
|
|
64
|
-
* ): Promise<IngredientData> => {
|
|
65
|
-
* return {
|
|
66
|
-
* chilled: data.chilled,
|
|
67
|
-
* carbonated: data.carbonated,
|
|
68
|
-
* highYield: data.highYield,
|
|
69
|
-
* }
|
|
70
|
-
* }
|
|
71
|
-
* ```
|
|
72
|
-
* */
|
|
11
|
+
* Maps ingredient service data into the `data` property of the {@link IngredientModel}, for properties the
|
|
12
|
+
* base model does not carry. Register with {@link DispenseExtensionManager.registerIngredientDataMapper}.
|
|
13
|
+
*/
|
|
73
14
|
IngredientMapper = "kos.ingredient.mapper",
|
|
74
15
|
IngredientIndex = "kos.ingredient.index",
|
|
75
16
|
/**
|
|
@@ -89,127 +30,22 @@ export declare enum ExtensionType {
|
|
|
89
30
|
* */
|
|
90
31
|
HolderIngredientMapper = "kos.holder.ingredient.mapper",
|
|
91
32
|
/**
|
|
92
|
-
* Maps data into the {@link AvailabilityModel}
|
|
93
|
-
*
|
|
94
|
-
|
|
95
|
-
* The following example shows how to map the data from the service response into the {@link AvailabilityModel}.
|
|
96
|
-
* The context is provided by the {@link AvailabilityLoader} extension point with its data being used to augment the
|
|
97
|
-
* availability data.
|
|
98
|
-
*
|
|
99
|
-
* The result of the mapping will be available in the `data` property of the {@link AvailabilityModel}.
|
|
100
|
-
*
|
|
101
|
-
* ```typescript
|
|
102
|
-
* export const beverageDataMapper = async (
|
|
103
|
-
* data: NozzleServices.BeverageResponse,
|
|
104
|
-
* context: BeverageContext
|
|
105
|
-
* ): Promise<BeverageData> => {
|
|
106
|
-
* const id = data.altId;
|
|
107
|
-
* const iconUrl = encodeURI(
|
|
108
|
-
* `http://localhost:8081/system/brandset/${context?.[id]?.icon}`
|
|
109
|
-
* );
|
|
110
|
-
* const cuiColorCode = context?.[id]?.cuiColorCode
|
|
111
|
-
* ? context?.[id]?.cuiColorCode
|
|
112
|
-
* : '';
|
|
113
|
-
* return { iconUrl, cuiColorCode };
|
|
114
|
-
* };
|
|
115
|
-
* ```
|
|
116
|
-
* */
|
|
33
|
+
* Maps availability service data into the `data` property of the {@link AvailabilityModel}. Register with
|
|
34
|
+
* {@link DispenseExtensionManager.registerAvailabilityDataMapper}.
|
|
35
|
+
*/
|
|
117
36
|
AvailabilityMapper = "kos.availability.mapper",
|
|
118
37
|
/**
|
|
119
|
-
* Loads data that
|
|
120
|
-
*
|
|
121
|
-
|
|
122
|
-
* A common use case is to load brandset data that is UI specific and not provided directly by the Java service.
|
|
123
|
-
*
|
|
124
|
-
* The following example shows how to load the brandset data, normalize it into a map and then provide it back to the framework
|
|
125
|
-
* where it can be used by the other extension points.
|
|
126
|
-
*
|
|
127
|
-
* In the nozzle model, the data is provided to the {@link AvailabilityMapper} extension point in order to augment availability data
|
|
128
|
-
* and also loaded into the nozzle model context in order to make the data available throughout the code.
|
|
129
|
-
*
|
|
130
|
-
* ```typescript
|
|
131
|
-
* export const beverageContextLoader = async (): Promise<BeverageContext> => {
|
|
132
|
-
* const response = await kosFetch('kos:/system/brandset/brandset.json');
|
|
133
|
-
*
|
|
134
|
-
* if (response.status !== 200) {
|
|
135
|
-
* KosLog.error('Failed to load beverage data');
|
|
136
|
-
* return {};
|
|
137
|
-
* }
|
|
138
|
-
* const json: BrandsetResponse | null = await response.json();
|
|
139
|
-
* const initialBeverages: Record<string, BrandsetIngredient> = {};
|
|
140
|
-
* const beverages = json?.ingredients?.reduce((acc, beverage) => {
|
|
141
|
-
* acc[beverage.ingredientId] = beverage;
|
|
142
|
-
* return acc;
|
|
143
|
-
* }, initialBeverages);
|
|
144
|
-
* return beverages;
|
|
145
|
-
* };
|
|
146
|
-
* ```
|
|
147
|
-
* */
|
|
38
|
+
* Loads data that is passed as context to the {@link AvailabilityMapper}, such as UI-specific brandset data.
|
|
39
|
+
* Register with {@link DispenseExtensionManager.registerAvailabilityLoader}.
|
|
40
|
+
*/
|
|
148
41
|
AvailabilityLoader = "kos.availability.loader",
|
|
149
42
|
/**
|
|
150
43
|
* Maps the abstract {@link SelectedPourable} data into a format that is specific to the nozzle.
|
|
151
44
|
* */
|
|
152
45
|
SelectedPourableMapper = "kos.selected.pourable.mapper",
|
|
153
46
|
/**
|
|
154
|
-
* Maps
|
|
155
|
-
*
|
|
156
|
-
* point allows for the data to be mapped into the {@link AssemblyModel} and augmented with additional properties.
|
|
157
|
-
*
|
|
158
|
-
* @example
|
|
159
|
-
*
|
|
160
|
-
* In this example of an implementation of a {@link AssemblyMapper}, the {@link AssemblyResponse} data is mapped into
|
|
161
|
-
* a {@link FreestyleAssembly} object.
|
|
162
|
-
*
|
|
163
|
-
* The {@link FreestyleAssemblyResponse} interface represents the additional data being returned by the assembly service and is
|
|
164
|
-
* merged into the {@link AssemblyResponse} interface.
|
|
165
|
-
*
|
|
166
|
-
* The {@link FreestyleAssembly} interface represents the additional data, beyond the base data set, that will be merged into the {@link AssemblyModel}.
|
|
167
|
-
*
|
|
168
|
-
* The mapper is responsible for mapping from the {@link FreestyleAssemblyResponse} format to the {@link FreestyleAssembly} format.
|
|
169
|
-
* ```typescript
|
|
170
|
-
* import { AssemblyTypes } from "@kosdev-code/kos-dispense-sdk";
|
|
171
|
-
* import { DataMapper } from "@kosdev-code/kos-ui-sdk";
|
|
172
|
-
*
|
|
173
|
-
* // define the additional data being returned by the assembly service
|
|
174
|
-
* export interface FreestyleAssemblyResponse {
|
|
175
|
-
* iceAgitator?: {
|
|
176
|
-
* name: "iceAgitator";
|
|
177
|
-
* path: string;
|
|
178
|
-
* };
|
|
179
|
-
* }
|
|
180
|
-
*
|
|
181
|
-
* // define the additional data structure that will be merged into the assembly model
|
|
182
|
-
* export interface FreestyleAssembly {
|
|
183
|
-
* iceAgitator: {
|
|
184
|
-
* path: string;
|
|
185
|
-
* };
|
|
186
|
-
* carbAgitator: {
|
|
187
|
-
* path: string;
|
|
188
|
-
* };
|
|
189
|
-
* }
|
|
190
|
-
*
|
|
191
|
-
*
|
|
192
|
-
* // define the mapper that will map the data from the service response into the additional data structure
|
|
193
|
-
* // that will be merged into the assembly model.
|
|
194
|
-
* // In this case the mapper is responsible for mapping from the {@link FreestyleAssemblyResponse} format to the {@link FreestyleAssembly} format.
|
|
195
|
-
* export const assemblyDataMapper: DataMapper<
|
|
196
|
-
* AssemblyTypes.AssemblyResponse<FreestyleAssemblyResponse>,
|
|
197
|
-
* FreestyleAssembly
|
|
198
|
-
* > = async (data) => {
|
|
199
|
-
* const response = data.assemblies.reduce((acc, assembly) => {
|
|
200
|
-
* const agitatorKeys = ["iceAgitator", "carbAgitator"];
|
|
201
|
-
* agitatorKeys.forEach((key) => {
|
|
202
|
-
* const agitator = assembly[key];
|
|
203
|
-
* if (agitator) {
|
|
204
|
-
* acc[key] = agitator;
|
|
205
|
-
* }
|
|
206
|
-
* });
|
|
207
|
-
*
|
|
208
|
-
* return acc;
|
|
209
|
-
* }, {} as FreestyleAssembly);
|
|
210
|
-
* return response;
|
|
211
|
-
* };
|
|
212
|
-
*```
|
|
47
|
+
* Maps additional assembly response properties into the {@link AssemblyModel}, for backends that extend the
|
|
48
|
+
* base assembly. Register with {@link DispenseExtensionManager.registerAssemblyDataMapper}.
|
|
213
49
|
*/
|
|
214
50
|
AssemblyMapper = "kos.assembly.mapper",
|
|
215
51
|
BoardMapper = "kos.board.mapper",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../packages/kos-dispense-sdk/src/models/constants/constants.ts"],"names":[],"mappings":"AAAA;;KAEK;AACL,oBAAY,aAAa;IACvB;;;OAGG;IACH,gBAAgB,0BAA0B;IAE1C;;;OAGG;IACH,gBAAgB,0BAA0B;IAE1C,eAAe,yBAAyB;IACxC;;SAEK;IACL,oBAAoB,+BAA+B;IAEnD;;SAEK;IACL,gBAAgB,2BAA2B;IAE3C,YAAY,sBAAsB;IAElC,WAAW,qBAAqB;IAChC;;;;SAIK;IACL,sBAAsB,iCAAiC;IAEvD;;;OAGG;IACH,kBAAkB,4BAA4B;IAE9C;;;OAGG;IACH,kBAAkB,4BAA4B;IAE9C;;SAEK;IACL,sBAAsB,iCAAiC;IAEvD;;;OAGG;IACH,cAAc,wBAAwB;IACtC,WAAW,qBAAqB;IAChC,UAAU,oBAAoB;IAC9B,SAAS,mBAAmB;IAC5B,oBAAoB,+BAA+B;CACpD;AAED,oBAAY,iBAAiB;IAC3B,MAAM,iBAAiB;IACvB,YAAY,uBAAuB;IACnC,MAAM,iBAAiB;IACvB,eAAe,2BAA2B;IAC1C,mBAAmB,+BAA+B;IAClD,UAAU,qBAAqB;IAC/B,IAAI,eAAe;IACnB,aAAa,yBAAyB;CACvC"}
|
|
@@ -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/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
|
package/models/index.d.ts.map
CHANGED
|
@@ -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/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,uCAAuC,CAAC;AACtD,cAAc,yBAAyB,CAAC;AACxC,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { PumpModel } from '../pump';
|
|
2
|
-
import { HolderModel } from '../holder';
|
|
3
|
-
import { BoardModel } from '../board';
|
|
4
|
-
import { AssemblyModel, AssemblyOptions } from './types';
|
|
5
1
|
import { IKosModelLogger, KosContext, KosContextLogger, KosCreationContext } from '@kosdev-code/kos-ui-sdk';
|
|
6
|
-
|
|
2
|
+
import { AssemblyModel, AssemblyOptions } from './types';
|
|
3
|
+
import { BoardModel } from '../board';
|
|
4
|
+
import { HolderModel } from '../holder';
|
|
5
|
+
import { PumpModel } from '../pump';
|
|
7
6
|
export declare const MODEL_TYPE = "assembly-model";
|
|
7
|
+
/**
|
|
8
|
+
* @kosService dispense.assembly
|
|
9
|
+
* @kosApiLevel 2
|
|
10
|
+
*/
|
|
8
11
|
export declare const CONTEXT_ASSEMBLY_DATA = "assembly-data";
|
|
12
|
+
/**
|
|
13
|
+
* @kosService dispense.assembly
|
|
14
|
+
* @kosApiLevel 9
|
|
15
|
+
*/
|
|
9
16
|
export declare const CONTEXT_ASSEMBLY_RAW_DATA = "assembly-raw-data";
|
|
10
17
|
/**
|
|
11
18
|
* @kosService dispense.assembly
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-model.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"assembly-model.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/assembly/assembly-model.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAEnB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAG9D,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,WAAW,CAAC;AAK7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzC,eAAO,MAAM,UAAU,mBAAmB,CAAC;AAC3C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,kBAAkB,CAAC;AACrD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,sBAAsB,CAAC;AAC7D;;;GAGG;AACH,qBACa,iBAAiB,CAC5B,WAAW,SAAS,MAAM,GAAG,GAAG,EAChC,SAAS,SAAS,MAAM,GAAG,GAAG,CAC9B,YAAW,aAAa,CAAC,WAAW,CAAC,EAAE,eAAe;IAEtD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,CAAC,YAAY,CAAqB;IAIzC,OAAO,CAAC,gBAAgB,CAAyB;IAEvC,OAAO,CAAC,eAAe,CAAuB;IAC9C,OAAO,CAAC,cAAc,CAAsB;IAC5C,OAAO,CAAC,aAAa,CAAqB;IACpD,MAAM,EAAE,gBAAgB,CAAC;gBAEvB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,eAAe,EACzB,OAAO,EAAE,kBAAkB;IAS7B,WAAW,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAI5C,IAAI,UAAU,IAAI,WAAW,CAAC,SAAS,CAAC,EAAE,CAEzC;IAED,IAAI,YAAY,IAAI,MAAM,EAAE,CAE3B;IAED,IAAI,WAAW,IAAI,MAAM,EAAE,CAE1B;IACD,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,EAAE;IAI1D,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,WAAW,CAAC,SAAS,CAAC,EAAE;IAIhE;;;;;OAKG;IACH,IAAI,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAEpD;IAED;;OAEG;IACH,IAAI,SAAS,IAAI,MAAM,EAAE,CAExB;IAED,IAAI,MAAM,IAAI,UAAU,CAAC,GAAG,CAAC,EAAE,CAE9B;IAIK,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrB,KAAK;IAQL,IAAI,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;CAqF/C"}
|
|
@@ -1,81 +1,22 @@
|
|
|
1
|
-
import { AssemblyModel, AssemblyOptions } from './types';
|
|
2
1
|
import { SingletonKosModelRegistrationBean } from '@kosdev-code/kos-ui-sdk';
|
|
3
|
-
|
|
2
|
+
import { AssemblyModel, AssemblyOptions } from './types';
|
|
4
3
|
/**
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* The registration bean includes convenience methods for creating and working with AssemblyModel 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: Assembly.type, id: "assemblyId"})
|
|
18
|
-
* private assemblyModel: AssemblyModel;
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* ## factory
|
|
23
|
-
*
|
|
24
|
-
* The factory method creates a factory function that can be used to create new AssemblyModel instances.
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
* The factory function is a curried function that takes the model id as the first argument and the options as the second argument.
|
|
28
|
-
*
|
|
29
|
-
* If a model with the specified id already exists, the factory function will return the existing model. The options will be ignored
|
|
30
|
-
* in this case and the existing model will be returned in its current state.
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* ```typescript
|
|
34
|
-
* const model = Assembly.factory("assemblyId")({
|
|
35
|
-
* // Add option data
|
|
36
|
-
* });
|
|
37
|
-
* ```
|
|
38
|
-
|
|
39
|
-
|
|
4
|
+
* Registration bean for {@link AssemblyModel}.
|
|
40
5
|
*
|
|
41
|
-
*
|
|
6
|
+
* - `type`: the model type, used by the model registry and in `@kosDependency` declarations.
|
|
7
|
+
* - `factory`: `Assembly.factory(options)` returns the single instance, creating it on the first call.
|
|
8
|
+
* - `predicate`: type guard that narrows an `IKosDataModel` to `AssemblyModel`.
|
|
9
|
+
* - `registration`: registry entry that can be spread into an `IKosRegistry["models"]` map.
|
|
42
10
|
*
|
|
43
|
-
*
|
|
11
|
+
* Assembly is a singleton. `KosModelRegistry.dispense.models()` registers it.
|
|
44
12
|
*
|
|
45
13
|
* @example
|
|
46
14
|
* ```typescript
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
* if (Assembly.predicate(model)) {
|
|
51
|
-
* // if the function evaluates to true, the model is narrowed down to AssemblyModel
|
|
52
|
-
* // and the compiler will know that the model has the AssemblyModel interface
|
|
53
|
-
* model.updateAvailability(false);
|
|
54
|
-
* }
|
|
15
|
+
* @kosDependency({ modelType: Assembly.type })
|
|
16
|
+
* private assembly!: AssemblyModel;
|
|
55
17
|
* ```
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
|
|
59
|
-
* The registration property is an object that can be used to simplify registration of the model with the model registry. The registration object
|
|
60
|
-
* can be spread into the model registration and provides all of the required information to register the model implementation class against the model type.
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* @example
|
|
64
|
-
*
|
|
65
|
-
* In an application registration file you can declare the model registration as follows:
|
|
66
|
-
*
|
|
67
|
-
* **registration.ts**
|
|
68
|
-
* ```typescript
|
|
69
|
-
* import { Assembly } from "@kosdev-code/kos-dispense-sdk";
|
|
70
|
-
* ...
|
|
71
|
-
* import { ExtensionManager, IKosRegistry } from "@kosdev-code/kos-ui-sdk";
|
|
72
|
-
* export const kosModels: IKosRegistry["models"] = {
|
|
73
|
-
* ...Assembly.registration,
|
|
74
|
-
* };
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* ## registration.singleton
|
|
78
|
-
* The assembly model is a singleton model. This means that each time the factory function the same instance of the model will be returned.
|
|
79
|
-
* */
|
|
18
|
+
* @kosService dispense.assembly
|
|
19
|
+
* @kosApiLevel 2
|
|
20
|
+
*/
|
|
80
21
|
export declare const Assembly: Readonly<SingletonKosModelRegistrationBean<AssemblyModel, AssemblyOptions>>;
|
|
81
22
|
//# sourceMappingURL=assembly-registration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembly-registration.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"assembly-registration.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/assembly/assembly-registration.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AAGjF,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE9D;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,QAAQ,EAAE,QAAQ,CAC7B,iCAAiC,CAAC,aAAa,EAAE,eAAe,CAAC,CAWlE,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { AssemblyBoard } from '../types/assembly';
|
|
2
1
|
import { BoardContainerModel } from '../board';
|
|
3
|
-
|
|
2
|
+
import { AssemblyBoard } from '../types/assembly';
|
|
4
3
|
export declare const mapAssemblyBoardToModel: <AssemblyBoardResponseExt extends object = any, BoardExt extends object = any>(board: AssemblyBoard<AssemblyBoardResponseExt>) => Promise<import('../board').BoardModel<{}>>;
|
|
5
4
|
export declare const assemblyBoardMap: (boardContainer: BoardContainerModel) => (board: AssemblyBoard) => Promise<void>;
|
|
6
5
|
//# sourceMappingURL=board-utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"board-utils.d.ts","sourceRoot":"","sources":["../../../../../../packages/kos-dispense-sdk/src/models/models/assembly/board-utils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAS,KAAK,mBAAmB,EAAqB,MAAM,UAAU,CAAC;AAC9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAMvD,eAAO,MAAM,uBAAuB,GAClC,wBAAwB,SAAS,MAAM,GAAG,GAAG,EAC7C,QAAQ,SAAS,MAAM,GAAG,GAAG,EAE7B,OAAO,aAAa,CAAC,wBAAwB,CAAC,+CA0B/C,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAC1B,gBAAgB,mBAAmB,MAAY,OAAO,aAAa,kBAInE,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { AssemblyHolder } from '../types/assembly';
|
|
2
1
|
import { HolderModel } from '../holder/types';
|
|
3
|
-
|
|
2
|
+
import { AssemblyHolder } from '../types/assembly';
|
|
4
3
|
export declare const mapAssemblyHolderToModel: <AssemblyHolderResponseExt extends object = any, HolderExt extends object = any>(group: string, holderData: AssemblyHolder<AssemblyHolderResponseExt>) => Promise<HolderModel<HolderExt>>;
|
|
5
4
|
//# sourceMappingURL=holder-utils.d.ts.map
|