Interface IngredientModel<AdditionalData>

Represents an ingredient that is composed into beverages and dispensed by the dispenser.

These will typically be created as part of the overall dispenser lifecycle as part of the Nozzle model.

Example: The base Ingredient from the backend will have an id, type and name properties. However,

a given implementation might extend the Ingredient node to include additional data, such as the image url. This additional data would be added to the model and would be represented by the AdditionalData type parameter.

const model: IngredientModel<{icon: string}> = ...;

would allow for visibility of all the base properties as well as the additional data (icon) that might be on the message payload from the backend.

interface IngredientModel<AdditionalData> {
    name: string;
    type: string;
    ingredientId: string;
    data: AdditionalData;
}

Type Parameters

  • AdditionalData extends object = any

    Any additional data that is added to an ingredient at the application layer.

Hierarchy (view full)

Properties

name: string

The name of the ingredient.

type: string

The type of the ingredient.

ingredientId: string

The ingredient id.

The ingredient data as defined by the ExtensionType.IngredientMapper extension point.