• Retrieves the availability nodes for a specified nozzle.

    Uses the KOS endpoint [GET] ${URL}/api/ext/dispense/nozzle/${nozzleId}/pipeline/beverage/availability

    Parameters

    • urlPrefix: string

    Returns Promise<undefined | KosServiceResponse<AvailabilityResponse>>

    • the availability nodes for the specified nozzle.

    Example

    import { NozzleServices } from "@kosdev-code/kos-dispense-sdk";
    ...

    const availability = await NozzleServices.getAvailability("nozzle-1");
    if (availability?.status !== 200) {
    throw new Error("Failed to load nozzle availability");
    }