@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5873 → 0.1.0-dev.5880
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{extension-utils-CFD54lr3.js → extension-utils-BmYlSFBk.js} +2 -2
- package/{extension-utils-CFD54lr3.js.map → extension-utils-BmYlSFBk.js.map} +1 -1
- package/{extension-utils-D3-Gwy8G.cjs → extension-utils-CfoCVS2Q.cjs} +2 -2
- package/{extension-utils-D3-Gwy8G.cjs.map → extension-utils-CfoCVS2Q.cjs.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +3 -3
- package/kos-models.json +1 -1
- package/models/models/fcm-pump/fcm-pump-model.d.ts +1 -1
- package/models/models/fcm-pump/services/fcm-pump-services.d.ts +1 -1
- package/models/models/fcm-pump/services/fcm-pump-services.d.ts.map +1 -1
- package/models.cjs +1 -1
- package/models.js +2 -2
- package/package.json +4 -4
- package/{service-DildzPxj.js → service-CWOr4GoM.js} +39 -40
- package/service-CWOr4GoM.js.map +1 -0
- package/service-DSYXBBUw.cjs +2 -0
- package/service-DSYXBBUw.cjs.map +1 -0
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/{use-nutrition-info-DP_JHkR0.js → use-nutrition-info-C-xQQgQc.js} +2 -2
- package/{use-nutrition-info-DP_JHkR0.js.map → use-nutrition-info-C-xQQgQc.js.map} +1 -1
- package/{use-nutrition-info-DMKLi-5k.cjs → use-nutrition-info-CkwUK6FN.cjs} +2 -2
- package/{use-nutrition-info-DMKLi-5k.cjs.map → use-nutrition-info-CkwUK6FN.cjs.map} +1 -1
- package/service-8u3gW6pr.cjs +0 -2
- package/service-8u3gW6pr.cjs.map +0 -1
- package/service-DildzPxj.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var Pt = Object.defineProperty;
|
|
2
2
|
var vt = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var s = (e, t, r) => (vt(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
-
import { resolveServiceUrl as M, ServiceFactory as R, KosLog as C, createPropKey as G, kosStateProp as O, kosConfigProperty as b, kosStateEntry as Pe, kosStateExit as _t, kosStateGuard as ve, kosFuture as I, kosModel as f, kosLoggerAware as D, kosCompanion as oe, kosFutureAware as xe, kosStateMachine as Tt, DependencyLifecycle as qe, KosModelContainer as It, kosChild as Ge, kosModelEffect as _e, EventBus as k, KosModelRegistrationFactory as F, SingletonKosModelRegistrationFactory as Te, FetchError as Ie, FutureManager as y, FutureEndState as U, FutureHandler as Ue, kosParentAware as je, KosFeatureFlags as de, getKosCompanionModel as $t, getKosModelSync as
|
|
4
|
+
import { resolveServiceUrl as M, ServiceFactory as R, KosLog as C, createPropKey as G, kosStateProp as O, kosConfigProperty as b, kosStateEntry as Pe, kosStateExit as _t, kosStateGuard as ve, kosFuture as I, kosModel as f, kosLoggerAware as D, kosCompanion as oe, kosFutureAware as xe, kosStateMachine as Tt, DependencyLifecycle as qe, KosModelContainer as It, kosChild as Ge, kosModelEffect as _e, EventBus as k, KosModelRegistrationFactory as F, SingletonKosModelRegistrationFactory as Te, FetchError as Ie, FutureManager as y, FutureEndState as U, FutureHandler as Ue, kosParentAware as je, KosFeatureFlags as de, getKosCompanionModel as $t, getKosModelSync as w, kosContainerAware as Ct, KosContextManager as Ot, kosAction as Z, KOS_MODEL_ID as $, kosMultipleFutureAware as Et, kosTopicHandler as St, modelTypeEventTopicFactory as wt, RegistrationManager as m, registerCoreModels as At, Trouble as Mt, ExtensionManager as pe, EXTENSION_TROUBLE_DATA_MAPPER as ge, createClient as H, kosServiceRequest as B } from "@kosdev-code/kos-ui-sdk";
|
|
5
5
|
import { PourState as d, Assembly as Ve, KosModelRegistry as Rt, registerDispenseModels as Dt, Nozzle as Ft, Pump as Nt, Holder as zt, PumpContainer as Lt, PumpIndex as xt } from "@kosdev-code/kos-dispense-sdk";
|
|
6
6
|
const { URL: He } = M("ICE_AGITATOR_SERVICE"), { postModel: qt } = R.build({
|
|
7
7
|
basePath: `${He}/api/ext/freestyle/ice`
|
|
@@ -416,7 +416,7 @@ var Xe = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Jt = (e, t
|
|
|
416
416
|
return o && a && Xe(t, r, a), a;
|
|
417
417
|
}, er = (e, t, r) => (Jt(e, t + "", r), r);
|
|
418
418
|
const tr = "cgp-pump-model", Oe = G("statePath");
|
|
419
|
-
let
|
|
419
|
+
let A = class {
|
|
420
420
|
constructor(e, t) {
|
|
421
421
|
s(this, "highProbeWet");
|
|
422
422
|
s(this, "lowProbeWet");
|
|
@@ -430,33 +430,33 @@ let w = class {
|
|
|
430
430
|
return this.state.path;
|
|
431
431
|
}
|
|
432
432
|
};
|
|
433
|
-
er(
|
|
433
|
+
er(A, "Registration");
|
|
434
434
|
se([
|
|
435
435
|
O({
|
|
436
436
|
path: Oe,
|
|
437
437
|
attribute: "highProbeWet"
|
|
438
438
|
})
|
|
439
|
-
],
|
|
439
|
+
], A.prototype, "highProbeWet", 2);
|
|
440
440
|
se([
|
|
441
441
|
O({
|
|
442
442
|
path: Oe,
|
|
443
443
|
attribute: "lowProbeWet"
|
|
444
444
|
})
|
|
445
|
-
],
|
|
445
|
+
], A.prototype, "lowProbeWet", 2);
|
|
446
446
|
se([
|
|
447
447
|
O({
|
|
448
448
|
path: Oe,
|
|
449
449
|
attribute: "filling"
|
|
450
450
|
})
|
|
451
|
-
],
|
|
452
|
-
|
|
451
|
+
], A.prototype, "filling", 2);
|
|
452
|
+
A = se([
|
|
453
453
|
f({ modelTypeId: tr, singleton: !1 }),
|
|
454
454
|
oe({
|
|
455
455
|
mode: "composition"
|
|
456
456
|
}),
|
|
457
457
|
D()
|
|
458
|
-
],
|
|
459
|
-
const rr =
|
|
458
|
+
], A);
|
|
459
|
+
const rr = A.Registration, { URL: j } = M("FCM-PUMP_SERVICE"), { postModel: K } = R.build({
|
|
460
460
|
basePath: `${j}/api/fcm-pump`
|
|
461
461
|
}), h = C.createLogger({
|
|
462
462
|
name: "fcm-pump-service",
|
|
@@ -554,7 +554,7 @@ const rr = w.Registration, { URL: j } = M("FCM-PUMP_SERVICE"), { postModel: K }
|
|
|
554
554
|
};
|
|
555
555
|
return y.initiateFuture(a), a;
|
|
556
556
|
}
|
|
557
|
-
}, nr = (e) => e
|
|
557
|
+
}, nr = (e) => e.status === 200 && !e.data ? "success" : e.data, lr = async (e, t, r) => {
|
|
558
558
|
h.debug(
|
|
559
559
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
560
560
|
);
|
|
@@ -565,11 +565,10 @@ const rr = w.Registration, { URL: j } = M("FCM-PUMP_SERVICE"), { postModel: K }
|
|
|
565
565
|
});
|
|
566
566
|
return h.debug("performPreCalibrate - response:", o), nr(o == null ? void 0 : o.data);
|
|
567
567
|
} catch (o) {
|
|
568
|
-
h.error(
|
|
568
|
+
return h.error(
|
|
569
569
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
|
|
570
570
|
o
|
|
571
|
-
);
|
|
572
|
-
return;
|
|
571
|
+
), "unknownError";
|
|
573
572
|
}
|
|
574
573
|
};
|
|
575
574
|
var ur = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ne = (e, t, r, o) => {
|
|
@@ -810,7 +809,7 @@ let ee = class {
|
|
|
810
809
|
* @returns The HolderModel instance referenced by holderPath, or undefined if not found
|
|
811
810
|
*/
|
|
812
811
|
get holder() {
|
|
813
|
-
return
|
|
812
|
+
return w(this.holderPath).model;
|
|
814
813
|
}
|
|
815
814
|
/**
|
|
816
815
|
* Determines if the remote tray is currently active.
|
|
@@ -933,7 +932,7 @@ let ye = class {
|
|
|
933
932
|
), this.future;
|
|
934
933
|
}
|
|
935
934
|
get isRemote() {
|
|
936
|
-
const e = `${V.type}-${this.holder.path}`, t =
|
|
935
|
+
const e = `${V.type}-${this.holder.path}`, t = w(e);
|
|
937
936
|
return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
|
|
938
937
|
}
|
|
939
938
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -947,7 +946,7 @@ let ye = class {
|
|
|
947
946
|
ye = $r([
|
|
948
947
|
f(it)
|
|
949
948
|
], ye);
|
|
950
|
-
const
|
|
949
|
+
const we = new F({
|
|
951
950
|
class: ye,
|
|
952
951
|
type: it
|
|
953
952
|
}), { URL: Er } = M("FREESTYLE-NOZZLE_SERVICE"), { getOne: Sr } = R.build({
|
|
@@ -956,21 +955,21 @@ const Ae = new F({
|
|
|
956
955
|
name: "freestyle-nozzle-service",
|
|
957
956
|
group: "Services"
|
|
958
957
|
});
|
|
959
|
-
class
|
|
958
|
+
class wr extends Error {
|
|
960
959
|
constructor(t) {
|
|
961
960
|
super(t), this.name = "NutritionInfoError";
|
|
962
961
|
}
|
|
963
962
|
}
|
|
964
|
-
class
|
|
963
|
+
class Ae extends Error {
|
|
965
964
|
constructor(t) {
|
|
966
965
|
super(t), this.name = "InvalidRequestError";
|
|
967
966
|
}
|
|
968
967
|
}
|
|
969
|
-
const
|
|
968
|
+
const Ar = async (e, t, r, o = "http://localhost:8081") => {
|
|
970
969
|
if (W.debug("sending GET for freestyle-nozzle"), !t)
|
|
971
|
-
throw W.error("Invalid freestyle-nozzle request: beverageId is required"), new
|
|
970
|
+
throw W.error("Invalid freestyle-nozzle request: beverageId is required"), new Ae("No beverageId provided");
|
|
972
971
|
if (!r || r.length === 0)
|
|
973
|
-
throw W.error("Invalid freestyle-nozzle request: volumes are required"), new
|
|
972
|
+
throw W.error("Invalid freestyle-nozzle request: volumes are required"), new Ae("No volumes provided");
|
|
974
973
|
const a = await Sr({
|
|
975
974
|
urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
|
|
976
975
|
","
|
|
@@ -979,7 +978,7 @@ const wr = async (e, t, r, o = "http://localhost:8081") => {
|
|
|
979
978
|
if (!(a != null && a.data))
|
|
980
979
|
throw W.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
|
|
981
980
|
if (a.data.error)
|
|
982
|
-
throw new
|
|
981
|
+
throw new wr(a.data.error);
|
|
983
982
|
return a.data;
|
|
984
983
|
};
|
|
985
984
|
var Mr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, st = (e, t, r, o) => {
|
|
@@ -1013,7 +1012,7 @@ let te = class {
|
|
|
1013
1012
|
);
|
|
1014
1013
|
const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
|
|
1015
1014
|
try {
|
|
1016
|
-
const r = await
|
|
1015
|
+
const r = await Ar(
|
|
1017
1016
|
t,
|
|
1018
1017
|
e,
|
|
1019
1018
|
this._cupSizes
|
|
@@ -1628,14 +1627,14 @@ let q = class {
|
|
|
1628
1627
|
get holder() {
|
|
1629
1628
|
if (!this.trouble)
|
|
1630
1629
|
return;
|
|
1631
|
-
const e = this.trouble.data.holderPaths[0], t =
|
|
1630
|
+
const e = this.trouble.data.holderPaths[0], t = w(e);
|
|
1632
1631
|
if (!(!this._holdersLoaded && !t.model))
|
|
1633
1632
|
return t == null ? void 0 : t.model;
|
|
1634
1633
|
}
|
|
1635
1634
|
updateHolder() {
|
|
1636
1635
|
if (!this._holdersLoaded && this.trouble) {
|
|
1637
1636
|
const e = this.trouble.data.holderPaths[0];
|
|
1638
|
-
|
|
1637
|
+
w(e).model && (this._holdersLoaded = !0);
|
|
1639
1638
|
}
|
|
1640
1639
|
}
|
|
1641
1640
|
/**
|
|
@@ -1694,7 +1693,7 @@ Se([
|
|
|
1694
1693
|
], q.prototype, "agitateBeforePour", 2);
|
|
1695
1694
|
Se([
|
|
1696
1695
|
St({
|
|
1697
|
-
topic:
|
|
1696
|
+
topic: wt(Ve.type),
|
|
1698
1697
|
lifecycle: qe.INIT
|
|
1699
1698
|
})
|
|
1700
1699
|
], q.prototype, "updateHolder", 1);
|
|
@@ -1746,7 +1745,7 @@ const pa = q.Registration, ga = ["iceAgitator"], ha = {
|
|
|
1746
1745
|
supportsCarb: n,
|
|
1747
1746
|
supportsIce: a
|
|
1748
1747
|
};
|
|
1749
|
-
}, ma = (e) => () => (
|
|
1748
|
+
}, ma = (e) => () => (At(e)(), Dt(e)(), Me.register(), fe.register(), ht.register(), Ke.register(), Ce.register(), sa.register(), pr.register(), Jr.register(), rr.register(), Re.register(), we.register(), V.register(), Ee.register(), m.companion.register(e)(
|
|
1750
1749
|
Ft.type,
|
|
1751
1750
|
Me.type
|
|
1752
1751
|
), m.companion.register(e)(
|
|
@@ -1757,7 +1756,7 @@ const pa = q.Registration, ga = ["iceAgitator"], ha = {
|
|
|
1757
1756
|
ca
|
|
1758
1757
|
), m.companion.register(e)(Nt.type, Re.type), m.companion.register(e)(
|
|
1759
1758
|
zt.type,
|
|
1760
|
-
|
|
1759
|
+
we.type
|
|
1761
1760
|
), pe[ge].register(
|
|
1762
1761
|
"EnjoyByTrouble",
|
|
1763
1762
|
async (t) => {
|
|
@@ -1775,7 +1774,7 @@ const pa = q.Registration, ga = ["iceAgitator"], ha = {
|
|
|
1775
1774
|
"SuperPumpRequiredTrouble",
|
|
1776
1775
|
// This is the trouble type
|
|
1777
1776
|
async (t) => {
|
|
1778
|
-
const { model: r } =
|
|
1777
|
+
const { model: r } = w(
|
|
1779
1778
|
Lt.type
|
|
1780
1779
|
);
|
|
1781
1780
|
return r ? {
|
|
@@ -1791,11 +1790,11 @@ const pa = q.Registration, ga = ["iceAgitator"], ha = {
|
|
|
1791
1790
|
if (t.ifaces.includes("container"))
|
|
1792
1791
|
return {};
|
|
1793
1792
|
if (t.data.pumpPath) {
|
|
1794
|
-
const { model: r } =
|
|
1793
|
+
const { model: r } = w(
|
|
1795
1794
|
t.data.pumpPath
|
|
1796
1795
|
);
|
|
1797
1796
|
if (r) {
|
|
1798
|
-
const o = r.ingredientId ?
|
|
1797
|
+
const o = r.ingredientId ? w(r.ingredientId).model : void 0;
|
|
1799
1798
|
return {
|
|
1800
1799
|
ingredientId: r.ingredientId,
|
|
1801
1800
|
ingredientName: (o == null ? void 0 : o.name) || ""
|
|
@@ -1841,7 +1840,7 @@ const Fe = H(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
1841
1840
|
function Pa(e) {
|
|
1842
1841
|
return B(e);
|
|
1843
1842
|
}
|
|
1844
|
-
const Ne = H(),
|
|
1843
|
+
const Ne = H(), wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1845
1844
|
__proto__: null,
|
|
1846
1845
|
api: Ne,
|
|
1847
1846
|
default: Ne,
|
|
@@ -1850,7 +1849,7 @@ const Ne = H(), Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.define
|
|
|
1850
1849
|
function va(e) {
|
|
1851
1850
|
return B(e);
|
|
1852
1851
|
}
|
|
1853
|
-
const ze = H(),
|
|
1852
|
+
const ze = H(), Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1854
1853
|
__proto__: null,
|
|
1855
1854
|
api: ze,
|
|
1856
1855
|
default: ze,
|
|
@@ -1877,7 +1876,7 @@ export {
|
|
|
1877
1876
|
ht as I,
|
|
1878
1877
|
Oa as K,
|
|
1879
1878
|
Jr as L,
|
|
1880
|
-
|
|
1879
|
+
wr as N,
|
|
1881
1880
|
Ee as R,
|
|
1882
1881
|
sa as S,
|
|
1883
1882
|
Ce as a,
|
|
@@ -1885,14 +1884,14 @@ export {
|
|
|
1885
1884
|
Qe as c,
|
|
1886
1885
|
rr as d,
|
|
1887
1886
|
fe as e,
|
|
1888
|
-
|
|
1887
|
+
we as f,
|
|
1889
1888
|
Me as g,
|
|
1890
1889
|
Re as h,
|
|
1891
1890
|
re as i,
|
|
1892
1891
|
pa as j,
|
|
1893
1892
|
Sa as k,
|
|
1894
|
-
|
|
1895
|
-
|
|
1893
|
+
wa as l,
|
|
1894
|
+
Aa as m,
|
|
1896
1895
|
Ma as n,
|
|
1897
1896
|
V as o,
|
|
1898
1897
|
ir as p,
|
|
@@ -1902,9 +1901,9 @@ export {
|
|
|
1902
1901
|
ar as t,
|
|
1903
1902
|
or as u,
|
|
1904
1903
|
sr as v,
|
|
1905
|
-
|
|
1906
|
-
|
|
1904
|
+
Ae as w,
|
|
1905
|
+
Ar as x,
|
|
1907
1906
|
Fr as y,
|
|
1908
1907
|
ta as z
|
|
1909
1908
|
};
|
|
1910
|
-
//# sourceMappingURL=service-
|
|
1909
|
+
//# sourceMappingURL=service-CWOr4GoM.js.map
|