mirror of
https://github.com/mealie-recipes/mealie.git
synced 2026-04-05 12:35:35 -04:00
feat: Unit standardization / conversion (#7121)
This commit is contained in:
@@ -329,6 +329,8 @@ export interface IngredientUnit {
|
||||
pluralAbbreviation?: string | null;
|
||||
useAbbreviation?: boolean;
|
||||
aliases?: IngredientUnitAlias[];
|
||||
standardQuantity?: number | null;
|
||||
standardUnit?: string | null;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
@@ -348,6 +350,8 @@ export interface CreateIngredientUnit {
|
||||
pluralAbbreviation?: string | null;
|
||||
useAbbreviation?: boolean;
|
||||
aliases?: CreateIngredientUnitAlias[];
|
||||
standardQuantity?: number | null;
|
||||
standardUnit?: string | null;
|
||||
}
|
||||
export interface CreateIngredientUnitAlias {
|
||||
name: string;
|
||||
|
||||
@@ -58,3 +58,13 @@ export interface QueryFilterJSONPart {
|
||||
relationalOperator?: RelationalKeyword | RelationalOperator | null;
|
||||
value?: string | string[] | null;
|
||||
}
|
||||
|
||||
export type StandardizedUnitType
|
||||
= | "fluid_ounce"
|
||||
| "cup"
|
||||
| "ounce"
|
||||
| "pound"
|
||||
| "milliliter"
|
||||
| "liter"
|
||||
| "gram"
|
||||
| "kilogram";
|
||||
|
||||
@@ -85,6 +85,8 @@ export interface CreateIngredientUnit {
|
||||
pluralAbbreviation?: string | null;
|
||||
useAbbreviation?: boolean;
|
||||
aliases?: CreateIngredientUnitAlias[];
|
||||
standardQuantity?: number | null;
|
||||
standardUnit?: string | null;
|
||||
}
|
||||
export interface CreateIngredientUnitAlias {
|
||||
name: string;
|
||||
@@ -174,6 +176,8 @@ export interface IngredientUnit {
|
||||
pluralAbbreviation?: string | null;
|
||||
useAbbreviation?: boolean;
|
||||
aliases?: IngredientUnitAlias[];
|
||||
standardQuantity?: number | null;
|
||||
standardUnit?: string | null;
|
||||
createdAt?: string | null;
|
||||
updatedAt?: string | null;
|
||||
}
|
||||
@@ -498,6 +502,8 @@ export interface SaveIngredientUnit {
|
||||
pluralAbbreviation?: string | null;
|
||||
useAbbreviation?: boolean;
|
||||
aliases?: CreateIngredientUnitAlias[];
|
||||
standardQuantity?: number | null;
|
||||
standardUnit?: string | null;
|
||||
groupId: string;
|
||||
}
|
||||
export interface ScrapeRecipe {
|
||||
|
||||
Reference in New Issue
Block a user