import * as z from "zod/v3";
import { ClosedEnum } from "../../types/enums.js";
import { Result as SafeParseResult } from "../../types/fp.js";
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export declare const ParseChunkingRequestChunkingRequestReturnType: {
    readonly Chunks: "chunks";
    readonly Texts: "texts";
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export type ParseChunkingRequestChunkingRequestReturnType = ClosedEnum<typeof ParseChunkingRequestChunkingRequestReturnType>;
export declare const AgenticChunker: {
    readonly Agentic: "agentic";
};
export type AgenticChunker = ClosedEnum<typeof AgenticChunker>;
/**
 * Agentic LLM-powered chunker that uses AI to determine optimal split points. Best for complex documents requiring intelligent segmentation.
 */
export type AgenticChunkerStrategy = {
    /**
     * The text content to be chunked
     */
    text: string;
    /**
     * Whether to include metadata for each chunk
     */
    metadata?: boolean | undefined;
    /**
     * Return format: chunks (with metadata) or texts (plain strings)
     */
    returnType?: ParseChunkingRequestChunkingRequestReturnType | undefined;
    strategy: AgenticChunker;
    /**
     * Chat model to use for chunking. (Available models)[https://docs.orq.ai/docs/proxy#chat-models]
     */
    model: string;
    /**
     * Maximum tokens per chunk
     */
    chunkSize?: number | undefined;
    /**
     * Size of candidate splits for LLM evaluation
     */
    candidateSize?: number | undefined;
    /**
     * Minimum characters allowed per chunk
     */
    minCharactersPerChunk?: number | undefined;
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export declare const ParseChunkingRequestChunkingReturnType: {
    readonly Chunks: "chunks";
    readonly Texts: "texts";
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export type ParseChunkingRequestChunkingReturnType = ClosedEnum<typeof ParseChunkingRequestChunkingReturnType>;
export declare const SemanticChunker: {
    readonly Semantic: "semantic";
};
export type SemanticChunker = ClosedEnum<typeof SemanticChunker>;
export declare const Threshold2: {
    readonly Auto: "auto";
};
export type Threshold2 = ClosedEnum<typeof Threshold2>;
/**
 * Similarity threshold for grouping (0-1) or "auto" for automatic detection
 */
export type Threshold = number | Threshold2;
/**
 * Chunking mode: window-based or sentence-based similarity
 */
export declare const Mode: {
    readonly Window: "window";
    readonly Sentence: "sentence";
};
/**
 * Chunking mode: window-based or sentence-based similarity
 */
export type Mode = ClosedEnum<typeof Mode>;
/**
 * Groups semantically similar sentences using embeddings. Excellent for maintaining topic coherence and context within chunks.
 */
export type SemanticChunkerStrategy = {
    /**
     * The text content to be chunked
     */
    text: string;
    /**
     * Whether to include metadata for each chunk
     */
    metadata?: boolean | undefined;
    /**
     * Return format: chunks (with metadata) or texts (plain strings)
     */
    returnType?: ParseChunkingRequestChunkingReturnType | undefined;
    strategy: SemanticChunker;
    /**
     * Maximum tokens per chunk
     */
    chunkSize?: number | undefined;
    /**
     * Similarity threshold for grouping (0-1) or "auto" for automatic detection
     */
    threshold?: number | Threshold2 | undefined;
    /**
     * Embedding model to use for semantic similarity. (Available embedding models)[https://docs.orq.ai/docs/proxy#embedding-models]
     */
    embeddingModel: string;
    /**
     * Number of dimensions for the embedding output. Required for text-embedding-3 models. Supported range: 256-3072 for text-embedding-3-large, 256-1536 for text-embedding-3-small.
     */
    dimensions?: number | undefined;
    /**
     * Maximum number of tokens per embedding request. Default is 8191 for text-embedding-3 models.
     */
    maxTokens?: number | undefined;
    /**
     * Chunking mode: window-based or sentence-based similarity
     */
    mode?: Mode | undefined;
    /**
     * Window size for similarity comparison
     */
    similarityWindow?: number | undefined;
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export declare const ParseChunkingRequestReturnType: {
    readonly Chunks: "chunks";
    readonly Texts: "texts";
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export type ParseChunkingRequestReturnType = ClosedEnum<typeof ParseChunkingRequestReturnType>;
export declare const RecursiveChunker: {
    readonly Recursive: "recursive";
};
export type RecursiveChunker = ClosedEnum<typeof RecursiveChunker>;
/**
 * Recursively splits text using a hierarchy of separators (paragraphs, sentences, words). Versatile general-purpose chunker that preserves document structure.
 */
export type RecursiveChunkerStrategy = {
    /**
     * The text content to be chunked
     */
    text: string;
    /**
     * Whether to include metadata for each chunk
     */
    metadata?: boolean | undefined;
    /**
     * Return format: chunks (with metadata) or texts (plain strings)
     */
    returnType?: ParseChunkingRequestReturnType | undefined;
    strategy: RecursiveChunker;
    /**
     * Maximum tokens per chunk
     */
    chunkSize?: number | undefined;
    /**
     * Hierarchy of separators to use for splitting
     */
    separators?: Array<string> | undefined;
    /**
     * Minimum characters allowed per chunk
     */
    minCharactersPerChunk?: number | undefined;
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export declare const ChunkingRequestReturnType: {
    readonly Chunks: "chunks";
    readonly Texts: "texts";
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export type ChunkingRequestReturnType = ClosedEnum<typeof ChunkingRequestReturnType>;
export declare const SentenceChunker: {
    readonly Sentence: "sentence";
};
export type SentenceChunker = ClosedEnum<typeof SentenceChunker>;
/**
 * Splits text at sentence boundaries while respecting token limits. Ideal for maintaining semantic coherence and readability.
 */
export type SentenceChunkerStrategy = {
    /**
     * The text content to be chunked
     */
    text: string;
    /**
     * Whether to include metadata for each chunk
     */
    metadata?: boolean | undefined;
    /**
     * Return format: chunks (with metadata) or texts (plain strings)
     */
    returnType?: ChunkingRequestReturnType | undefined;
    strategy: SentenceChunker;
    /**
     * Maximum tokens per chunk
     */
    chunkSize?: number | undefined;
    /**
     * Number of overlapping tokens between chunks
     */
    chunkOverlap?: number | undefined;
    /**
     * Minimum number of sentences per chunk
     */
    minSentencesPerChunk?: number | undefined;
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export declare const ReturnTypeT: {
    readonly Chunks: "chunks";
    readonly Texts: "texts";
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export type ReturnTypeT = ClosedEnum<typeof ReturnTypeT>;
export declare const TokenChunker: {
    readonly Token: "token";
};
export type TokenChunker = ClosedEnum<typeof TokenChunker>;
/**
 * Splits text based on token count. Best for ensuring chunks fit within LLM context windows and maintaining consistent chunk sizes for embedding models.
 */
export type TokenChunkerStrategy = {
    /**
     * The text content to be chunked
     */
    text: string;
    /**
     * Whether to include metadata for each chunk
     */
    metadata?: boolean | undefined;
    /**
     * Return format: chunks (with metadata) or texts (plain strings)
     */
    returnType?: ReturnTypeT | undefined;
    strategy: TokenChunker;
    /**
     * Maximum tokens per chunk
     */
    chunkSize?: number | undefined;
    /**
     * Number of tokens to overlap between chunks
     */
    chunkOverlap?: number | undefined;
};
/**
 * Request payload for text chunking with strategy-specific configuration
 */
export type ParseChunkingRequest = SemanticChunkerStrategy | AgenticChunkerStrategy | TokenChunkerStrategy | SentenceChunkerStrategy | RecursiveChunkerStrategy;
export type ParseMetadata = {
    startIndex: number | null;
    endIndex: number | null;
    tokenCount: number | null;
};
export type Chunks = {
    /**
     * The text content of the chunk
     */
    text: string;
    /**
     * The position index of this chunk in the sequence
     */
    index: number;
    metadata?: ParseMetadata | undefined;
};
/**
 * Text successfully chunked
 */
export type ParseResponseBody = {
    chunks: Array<Chunks>;
};
/** @internal */
export declare const ParseChunkingRequestChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType>;
/** @internal */
export declare const ParseChunkingRequestChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType>;
/** @internal */
export declare const AgenticChunker$inboundSchema: z.ZodNativeEnum<typeof AgenticChunker>;
/** @internal */
export declare const AgenticChunker$outboundSchema: z.ZodNativeEnum<typeof AgenticChunker>;
/** @internal */
export declare const AgenticChunkerStrategy$inboundSchema: z.ZodType<AgenticChunkerStrategy, z.ZodTypeDef, unknown>;
/** @internal */
export type AgenticChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: string;
    model: string;
    chunk_size: number;
    candidate_size: number;
    min_characters_per_chunk: number;
};
/** @internal */
export declare const AgenticChunkerStrategy$outboundSchema: z.ZodType<AgenticChunkerStrategy$Outbound, z.ZodTypeDef, AgenticChunkerStrategy>;
export declare function agenticChunkerStrategyToJSON(agenticChunkerStrategy: AgenticChunkerStrategy): string;
export declare function agenticChunkerStrategyFromJSON(jsonString: string): SafeParseResult<AgenticChunkerStrategy, SDKValidationError>;
/** @internal */
export declare const ParseChunkingRequestChunkingReturnType$inboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType>;
/** @internal */
export declare const ParseChunkingRequestChunkingReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType>;
/** @internal */
export declare const SemanticChunker$inboundSchema: z.ZodNativeEnum<typeof SemanticChunker>;
/** @internal */
export declare const SemanticChunker$outboundSchema: z.ZodNativeEnum<typeof SemanticChunker>;
/** @internal */
export declare const Threshold2$inboundSchema: z.ZodNativeEnum<typeof Threshold2>;
/** @internal */
export declare const Threshold2$outboundSchema: z.ZodNativeEnum<typeof Threshold2>;
/** @internal */
export declare const Threshold$inboundSchema: z.ZodType<Threshold, z.ZodTypeDef, unknown>;
/** @internal */
export type Threshold$Outbound = number | string;
/** @internal */
export declare const Threshold$outboundSchema: z.ZodType<Threshold$Outbound, z.ZodTypeDef, Threshold>;
export declare function thresholdToJSON(threshold: Threshold): string;
export declare function thresholdFromJSON(jsonString: string): SafeParseResult<Threshold, SDKValidationError>;
/** @internal */
export declare const Mode$inboundSchema: z.ZodNativeEnum<typeof Mode>;
/** @internal */
export declare const Mode$outboundSchema: z.ZodNativeEnum<typeof Mode>;
/** @internal */
export declare const SemanticChunkerStrategy$inboundSchema: z.ZodType<SemanticChunkerStrategy, z.ZodTypeDef, unknown>;
/** @internal */
export type SemanticChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: string;
    chunk_size: number;
    threshold?: number | string | undefined;
    embedding_model: string;
    dimensions?: number | undefined;
    max_tokens?: number | undefined;
    mode: string;
    similarity_window: number;
};
/** @internal */
export declare const SemanticChunkerStrategy$outboundSchema: z.ZodType<SemanticChunkerStrategy$Outbound, z.ZodTypeDef, SemanticChunkerStrategy>;
export declare function semanticChunkerStrategyToJSON(semanticChunkerStrategy: SemanticChunkerStrategy): string;
export declare function semanticChunkerStrategyFromJSON(jsonString: string): SafeParseResult<SemanticChunkerStrategy, SDKValidationError>;
/** @internal */
export declare const ParseChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestReturnType>;
/** @internal */
export declare const ParseChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestReturnType>;
/** @internal */
export declare const RecursiveChunker$inboundSchema: z.ZodNativeEnum<typeof RecursiveChunker>;
/** @internal */
export declare const RecursiveChunker$outboundSchema: z.ZodNativeEnum<typeof RecursiveChunker>;
/** @internal */
export declare const RecursiveChunkerStrategy$inboundSchema: z.ZodType<RecursiveChunkerStrategy, z.ZodTypeDef, unknown>;
/** @internal */
export type RecursiveChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: string;
    chunk_size: number;
    separators?: Array<string> | undefined;
    min_characters_per_chunk: number;
};
/** @internal */
export declare const RecursiveChunkerStrategy$outboundSchema: z.ZodType<RecursiveChunkerStrategy$Outbound, z.ZodTypeDef, RecursiveChunkerStrategy>;
export declare function recursiveChunkerStrategyToJSON(recursiveChunkerStrategy: RecursiveChunkerStrategy): string;
export declare function recursiveChunkerStrategyFromJSON(jsonString: string): SafeParseResult<RecursiveChunkerStrategy, SDKValidationError>;
/** @internal */
export declare const ChunkingRequestReturnType$inboundSchema: z.ZodNativeEnum<typeof ChunkingRequestReturnType>;
/** @internal */
export declare const ChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<typeof ChunkingRequestReturnType>;
/** @internal */
export declare const SentenceChunker$inboundSchema: z.ZodNativeEnum<typeof SentenceChunker>;
/** @internal */
export declare const SentenceChunker$outboundSchema: z.ZodNativeEnum<typeof SentenceChunker>;
/** @internal */
export declare const SentenceChunkerStrategy$inboundSchema: z.ZodType<SentenceChunkerStrategy, z.ZodTypeDef, unknown>;
/** @internal */
export type SentenceChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: string;
    chunk_size: number;
    chunk_overlap: number;
    min_sentences_per_chunk: number;
};
/** @internal */
export declare const SentenceChunkerStrategy$outboundSchema: z.ZodType<SentenceChunkerStrategy$Outbound, z.ZodTypeDef, SentenceChunkerStrategy>;
export declare function sentenceChunkerStrategyToJSON(sentenceChunkerStrategy: SentenceChunkerStrategy): string;
export declare function sentenceChunkerStrategyFromJSON(jsonString: string): SafeParseResult<SentenceChunkerStrategy, SDKValidationError>;
/** @internal */
export declare const ReturnTypeT$inboundSchema: z.ZodNativeEnum<typeof ReturnTypeT>;
/** @internal */
export declare const ReturnTypeT$outboundSchema: z.ZodNativeEnum<typeof ReturnTypeT>;
/** @internal */
export declare const TokenChunker$inboundSchema: z.ZodNativeEnum<typeof TokenChunker>;
/** @internal */
export declare const TokenChunker$outboundSchema: z.ZodNativeEnum<typeof TokenChunker>;
/** @internal */
export declare const TokenChunkerStrategy$inboundSchema: z.ZodType<TokenChunkerStrategy, z.ZodTypeDef, unknown>;
/** @internal */
export type TokenChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: string;
    chunk_size: number;
    chunk_overlap: number;
};
/** @internal */
export declare const TokenChunkerStrategy$outboundSchema: z.ZodType<TokenChunkerStrategy$Outbound, z.ZodTypeDef, TokenChunkerStrategy>;
export declare function tokenChunkerStrategyToJSON(tokenChunkerStrategy: TokenChunkerStrategy): string;
export declare function tokenChunkerStrategyFromJSON(jsonString: string): SafeParseResult<TokenChunkerStrategy, SDKValidationError>;
/** @internal */
export declare const ParseChunkingRequest$inboundSchema: z.ZodType<ParseChunkingRequest, z.ZodTypeDef, unknown>;
/** @internal */
export type ParseChunkingRequest$Outbound = SemanticChunkerStrategy$Outbound | AgenticChunkerStrategy$Outbound | TokenChunkerStrategy$Outbound | SentenceChunkerStrategy$Outbound | RecursiveChunkerStrategy$Outbound;
/** @internal */
export declare const ParseChunkingRequest$outboundSchema: z.ZodType<ParseChunkingRequest$Outbound, z.ZodTypeDef, ParseChunkingRequest>;
export declare function parseChunkingRequestToJSON(parseChunkingRequest: ParseChunkingRequest): string;
export declare function parseChunkingRequestFromJSON(jsonString: string): SafeParseResult<ParseChunkingRequest, SDKValidationError>;
/** @internal */
export declare const ParseMetadata$inboundSchema: z.ZodType<ParseMetadata, z.ZodTypeDef, unknown>;
/** @internal */
export type ParseMetadata$Outbound = {
    start_index: number | null;
    end_index: number | null;
    token_count: number | null;
};
/** @internal */
export declare const ParseMetadata$outboundSchema: z.ZodType<ParseMetadata$Outbound, z.ZodTypeDef, ParseMetadata>;
export declare function parseMetadataToJSON(parseMetadata: ParseMetadata): string;
export declare function parseMetadataFromJSON(jsonString: string): SafeParseResult<ParseMetadata, SDKValidationError>;
/** @internal */
export declare const Chunks$inboundSchema: z.ZodType<Chunks, z.ZodTypeDef, unknown>;
/** @internal */
export type Chunks$Outbound = {
    text: string;
    index: number;
    metadata?: ParseMetadata$Outbound | undefined;
};
/** @internal */
export declare const Chunks$outboundSchema: z.ZodType<Chunks$Outbound, z.ZodTypeDef, Chunks>;
export declare function chunksToJSON(chunks: Chunks): string;
export declare function chunksFromJSON(jsonString: string): SafeParseResult<Chunks, SDKValidationError>;
/** @internal */
export declare const ParseResponseBody$inboundSchema: z.ZodType<ParseResponseBody, z.ZodTypeDef, unknown>;
/** @internal */
export type ParseResponseBody$Outbound = {
    chunks: Array<Chunks$Outbound>;
};
/** @internal */
export declare const ParseResponseBody$outboundSchema: z.ZodType<ParseResponseBody$Outbound, z.ZodTypeDef, ParseResponseBody>;
export declare function parseResponseBodyToJSON(parseResponseBody: ParseResponseBody): string;
export declare function parseResponseBodyFromJSON(jsonString: string): SafeParseResult<ParseResponseBody, SDKValidationError>;
//# sourceMappingURL=parse.d.ts.map