//!!! DO NOT EDIT THIS FILE, IT IS AUTO-GENERATED !!!//

import { MilvusConfig } from '@smythos/sre';
import { PineconeConfig } from '@smythos/sre';
import { RAMVectorDBConfig } from '@smythos/sre';
import { AccessCandidate } from '@smythos/sre';
import { VectorDBInstance } from '../../VectorDB/VectorDBInstance.class';
import { Scope } from '../SDKTypes';

// Define VectorDB provider settings mapping
export type TVectorDBProviderSettings = {
    default: {} // Empty config for default provider
    Milvus: MilvusConfig & {scope?: Scope | AccessCandidate}
    Pinecone: PineconeConfig & {scope?: Scope | AccessCandidate}
    RAMVec: RAMVectorDBConfig & {scope?: Scope | AccessCandidate}
};

export type TAllVectorDBProviderSettings = TVectorDBProviderSettings & IVectorDBProviders;

// #region [ Handle extendable VectorDB Providers ] ================================================
// Base provider type derived from settings
export type TBuiltinVectorDBProvider = keyof TVectorDBProviderSettings;

// Extensible interface for custom providers
export interface IVectorDBProviders {}
// Combined provider type that can be extended
export type TVectorDBProvider = TBuiltinVectorDBProvider | keyof IVectorDBProviders;

// For backward compatibility, export the built-in providers as enum-like object
export const TVectorDBProvider: Record<TBuiltinVectorDBProvider, TBuiltinVectorDBProvider> = {
    default: 'default',
    Milvus: 'Milvus',
    Pinecone: 'Pinecone',
    RAMVec: 'RAMVec',
} as const;

// #endregion


// Generic type to get settings for a specific provider
export type TVectorDBSettingsFor<T extends TVectorDBProvider> = TAllVectorDBProviderSettings[T];

export type TVectorDBProviderInstances = {
    [K in TVectorDBProvider]: (namespace: string, settings?: TVectorDBSettingsFor<K>, scope?: Scope | AccessCandidate) => VectorDBInstance;
};
