import { BaseNode } from '@llamaindex/core/schema';
import { BaseVectorStore, VectorStoreBaseParams, VectorStoreQuery, VectorStoreQueryResult } from '@llamaindex/core/vector-store';
import { QdrantClient, Schemas } from '@qdrant/js-client-rest';

type QdrantSearchParams = Schemas["SearchParams"];
type PointStruct = {
    id: string;
    payload: Record<string, string>;
    vector: number[];
};
type QdrantParams = {
    collectionName?: string;
    client?: QdrantClient;
    url?: string;
    apiKey?: string;
    batchSize?: number;
} & VectorStoreBaseParams;
/**
 * Qdrant vector store.
 */
declare class QdrantVectorStore extends BaseVectorStore {
    storesText: boolean;
    batchSize: number;
    collectionName: string;
    private db;
    private collectionInitialized;
    /**
     * Creates a new QdrantVectorStore.
     * @param collectionName Qdrant collection name
     * @param client Qdrant client
     * @param url Qdrant URL
     * @param apiKey Qdrant API key
     * @param batchSize Number of vectors to upload in a single batch
     * @param embedModel Embedding model
     */
    constructor({ collectionName, client, url, apiKey, batchSize, ...init }: QdrantParams);
    /**
     * Returns the Qdrant client.
     * @returns Qdrant client
     */
    client(): QdrantClient;
    /**
     * Creates a collection in Qdrant.
     * @param collectionName Qdrant collection name
     * @param vectorSize Dimensionality of the vectors
     */
    createCollection(collectionName: string, vectorSize: number): Promise<void>;
    /**
     * Checks if the collection exists in Qdrant and creates it if not.
     * @param collectionName Qdrant collection name
     * @returns
     */
    collectionExists(collectionName: string): Promise<boolean>;
    /**
     * Initializes the collection in Qdrant.
     * @param vectorSize Dimensionality of the vectors
     */
    initializeCollection(vectorSize: number): Promise<void>;
    /**
     * Builds a list of points from the given nodes.
     * @param nodes
     * @returns
     */
    buildPoints(nodes: BaseNode[]): Promise<{
        points: PointStruct[];
        ids: string[];
    }>;
    /**
     * Adds the given nodes to the vector store.
     * @param embeddingResults List of nodes
     * @returns List of node IDs
     */
    add(embeddingResults: BaseNode[]): Promise<string[]>;
    /**
     * Deletes the given nodes from the vector store.
     * @param refDocId Node ID
     */
    delete(refDocId: string): Promise<void>;
    /**
     * Converts the result of a query to a VectorStoreQueryResult.
     * @param response Query response
     * @returns VectorStoreQueryResult
     */
    private parseToQueryResult;
    /**
     * Queries the vector store for the closest matching data to the query embeddings.
     * @param query The VectorStoreQuery to be used
     * @param options Required by VectorStore interface.
     * @returns Zero or more Document instances with data from the vector store.
     */
    query(query: VectorStoreQuery<QdrantSearchParams | undefined>, options?: object): Promise<VectorStoreQueryResult>;
}

export { QdrantVectorStore };
