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 ParseChunkingRequestChunkingRequestRequestBodyReturnType: {
    readonly Chunks: "chunks";
    readonly Texts: "texts";
};
/**
 * Return format: chunks (with metadata) or texts (plain strings)
 */
export type ParseChunkingRequestChunkingRequestRequestBodyReturnType = ClosedEnum<typeof ParseChunkingRequestChunkingRequestRequestBodyReturnType>;
/**
 * High-performance SIMD-optimized byte-level chunking. Best for large files (>1MB) where speed and memory efficiency are critical. 2x faster and 3x less memory than token-based chunking.
 */
export type FastChunkerStrategy = {
    /**
     * 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?: ParseChunkingRequestChunkingRequestRequestBodyReturnType | undefined;
    strategy: "fast";
    /**
     * Target chunk size in bytes
     */
    targetSize?: number | undefined;
    /**
     * Single-byte delimiter characters. Each character is treated as a separate delimiter (e.g., ".?!" splits on period, question mark, or exclamation). Use escaped sequences for special chars.
     */
    delimiters?: string | undefined;
    /**
     * Multi-byte pattern for splitting (e.g., "▁" for SentencePiece tokenizers). Takes precedence over delimiters if set.
     */
    pattern?: string | undefined;
    /**
     * Attach delimiter to start of next chunk instead of end of current chunk
     */
    prefix?: boolean | undefined;
    /**
     * When true, splits at the START of consecutive delimiter runs, keeping the run with the following chunk (e.g., splits before "\n\n\n" not in the middle)
     */
    consecutive?: boolean | undefined;
    /**
     * Search forward if no delimiter found in backward search window
     */
    forwardFallback?: boolean | undefined;
};
/**
 * 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>;
/**
 * 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: "agentic";
    /**
     * Model to use for chunking. (Available models)[https://docs.orq.ai/docs/proxy/supported-models#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 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 ChunkingRequestMode: {
    readonly Window: "window";
    readonly Sentence: "sentence";
};
/**
 * Chunking mode: window-based or sentence-based similarity
 */
export type ChunkingRequestMode = ClosedEnum<typeof ChunkingRequestMode>;
/**
 * 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: "semantic";
    /**
     * 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/supported-models#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?: ChunkingRequestMode | 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>;
/**
 * 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: "recursive";
    /**
     * 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>;
/**
 * 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: "sentence";
    /**
     * 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>;
/**
 * 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: "token";
    /**
     * 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 = TokenChunkerStrategy | SentenceChunkerStrategy | RecursiveChunkerStrategy | SemanticChunkerStrategy | AgenticChunkerStrategy | FastChunkerStrategy;
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 ParseChunkingRequestChunkingRequestRequestBodyReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestRequestBodyReturnType>;
/** @internal */
export type FastChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: "fast";
    target_size: number;
    delimiters: string;
    pattern?: string | undefined;
    prefix: boolean;
    consecutive: boolean;
    forward_fallback: boolean;
};
/** @internal */
export declare const FastChunkerStrategy$outboundSchema: z.ZodType<FastChunkerStrategy$Outbound, z.ZodTypeDef, FastChunkerStrategy>;
export declare function fastChunkerStrategyToJSON(fastChunkerStrategy: FastChunkerStrategy): string;
/** @internal */
export declare const ParseChunkingRequestChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingRequestReturnType>;
/** @internal */
export type AgenticChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: "agentic";
    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;
/** @internal */
export declare const ParseChunkingRequestChunkingReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestChunkingReturnType>;
/** @internal */
export declare const Threshold2$outboundSchema: z.ZodNativeEnum<typeof Threshold2>;
/** @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;
/** @internal */
export declare const ChunkingRequestMode$outboundSchema: z.ZodNativeEnum<typeof ChunkingRequestMode>;
/** @internal */
export type SemanticChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: "semantic";
    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;
/** @internal */
export declare const ParseChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<typeof ParseChunkingRequestReturnType>;
/** @internal */
export type RecursiveChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: "recursive";
    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;
/** @internal */
export declare const ChunkingRequestReturnType$outboundSchema: z.ZodNativeEnum<typeof ChunkingRequestReturnType>;
/** @internal */
export type SentenceChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: "sentence";
    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;
/** @internal */
export declare const ReturnTypeT$outboundSchema: z.ZodNativeEnum<typeof ReturnTypeT>;
/** @internal */
export type TokenChunkerStrategy$Outbound = {
    text: string;
    metadata: boolean;
    return_type: string;
    strategy: "token";
    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;
/** @internal */
export type ParseChunkingRequest$Outbound = TokenChunkerStrategy$Outbound | SentenceChunkerStrategy$Outbound | RecursiveChunkerStrategy$Outbound | SemanticChunkerStrategy$Outbound | AgenticChunkerStrategy$Outbound | FastChunkerStrategy$Outbound;
/** @internal */
export declare const ParseChunkingRequest$outboundSchema: z.ZodType<ParseChunkingRequest$Outbound, z.ZodTypeDef, ParseChunkingRequest>;
export declare function parseChunkingRequestToJSON(parseChunkingRequest: ParseChunkingRequest): string;
/** @internal */
export declare const ParseMetadata$inboundSchema: z.ZodType<ParseMetadata, z.ZodTypeDef, unknown>;
export declare function parseMetadataFromJSON(jsonString: string): SafeParseResult<ParseMetadata, SDKValidationError>;
/** @internal */
export declare const Chunks$inboundSchema: z.ZodType<Chunks, z.ZodTypeDef, unknown>;
export declare function chunksFromJSON(jsonString: string): SafeParseResult<Chunks, SDKValidationError>;
/** @internal */
export declare const ParseResponseBody$inboundSchema: z.ZodType<ParseResponseBody, z.ZodTypeDef, unknown>;
export declare function parseResponseBodyFromJSON(jsonString: string): SafeParseResult<ParseResponseBody, SDKValidationError>;
//# sourceMappingURL=parse.d.ts.map