export type VersoErrorCode = 'VALIDATION_ERROR' | 'DIMENSION_MISMATCH' | 'DUPLICATE_VECTOR' | 'COLLECTION_NOT_FOUND' | 'COLLECTION_EXISTS' | 'VECTOR_NOT_FOUND' | 'STORAGE_ERROR' | 'CORRUPT_COLLECTION' | 'CORRUPT_MANIFEST' | 'QUANTIZATION_ERROR' | 'ABORTED' | 'CLOSED' | string; export interface VersoErrorOptions { operation?: string; collection?: string; details?: unknown; cause?: unknown; } /** Stable base error with machine-readable context for application code. */ export declare class VersoError extends Error { readonly code: VersoErrorCode; readonly operation?: string; readonly collection?: string; readonly details?: unknown; readonly cause?: unknown; constructor(message: string, code: VersoErrorCode, options?: VersoErrorOptions); } /** Internal name retained for errors thrown by the storage/index engine. */ export declare class VectorDBError extends VersoError { constructor(message: string, code: VersoErrorCode, options?: VersoErrorOptions); } /** * Thrown when vector dimensions don't match expected dimensions */ export declare class DimensionMismatchError extends VectorDBError { readonly expected: number; readonly actual: number; constructor(expected: number, actual: number, context?: string); } /** * Thrown when attempting to add a vector with an ID that already exists */ export declare class DuplicateVectorError extends VectorDBError { readonly ids: string[]; constructor(ids: string[]); } /** Stable product-level name for duplicate record identifiers. */ export declare class DuplicateRecordError extends DuplicateVectorError { constructor(ids: string[]); } /** * Thrown when a requested collection does not exist */ export declare class CollectionNotFoundError extends VectorDBError { readonly collectionName: string; constructor(collectionName: string); } /** * Thrown when attempting to create a collection that already exists */ export declare class CollectionExistsError extends VectorDBError { readonly collectionName: string; constructor(collectionName: string); } /** * Thrown when a storage operation fails */ export declare class StorageError extends VectorDBError { readonly operation: string; readonly path?: string; constructor(operation: string, message: string, path?: string); } /** * Thrown when quantization operations fail */ export declare class QuantizationError extends VectorDBError { constructor(message: string); } /** * Thrown when a vector is not found in the index */ export declare class VectorNotFoundError extends VectorDBError { readonly vectorId: string | number; constructor(vectorId: string | number); } /** Namespace form keeps error handling discoverable without string codes. */ export declare const errors: Readonly<{ VersoError: typeof VersoError; VectorDBError: typeof VectorDBError; DimensionMismatch: typeof DimensionMismatchError; DimensionMismatchError: typeof DimensionMismatchError; DuplicateRecord: typeof DuplicateRecordError; DuplicateRecordError: typeof DuplicateRecordError; CollectionNotFound: typeof CollectionNotFoundError; CollectionExists: typeof CollectionExistsError; Storage: typeof StorageError; Quantization: typeof QuantizationError; VectorNotFound: typeof VectorNotFoundError; }>; //# sourceMappingURL=errors.d.ts.map