import { MealieClient } from '../client.js'; import type { ParsedIngredient } from '../types/index.js'; /** * Service for parsing ingredient strings into structured data * * The ingredient parser uses NLP to extract quantities, units, foods, and notes from natural language ingredient descriptions. * This is useful for recipe import, data normalization, and shopping list generation. * * @extends MealieClient */ export declare class IngredientParserService extends MealieClient { /** * Parse a single ingredient string * * @param ingredient - The ingredient string to parse (e.g., "2 cups all-purpose flour") * @param acceptLanguage - Optional language header for localization * @returns Parsed ingredient components * * @example * ```ts * const result = await parser.parseIngredient("2 cups all-purpose flour"); * console.log(result.quantity); // 2 * console.log(result.unit); // "cups" * console.log(result.food); // "all-purpose flour" * ``` */ parseIngredient(ingredient: string, acceptLanguage?: string): Promise; /** * Parse multiple ingredient strings in bulk * * @param ingredients - Array of ingredient strings to parse * @param acceptLanguage - Optional language header for localization * @returns Array of parsed ingredient components * * @example * ```ts * const results = await parser.parseIngredients([ * "2 cups all-purpose flour", * "1 tsp vanilla extract", * "3 large eggs, room temperature" * ]); * results.forEach(result => { * console.log(`${result.quantity} ${result.unit} ${result.food}`); * }); * ``` */ parseIngredients(ingredients: string[], acceptLanguage?: string): Promise; } //# sourceMappingURL=ingredient-parser.d.ts.map