@aidalinfo/pdf-processor
Version:
Powerful PDF data extraction library powered by AI vision models. Transform PDFs into structured, validated data using TypeScript, Zod, and AI providers like Scaleway and Ollama.
1,366 lines • 51.4 kB
TypeScript
import { z } from 'zod';
/**
* Schémas spécifiques aux factures et reçus
*/
export declare const InvoiceLineItemSchema: z.ZodObject<{
item_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
line_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
quantite: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
prix_unitaire: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
taux_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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;
}>;
export declare const FinancialTotalsSchema: z.ZodObject<{
subtotal: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
shipping_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
amount_paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
balance_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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;
}>;
export declare const InvoiceDetailsSchema: z.ZodObject<{
invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
invoice_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
purchase_order: z.ZodOptional<z.ZodNullable<z.ZodString>>;
reference_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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;
}>;
export declare const ComprehensiveInvoiceSchema: z.ZodObject<{
document_info: z.ZodOptional<z.ZodObject<{
document_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
language: z.ZodOptional<z.ZodNullable<z.ZodString>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
total_pages: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
}, "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<z.ZodObject<{
invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
invoice_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
purchase_order: z.ZodOptional<z.ZodNullable<z.ZodString>>;
reference_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodObject<{
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
company_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
street?: string;
city?: string;
postal_code?: string;
country?: string;
}, {
street?: string;
city?: string;
postal_code?: string;
country?: string;
}>>>;
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
email: z.ZodOptional<z.ZodUnion<[z.ZodNullable<z.ZodString>, z.ZodLiteral<any>]>>;
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
vat_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodObject<{
name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
company_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
street: z.ZodOptional<z.ZodNullable<z.ZodString>>;
city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "strip", z.ZodTypeAny, {
street?: string;
city?: string;
postal_code?: string;
country?: string;
}, {
street?: string;
city?: string;
postal_code?: string;
country?: string;
}>>>;
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
email: z.ZodOptional<z.ZodUnion<[z.ZodNullable<z.ZodString>, z.ZodLiteral<any>]>>;
website: z.ZodOptional<z.ZodNullable<z.ZodString>>;
vat_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
tax_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodArray<z.ZodObject<{
item_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
line_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
quantite: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
prix_unitaire: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
taux_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodObject<{
subtotal: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
shipping_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
amount_paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
balance_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodObject<{
payment_terms: z.ZodOptional<z.ZodNullable<z.ZodString>>;
payment_method: z.ZodOptional<z.ZodNullable<z.ZodString>>;
payment_due_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
bank_details: z.ZodOptional<z.ZodNullable<z.ZodString>>;
iban: z.ZodOptional<z.ZodNullable<z.ZodString>>;
swift_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodArray<z.ZodObject<{
page: z.ZodNumber;
page_tables: z.ZodArray<z.ZodObject<{
billed_services: z.ZodOptional<z.ZodArray<z.ZodObject<{
item_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
unit: z.ZodOptional<z.ZodNullable<z.ZodString>>;
unit_price: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_rate: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
line_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
quantite: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
prix_unitaire: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
taux_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodObject<{
subtotal: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
shipping_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
amount_paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
balance_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodRecord<z.ZodString, z.ZodObject<{
items: z.ZodRecord<z.ZodString, z.ZodObject<{
quantite: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
prix_unitaire: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
taux_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
}, "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<z.ZodObject<{
subtotal: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
shipping_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
amount_paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
balance_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<z.ZodObject<{
subtotal: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
discount_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
tax_total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
shipping_cost: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
amount_paid: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
balance_due: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
total_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ht: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_tva: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, "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<z.ZodString>;
exercice: z.ZodOptional<z.ZodNullable<z.ZodString>>;
montant_ttc: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
raw_data: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "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<string, {
items?: Record<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, any>;
}, {
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<string, {
items?: Record<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, any>;
}>, "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<string, {
items?: Record<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, any>;
}[];
}, {
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<string, {
items?: Record<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, any>;
}[];
}>, "many">>;
extraction_metadata: z.ZodOptional<z.ZodObject<{
confidence_score: z.ZodNullable<z.ZodNumber>;
fields_found: z.ZodNullable<z.ZodNumber>;
fields_empty: z.ZodNullable<z.ZodNumber>;
processing_notes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "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<string, {
items?: Record<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, any>;
}[];
}[];
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<string, {
items?: Record<string, {
quantite?: number;
prix_unitaire?: number;
montant_ht?: number;
montant_ttc?: number;
taux_tva?: number;
montant_tva?: number;
}>;
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<string, any>;
}[];
}[];
extraction_metadata?: {
confidence_score?: number;
fields_found?: number;
fields_empty?: number;
processing_notes?: string[];
};
}>;
export declare const BasicReceiptSchema: z.ZodObject<{
merchant_name: z.ZodOptional<z.ZodNullable<z.