/** * Tax scenario detection — a pure, confidence-scored cascade: * document text patterns → counterparty country → amount plausibility → * default. Ported from the finance.plus VatRuleDetector design, with the * scenario vocabulary of core.types. */ import type { TBuKey, TCents, TTaxScenario } from './core.types.js'; export interface ITaxScenarioInput { direction: 'inbound' | 'outbound'; /** ISO 3166-1 alpha-2, defaults to 'DE' */ homeCountry?: string; counterpartyCountry?: string; counterpartyVatId?: string; documentText?: string; netCents?: TCents; vatCents?: TCents; vatRatePercent?: number; } export interface ITaxScenarioDetection { scenario: TTaxScenario; confidence: number; detectedBy: 'text' | 'country' | 'amounts' | 'default'; reasoning: string; suggestedBuKey: TBuKey; } /** * Today's member states of the EU beside Germany (ISO 3166-1 alpha-2; Greece * as `GR`), undated. A booking of a past day asks `isEuMemberOn`. */ export declare const EU_COUNTRIES: Set; /** * Whether a country (ISO 3166-1 alpha-2, any case) was a member state of the * EU on a day, as the EU's VAT law treats it: Germany and today's members * (`EU_COUNTRIES`) from the day they joined, the United Kingdom through * 2020-12-31 (`EU_MEMBERSHIP_CHANGES`). Undated, `EU_COUNTRIES` answers for * today only: a seat or supply of a past day asks this. Throws on a day that * is none. */ export declare function isEuMemberOn(country: string, day: Date | string): boolean; export declare function detectTaxScenario(input: ITaxScenarioInput): ITaxScenarioDetection;