import * as z from "zod/v3";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
 * URL of the image to process
 */
export type ImageUrl2 = {
    url: string;
    detail?: string | undefined;
};
export type DocumentImageUrl = ImageUrl2 | string;
export type Document2 = {
    type: "image_url";
    imageUrl: ImageUrl2 | string;
};
export type Document1 = {
    type: "document_url";
    /**
     * URL of the document to process
     */
    documentUrl: string;
    /**
     * The name of the document
     */
    documentName?: string | undefined;
};
/**
 * Document to run OCR on. Can be a DocumentURLChunk or ImageURLChunk.
 */
export type Document = Document1 | Document2;
/**
 * Optional settings for the OCR run
 */
export type OcrSettings = {
    /**
     * Whether to include image Base64 in the response. Null for default.
     */
    includeImageBase64?: boolean | null | undefined;
    /**
     * Maximum number of images to extract. Null for no limit.
     */
    maxImagesToInclude?: number | undefined;
    /**
     * Minimum height and width of image to extract. Null for no minimum.
     */
    imageMinSize?: number | undefined;
};
/**
 * input
 */
export type PostV2RouterOcrRequestBody = {
    /**
     * ID of the model to use for OCR.
     */
    model: string;
    /**
     * Document to run OCR on. Can be a DocumentURLChunk or ImageURLChunk.
     */
    document: Document1 | Document2;
    /**
     * Specific pages to process. Can be a single number, range, or list. Starts from 0. Null for all pages.
     */
    pages?: Array<number> | null | undefined;
    /**
     * Optional settings for the OCR run
     */
    ocrSettings?: OcrSettings | undefined;
};
export type Images = {
    /**
     * The id of the image
     */
    id: string;
    /**
     * The base64 encoded image
     */
    imageBase64?: string | null | undefined;
};
/**
 * The dimensions of the PDF Page's screenshot image
 */
export type Dimensions = {
    /**
     * Dots per inch of the page-image
     */
    dpi: number;
    /**
     * Height of the image in pixels
     */
    height: number;
    /**
     * Width of the image in pixels
     */
    width: number;
};
export type Pages = {
    /**
     * The page index in a pdf document starting from 0
     */
    index: number;
    /**
     * The markdown string response of the page
     */
    markdown: string;
    images: Array<Images>;
    /**
     * The dimensions of the PDF Page's screenshot image
     */
    dimensions?: Dimensions | null | undefined;
};
/**
 * The usage information for the OCR run counted as tokens processed
 */
export type Usage2 = {
    type: "tokens";
    /**
     * The number of tokens processed
     */
    tokensProcessed: number;
};
/**
 * The usage information for the OCR run counted as pages processed
 */
export type Usage1 = {
    type: "pages";
    /**
     * The number of pages processed
     */
    pagesProcessed: number;
};
export type PostV2RouterOcrUsage = Usage1 | Usage2;
/**
 * Represents an OCR response from the API.
 */
