UNPKG

@entro314labs/ai-changelog-generator

Version:

AI-powered changelog generator with MCP server support - works with most providers, online and local models

110 lines (109 loc) 3.09 kB
/** * Credential Testing Service * * Validates credentials by making actual API calls to providers. * Caches results to avoid excessive API calls. */ export declare class CredentialTestingService { [key: string]: any; constructor(options?: Record<string, any>); /** * Test a credential for a specific provider * * @param {string} provider - Provider name * @param {string} credential - Credential to test * @param {Object} config - Additional configuration (endpoints, etc.) * @returns {Promise<Object>} { valid, error, metadata } */ testCredential(provider: any, credential: any, config?: Record<string, any>): Promise<any>; /** * Test all configured credentials * * @param {Object} credentialManager - UnifiedCredentialManager instance * @returns {Promise<Map>} Map of provider -> test result */ testAllCredentials(credentialManager: any): Promise<Map<any, any>>; /** * Validate credential format (without API call) * * @param {string} provider - Provider name * @param {string} credential - Credential to validate * @returns {Object} { valid, error } */ validateFormat(provider: any, credential: any, config?: Record<string, any>): { valid: boolean; error: any; } | { valid: any; error: string | null; }; /** * Invalidate cache for a provider/credential * * @param {string} provider - Provider name * @param {string} credential - Credential */ invalidateCache(provider: any, credential: any): void; /** * Clear all cached results */ clearCache(): void; /** * Test OpenAI credential * @private */ _testOpenAI(apiKey: any, _config: any): Promise<unknown>; /** * Test Anthropic credential * @private */ _testAnthropic(apiKey: any, _config: any): Promise<unknown>; /** * Test Google (Gemini) credential * @private */ _testGoogle(credential: any, config: any): Promise<unknown>; /** * Test Azure OpenAI credential * @private */ _testAzure(credential: any, config: any): Promise<unknown>; /** * Test AWS Bedrock credential * @private */ _testBedrock(credential: any, config: any): Promise<{ valid: boolean; error: string | null; metadata: { region: any; model: any; }; }>; /** * Test Hugging Face credential * @private */ _testHuggingFace(token: any, _config: any): Promise<unknown>; /** * Test Ollama connection * @private */ _testOllama(config: any): Promise<unknown>; /** * Test LM Studio connection * @private */ _testLMStudio(config: any): Promise<unknown>; /** * Make HTTPS request * @private */ _makeRequest(options: any, postData?: any): Promise<unknown>; /** * Simple hash function for cache keys * @private */ _hash(str: any): string; } export default CredentialTestingService;