UNPKG

@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.

28 lines (27 loc) 823 B
import { z } from 'zod'; /** * Factory pour création et sélection de schémas */ export declare class SchemaFactory { /** * Crée un schéma Zod à partir d'un JSON Schema utilisateur * Pour compatibilité avec les requêtes JSON existantes */ static createFromJSON(jsonSchema: string): z.ZodSchema; /** * Convertit un JSON Schema en schéma Zod (conversion basique) */ private static convertJSONSchemaToZod; /** * Convertit une propriété JSON Schema en Zod */ private static convertPropertyToZod; /** * Obtient le type Zod pour un type string */ private static getZodTypeForString; /** * Obtient le schéma préconfiguré selon le type de document */ static getSchemaForDocumentType(documentType: string): z.ZodSchema; }