export type PostV2RouterOcrResponseBody = {
    /**
     * ID of the model used for OCR.
     */
    model: string;
    pages: Array<Pages>;
    usage: Usage1 | Usage2;
};
/** @internal */
export type ImageUrl2$Outbound = {
    url: string;
    detail?: string | undefined;
};
/** @internal */
export declare const ImageUrl2$outboundSchema: z.ZodType<ImageUrl2$Outbound, z.ZodTypeDef, ImageUrl2>;
export declare function imageUrl2ToJSON(imageUrl2: ImageUrl2): string;
/** @internal */
export type DocumentImageUrl$Outbound = ImageUrl2$Outbound | string;
/** @internal */
export declare const DocumentImageUrl$outboundSchema: z.ZodType<DocumentImageUrl$Outbound, z.ZodTypeDef, DocumentImageUrl>;
export declare function documentImageUrlToJSON(documentImageUrl: DocumentImageUrl): string;
/** @internal */
export type Document2$Outbound = {
    type: "image_url";
    image_url: ImageUrl2$Outbound | string;
};
/** @internal */
export declare const Document2$outboundSchema: z.ZodType<Document2$Outbound, z.ZodTypeDef, Document2>;
export declare function document2ToJSON(document2: Document2): string;
/** @internal */
export type Document1$Outbound = {
    type: "document_url";
    document_url: string;
    document_name?: string | undefined;
};
/** @internal */
export declare const Document1$outboundSchema: z.ZodType<Document1$Outbound, z.ZodTypeDef, Document1>;
export declare function document1ToJSON(document1: Document1): string;
/** @internal */
export type Document$Outbound = Document1$Outbound | Document2$Outbound;
/** @internal */
export declare const Document$outboundSchema: z.ZodType<Document$Outbound, z.ZodTypeDef, Document>;
export declare function documentToJSON(document: Document): string;
/** @internal */
export type OcrSettings$Outbound = {
    include_image_base64?: boolean | null | undefined;
    max_images_to_include?: number | undefined;
    image_min_size?: number | undefined;
};
/** @internal */
export declare const OcrSettings$outboundSchema: z.ZodType<OcrSettings$Outbound, z.ZodTypeDef, OcrSettings>;
export declare function ocrSettingsToJSON(ocrSettings: OcrSettings): string;
/** @internal */
export type PostV2RouterOcrRequestBody$Outbound = {
    model: string;
    document: Document1$Outbound | Document2$Outbound;
    pages?: Array<number> | null | undefined;
    ocr_settings?: OcrSettings$Outbound | undefined;
};
/** @internal */
export declare const PostV2RouterOcrRequestBody$outboundSchema: z.ZodType<PostV2RouterOcrRequestBody$Outbound, z.ZodTypeDef, PostV2RouterOcrRequestBody>;
export declare function postV2RouterOcrRequestBodyToJSON(postV2RouterOcrRequestBody: PostV2RouterOcrRequestBody): string;
/** @internal */
export declare const Images$inboundSchema: z.ZodType<Images, z.ZodTypeDef, unknown>;
export declare function imagesFromJSON(jsonString: string): SafeParseResult<Images, SDKValidationError>;
/** @internal */
export declare const Dimensions$inboundSchema: z.ZodType<Dimensions, z.ZodTypeDef, unknown>;
export declare function dimensionsFromJSON(jsonString: string): SafeParseResult<Dimensions, SDKValidationError>;
/** @internal */
export declare const Pages$inboundSchema: z.ZodType<Pages, z.ZodTypeDef, unknown>;
export declare function pagesFromJSON(jsonString: string): SafeParseResult<Pages, SDKValidationError>;
/** @internal */
export declare const Usage2$inboundSchema: z.ZodType<Usage2, z.ZodTypeDef, unknown>;
export declare function usage2FromJSON(jsonString: string): SafeParseResult<Usage2, SDKValidationError>;
/** @internal */
export declare const Usage1$inboundSchema: z.ZodType<Usage1, z.ZodTypeDef, unknown>;
export declare function usage1FromJSON(jsonString: string): SafeParseResult<Usage1, SDKValidationError>;
/** @internal */
export declare const PostV2RouterOcrUsage$inboundSchema: z.ZodType<PostV2RouterOcrUsage, z.ZodTypeDef, unknown>;
export declare function postV2RouterOcrUsageFromJSON(jsonString: string): SafeParseResult<PostV2RouterOcrUsage, SDKValidationError>;
/** @internal */
export declare const PostV2RouterOcrResponseBody$inboundSchema: z.ZodType<PostV2RouterOcrResponseBody, z.ZodTypeDef, unknown>;
export declare function postV2RouterOcrResponseBodyFromJSON(jsonString: string): SafeParseResult<PostV2RouterOcrResponseBody, SDKValidationError>;
//# sourceMappingURL=postv2routerocr.d.ts.map