using PowderCoating.Application.DTOs.Company; namespace PowderCoating.Application.Interfaces; public interface ICustomFormulaAiService { /// /// Generates a NCalc formula, field list, and notes from a natural-language description /// and an optional diagram image. Returns a /// ready to pre-fill the template editor. /// Task GenerateFormulaAsync( GenerateFormulaFromAiRequest request, byte[]? imageBytes = null, string? imageContentType = null); /// /// Evaluates a NCalc formula with the supplied variable map and returns the numeric result. /// Safe server-side only — no user-controlled code execution. /// EvaluateFormulaResponse EvaluateFormula(EvaluateFormulaRequest request); /// /// Normalizes NCalc built-in function names to lowercase (IF→if, Abs→abs, etc.) then /// attempts a parse-only evaluation to catch syntax errors before the formula is saved. /// Returns the normalized formula string and a null error on success, or the original /// formula and an error message on failure. /// (string NormalizedFormula, string? Error) NormalizeAndValidate(string formula); }