/**
 * MongoDB Atlas Vector Store Node - Version 1
 * Discriminator: mode=update
 */


interface Credentials {
  mongoDb: CredentialReference;
}

/** Update documents in vector store by ID */
export type LcVectorStoreMongoDBAtlasV1UpdateParams = {
  /**
   * Updates a single document by `id`. Declare with `vectorStore({...})`. Required subnodes: `embedding`. Only available on stores whose `operationModes` enables it — most providers omit this mode.
   * <patterns>
   * <pattern title="update mode — update document by ID (generic)">
   * // Substitute the type literal and provider-specific parameters — see the rest of this file.
   * const store = vectorStore({
   *   type: '@n8n/n8n-nodes-langchain.vectorStoreXxx',
   *   config: {
   *     name: 'Knowledge Base',
   *     parameters: { mode: 'update', id: expr('{{ $json.docId }}') },
   *     subnodes: { embedding: embeddingsOpenAi }
   *   }
   * });
   * </pattern>
   * </patterns>
   */
  mode: 'update';
  mongoCollection?: { __rl: true; mode: 'list' | 'name'; value: string; cachedResultName?: string };
/**
 * The field with the embedding array
 * @default embedding
 */
    embedding?: string | Expression<string>;
/**
 * The text field of the raw data
 * @default text
 */
    metadata_field?: string | Expression<string>;
/**
 * The name of the vector index
 */
    vectorIndexName: string | Expression<string>;
/**
 * ID of an embedding entry
 */
    id: string | Expression<string>;
};

export interface LcVectorStoreMongoDBAtlasV1UpdateSubnodeConfig {
  embedding: EmbeddingInstance | EmbeddingInstance[];
}

export type LcVectorStoreMongoDBAtlasV1UpdateNode = {
  type: '@n8n/n8n-nodes-langchain.vectorStoreMongoDBAtlas';
  version: 1;
  config: NodeConfig<LcVectorStoreMongoDBAtlasV1UpdateParams> & { credentials?: Credentials } & { subnodes: LcVectorStoreMongoDBAtlasV1UpdateSubnodeConfig };
};