using PowderCoating.Application.DTOs.AI; namespace PowderCoating.Application.Interfaces; public interface IAccountingAiService { /// /// Scans a receipt/invoice image and extracts vendor, date, total, invoice number, and line items. /// Attempts to match each line item to one of the provided expense accounts. /// Task ScanReceiptAsync( byte[] imageData, string mimeType, List availableAccounts); /// /// Drafts a follow-up email for an overdue AR customer. /// Tone scales with days overdue: gentle (≤30), firm (31-60), serious (61+). /// Task DraftFollowUpEmailAsync(ArFollowUpRequest request); /// /// Suggests the best-matching expense account for a bill line item or expense. /// Returns a primary suggestion plus up to 3 ranked alternatives. /// Task SuggestAccountAsync(AccountSuggestionRequest request); /// /// Generates a plain-English financial health summary with 4-6 bullet points /// and a sentiment classification (positive / neutral / concerning). /// Task GenerateFinancialSummaryAsync(FinancialSummaryRequest request); /// /// Projects 30/60/90-day cash position based on open AR, open AP, and active job pipeline. /// Returns period-by-period inflow/outflow estimates and plain-English insights. /// Task GenerateCashFlowForecastAsync(CashFlowForecastRequest request); /// /// Scans recent bills and expense account trends for duplicates, unusual amounts, /// and accounts running significantly above historical averages. /// Returns a ranked list of flagged items with recommended actions. /// Task DetectAnomaliesAsync(AnomalyDetectionRequest request); /// /// Suggests which uncleared bank rec items should be marked as cleared to reconcile /// a statement. Returns a ranked list of suggestions with confidence scores based on /// amount/date patterns and the gap between the current cleared balance and the /// statement ending balance. /// Task AutoMatchReconciliationAsync(AutoMatchRequest request); /// /// Predicts likelihood of late payment for each open AR customer using their historical /// payment behavior (avg days to pay, late rate) combined with current overdue status. /// Returns risk levels (high/medium/low) and estimated days to collection. /// Task PredictLatePaymentsAsync(LatePaymentPredictionRequest request); /// /// Answers a plain-English financial question (e.g. "What did we spend on powder last quarter?") /// using pre-loaded company financial context. Returns a direct answer, supporting facts, /// and an optional follow-up question suggestion. /// Task AnswerFinancialQueryAsync(FinancialQueryRequest request); /// /// Analyzes 6–12 months of bill history to detect recurring payment patterns per vendor. /// Returns detected patterns with frequency, typical amount, next expected date, and /// suggested actions (e.g. set a reminder, create a template). /// Task DetectRecurringBillsAsync(RecurringBillDetectionRequest request); }