/** * PDF Vision Library - Interface publique pour utilisation directe */ import { z } from 'zod'; import { type ComprehensiveInvoice, type TablesOnly, type BasicReceipt } from "../core/schemas"; import type { VisionExtractionOptions, PdfProcessorConfig, ProviderConfig } from "../core/types"; /** * Options d'extraction pour l'API publique */ export interface ExtractOptions extends Omit { /** Provider d'IA à utiliser */ provider?: 'scaleway' | 'ollama' | 'mistral' | 'custom'; /** Modèle spécifique (optionnel) */ model?: string; /** Schema JSON personnalisé ou type de document */ query?: string; /** Taille de recadrage en pourcentage (10-90) */ cropSize?: number; /** Extraction focalisée sur les tableaux uniquement */ tablesOnly?: boolean; /** Type de document pour utiliser un schéma prédéfini */ documentType?: 'invoice' | 'receipt' | 'basic' | 'custom'; /** Amélioration du contraste (défaut: true) */ enhanceContrast?: boolean; /** Qualité de compression JPEG (70-100, défaut: 95) */ targetQuality?: number; /** DPI pour la conversion PDF vers images (défaut: 300) */ dpi?: number; /** Nombre de tentatives en cas d'échec (défaut: 2) */ maxRetries?: number; /** Schéma Zod personnalisé pour validation stricte */ customSchema?: z.ZodSchema; /** Configuration personnalisée des providers */ pdfProcessor?: PdfProcessorConfig; } /** * Résultat d'extraction avec métadonnées */ export interface ExtractResult { /** Données extraites et validées */ data: T; /** Métadonnées du traitement */ metadata: { /** Nombre de pages traitées */ pageCount: number; /** Temps de traitement total en ms */ processingTime: number; /** Provider utilisé */ provider: string; /** Modèle utilisé */ model: string; /** Nom du schéma utilisé */ schemaUsed: string; /** Métriques d'optimisation des images */ optimizationMetrics: { originalSizeMB: number; optimizedSizeMB: number; compressionRatio: number; }; }; /** Résultat de la validation */ validation: { success: boolean; errors?: z.ZodError; }; } /** * Extrait des données d'un PDF avec schéma personnalisé */ export declare function extractPdf(filePath: string, schema: T, options?: ExtractOptions): Promise>; /** * Extrait des données d'un PDF avec résultat détaillé */ export declare function extractPdfWithMetadata(filePath: string, schema: T, options?: ExtractOptions): Promise>>; /** * Extrait une facture avec le schéma complet */ export declare function extractInvoicePdf(filePath: string, options?: ExtractOptions): Promise; /** * Extrait les tableaux d'un PDF */ export declare function extractTablesPdf(filePath: string, options?: ExtractOptions): Promise; /** * Extrait un reçu avec le schéma simplifié */ export declare function extractReceiptPdf(filePath: string, options?: ExtractOptions): Promise; /** * Schémas Zod prédéfinis pour validation */ export declare const schemas: { invoice: z.ZodObject<{ document_info: z.ZodOptional>; language: z.ZodOptional>; currency: z.ZodOptional>; total_pages: z.ZodOptional>; }, "strip", z.ZodTypeAny, { document_type?: string; language?: string; currency?: string; total_pages?: number; }, { document_type?: string; language?: string; currency?: string; total_pages?: number; }>>; invoice_details: z.ZodOptional>; invoice_date: z.ZodOptional>; due_date: z.ZodOptional>; purchase_order: z.ZodOptional>; reference_number: z.ZodOptional>; }, "strip", z.ZodTypeAny, { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }, { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }>>; seller_info: z.ZodOptional>; company_name: z.ZodOptional>; address: z.ZodOptional>; city: z.ZodOptional>; postal_code: z.ZodOptional>; country: z.ZodOptional>; }, "strip", z.ZodTypeAny, { street?: string; city?: string; postal_code?: string; country?: string; }, { street?: string; city?: string; postal_code?: string; country?: string; }>>>; phone: z.ZodOptional>; email: z.ZodOptional, z.ZodLiteral]>>; website: z.ZodOptional>; vat_number: z.ZodOptional>; tax_id: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }>>; buyer_info: z.ZodOptional>; company_name: z.ZodOptional>; address: z.ZodOptional>; city: z.ZodOptional>; postal_code: z.ZodOptional>; country: z.ZodOptional>; }, "strip", z.ZodTypeAny, { street?: string; city?: string; postal_code?: string; country?: string; }, { street?: string; city?: string; postal_code?: string; country?: string; }>>>; phone: z.ZodOptional>; email: z.ZodOptional, z.ZodLiteral]>>; website: z.ZodOptional>; vat_number: z.ZodOptional>; tax_id: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }>>; line_items: z.ZodOptional>; description: z.ZodOptional>; quantity: z.ZodOptional>; unit: z.ZodOptional>; unit_price: z.ZodOptional>; discount: z.ZodOptional>; tax_rate: z.ZodOptional>; tax_amount: z.ZodOptional>; line_total: z.ZodOptional>; quantite: z.ZodOptional>; prix_unitaire: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_ttc: z.ZodOptional>; taux_tva: z.ZodOptional>; montant_tva: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }>, "many">>; financial_totals: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; payment_info: z.ZodOptional>; payment_method: z.ZodOptional>; payment_due_date: z.ZodOptional>; bank_details: z.ZodOptional>; iban: z.ZodOptional>; swift_code: z.ZodOptional>; }, "strip", z.ZodTypeAny, { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }, { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }>>; pages: z.ZodOptional>; description: z.ZodOptional>; quantity: z.ZodOptional>; unit: z.ZodOptional>; unit_price: z.ZodOptional>; discount: z.ZodOptional>; tax_rate: z.ZodOptional>; tax_amount: z.ZodOptional>; line_total: z.ZodOptional>; quantite: z.ZodOptional>; prix_unitaire: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_ttc: z.ZodOptional>; taux_tva: z.ZodOptional>; montant_tva: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }>, "many">>; totals: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; sections_detaillees: z.ZodOptional>; prix_unitaire: z.ZodOptional>; montant_ht: z.ZodOptional>; taux_tva: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; }, "strip", z.ZodTypeAny, { quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }, { quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }>>; sous_total: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; }, "strip", z.ZodTypeAny, { items?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }, { items?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>>>; total: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; reference: z.ZodOptional>; exercice: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; raw_data: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }, { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }>, "many">; }, "strip", z.ZodTypeAny, { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }, { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }>, "many">>; extraction_metadata: z.ZodOptional; fields_found: z.ZodNullable; fields_empty: z.ZodNullable; processing_notes: z.ZodOptional>; }, "strip", z.ZodTypeAny, { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }, { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }>>; }, "strip", z.ZodTypeAny, { document_info?: { document_type?: string; language?: string; currency?: string; total_pages?: number; }; invoice_details?: { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }; seller_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; buyer_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; line_items?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; financial_totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; payment_info?: { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }; pages?: { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }[]; extraction_metadata?: { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }; }, { document_info?: { document_type?: string; language?: string; currency?: string; total_pages?: number; }; invoice_details?: { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }; seller_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; buyer_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; line_items?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; financial_totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; payment_info?: { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }; pages?: { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }[]; extraction_metadata?: { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }; }>; tables: z.ZodObject<{ detected_tables: z.ZodOptional>; table_type: z.ZodOptional>; headers: z.ZodOptional>; rows: z.ZodOptional, "many">, "many">>; summary: z.ZodOptional>; }, "strip", z.ZodTypeAny, { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }, { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }>, "many">>; extraction_metadata: z.ZodOptional>; confidence_score: z.ZodOptional>; }, "strip", z.ZodTypeAny, { confidence_score?: number; tables_found?: number; }, { confidence_score?: number; tables_found?: number; }>>; }, "strip", z.ZodTypeAny, { extraction_metadata?: { confidence_score?: number; tables_found?: number; }; detected_tables?: { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }[]; }, { extraction_metadata?: { confidence_score?: number; tables_found?: number; }; detected_tables?: { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }[]; }>; receipt: z.ZodObject<{ merchant_name: z.ZodOptional>; transaction_date: z.ZodOptional>; total_amount: z.ZodOptional>; payment_method: z.ZodOptional>; currency: z.ZodOptional>; items: z.ZodOptional>; price: z.ZodOptional>; quantity: z.ZodOptional>; total: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; quantity?: number; total?: number; price?: number; }, { name?: string; quantity?: number; total?: number; price?: number; }>, "many">>; }, "strip", z.ZodTypeAny, { currency?: string; payment_method?: string; total_amount?: number; items?: { name?: string; quantity?: number; total?: number; price?: number; }[]; merchant_name?: string; transaction_date?: string; }, { currency?: string; payment_method?: string; total_amount?: number; items?: { name?: string; quantity?: number; total?: number; price?: number; }[]; merchant_name?: string; transaction_date?: string; }>; }; /** * Types TypeScript pour les données extraites */ export type { ComprehensiveInvoice, TablesOnly, BasicReceipt, VisionExtractionOptions, PdfProcessorConfig, ProviderConfig }; /** * Configuration des providers disponibles */ export declare const providers: { readonly scaleway: { readonly name: "Scaleway AI"; readonly models: readonly ["mistral-small-3.1-24b-instruct-2503"]; readonly defaultModel: string; }; readonly ollama: { readonly name: "Ollama Local"; readonly models: readonly ["llava:latest", "llava:13b", "llava:34b"]; readonly defaultModel: string; }; readonly mistral: { readonly name: "Mistral AI"; readonly models: readonly ["pixtral-12b-latest", "pixtral-large-latest", "mistral-medium-latest", "mistral-small-latest"]; readonly defaultModel: string; }; readonly custom: { readonly name: "Custom OpenAI-Compatible API"; readonly models: readonly []; readonly defaultModel: string; }; }; declare const _default: { extractPdf: typeof extractPdf; extractPdfWithMetadata: typeof extractPdfWithMetadata; extractInvoicePdf: typeof extractInvoicePdf; extractTablesPdf: typeof extractTablesPdf; extractReceiptPdf: typeof extractReceiptPdf; schemas: { invoice: z.ZodObject<{ document_info: z.ZodOptional>; language: z.ZodOptional>; currency: z.ZodOptional>; total_pages: z.ZodOptional>; }, "strip", z.ZodTypeAny, { document_type?: string; language?: string; currency?: string; total_pages?: number; }, { document_type?: string; language?: string; currency?: string; total_pages?: number; }>>; invoice_details: z.ZodOptional>; invoice_date: z.ZodOptional>; due_date: z.ZodOptional>; purchase_order: z.ZodOptional>; reference_number: z.ZodOptional>; }, "strip", z.ZodTypeAny, { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }, { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }>>; seller_info: z.ZodOptional>; company_name: z.ZodOptional>; address: z.ZodOptional>; city: z.ZodOptional>; postal_code: z.ZodOptional>; country: z.ZodOptional>; }, "strip", z.ZodTypeAny, { street?: string; city?: string; postal_code?: string; country?: string; }, { street?: string; city?: string; postal_code?: string; country?: string; }>>>; phone: z.ZodOptional>; email: z.ZodOptional, z.ZodLiteral]>>; website: z.ZodOptional>; vat_number: z.ZodOptional>; tax_id: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }>>; buyer_info: z.ZodOptional>; company_name: z.ZodOptional>; address: z.ZodOptional>; city: z.ZodOptional>; postal_code: z.ZodOptional>; country: z.ZodOptional>; }, "strip", z.ZodTypeAny, { street?: string; city?: string; postal_code?: string; country?: string; }, { street?: string; city?: string; postal_code?: string; country?: string; }>>>; phone: z.ZodOptional>; email: z.ZodOptional, z.ZodLiteral]>>; website: z.ZodOptional>; vat_number: z.ZodOptional>; tax_id: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }, { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }>>; line_items: z.ZodOptional>; description: z.ZodOptional>; quantity: z.ZodOptional>; unit: z.ZodOptional>; unit_price: z.ZodOptional>; discount: z.ZodOptional>; tax_rate: z.ZodOptional>; tax_amount: z.ZodOptional>; line_total: z.ZodOptional>; quantite: z.ZodOptional>; prix_unitaire: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_ttc: z.ZodOptional>; taux_tva: z.ZodOptional>; montant_tva: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }>, "many">>; financial_totals: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; payment_info: z.ZodOptional>; payment_method: z.ZodOptional>; payment_due_date: z.ZodOptional>; bank_details: z.ZodOptional>; iban: z.ZodOptional>; swift_code: z.ZodOptional>; }, "strip", z.ZodTypeAny, { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }, { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }>>; pages: z.ZodOptional>; description: z.ZodOptional>; quantity: z.ZodOptional>; unit: z.ZodOptional>; unit_price: z.ZodOptional>; discount: z.ZodOptional>; tax_rate: z.ZodOptional>; tax_amount: z.ZodOptional>; line_total: z.ZodOptional>; quantite: z.ZodOptional>; prix_unitaire: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_ttc: z.ZodOptional>; taux_tva: z.ZodOptional>; montant_tva: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }, { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }>, "many">>; totals: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; sections_detaillees: z.ZodOptional>; prix_unitaire: z.ZodOptional>; montant_ht: z.ZodOptional>; taux_tva: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; }, "strip", z.ZodTypeAny, { quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }, { quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }>>; sous_total: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; }, "strip", z.ZodTypeAny, { items?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }, { items?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>>>; total: z.ZodOptional>; discount_total: z.ZodOptional>; tax_total: z.ZodOptional>; shipping_cost: z.ZodOptional>; total_amount: z.ZodOptional>; amount_paid: z.ZodOptional>; balance_due: z.ZodOptional>; total_ht: z.ZodOptional>; total_tva: z.ZodOptional>; total_ttc: z.ZodOptional>; montant_ht: z.ZodOptional>; montant_tva: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }, { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }>>; reference: z.ZodOptional>; exercice: z.ZodOptional>; montant_ttc: z.ZodOptional>; currency: z.ZodOptional>; raw_data: z.ZodOptional>; }, "strip", z.ZodTypeAny, { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }, { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }>, "many">; }, "strip", z.ZodTypeAny, { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }, { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }>, "many">>; extraction_metadata: z.ZodOptional; fields_found: z.ZodNullable; fields_empty: z.ZodNullable; processing_notes: z.ZodOptional>; }, "strip", z.ZodTypeAny, { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }, { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }>>; }, "strip", z.ZodTypeAny, { document_info?: { document_type?: string; language?: string; currency?: string; total_pages?: number; }; invoice_details?: { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }; seller_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; buyer_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; line_items?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; financial_totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; payment_info?: { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }; pages?: { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }[]; extraction_metadata?: { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }; }, { document_info?: { document_type?: string; language?: string; currency?: string; total_pages?: number; }; invoice_details?: { invoice_number?: string; invoice_date?: string; due_date?: string; purchase_order?: string; reference_number?: string; }; seller_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; buyer_info?: { name?: string; company_name?: string; address?: { street?: string; city?: string; postal_code?: string; country?: string; }; phone?: string; email?: any; website?: string; vat_number?: string; tax_id?: string; }; line_items?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; financial_totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; payment_info?: { payment_terms?: string; payment_method?: string; payment_due_date?: string; bank_details?: string; iban?: string; swift_code?: string; }; pages?: { page?: number; page_tables?: { currency?: string; montant_ttc?: number; billed_services?: { currency?: string; item_number?: string; description?: string; quantity?: number; unit?: string; unit_price?: number; discount?: number; tax_rate?: number; tax_amount?: number; line_total?: number; quantite?: number; prix_unitaire?: number; montant_ht?: number; montant_ttc?: number; taux_tva?: number; montant_tva?: number; }[]; totals?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; sections_detaillees?: Record; sous_total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; }>; total?: { currency?: string; montant_ht?: number; montant_ttc?: number; montant_tva?: number; subtotal?: number; discount_total?: number; tax_total?: number; shipping_cost?: number; total_amount?: number; amount_paid?: number; balance_due?: number; total_ht?: number; total_tva?: number; total_ttc?: number; }; reference?: string; exercice?: string; raw_data?: Record; }[]; }[]; extraction_metadata?: { confidence_score?: number; fields_found?: number; fields_empty?: number; processing_notes?: string[]; }; }>; tables: z.ZodObject<{ detected_tables: z.ZodOptional>; table_type: z.ZodOptional>; headers: z.ZodOptional>; rows: z.ZodOptional, "many">, "many">>; summary: z.ZodOptional>; }, "strip", z.ZodTypeAny, { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }, { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }>, "many">>; extraction_metadata: z.ZodOptional>; confidence_score: z.ZodOptional>; }, "strip", z.ZodTypeAny, { confidence_score?: number; tables_found?: number; }, { confidence_score?: number; tables_found?: number; }>>; }, "strip", z.ZodTypeAny, { extraction_metadata?: { confidence_score?: number; tables_found?: number; }; detected_tables?: { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }[]; }, { extraction_metadata?: { confidence_score?: number; tables_found?: number; }; detected_tables?: { table_name?: string; table_type?: string; headers?: string[]; rows?: (string | number)[][]; summary?: string; }[]; }>; receipt: z.ZodObject<{ merchant_name: z.ZodOptional>; transaction_date: z.ZodOptional>; total_amount: z.ZodOptional>; payment_method: z.ZodOptional>; currency: z.ZodOptional>; items: z.ZodOptional>; price: z.ZodOptional>; quantity: z.ZodOptional>; total: z.ZodOptional>; }, "strip", z.ZodTypeAny, { name?: string; quantity?: number; total?: number; price?: number; }, { name?: string; quantity?: number; total?: number; price?: number; }>, "many">>; }, "strip", z.ZodTypeAny, { currency?: string; payment_method?: string; total_amount?: number; items?: { name?: string; quantity?: number; total?: number; price?: number; }[]; merchant_name?: string; transaction_date?: string; }, { currency?: string; payment_method?: string; total_amount?: number; items?: { name?: string; quantity?: number; total?: number; price?: number; }[]; merchant_name?: string; transaction_date?: string; }>; }; providers: { readonly scaleway: { readonly name: "Scaleway AI"; readonly models: readonly ["mistral-small-3.1-24b-instruct-2503"]; readonly defaultModel: string; }; readonly ollama: { readonly name: "Ollama Local"; readonly models: readonly ["llava:latest", "llava:13b", "llava:34b"]; readonly defaultModel: string; }; readonly mistral: { readonly name: "Mistral AI"; readonly models: readonly ["pixtral-12b-latest", "pixtral-large-latest", "mistral-medium-latest", "mistral-small-latest"]; readonly defaultModel: string; }; readonly custom: { readonly name: "Custom OpenAI-Compatible API"; readonly models: readonly []; readonly defaultModel: string; }; }; }; export default _default;