/**
 * Qdrant Vector Store Node - Version 1
 * Discriminator: mode=insert
 */


interface Credentials {
  qdrantApi: CredentialReference;
}

/** Insert documents into vector store */
export type LcVectorStoreQdrantV1InsertParams = {
  /**
   * Sits on the main flow — pipe the documents you want to embed into this node. Declare with `vectorStore({...})`. Required subnodes: `embedding` and `documentLoader`. If the goal is letting an LLM query the store, use `mode: 'retrieve-as-tool'` instead.
   * <patterns>
   * <pattern title="insert mode — upsert documents (generic, works for any vectorStore* node)">
   * // Substitute the type literal and provider-specific parameters (e.g. pineconeIndex,
   * // qdrantCollection, supabaseTableName) — see the rest of this file for the exact shape.
   * const store = vectorStore({
   *   type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
   *   config: {
   *     name: 'Knowledge Base',
   *     parameters: {
   *       mode: 'insert',
   *       // ...provider-specific parameters
   *     },
   *     subnodes: { embedding: embeddingsOpenAi, documentLoader: defaultDataLoader }
   *   }
   * });
   * </pattern>
   * </patterns>
   */
  mode: 'insert';
  qdrantCollection?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * Options
 * @default {}
 */
    options?: {
    /** JSON options for creating a collection. &lt;a href="https://qdrant.tech/documentation/concepts/collections"&gt;Learn more&lt;/a&gt;.
     */
    collectionConfig?: IDataObject | string | Expression<string>;
    /** The key to use for the content payload in Qdrant. Default is "content".
     * @default content
     */
    contentPayloadKey?: string | Expression<string>;
    /** The key to use for the metadata payload in Qdrant. Default is "metadata".
     * @default metadata
     */
    metadataPayloadKey?: string | Expression<string>;
  };
};

export interface LcVectorStoreQdrantV1InsertSubnodeConfig {
  embedding: EmbeddingInstance | EmbeddingInstance[];
  documentLoader: DocumentLoaderInstance | DocumentLoaderInstance[];
}

export type LcVectorStoreQdrantV1InsertNode = {
  type: '@n8n/n8n-nodes-langchain.vectorStoreQdrant';
  version: 1;
  config: NodeConfig<LcVectorStoreQdrantV1InsertParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreQdrantV1InsertSubnodeConfig };
};