arolariu.Backend.Domain.Invoices.DTOs
arolariu.Backend.Domain.Invoices
arolariu.Backend.Domain.Invoices.DTOs Namespace
Enums
AnalysisOptions Enum
Specifies the type of AI/ML analysis to perform on an invoice.
public enum AnalysisOptions
Fields
NoAnalysis 0
Skip analysis entirely. Returns the invoice unchanged.
Remarks
Use when you only need to validate invoice existence or retrieve current state without triggering any AI processing.
CompleteAnalysis 1
Perform comprehensive analysis including items, merchant, and recipe inference.
Remarks
Executes the full analysis pipeline:
- OCR extraction from scans
- Line item parsing and categorization
- Merchant identification and linking
- Recipe inference from detected food items
- Allergen detection
Cost: Highest computational cost. Use sparingly for initial invoice processing.
InvoiceOnly 2
Analyze invoice metadata only (name, description, category, payment info).
Remarks
Performs basic document analysis without extracting individual line items. Useful for quick categorization or when items are already manually entered.
InvoiceItemsOnly 3
Extract and categorize line items from invoice scans via OCR.
Remarks
Focuses on product extraction:
- OCR text extraction from scans
- Line item parsing (name, quantity, price)
- Product categorization
- Allergen detection for food items
Does not identify merchant or infer recipes.
InvoiceMerchantOnly 4
Identify and link the merchant from invoice scans.
Remarks
Extracts merchant information (name, address, category) and attempts to match against existing merchants in the system. Creates a new merchant if no match found. Does not extract line items or infer recipes.
Remarks
Purpose: Controls the scope and depth of invoice analysis operations. Different options have different computational costs and processing times.
Usage: Passed to the invoice analysis endpoint via AnalyzeInvoiceRequestDto.
Processing Impact:
- NoAnalysis: Immediate return, no AI processing.
- InvoiceOnly: Fast (~2-5 seconds), basic metadata extraction.
- InvoiceItemsOnly: Medium (~5-15 seconds), OCR and item parsing.
- InvoiceMerchantOnly: Fast (~2-5 seconds), merchant identification.
- CompleteAnalysis: Slow (~15-60 seconds), full pipeline with recipes.