@kosdev-code/kos-freestyle-sdk 2.1.37 → 2.1.39
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--qB2FP1I.js → extension-utils-CFD54lr3.js} +2 -2
- package/{extension-utils--qB2FP1I.js.map → extension-utils-CFD54lr3.js.map} +1 -1
- package/{extension-utils-DQSu9dSv.cjs → extension-utils-D3-Gwy8G.cjs} +2 -2
- package/{extension-utils-DQSu9dSv.cjs.map → extension-utils-D3-Gwy8G.cjs.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +43 -39
- package/kos-models.json +1 -1
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts +1 -0
- package/models/models/freestyle-holder/freestyle-holder-model.d.ts.map +1 -1
- package/models/utils/services/freestyle/1.6.5/service.d.ts +4 -0
- package/models/utils/services/freestyle/1.6.5/service.d.ts.map +1 -1
- package/models/utils/services/freestyle/1.8.1/service.d.ts +4 -0
- package/models/utils/services/freestyle/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/freestyle/daily/openapi.d.ts +608 -327
- package/models/utils/services/freestyle/daily/service.d.ts +6 -2
- package/models/utils/services/freestyle/daily/service.d.ts.map +1 -1
- package/models/utils/services/handle/1.8.1/service.d.ts +4 -0
- package/models/utils/services/handle/1.8.1/service.d.ts.map +1 -1
- package/models/utils/services/handle/daily/service.d.ts +4 -0
- package/models/utils/services/handle/daily/service.d.ts.map +1 -1
- package/models/utils/services-index.d.ts +6 -2
- package/models/utils/services-index.d.ts.map +1 -1
- package/models.cjs +1 -1
- package/models.js +34 -30
- package/package.json +2 -2
- package/service-8u3gW6pr.cjs +2 -0
- package/service-8u3gW6pr.cjs.map +1 -0
- package/{service-BuugCicr.js → service-DildzPxj.js} +4 -1
- package/service-DildzPxj.js.map +1 -0
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/{use-nutrition-info-C_myxRvf.cjs → use-nutrition-info-DMKLi-5k.cjs} +2 -2
- package/{use-nutrition-info-C_myxRvf.cjs.map → use-nutrition-info-DMKLi-5k.cjs.map} +1 -1
- package/{use-nutrition-info-CPEwk_O-.js → use-nutrition-info-DP_JHkR0.js} +2 -2
- package/{use-nutrition-info-CPEwk_O-.js.map → use-nutrition-info-DP_JHkR0.js.map} +1 -1
- package/service-BuugCicr.js.map +0 -1
- package/service-DSV9Dr2d.cjs +0 -2
- package/service-DSV9Dr2d.cjs.map +0 -1
|
@@ -41,7 +41,7 @@ export declare function kosServiceRequest<Path extends ApiPath, Method extends H
|
|
|
41
41
|
* Create an API client for freestyle
|
|
42
42
|
*/
|
|
43
43
|
export declare const api: {
|
|
44
|
-
get: <K extends "/api/ext/freestyle/can/read/float/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/read/int/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/stats/raw" | "/api/ext/freestyle/microCalibration/report/{board}" | "/api/ext/freestyle/microCalibration/history/{pump}" | "/api/ext/freestyle/microCalibration/cal/{pump}" | "/api/ext/freestyle/brandset/nutrition/{bevId}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline" | "/api/ext/freestyle/fuelGauges/{holder}" | "/api/ext/freestyle/cartridges" | "/api/ext/freestyle/cartridges/{id}">(endpoint: K, params?: (paths[K]["get"] extends {
|
|
44
|
+
get: <K extends "/api/ext/freestyle/can/read/float/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/read/int/{boardPath}/{index}/{subIndex}" | "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/stats/raw" | "/api/ext/freestyle/microCalibration/report/{board}" | "/api/ext/freestyle/microCalibration/history/{pump}" | "/api/ext/freestyle/microCalibration/cal/{pump}" | "/api/ext/freestyle/brandset/nutrition/{bevId}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline" | "/api/ext/freestyle/fuelGauges/{holder}" | "/api/ext/freestyle/cartridges" | "/api/ext/freestyle/cartridges/{id}" | "/api/ext/freestyle/studio/rfid/blanks" | "/api/ext/freestyle/studio/rfid/tags">(endpoint: K, params?: (paths[K]["get"] extends {
|
|
45
45
|
parameters: infer P;
|
|
46
46
|
} ? P : never) | undefined, options?: {
|
|
47
47
|
ordered?: boolean | undefined;
|
|
@@ -55,8 +55,9 @@ export declare const api: {
|
|
|
55
55
|
signal?: AbortSignal | undefined;
|
|
56
56
|
stream?: boolean | undefined;
|
|
57
57
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
58
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
58
59
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K, "get">>>;
|
|
59
|
-
post: <K_1 extends "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/write/byte/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/short/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/float/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/int/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/fcm/diagnostics/{pump}/pressureTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/opennessTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/flowTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/electricalTest" | "/api/ext/freestyle/microCalibration/cal/{pump}/running/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/code/{code}" | "/api/ext/freestyle/microCalibration/cal/{pump}/baseline/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/both/{val}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/calibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/preCalibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/verify/{calVolume}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline/{value}" | "/api/ext/freestyle/fcm/calibration/{pump}/complete/{calVolume}/{verifyVolume}" | "/api/ext/freestyle/microCalibration/pour/{pump}/calibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/preCalibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/verify" | "/api/ext/freestyle/microCalibration/pour/{pump}/complete" | "/api/ext/freestyle/fuelGauges/{holder}/{val}">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
60
|
+
post: <K_1 extends "/api/ext/freestyle/can/stats" | "/api/ext/freestyle/can/write/byte/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/short/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/float/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/can/write/int/{boardPath}/{index}/{subIndex}/{val}" | "/api/ext/freestyle/fcm/diagnostics/{pump}/pressureTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/opennessTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/flowTest" | "/api/ext/freestyle/fcm/diagnostics/{pump}/electricalTest" | "/api/ext/freestyle/microCalibration/cal/{pump}/running/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/code/{code}" | "/api/ext/freestyle/microCalibration/cal/{pump}/baseline/{val}" | "/api/ext/freestyle/microCalibration/cal/{pump}/both/{val}" | "/api/ext/freestyle/brandset/grantProperties" | "/api/ext/freestyle/fcm/calibration/{pump}/calibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/preCalibrate" | "/api/ext/freestyle/fcm/calibration/{pump}/verify/{calVolume}" | "/api/ext/freestyle/fcm/calibration/{pump}/baseline/{value}" | "/api/ext/freestyle/fcm/calibration/{pump}/complete/{calVolume}/{verifyVolume}" | "/api/ext/freestyle/microCalibration/pour/{pump}/calibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/preCalibrate" | "/api/ext/freestyle/microCalibration/pour/{pump}/verify" | "/api/ext/freestyle/microCalibration/pour/{pump}/complete" | "/api/ext/freestyle/fuelGauges/{holder}/{val}" | "/api/ext/freestyle/studio/rfid/update/{holder}" | "/api/ext/freestyle/studio/rfid/initialize/{holder}">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
60
61
|
parameters: infer P_1;
|
|
61
62
|
} ? P_1 : never) | undefined, body?: (paths[K_1]["post"] extends {
|
|
62
63
|
requestBody: {
|
|
@@ -74,6 +75,7 @@ export declare const api: {
|
|
|
74
75
|
signal?: AbortSignal | undefined;
|
|
75
76
|
stream?: boolean | undefined;
|
|
76
77
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
78
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
77
79
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_1, "post">>>;
|
|
78
80
|
put: <K_2 extends never>(endpoint: K_2, params?: (paths[K_2]["put"] extends {
|
|
79
81
|
parameters: infer P_2;
|
|
@@ -93,6 +95,7 @@ export declare const api: {
|
|
|
93
95
|
signal?: AbortSignal | undefined;
|
|
94
96
|
stream?: boolean | undefined;
|
|
95
97
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
98
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
96
99
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
97
100
|
delete: <K_3 extends never>(endpoint: K_3, params?: (paths[K_3]["delete"] extends {
|
|
98
101
|
parameters: infer P_3;
|
|
@@ -112,6 +115,7 @@ export declare const api: {
|
|
|
112
115
|
signal?: AbortSignal | undefined;
|
|
113
116
|
stream?: boolean | undefined;
|
|
114
117
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
118
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
115
119
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_3, "delete">>>;
|
|
116
120
|
};
|
|
117
121
|
export default api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/freestyle/daily/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/freestyle/daily/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAEzC,eAAe,GAAG,CAAC"}
|
|
@@ -55,6 +55,7 @@ export declare const api: {
|
|
|
55
55
|
signal?: AbortSignal | undefined;
|
|
56
56
|
stream?: boolean | undefined;
|
|
57
57
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
58
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
58
59
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K, "get">>>;
|
|
59
60
|
post: <K_1 extends "/api/handle/assembly:core:board:macro:agit:agit/test">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
60
61
|
parameters: infer P_1;
|
|
@@ -74,6 +75,7 @@ export declare const api: {
|
|
|
74
75
|
signal?: AbortSignal | undefined;
|
|
75
76
|
stream?: boolean | undefined;
|
|
76
77
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
78
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
77
79
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_1, "post">>>;
|
|
78
80
|
put: <K_2 extends never>(endpoint: K_2, params?: (paths[K_2]["put"] extends {
|
|
79
81
|
parameters: infer P_2;
|
|
@@ -93,6 +95,7 @@ export declare const api: {
|
|
|
93
95
|
signal?: AbortSignal | undefined;
|
|
94
96
|
stream?: boolean | undefined;
|
|
95
97
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
98
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
96
99
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
97
100
|
delete: <K_3 extends never>(endpoint: K_3, params?: (paths[K_3]["delete"] extends {
|
|
98
101
|
parameters: infer P_3;
|
|
@@ -112,6 +115,7 @@ export declare const api: {
|
|
|
112
115
|
signal?: AbortSignal | undefined;
|
|
113
116
|
stream?: boolean | undefined;
|
|
114
117
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
118
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
115
119
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_3, "delete">>>;
|
|
116
120
|
};
|
|
117
121
|
export default api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/handle/1.8.1/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/handle/1.8.1/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAEzC,eAAe,GAAG,CAAC"}
|
|
@@ -55,6 +55,7 @@ export declare const api: {
|
|
|
55
55
|
signal?: AbortSignal | undefined;
|
|
56
56
|
stream?: boolean | undefined;
|
|
57
57
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
58
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
58
59
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K, "get">>>;
|
|
59
60
|
post: <K_1 extends "/api/handle/assembly:core:board:macro:cartridgeAgitator:agit/test" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/test/agitation" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/test/gate" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/pour" | "/api/handle/assembly:core:board:macro:iceAgitator:ice/type/{type}">(endpoint: K_1, params?: (paths[K_1]["post"] extends {
|
|
60
61
|
parameters: infer P_1;
|
|
@@ -74,6 +75,7 @@ export declare const api: {
|
|
|
74
75
|
signal?: AbortSignal | undefined;
|
|
75
76
|
stream?: boolean | undefined;
|
|
76
77
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
78
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
77
79
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_1, "post">>>;
|
|
78
80
|
put: <K_2 extends never>(endpoint: K_2, params?: (paths[K_2]["put"] extends {
|
|
79
81
|
parameters: infer P_2;
|
|
@@ -93,6 +95,7 @@ export declare const api: {
|
|
|
93
95
|
signal?: AbortSignal | undefined;
|
|
94
96
|
stream?: boolean | undefined;
|
|
95
97
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
98
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
96
99
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_2, "put">>>;
|
|
97
100
|
delete: <K_3 extends never>(endpoint: K_3, params?: (paths[K_3]["delete"] extends {
|
|
98
101
|
parameters: infer P_3;
|
|
@@ -112,6 +115,7 @@ export declare const api: {
|
|
|
112
115
|
signal?: AbortSignal | undefined;
|
|
113
116
|
stream?: boolean | undefined;
|
|
114
117
|
responseType?: "text" | "json" | "arraybuffer" | "blob" | undefined;
|
|
118
|
+
retry?: boolean | import('@kosdev-code/kos-ui-sdk').RetryConfig | undefined;
|
|
115
119
|
} | undefined) => Promise<import('@kosdev-code/kos-ui-sdk').ServiceResponse<ClientResponse<paths, K_3, "delete">>>;
|
|
116
120
|
};
|
|
117
121
|
export default api;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/handle/daily/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG
|
|
1
|
+
{"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services/handle/daily/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,CAAC;AACxB,MAAM,MAAM,OAAO,GAAG,MAAM,KAAK,CAAC;AAClC,MAAM,MAAM,UAAU,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;AAE9C;;GAEG;AACH,MAAM,MAAM,WAAW,CACrB,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,IACtD,cAAc,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAExC;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAC1B,IAAI,SAAS,OAAO,GAAG,OAAO,EAC9B,MAAM,SAAS,UAAU,GAAG,KAAK,IAC/B,mBAAmB,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;AAE7C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,SAAS,OAAO,EACpB,MAAM,SAAS,UAAU,GAAG,KAAK,EACjC,QAAQ,GAAG,GAAG,EACd,mBAAmB,GAAG,QAAQ,EAE9B,MAAM,EAAE,wBAAwB,CAC9B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,mBAAmB,CACpB,4FASF;AAED;;GAEG;AACH,eAAO,MAAM,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAwB,CAAC;AAEzC,eAAe,GAAG,CAAC"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
export * as FREESTYLE_SERVICE from './services/freestyle/1.8.1/service';
|
|
1
2
|
export * as FREESTYLE_SERVICE_1_6_5 from './services/freestyle/1.6.5/service';
|
|
2
3
|
export * as FREESTYLE_SERVICE_1_8_1 from './services/freestyle/1.8.1/service';
|
|
3
|
-
export * as
|
|
4
|
+
export * as FREESTYLE_SERVICE_DAILY from './services/freestyle/daily/service';
|
|
5
|
+
export * as FREESTYLE_SERVICE_LATEST from './services/freestyle/daily/service';
|
|
6
|
+
export * as HANDLE_SERVICE from './services/handle/1.8.1/service';
|
|
4
7
|
export * as HANDLE_SERVICE_1_8_1 from './services/handle/1.8.1/service';
|
|
5
|
-
export * as
|
|
8
|
+
export * as HANDLE_SERVICE_DAILY from './services/handle/daily/service';
|
|
9
|
+
export * as HANDLE_SERVICE_LATEST from './services/handle/daily/service';
|
|
6
10
|
//# sourceMappingURL=services-index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"services-index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services-index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,uBAAuB,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,uBAAuB,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"services-index.d.ts","sourceRoot":"","sources":["../../../../../../packages/sdk/kos-freestyle-sdk/src/models/utils/services-index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,oCAAoC,CAAC;AACxE,OAAO,KAAK,uBAAuB,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,uBAAuB,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,uBAAuB,MAAM,oCAAoC,CAAC;AAC9E,OAAO,KAAK,wBAAwB,MAAM,oCAAoC,CAAC;AAC/E,OAAO,KAAK,cAAc,MAAM,iCAAiC,CAAC;AAClE,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,oBAAoB,MAAM,iCAAiC,CAAC;AACxE,OAAO,KAAK,qBAAqB,MAAM,iCAAiC,CAAC"}
|
package/models.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./service-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./service-8u3gW6pr.cjs"),r=require("./extension-utils-D3-Gwy8G.cjs");require("@kosdev-code/kos-ui-sdk");require("@kosdev-code/kos-dispense-sdk");exports.AGITATION_REQUIRED_TROUBLE=e.AGITATION_REQUIRED_TROUBLE;exports.AgitationRequiredTrouble=e.AgitationRequiredTrouble;exports.CarbAgitator=e.CarbAgitator;exports.CartridgeAgitator=e.CartridgeAgitator;exports.CartridgeAgitatorContainer=e.CartridgeAgitatorContainer;exports.CartridgeAgitatorEvents=e.CartridgeAgitatorEvents;exports.CgpPump=e.CgpPump;exports.FREESTYLE_SERVICE=e.service;exports.FREESTYLE_SERVICE_1_6_5=e.service$1;exports.FREESTYLE_SERVICE_1_8_1=e.service;exports.FREESTYLE_SERVICE_DAILY=e.service$2;exports.FREESTYLE_SERVICE_LATEST=e.service$2;exports.FcmPump=e.FcmPump;exports.FreestyleAssembly=e.FreestyleAssembly;exports.FreestyleHolder=e.FreestyleHolder;exports.FreestyleNozzle=e.FreestyleNozzle;exports.FreestylePump=e.FreestylePump;exports.HANDLE_SERVICE=e.service$3;exports.HANDLE_SERVICE_1_8_1=e.service$3;exports.HANDLE_SERVICE_DAILY=e.service$4;exports.HANDLE_SERVICE_LATEST=e.service$4;exports.IceAgitator=e.IceAgitator;exports.IceAgitatorEvents=e.IceAgitatorEvents;exports.KosModelRegistry=e.KosModelRegistry;exports.LfcvPump=e.LfcvPump;exports.SpmPump=e.SpmPump;exports.registerFreestyleModels=e.registerFreestyleModels;exports.EXTENSION_PLUGIN_VISIBILITY=r.EXTENSION_PLUGIN_VISIBILITY;exports.FcmPumpServices=r.index;exports.FreestyleExtensionManager=r.FreestyleExtensionManager;exports.FreestyleNozzleServices=r.index$1;exports.FreestylePumpServices=r.index$2;exports.KosExtensionManager=r.KosExtensionManager;exports.SpmPumpServices=r.index$3;
|
|
2
2
|
//# sourceMappingURL=models.cjs.map
|
package/models.js
CHANGED
|
@@ -1,37 +1,41 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
import { E as
|
|
1
|
+
import { A as r, j as t, C as _, c as i, a as S, b as o, d as I, s as m, k as A, s as R, l as L, l, F, e as g, f as C, g as p, h as T, m as n, m as c, n as u, n as y, I as N, i as V, K as P, L as d, S as Y, r as v } from "./service-DildzPxj.js";
|
|
2
|
+
import { E as b, i as H, F as f, a as x, b as z, K, c as M } from "./extension-utils-CFD54lr3.js";
|
|
3
3
|
import "@kosdev-code/kos-ui-sdk";
|
|
4
4
|
import "@kosdev-code/kos-dispense-sdk";
|
|
5
5
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
r as AGITATION_REQUIRED_TROUBLE,
|
|
7
|
+
t as AgitationRequiredTrouble,
|
|
8
|
+
_ as CarbAgitator,
|
|
9
|
+
i as CartridgeAgitator,
|
|
10
|
+
S as CartridgeAgitatorContainer,
|
|
11
|
+
o as CartridgeAgitatorEvents,
|
|
12
12
|
I as CgpPump,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
F as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
x as
|
|
26
|
-
|
|
13
|
+
b as EXTENSION_PLUGIN_VISIBILITY,
|
|
14
|
+
m as FREESTYLE_SERVICE,
|
|
15
|
+
A as FREESTYLE_SERVICE_1_6_5,
|
|
16
|
+
R as FREESTYLE_SERVICE_1_8_1,
|
|
17
|
+
L as FREESTYLE_SERVICE_DAILY,
|
|
18
|
+
l as FREESTYLE_SERVICE_LATEST,
|
|
19
|
+
F as FcmPump,
|
|
20
|
+
H as FcmPumpServices,
|
|
21
|
+
g as FreestyleAssembly,
|
|
22
|
+
f as FreestyleExtensionManager,
|
|
23
|
+
C as FreestyleHolder,
|
|
24
|
+
p as FreestyleNozzle,
|
|
25
|
+
x as FreestyleNozzleServices,
|
|
26
|
+
T as FreestylePump,
|
|
27
|
+
z as FreestylePumpServices,
|
|
28
|
+
n as HANDLE_SERVICE,
|
|
27
29
|
c as HANDLE_SERVICE_1_8_1,
|
|
28
|
-
u as
|
|
29
|
-
y as
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
u as HANDLE_SERVICE_DAILY,
|
|
31
|
+
y as HANDLE_SERVICE_LATEST,
|
|
32
|
+
N as IceAgitator,
|
|
33
|
+
V as IceAgitatorEvents,
|
|
34
|
+
K as KosExtensionManager,
|
|
35
|
+
P as KosModelRegistry,
|
|
36
|
+
d as LfcvPump,
|
|
37
|
+
Y as SpmPump,
|
|
38
|
+
M as SpmPumpServices,
|
|
39
|
+
v as registerFreestyleModels
|
|
36
40
|
};
|
|
37
41
|
//# sourceMappingURL=models.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kosdev-code/kos-freestyle-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.39",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./index.d.ts",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"kos": {
|
|
34
34
|
"build": {
|
|
35
|
-
"gitHash": "
|
|
35
|
+
"gitHash": "a6bf619546c3e6d08d77363dd1493226083a291f"
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var st=Object.defineProperty;var nt=(e,t,r)=>t in e?st(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var n=(e,t,r)=>(nt(e,typeof t!="symbol"?t+"":t,r),r);const o=require("@kosdev-code/kos-ui-sdk"),d=require("@kosdev-code/kos-dispense-sdk"),{URL:he}=o.resolveServiceUrl("ICE_AGITATOR_SERVICE"),{postModel:lt}=o.ServiceFactory.build({basePath:`${he}/api/ext/freestyle/ice`});o.KosLog.createLogger({name:"carb-tank-service",group:"Services"});const ut=async(e,t)=>{const r=await lt({model:{},tracker:t,urlOverride:`${he}/api/handle/${e}/test`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data};var fe=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,dt=(e,t,r)=>t in e?fe(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,m=(e,t,r,i)=>{for(var a=i>1?void 0:i?ct(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&fe(t,r,a),a},pt=(e,t,r)=>(dt(e,t+"",r),r);const gt="carb-agitator-model",oe=o.createPropKey("statePath");let h=class{constructor(e,t,r){n(this,"id");n(this,"name");n(this,"path");n(this,"statePath");n(this,"highProbeWet");n(this,"lowProbeWet");n(this,"filling");n(this,"enabled");var a;this.id=e,this.name=t.name,this.path=((a=r.kosContext.get("assembly-feature-carbTank"))==null?void 0:a.path)||"";const i=r.kosContext.get("assembly-state-path-carbTank");this.statePath=i}get holder(){var t;return(t=this.getCompanionParent())==null?void 0:t.getHoldersByGroup("carb")[0]}get pump(){var e;return(e=this.holder)==null?void 0:e.pumps.data[0]}get isFilling(){return!!this.filling.value}get isCarbInitialized(){return!!this.enabled.value}get canActivate(){return!this.enabled.value}get canProceed(){return this.isInState("INITIALIZED")||this.isInState("SKIPPED")}handleActivationStart(){this.logger.info("Carb tank activation started")}handleActivationComplete(){this.logger.info("Carb tank initialized")}handleInitialized(){this.logger.info("Carb tank ready to proceed")}handleSkipped(){this.logger.info("Proceeding without carbinator")}async activateCarbTank(){this.transition("ACTIVATE"),this.enabled.updateProperty(!0),this.transition("ACTIVATION_COMPLETE")}async deactivateCarbTank(){this.enabled.updateProperty(!1),this.transition("RESET")}skip(){this.transition("SKIP")}reset(){this.enabled.updateProperty(!1),this.transition("RESET")}toggleCarbTank(){this.enabled.value?this.deactivateCarbTank():this.activateCarbTank()}handleTestCarbTank(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`testing carb tank: ${this.id}`),ut(this.path,e)}};pt(h,"Registration");m([o.kosStateProp({path:oe,attribute:"highProbeWet"})],h.prototype,"highProbeWet",2);m([o.kosStateProp({path:oe,attribute:"lowProbeWet"})],h.prototype,"lowProbeWet",2);m([o.kosStateProp({path:oe,attribute:"filling"})],h.prototype,"filling",2);m([o.kosConfigProperty({path:"assembly:core:board:macksm:carbTank:carbTank",attribute:"enabled"})],h.prototype,"enabled",2);m([o.kosStateEntry("ACTIVATING")],h.prototype,"handleActivationStart",1);m([o.kosStateExit("ACTIVATING")],h.prototype,"handleActivationComplete",1);m([o.kosStateEntry("INITIALIZED")],h.prototype,"handleInitialized",1);m([o.kosStateEntry("SKIPPED")],h.prototype,"handleSkipped",1);m([o.kosStateGuard({allowedStates:["UNINITIALIZED"]})],h.prototype,"activateCarbTank",1);m([o.kosStateGuard({allowedStates:["UNINITIALIZED"]})],h.prototype,"skip",1);m([o.kosStateGuard({allowedStates:["INITIALIZED","SKIPPED"]})],h.prototype,"reset",1);m([o.kosFuture()],h.prototype,"handleTestCarbTank",1);h=m([o.kosModel({modelTypeId:gt,singleton:!1}),o.kosLoggerAware(),o.kosCompanion({mode:"composition",lifecycle:o.DependencyLifecycle.LOAD}),o.kosFutureAware(),o.kosStateMachine({initial:"UNINITIALIZED",states:{UNINITIALIZED:{on:{ACTIVATE:"ACTIVATING",SKIP:"SKIPPED"}},ACTIVATING:{on:{ACTIVATION_COMPLETE:"INITIALIZED"}},INITIALIZED:{on:{RESET:"UNINITIALIZED"}},SKIPPED:{on:{RESET:"UNINITIALIZED"}}}},{throwOnInvalid:!1})],h);const ae=h.Registration;var ht=Object.defineProperty,ft=Object.getOwnPropertyDescriptor,me=(e,t,r,i)=>{for(var a=i>1?void 0:i?ft(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&ht(t,r,a),a};const ye="cartridge-agitator-container-model";let L=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"_models");this.id=e,this.logger=r.logger,this._models=new o.KosModelContainer({parentId:e})}getModel(e){return this._models.getModel(e)}get models(){return this._models}get data(){return this._models.data}addModel(e){this._models.addModel(e)}removeModel(e){this._models.removeModel(e)}async init(){this.logger.debug(`initializing cartridge-agitator-container container ${this.id}`)}async load(){this.logger.debug(`loading cartridge-agitator-container container ${this.id}`)}};me([o.kosChild],L.prototype,"_models",2);L=me([o.kosModel(ye)],L);const{URL:Pe}=o.resolveServiceUrl("CARTRIDGE_AGITATOR_SERVICE"),{postModel:mt}=o.ServiceFactory.build({basePath:`${Pe}/api/ext/freestyle/freestyle/ice`}),yt=async(e,t)=>{const r=await mt({model:{},tracker:t,urlOverride:`${Pe}/api/handle/${e}/test`});if(!(r!=null&&r.data))throw new Error("No response from server");return r.data};var Pt=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,x=(e,t,r,i)=>{for(var a=i>1?void 0:i?bt(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&Pt(t,r,a),a};const be="cartridge-agitator-model";class A{}n(A,"TOPIC_AGITATION_STARTED","/kos/events/ddk/agitation-started"),n(A,"TOPIC_AGITATION_ENDED","/kos/events/ddk/agitation-ended");const vt=o.createPropKey("statePath");let S=class{constructor(e,t){n(this,"id");n(this,"agitating");n(this,"path");n(this,"statePath");n(this,"name");this.id=e,this.path=t.path,this.name=t.name,this.statePath=t.statePath}get isAgitating(){return!!this.agitating.value}async testAgitate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`agitating cartridge-agitator ${this.id}`),yt(this.path,e)}handleAgitation(){var e;this.isAgitating?(this.logger.info(`agitating cartridge-agitator ${this.id}`),o.EventBus.publish(A.TOPIC_AGITATION_STARTED,{path:this.path,futureId:(e=this.future)==null?void 0:e.futureId})):o.EventBus.publish(A.TOPIC_AGITATION_ENDED,{path:this.path})}};x([o.kosStateProp({path:vt,attribute:"agitating"})],S.prototype,"agitating",2);x([o.kosFuture()],S.prototype,"testAgitate",1);x([o.kosModelEffect({dependencies:e=>[e.isAgitating]})],S.prototype,"handleAgitation",1);S=x([o.kosModel(be),o.kosFutureAware(),o.kosLoggerAware()],S);const ie=new o.KosModelRegistrationFactory({class:S,type:be}),q=new o.SingletonKosModelRegistrationFactory({class:L,type:ye});q.addRelatedModel(ie);var ve=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,Tt=(e,t,r)=>t in e?ve(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G=(e,t,r,i)=>{for(var a=i>1?void 0:i?_t(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&ve(t,r,a),a},It=(e,t,r)=>(Tt(e,t+"",r),r);const St="cgp-pump-model",se=o.createPropKey("statePath");let T=class{constructor(e,t){n(this,"highProbeWet");n(this,"lowProbeWet");n(this,"filling");n(this,"id");n(this,"state");var r;this.id=e,this.state=((r=t.data)==null?void 0:r.state)??{name:"unknown",path:""}}get statePath(){return this.state.path}};It(T,"Registration");G([o.kosStateProp({path:se,attribute:"highProbeWet"})],T.prototype,"highProbeWet",2);G([o.kosStateProp({path:se,attribute:"lowProbeWet"})],T.prototype,"lowProbeWet",2);G([o.kosStateProp({path:se,attribute:"filling"})],T.prototype,"filling",2);T=G([o.kosModel({modelTypeId:St,singleton:!1}),o.kosCompanion({mode:"composition"}),o.kosLoggerAware()],T);const _e=T.Registration,{URL:M}=o.resolveServiceUrl("FCM-PUMP_SERVICE"),{postModel:w}=o.ServiceFactory.build({basePath:`${M}/api/fcm-pump`}),f=o.KosLog.createLogger({name:"fcm-pump-service",group:"Services"}),Te=async e=>{var t,r,i,a,l;f.debug(`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`);try{const s=await w({model:{},urlOverride:`${M}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`});return f.debug("performElectricalTest - response:",s),((s==null?void 0:s.status)===200||(s==null?void 0:s.status)===499)&&((t=s.data)!=null&&t.error)?[s.data.error||"unknownError",s.data]:[void 0,s==null?void 0:s.data]}catch(s){if(f.error(`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,s),s instanceof o.FetchError){const c=((i=(r=s.payload)==null?void 0:r.data)==null?void 0:i.error)||((a=s.payload)==null?void 0:a.error)||"unknownError";return[c,((l=s.payload)==null?void 0:l.data)||{error:c}]}}return["unknownError",{error:"unknownError"}]},Ie=async(e,t)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`);try{const r=await w({model:{},urlOverride:`${M}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,tracker:t});return f.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},Se=async(e,t)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`);try{const r=await w({model:{},urlOverride:`${M}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,tracker:t});return f.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},Ce=async(e,t,r)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`);try{const i=await w({model:{},urlOverride:`${M}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,tracker:r});return f.debug("performVerify - response:",i),i!=null&&i.data&&o.FutureManager.initiateFuture(i.data),i==null?void 0:i.data}catch(i){f.error(`performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,i);const a={id:r||"",endState:o.FutureEndState.Fail,tracker:r,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(a),a}},Ct=e=>e?e.data==="success"||!e.data?"success":e.data:"error",Ee=async(e,t,r)=>{f.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`);try{const i=await w({model:{},urlOverride:`${M}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`});return f.debug("performPreCalibrate - response:",i),Ct(i==null?void 0:i.data)}catch(i){f.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,i);return}};var Et=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,j=(e,t,r,i)=>{for(var a=i>1?void 0:i?$t(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&Et(t,r,a),a};const $e="fcm-pump-model",Ot=o.KosLog.createLogger({name:"fcm-pump-model"});let C=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"pumpModel");n(this,"futureHandler");this.id=e,this.logger=r.logger,this.pumpModel=t.companionParent,this.futureHandler=new o.FutureHandler(this)}get future(){return this.futureHandler.future}get name(){return this.pumpModel.name}get canPour(){return this.pumpModel.canPour}get isPouring(){return this.pumpModel.isPouring}async cancelPour(){return this.pumpModel.cancelPour()}performIntent(e){return this.pumpModel.performIntent(e)}async performElectricalTest(){const[e,t]=await Te(this.pumpModel.path);return e&&Ot.error(`Failed to perform electrical test on pump ${this.id}`,e),t}getChildren(){return[...this.futureHandler.allFutures]}async performPreCalibrate(e){return Ie(this.pumpModel.path,e)}async performCalibrate(e){return Se(this.pumpModel.path,e)}async performVerify(e,t){return Ce(this.pumpModel.path,e,t)}async performComplete(e,t){return Ee(this.pumpModel.path,e,t)}async init(){this.logger.debug(`initializing fcm-pump ${this.id}`)}async load(){this.logger.debug(`loading fcm-pump ${this.id}`)}};j([o.kosFuture()],C.prototype,"performPreCalibrate",1);j([o.kosFuture()],C.prototype,"performCalibrate",1);j([o.kosFuture()],C.prototype,"performVerify",1);C=j([o.kosModel($e)],C);const Oe=new o.KosModelRegistrationFactory({class:C,type:$e});var Mt=Object.defineProperty,At=Object.getOwnPropertyDescriptor,Me=(e,t,r,i)=>{for(var a=i>1?void 0:i?At(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&Mt(t,r,a),a};const Ae="freestyle-assembly-model",Re="iceAgitator",Rt="carbTank",wt="remoteTrays";let N=class{constructor(e,t,r){n(this,"id");n(this,"_carbTankModel");n(this,"logger");n(this,"assembly");n(this,"_remoteTrays");this.id=e,this.logger=r.logger,this.assembly=t.companionParent}get holderGroups(){return this.assembly.holderGroups}get nozzlePaths(){return this.assembly.nozzlePaths}get allHolders(){return this.assembly.allHolders}getHoldersByGroup(e){return this.assembly.getHoldersByGroup(e)}getHoldersByNozzle(e){return this.assembly.getHoldersByNozzle(e)}get pumpsByNozzle(){return this.assembly.pumpsByNozzle}get pumpPaths(){return this.assembly.pumpPaths}get boards(){return this.assembly.boards}updateModel(e){return this.assembly.updateModel(e)}get iceAgitator(){return this.assembly.iceAgitator}get carbTank(){return this._carbTankModel}get cartridgeAgitators(){return this.assembly.cartridgeAgitators}get defaultCartridgeAgitator(){return this.assembly.cartridgeAgitators.data[0]}get cartridgeAgitatorModels(){return this.assembly.cartridgeAgitators.data}get hasCartridgeAgitators(){return this.assembly.cartridgeAgitators.data.length>0}get remoteTrays(){return this.assembly.remoteTrays}get hasRemoteTrays(){return this.assembly.remoteTrays?this.assembly.remoteTrays.data.length>0:!1}get supportsRemoteTrays(){return o.KosFeatureFlags.isFeatureEnabled(wt)}get supportsIce(){return o.KosFeatureFlags.isFeatureEnabled(Re)}get supportsCarb(){return o.KosFeatureFlags.isFeatureEnabled(Rt)}async init(){this.logger.debug(`initializing freestyle-assembly ${this.id}`)}async ready(){const e=o.getKosCompanionModel(this.assembly,ae.type);this._carbTankModel=e}};Me([o.kosChild],N.prototype,"_remoteTrays",2);N=Me([o.kosParentAware(),o.kosModel(Ae)],N);const z=new o.SingletonKosModelRegistrationFactory({class:N,type:Ae});var Ft=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,we=(e,t,r,i)=>{for(var a=i>1?void 0:i?Dt(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&Ft(t,r,a),a};const Fe="remote-tray-model";o.createPropKey("holderPath");const Lt=o.createPropKey("configPath");let k=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"holderPath");n(this,"configPath");n(this,"name");n(this,"remoteTrayEnabled");this.id=e,this.logger=r.logger,this.holderPath=t.holderPath,this.configPath=t.configPath,this.name=t.name}get troubles(){var e;return((e=this.holder)==null?void 0:e.troubles)??[]}get troubleStatus(){return""}get troublesByType(){var e;return((e=this.holder)==null?void 0:e.troublesByType)??{}}updateModel(e){}get holder(){return o.getKosModelSync(this.holderPath).model}get active(){return!!this.remoteTrayEnabled.value}async init(){this.logger.debug(`initializing remote-tray ${this.id}`)}async load(){this.logger.debug(`loading remote-tray ${this.id}`)}};we([o.kosConfigProperty({path:Lt,attribute:"enabled"})],k.prototype,"remoteTrayEnabled",2);k=we([o.kosModel(Fe)],k);const E=new o.KosModelRegistrationFactory({class:k,type:Fe});var Nt=Object.getOwnPropertyDescriptor,zt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Nt(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=s(a)||a);return a};const De="remote-tray-container-model";let Z=class{constructor(e){n(this,"id");this.id=e}};Z=zt([o.kosModel(De),o.kosLoggerAware(),o.kosContainerAware()],Z);const B=new o.SingletonKosModelRegistrationFactory({class:Z,type:De});B.addRelatedModel(E);var kt=Object.getOwnPropertyDescriptor,Kt=(e,t,r,i)=>{for(var a=i>1?void 0:i?kt(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=s(a)||a);return a};const Le="freestyle-holder-model";function Ut(e){const t=o.KosContextManager.getContext(e),r=t==null?void 0:t.get(z.type);if(!r){o.KosLog.error("Freestyle assembly not found");return}return r}async function xt(e,t){if(!e||!t)return;const r=await e[t]();if(r!=null&&r.tracker)return o.FutureManager.getFuture(r.tracker)}let X=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"holder");n(this,"context");n(this,"future");this.id=e,this.logger=r.logger,this.context=r.kosContext,this.holder=t.companionParent}get altName(){return this.holder.attributes.ncui_altName}get agitated(){return this.holder.data.agitated}async agitate(){if(!this.holder.data.agitated)return;this.future=void 0;const e=Ut(this.id);if(!e)return;if(!e.defaultCartridgeAgitator){this.logger.error("Agitator not found");return}return this.future=await xt(e.defaultCartridgeAgitator,"testAgitate"),this.future}get isRemote(){const e=`${E.type}-${this.holder.path}`,t=o.getKosModelSync(e);return t!=null&&t.model?!!t.model.remoteTrayEnabled.value:!1}async init(){this.logger.debug(`initializing freestyle-holder ${this.id}`)}async load(){this.logger.debug(`loading freestyle-holder ${this.id}`)}};X=Kt([o.kosModel(Le)],X);const Q=new o.KosModelRegistrationFactory({class:X,type:Le}),{URL:qt}=o.resolveServiceUrl("FREESTYLE-NOZZLE_SERVICE"),{getOne:Gt}=o.ServiceFactory.build({basePath:`${qt}/api/freestyle-nozzle`}),D=o.KosLog.createLogger({name:"freestyle-nozzle-service",group:"Services"});class Ne extends Error{constructor(t){super(t),this.name="NutritionInfoError"}}class J extends Error{constructor(t){super(t),this.name="InvalidRequestError"}}const ze=async(e,t,r,i="http://localhost:8081")=>{if(D.debug("sending GET for freestyle-nozzle"),!t)throw D.error("Invalid freestyle-nozzle request: beverageId is required"),new J("No beverageId provided");if(!r||r.length===0)throw D.error("Invalid freestyle-nozzle request: volumes are required"),new J("No volumes provided");const a=await Gt({urlOverride:`${i}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(",")}`});if(!(a!=null&&a.data))throw D.error("Failed to retrieve freestyle-nozzle data"),new Error("Failed to retrieve freestyle-nozzle data");if(a.data.error)throw new Ne(a.data.error);return a.data};var jt=Object.defineProperty,Bt=Object.getOwnPropertyDescriptor,ke=(e,t,r,i)=>{for(var a=i>1?void 0:i?Bt(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&jt(t,r,a),a};const Ke="freestyle-nozzle-model";let K=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"nozzleModel");n(this,"_cupSizes");n(this,"_nutritionInfo");this.id=e,this.logger=r.logger,this.nozzleModel=t.companionParent,this._cupSizes=[100]}set cupSizes(e){this._cupSizes=e}get nutritionInfo(){return this._nutritionInfo}get selectedPourable(){return this.nozzleModel.selectedPourable}async handleBeverageSelection(){if(this.nozzleModel.selectedPourable.beverage&&this._cupSizes.length){this.logger.debug(`selected beverage: ${this.nozzleModel.selectedPourable.beverage.rawId}. Volume: ${this._cupSizes.join(", ")}`);const e=this.nozzleModel.selectedPourable.beverage.rawId,t=this.nozzleModel.urlPrefix;try{const r=await ze(t,e,this._cupSizes);o.kosAction(()=>{this._nutritionInfo=r})}catch(r){this.logger.error(`Error fetching nutrition info: ${r}`)}}}async init(){this.logger.debug(`initializing freestyle-nozzle ${this.id}`)}unload(){this.logger.debug(`unloading freestyle-nozzle ${this.id}`)}async load(){this.logger.debug(`loading freestyle-nozzle ${this.id}`)}};ke([o.kosModelEffect({dependencies:e=>[e.selectedPourable.beverage]})],K.prototype,"handleBeverageSelection",1);K=ke([o.kosParentAware(),o.kosModel(Ke)],K);const ee=new o.KosModelRegistrationFactory({class:K,type:Ke}),{URL:Ue}=o.resolveServiceUrl("PUMP_SERVICE"),{postModel:Vt}=o.ServiceFactory.build({basePath:`${Ue}/api/ext/freestyle/microCalibration`}),W=o.KosLog.createLogger({name:"freestyle-pump-service",group:"Services"}),xe=async(e,t)=>{var r,i,a,l,s;W.debug(`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`);try{const c=await Vt({model:{},urlOverride:`${Ue}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`});return W.debug("replacePump - response:",c),((c==null?void 0:c.status)===200||(c==null?void 0:c.status)===499)&&((r=c.data)!=null&&r.error)?[c.data.error||"unknownError",c.data]:[void 0,c==null?void 0:c.data]}catch(c){if(W.error(`replacePump - sending POST request to /api/cal/${e}/code/${t}`,c),c instanceof o.FetchError){const v=((a=(i=c.payload)==null?void 0:i.data)==null?void 0:a.error)||((l=c.payload)==null?void 0:l.error)||"unknownError";return[v,((s=c.payload)==null?void 0:s.data)||{error:v}]}}return["unknownError",{error:"unknownError"}]};var Ht=Object.getOwnPropertyDescriptor,Yt=(e,t,r,i)=>{for(var a=i>1?void 0:i?Ht(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=s(a)||a);return a};const qe="freestyle-pump-model";let te=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"pump");this.id=e,this.logger=r.logger,this.pump=t.companionParent}async replacePump(e){const[t,r]=await xe(this.pump.path,e);return t&&this.logger.error(`Failed to replace the pump, ${this.pump.id}`,t),[t,r]}};te=Yt([o.kosModel(qe)],te);const re=new o.KosModelRegistrationFactory({class:te,type:qe}),{URL:I}=o.resolveServiceUrl("ICE_AGITATOR_SERVICE"),{getAll:Ge,postModel:V}=o.ServiceFactory.build({basePath:`${I}/api/ext/freestyle/ice`}),je=o.KosLog.createLogger({name:"ice-agitator-service",group:"Services"}),Wt=async e=>(je.debug("sending GET for ice types"),await Ge({urlOverride:`${I}/api/handle/${e}/types`})),Zt=async(e,t)=>(je.debug("sending POST for ice types"),await V({urlOverride:`${I}/api/handle/${e}/type/${t}`,model:{}})),Xt=async e=>await Ge({urlOverride:`${I}/api/kos/config/details/${e}/4`}),Qt=async(e,t)=>{const r=await V({model:{},tracker:t,urlOverride:`${I}/api/handle/${e}/pour`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data},Jt=async(e,t)=>{const r=await V({model:{},tracker:t,urlOverride:`${I}/api/handle/${e}/test/agitation`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data},er=async(e,t)=>{const r=await V({model:{},tracker:t,urlOverride:`${I}/api/handle/${e}/test/gate`});if(!(r!=null&&r.data))throw new Error("No response from server");return r==null?void 0:r.data};var Be=Object.defineProperty,tr=Object.getOwnPropertyDescriptor,rr=(e,t,r)=>t in e?Be(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,g=(e,t,r,i)=>{for(var a=i>1?void 0:i?tr(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&Be(t,r,a),a},or=(e,t,r)=>(rr(e,t+"",r),r);class R{}n(R,"TOPIC_AGITATION_STARTED","/kos/events/ddk/ice-agitation-started"),n(R,"TOPIC_AGITATION_ENDED","/kos/events/ddk/ice-agitation-ended");const ar="ice-agitator-model",Ve=o.createPropKey("statePath");let p=class{constructor(e,t){n(this,"id");n(this,"name");n(this,"path");n(this,"volWithoutIceMl");n(this,"durationSec");n(this,"enableIceChuteClear");n(this,"iceChuteClearDurationMs");n(this,"iceChuteClearIntervalSec");n(this,"iceChuteClearRetryIntervalSec");n(this,"maxDispenseSec");n(this,"type");n(this,"dilutionOffset");n(this,"inactivitySec");n(this,"agitating");n(this,"iceChuteOpen");n(this,"statePath");n(this,"_allIceTypes");n(this,"currentState",d.PourState.IDLE);n(this,"resetDefaultValues",async()=>await Xt(this.path));this.id=e,this.name=t.name,this.path=t.path,this.statePath=t.statePath,this._allIceTypes=[]}get iceTypes(){return this._allIceTypes}get isAgitating(){return!!this.agitating.value}get isIceChuteOpen(){return!!this.iceChuteOpen.value}get isPouring(){var e;return!!(this.pourFuture&&!((e=this.pourFuture)!=null&&e.endState))||this.currentState===d.PourState.POUR_STARTING||this.currentState===d.PourState.POURING||this.currentState===d.PourState.POUR_CANCELING}get canPour(){return this.currentState===d.PourState.IDLE}updateIfCurrent(e,t){this.currentState===e&&o.kosAction(()=>{this.currentState=t})}async pourIce(e){try{if(this.currentState===d.PourState.IDLE){if(this.updateIfCurrent(d.PourState.IDLE,d.PourState.POUR_STARTING),!e)throw new Error("No tracker provided");const t=await Qt(this.path,e);return this.updateIfCurrent(d.PourState.POUR_STARTING,d.PourState.POURING),t!=null&&t.endState&&this.updateIfCurrent(d.PourState.POURING,d.PourState.IDLE),t}else throw new Error(`Cannot pour in state ${this.currentState}`)}catch(t){throw this.logger.error(t),this.currentState=d.PourState.IDLE,t}}async cancelIceDispense(){var e;this.currentState===d.PourState.POURING||this.currentState===d.PourState.POUR_STARTING?(this.currentState=d.PourState.POUR_CANCELING,await((e=this.pourFuture)==null?void 0:e.cancelFuture()),o.kosAction(()=>{this.currentState=d.PourState.IDLE})):this.logger.warn(`Cannot cancel ice dispense in state ${this.currentState}`)}async testAgitate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`agitating ice-agitator ${this.id}`),Jt(this.path,e)}async testGate(e){if(!e)throw new Error("No tracker provided");return this.logger.info(`testing ice gate: ${this.id}`),er(this.path,e)}handleAgitationChange(){var e;this.isAgitating?(this.logger.info(`agitating ice-agitator ${this.id}`),o.EventBus.publish(R.TOPIC_AGITATION_STARTED,{path:this.path,futureId:(e=this.futureHandler.future)==null?void 0:e.futureId})):o.EventBus.publish(R.TOPIC_AGITATION_ENDED,{path:this.path})}async updateIceType(e){await Zt(this.path,e)}async init(){this.logger.debug(`initializing ice-agitator ${this.id}`)}async load(){try{this.logger.debug(`loading ice-agitator ${this.id}`);const e=await Wt(this.path);(e==null?void 0:e.status)===200&&o.kosAction(()=>{this._allIceTypes=e.data||[]})}catch(e){this.logger.error(e)}}};or(p,"Registration");g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.volWithoutIceMl"})],p.prototype,"volWithoutIceMl",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.durationSec",converter:{to:"second"}})],p.prototype,"durationSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"enableIceChuteClear"})],p.prototype,"enableIceChuteClear",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearDurationMs"})],p.prototype,"iceChuteClearDurationMs",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearIntervalSec"})],p.prototype,"iceChuteClearIntervalSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"iceChuteClearRetryIntervalSec"})],p.prototype,"iceChuteClearRetryIntervalSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"maxDispenseSec"})],p.prototype,"maxDispenseSec",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"type"})],p.prototype,"type",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.dilutionOffset"})],p.prototype,"dilutionOffset",2);g([o.kosConfigProperty({path:o.KOS_MODEL_ID,attribute:"settings.inactivitySec",converter:{to:"minute"}})],p.prototype,"inactivitySec",2);g([o.kosStateProp({path:Ve,attribute:"agitating"})],p.prototype,"agitating",2);g([o.kosStateProp({path:Ve,attribute:"iceChuteOpen"})],p.prototype,"iceChuteOpen",2);g([o.kosFuture({alias:"pour"})],p.prototype,"pourIce",1);g([o.kosFuture({alias:"agitate"})],p.prototype,"testAgitate",1);g([o.kosFuture({alias:"gate"})],p.prototype,"testGate",1);g([o.kosModelEffect({dependencies:e=>[e.isAgitating]})],p.prototype,"handleAgitationChange",1);p=g([o.kosModel({modelTypeId:ar,singleton:!1}),o.kosLoggerAware(),o.kosMultipleFutureAware()],p);const ne=p.Registration;var ir=Object.defineProperty,sr=Object.getOwnPropertyDescriptor,nr=(e,t,r)=>t in e?ir(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,lr=(e,t,r,i)=>{for(var a=i>1?void 0:i?sr(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=s(a)||a);return a},ur=(e,t,r)=>(nr(e,t+"",r),r);const cr="lfcv-pump-model";let U=class{constructor(e,t){n(this,"id");this.id=e}get name(){return this.pumpModel.name}get canPour(){return this.pumpModel.canPour}get isPouring(){return this.pumpModel.isPouring}async cancelPour(){return this.pumpModel.cancelPour()}performIntent(e){return this.pumpModel.performIntent(e)}};ur(U,"Registration");U=lr([o.kosModel({modelTypeId:cr,singleton:!1}),o.kosLoggerAware(),o.kosCompanion({mode:"composition",parentProperty:"pumpModel"})],U);const He=U.Registration,{URL:F}=o.resolveServiceUrl("SPM-PUMP_SERVICE"),{postModel:H}=o.ServiceFactory.build({basePath:`${F}/api/spm-pump`}),P=o.KosLog.createLogger({name:"spm-pump-service",group:"Services"}),Ye=async(e,t)=>{P.debug(`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`);try{const r=await H({model:{},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,tracker:t});return P.debug("performPreCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){P.error(`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},We=async(e,t)=>{P.debug(`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`);try{const r=await H({model:{},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,tracker:t});return P.debug("performCalibrate - response:",r),r!=null&&r.data&&o.FutureManager.initiateFuture(r.data),r==null?void 0:r.data}catch(r){P.error(`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,r);const i={id:t||"",endState:o.FutureEndState.Fail,tracker:t,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(i),i}},Ze=async(e,t,r,i)=>{P.debug(`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`);try{const a=await H({model:{...r,measuredCalibrationVolume:t},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/verify`,tracker:i});return P.debug("performVerify - response:",a),a!=null&&a.data&&o.FutureManager.initiateFuture(a.data),a==null?void 0:a.data}catch(a){P.error(`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,a);const l={id:i||"",endState:o.FutureEndState.Fail,tracker:i,reason:"Failed to resolve trouble"};return o.FutureManager.initiateFuture(l),l}},Xe=async(e,t,r,i)=>{var a,l,s,c,v;P.debug(`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`);try{const u=await H({model:{...i,measuredCalibrationVolume:t,measuredVerificationVolume:r},urlOverride:`${F}/api/ext/freestyle/microCalibration/pour/${e}/complete`});return P.debug("performComplete - response:",u),((u==null?void 0:u.status)===200||(u==null?void 0:u.status)===499)&&((a=u.data)!=null&&a.error)?[u.data.error||"unknownError",u.data]:[void 0,u==null?void 0:u.data]}catch(u){if(P.error(`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,u),u instanceof o.FetchError){const y=((s=(l=u.payload)==null?void 0:l.data)==null?void 0:s.error)||((c=u.payload)==null?void 0:c.error)||"unknownError";return[y,((v=u.payload)==null?void 0:v.data)||{error:y}]}}return["unknownError",{error:"unknownError"}]};var dr=Object.defineProperty,pr=Object.getOwnPropertyDescriptor,Y=(e,t,r,i)=>{for(var a=i>1?void 0:i?pr(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&dr(t,r,a),a};const Qe="spm-pump-model";let $=class{constructor(e,t,r){n(this,"id");n(this,"logger");n(this,"pump");n(this,"futureHandler");this.id=e,this.logger=r.logger,this.pump=t.companionParent,this.futureHandler=new o.FutureHandler(this)}get name(){return this.pump.name}get canPour(){return this.pump.canPour}get isPouring(){return this.pump.isPouring}async cancelPour(){return this.pump.cancelPour()}performIntent(e){return this.pump.performIntent(e)}get future(){return this.futureHandler.future}async performPreCalibrate(e){return Ye(this.pump.path,e)}async performCalibrate(e){return We(this.pump.path,e)}async performVerify(e,t,r){return Ze(this.pump.path,e,t,r)}async performComplete(e,t,r){return Xe(this.pump.path,e,t,r)}async init(){this.logger.debug(`initializing spm-pump ${this.id}`)}async load(){this.logger.debug(`loading spm-pump ${this.id}`)}};Y([o.kosFuture()],$.prototype,"performPreCalibrate",1);Y([o.kosFuture()],$.prototype,"performCalibrate",1);Y([o.kosFuture()],$.prototype,"performVerify",1);$=Y([o.kosModel(Qe)],$);const Je=new o.KosModelRegistrationFactory({class:$,type:Qe});var et=Object.defineProperty,gr=Object.getOwnPropertyDescriptor,hr=(e,t,r)=>t in e?et(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,le=(e,t,r,i)=>{for(var a=i>1?void 0:i?gr(t,r):t,l=e.length-1,s;l>=0;l--)(s=e[l])&&(a=(i?s(t,r,a):s(a))||a);return i&&a&&et(t,r,a),a},fr=(e,t,r)=>(hr(e,t+"",r),r);const tt="agitation-required-trouble-model",mr=e=>{if(e.data.agitationRequired)return tt},rt="InsufficientAgitationTrouble";let O=class{constructor(e){n(this,"id");n(this,"_deferred");n(this,"_holdersLoaded",!1);n(this,"agitateBeforePour");this.id=e,this._deferred=!1}async resolve(){return this.trouble.resolve()}get holder(){if(!this.trouble)return;const e=this.trouble.data.holderPaths[0],t=o.getKosModelSync(e);if(!(!this._holdersLoaded&&!t.model))return t==null?void 0:t.model}updateHolder(){if(!this._holdersLoaded&&this.trouble){const e=this.trouble.data.holderPaths[0];o.getKosModelSync(e).model&&(this._holdersLoaded=!0)}}get shouldDefer(){var i,a;if(!this.holder)return!0;const t=(((i=this.holder)==null?void 0:i.troublesByType[rt])||[]).length>0;return!!((a=this.agitateBeforePour)!=null&&a.value)&&t}get deferred(){return this._deferred}defer(){this._deferred=!0}clearDefer(){this._deferred=!1}};fr(O,"Registration");le([o.kosConfigProperty({path:"app:kosdev.ddk:app",attribute:"ncui.agitateBeforePour"})],O.prototype,"agitateBeforePour",2);le([o.kosTopicHandler({topic:o.modelTypeEventTopicFactory(d.Assembly.type),lifecycle:o.DependencyLifecycle.INIT})],O.prototype,"updateHolder",1);O=le([o.kosModel({modelTypeId:tt,singleton:!1}),o.kosLoggerAware(),o.kosCompanion({mode:"composition",parentProperty:"trouble"})],O);const ot=O.Registration,yr=["iceAgitator"],Pr={iceAgitator:ne},br=o.KosLog.createLogger({name:"freestyle-assembly-data-mapper"}),vr=async e=>{const t=q.instance().options({}).build(),r=B.instance().options({}).build(),i=e.assemblies.reduce((s,c)=>{var v;return yr.forEach(u=>{var _;const y=c[u];if(y){const it=Pr[u];s[u]=it.instance(y.path).options({name:y.name,path:y.path,statePath:((_=y.state)==null?void 0:_.path)||""}).build()}}),(v=c.cartridgeAgitators)==null||v.forEach(u=>{var _;const y=ie.instance(u.path).options({name:u.name,path:u.path,statePath:((_=u.state)==null?void 0:_.path)||""}).build();t.addModel(y)}),c.remoteTrays&&c.remoteTrays.forEach(u=>{br.info(`Found remote tray ${u.name} with path ${u.path}`);const y=`${E.type}-${u.holderPath}`,_=E.instance(y).options({holderPath:u.holderPath,configPath:u.path,name:u.name}).build();r.addModel(_)}),s},{}),a=!!i.iceAgitator,l=!!i.carbTank;return{...i,cartridgeAgitators:t,remoteTrays:r,supportsCarb:l,supportsIce:a}},at=e=>()=>(o.registerCoreModels(e)(),d.registerDispenseModels(e)(),ee.register(),z.register(),ne.register(),ae.register(),q.register(),Je.register(),Oe.register(),He.register(),_e.register(),re.register(),Q.register(),E.register(),B.register(),o.RegistrationManager.companion.register(e)(d.Nozzle.type,ee.type),o.RegistrationManager.companion.register(e)(d.Assembly.type,z.type),ot.register(),o.RegistrationManager.companion.register(e)(o.Trouble.type,mr),o.RegistrationManager.companion.register(e)(d.Pump.type,re.type),o.RegistrationManager.companion.register(e)(d.Holder.type,Q.type),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("EnjoyByTrouble",async t=>{if(t.data.enjoyByDate){const r=new Date(t.data.enjoyByDate);return{enjoyByDays:Math.floor((new Date().getTime()-r.getTime())/(1e3*60*60*24))||""}}return{}}),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("SuperPumpRequiredTrouble",async t=>{const{model:r}=o.getKosModelSync(d.PumpContainer.type);return r?{superPumps:r.models.getIndexByKey(d.PumpIndex.byType,"microSuper").map(l=>l.name).join(", ")}:{}}),o.ExtensionManager[o.EXTENSION_TROUBLE_DATA_MAPPER].register("MicroPumpAirDetectTrouble",async t=>{if(t.ifaces.includes("container"))return{};if(t.data.pumpPath){const{model:r}=o.getKosModelSync(t.data.pumpPath);if(r){const i=r.ingredientId?o.getKosModelSync(r.ingredientId).model:void 0;return{ingredientId:r.ingredientId,ingredientName:(i==null?void 0:i.name)||""}}}return{}}),{preload:o.RegistrationManager.model.preloadModel(e),model:o.RegistrationManager.model.register(e),companion:o.RegistrationManager.companion.register(e),legacy:o.RegistrationManager.model.registerLegacyModel(e)}),b={...d.KosModelRegistry};b.freestyle={models:at(b)};b.preload=o.RegistrationManager.model.preloadModel(b);b.model=o.RegistrationManager.model.register(b);b.companion=o.RegistrationManager.companion.register(b);b.legacy=o.RegistrationManager.model.registerLegacyModel(b);const _r=b;function Tr(e){return o.kosServiceRequest(e)}const ue=o.createClient(),Ir=Object.freeze(Object.defineProperty({__proto__:null,api:ue,default:ue,kosServiceRequest:Tr},Symbol.toStringTag,{value:"Module"}));function Sr(e){return o.kosServiceRequest(e)}const ce=o.createClient(),Cr=Object.freeze(Object.defineProperty({__proto__:null,api:ce,default:ce,kosServiceRequest:Sr},Symbol.toStringTag,{value:"Module"}));function Er(e){return o.kosServiceRequest(e)}const de=o.createClient(),$r=Object.freeze(Object.defineProperty({__proto__:null,api:de,default:de,kosServiceRequest:Er},Symbol.toStringTag,{value:"Module"}));function Or(e){return o.kosServiceRequest(e)}const pe=o.createClient(),Mr=Object.freeze(Object.defineProperty({__proto__:null,api:pe,default:pe,kosServiceRequest:Or},Symbol.toStringTag,{value:"Module"}));function Ar(e){return o.kosServiceRequest(e)}const ge=o.createClient(),Rr=Object.freeze(Object.defineProperty({__proto__:null,api:ge,default:ge,kosServiceRequest:Ar},Symbol.toStringTag,{value:"Module"}));exports.AGITATION_REQUIRED_TROUBLE=rt;exports.AgitationRequiredTrouble=ot;exports.CarbAgitator=ae;exports.CartridgeAgitator=ie;exports.CartridgeAgitatorContainer=q;exports.CartridgeAgitatorEvents=A;exports.CgpPump=_e;exports.FEATURE_SUPPORTS_ICE=Re;exports.FcmPump=Oe;exports.FreestyleAssembly=z;exports.FreestyleHolder=Q;exports.FreestyleNozzle=ee;exports.FreestylePump=re;exports.IceAgitator=ne;exports.IceAgitatorEvents=R;exports.InvalidRequestError=J;exports.KosModelRegistry=_r;exports.LfcvPump=He;exports.NutritionInfoError=Ne;exports.RemoteTray=E;exports.RemoteTrayContainer=B;exports.SpmPump=Je;exports.freestyleAssemblyDataMapper=vr;exports.getFreestyleNutritionInfo=ze;exports.performCalibrate=Se;exports.performCalibrate$1=We;exports.performComplete=Ee;exports.performComplete$1=Xe;exports.performElectricalTest=Te;exports.performPreCalibrate=Ie;exports.performPreCalibrate$1=Ye;exports.performVerify=Ce;exports.performVerify$1=Ze;exports.registerFreestyleModels=at;exports.replacePump=xe;exports.service=Ir;exports.service$1=Cr;exports.service$2=$r;exports.service$3=Mr;exports.service$4=Rr;
|
|
2
|
+
//# sourceMappingURL=service-8u3gW6pr.cjs.map
|