using Books.Api.EventFlow.ReadModels; namespace Books.Api.AiBookkeeper; /// /// Maps standard account numbers (from Erhvervsstyrelsen) to company-specific accounts. /// public interface IAccountMappingService { /// /// Find the company's account that matches a standard account number. /// /// Company ID /// Standard account number from Erhvervsstyrelsen /// Cancellation token /// The matching account, or null if not found Task FindByStandardAccountNumberAsync( string companyId, string standardAccountNumber, CancellationToken cancellationToken = default); /// /// Map AI-suggested lines to company accounts. /// /// Company ID /// Lines from AI suggestion /// Cancellation token /// Mapped lines with company account IDs Task> MapSuggestedLinesAsync( string companyId, List suggestedLines, CancellationToken cancellationToken = default); } /// /// A suggested line with the mapped company account. /// public class MappedSuggestedLine { /// /// Original suggested line from AI. /// public required SuggestedLine Original { get; init; } /// /// Mapped company account (if found). /// public AccountReadModelDto? MappedAccount { get; init; } /// /// Whether the line was successfully mapped to a company account. /// public bool IsMapped => MappedAccount != null; }