import { schemas } from '../api/schema.gen';
import { z } from 'zod';

// Re-export simple types directly
export type {
    LlmModel,
    LlmProvider,
    DataSourceConfig,
    AnalysisModuleConfig,
    DataSourceProvider, 
} from '../api/schema.gen';

export type TestConfigRequest = z.infer<typeof schemas.TestConfigRequest>;
export type TestLlmConfigRequest = z.infer<typeof schemas.TestLlmConfigRequest>;
export type AnalysisTemplateSet = z.infer<typeof schemas.AnalysisTemplateSet>;

// Infer map types from Zod schemas to ensure Record<string, T>
export type LlmProvidersConfig = z.infer<typeof schemas.LlmProvidersConfig>;
export type DataSourcesConfig = z.infer<typeof schemas.DataSourcesConfig>;
export type AnalysisTemplateSets = z.infer<typeof schemas.AnalysisTemplateSets>;

// Runtime Enum for DataSourceProvider
export const DataSourceProviders = schemas.DataSourceProvider.enum;
