/**
 * Weaviate Vector Store Node - Version 1.2
 * Discriminator: mode=insert
 */


interface Credentials {
  weaviateApi: CredentialReference;
}

/** Insert documents into vector store */
export type LcVectorStoreWeaviateV12InsertParams = {
  /**
   * 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';
  weaviateCollection?: { __rl: true; mode: 'list' | 'id'; value: string; cachedResultName?: string };
/**
 * Number of documents to embed in a single batch
 * @default 200
 */
    embeddingBatchSize?: number | Expression<number>;
/**
 * Options
 * @default {}
 */
    options?: {
    /** Tenant Name. Collection must have been created with tenant support enabled.
     */
    tenant?: string | Expression<string>;
    /** The key in the document that contains the embedded text
     * @default text
     */
    textKey?: string | Expression<string>;
    /** Whether to skip init checks while instantiating the client
     * @default false
     */
    skip_init_checks?: boolean | Expression<boolean>;
    /** Number of timeout seconds for initial checks
     * @default 2
     */
    timeout_init?: number | Expression<number>;
    /** Number of timeout seconds for inserts
     * @default 90
     */
    timeout_insert?: number | Expression<number>;
    /** Number of timeout seconds for queries
     * @default 30
     */
    timeout_query?: number | Expression<number>;
    /** Proxy to use for GRPC
     */
    proxy_grpc?: string | Expression<string>;
    /** Whether to clear the Collection/Tenant before inserting new data
     * @default false
     */
    clearStore?: boolean | Expression<boolean>;
  };
};

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

export type LcVectorStoreWeaviateV12InsertNode = {
  type: '@n8n/n8n-nodes-langchain.vectorStoreWeaviate';
  version: 1.2;
  credentials?: Credentials;
  config: NodeConfig<LcVectorStoreWeaviateV12InsertParams> & { subnodes: LcVectorStoreWeaviateV12InsertSubnodeConfig };
};