import type { OkraOptions } from './types'; import { OkraClient } from './client'; /** * Extraction phase names. */ export type ExtractionPhase = 'ocr' | 'enhance' | 'metadata' | 'verify'; /** * A provider plugin that handles one or more extraction phases. */ export interface OkraProvider { name: string; supportedPhases: ExtractionPhase[]; } /** * Middleware that wraps the client with cross-cutting concerns. */ export interface OkraMiddleware { name: string; /** Middleware config passed through to the worker as capabilities. */ config: Record; } export interface CreateOkraOptions extends OkraOptions { /** Registered provider plugins. */ providers?: Record; /** Map extraction phases to provider names. */ extraction?: Partial>; /** Middleware stack applied to requests. */ middleware?: OkraMiddleware[]; /** BYOK vendor keys sent as passthrough headers on every upload (e.g. { llamaparse: 'llx-...' }). */ vendorKeys?: Record; } /** * Factory function — AI SDK-style provider abstraction. * * ```ts * import { createOkra } from '@okrapdf/runtime'; * import { azureDocAI } from '@okrapdf/azure-docai'; * * const okra = createOkra({ * apiKey: 'okra_...', * providers: { azureDocAI }, * extraction: { ocr: 'azureDocAI' }, * }); * ``` */ export declare function createOkra(options: CreateOkraOptions): OkraClient; export declare function withCache(opts: { by: 'pdf-hash' | 'content-hash'; }): OkraMiddleware; export declare function withQualityScore(opts: { threshold: number; }): OkraMiddleware; export declare function withSecret(namespace: string, opts?: { required?: boolean; }): OkraMiddleware; //# sourceMappingURL=providers.d.ts.map