• 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

    Parameters

    • nozzleId: string

      the nozzle id to select a pourable for.

    • payload: object

      the payload to send to the endpoint. The shape of the payload is determined by the ExtensionType.SelectedPourableMapper extension.

    Returns Promise<undefined | KosServiceResponse<any>>

    • an emtpy response.

    See

    ExtensionType.SelectedPourableMapper

    Example

    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);
    }