nutrition panel removed
This commit is contained in:
@@ -261,43 +261,6 @@ export interface CatalogueProduct {
|
||||
fssai_license?: string;
|
||||
highlights?: string[];
|
||||
nutrients?: string[];
|
||||
/**
|
||||
* The structured nutrition panel, where the catalogue carries one.
|
||||
*
|
||||
* `nutrients` above is the older shape — display lines like "Energy 350kcal",
|
||||
* which are enough to print bullets and not enough for an app to lay out a
|
||||
* table or say what the figures are measured against. This is what the agent
|
||||
* team fills and what the customer app renders.
|
||||
*
|
||||
* Optional because most rows do not have it yet: the backend derives a panel
|
||||
* from the lines when this is absent, so a reader should prefer this and fall
|
||||
* back rather than treating its absence as "no nutrition".
|
||||
*/
|
||||
nutrition?: NutritionPanel;
|
||||
}
|
||||
|
||||
/**
|
||||
* A nutrition panel as Fiesta sends it.
|
||||
*
|
||||
* Field names are the backend's and the customer app's — `servingsize`, not
|
||||
* `servingSize`. An API is a promise to clients already written against it, and
|
||||
* renaming on the way in would mean this file disagreeing with the wire.
|
||||
*/
|
||||
export interface NutritionPanel {
|
||||
/** What the figures are measured against: "100g", "100ml", "1 serving". */
|
||||
per?: string;
|
||||
/** What the pack calls one serving: "30g". A label routinely states both. */
|
||||
servingsize?: string;
|
||||
/** Never empty when the panel is present — the backend omits an empty one. */
|
||||
items: NutritionItem[];
|
||||
}
|
||||
|
||||
export interface NutritionItem {
|
||||
name: string;
|
||||
/** A float: saturated fat is 11.5g as often as it is 11g. */
|
||||
value: number;
|
||||
/** "kcal", "g", "mg". Free text — the label is the authority. */
|
||||
unit?: string;
|
||||
}
|
||||
|
||||
export interface CatalogueBrand {
|
||||
|
||||
Reference in New Issue
Block a user