import { ZodType } from "zod"; import { ConfigService } from "@nestjs/config"; import { BaseConfigInterface } from "../../../config/interfaces"; /** * Calls Mistral Document AI (OCR) on Azure AI Foundry. * * NOTE: this does NOT use the @mistralai/mistralai SDK — that SDK hardcodes Mistral's cloud * route (`/v1/ocr`) and cannot target the Azure Foundry route * (`/providers/mistral/azure/ocr`). We POST directly with Bearer auth instead. * The wire format is snake_case (image_url, document_annotation_format → json_schema.schema, * response document_annotation), built from the caller's Zod schema via convertZodToJsonSchema. * * `documentType` is returned as the raw extracted string; callers cast it to their own * domain enum (the service stays domain-agnostic). */ export declare class DocumentAiService { private readonly config; private readonly logger; private readonly CALL_TIMEOUT_MS; constructor(config: ConfigService); extract(params: { imageDataUrl: string; outputSchema: ZodType; }): Promise<{ documentType: string | null; fields: Record; confidence: number; tokenUsage: { input: number; output: number; }; ocrText: string; /** * Number of pages the OCR provider actually processed. OCR is billed PER PAGE, not * per token, so this is the only usable cost signal for this call — callers multiply * it by `ai.documentAi.costPerPage` and record it as a `costOverride`. */ pages: number; }>; } //# sourceMappingURL=document-ai.service.d.ts.map