the nozzle id to select a pourable for.
the payload to send to the endpoint. The shape of the payload is determined by the ExtensionType.SelectedPourableMapper extension.
ExtensionType.SelectedPourableMapper
import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
...
try {
const response = await NozzleServices.selectPourable("nozzle-1", {
beverage: "beverage-1",
additional: ["flavor-1"],
});
if (response?.status !== 200) {
throw new Error("Failed to select pourable");
}
} catch (e) {
console.error(e);
}
Invokes the endpoint to select a pourable for the specified nozzle.
Uses the KOS endpoint [POST]
${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/select