import type { InstanceAiMcpConnectionToolResponse, InstanceAiMcpUpdateConnectionRequestDto } from '@n8n/api-types';
import { Logger } from '@n8n/backend-common';
import { OutboundHttp, SsrfProtectionService } from '@n8n/backend-network';
import { SsrfProtectionConfig } from '@n8n/config';
import type { CredentialsEntity, User } from '@n8n/db';
import type { McpServerConfig } from '@n8n/instance-ai';
import { CredentialsFinderService } from '../../../credentials/credentials-finder.service';
import { CredentialsService } from '../../../credentials/credentials.service';
import { EventService } from '../../../events/event.service';
import { McpRegistryService } from '../../../modules/mcp-registry/registry/mcp-registry.service';
import type { McpRegistryServer } from '../../../modules/mcp-registry/registry/mcp-registry.types';
import { OauthService } from '../../../oauth/oauth.service';
import type { InstanceAiMcpRegistryConnection } from '../entities/instance-ai-mcp-registry-connection.entity';
import { InstanceAiMcpRegistryConnectionRepository } from '../repositories/instance-ai-mcp-registry-connection.repository';
export declare class InstanceAiMcpRegistryService {
    private readonly connectionRepository;
    private readonly mcpRegistryService;
    private readonly credentialsFinderService;
    private readonly credentialsService;
    private readonly oauthService;
    private readonly eventService;
    private readonly outboundHttp;
    private readonly ssrfConfig;
    private readonly ssrfProtectionService;
    private readonly logger;
    constructor(logger: Logger, connectionRepository: InstanceAiMcpRegistryConnectionRepository, mcpRegistryService: McpRegistryService, credentialsFinderService: CredentialsFinderService, credentialsService: CredentialsService, oauthService: OauthService, eventService: EventService, outboundHttp: OutboundHttp, ssrfConfig: SsrfProtectionConfig, ssrfProtectionService: SsrfProtectionService);
    listConnectionsForUser(user: User): Promise<InstanceAiMcpRegistryConnection[]>;
    createConnection(user: User, input: {
        serverSlug: string;
        credentialId: string;
    }): Promise<{
        connection: InstanceAiMcpRegistryConnection;
        credential: CredentialsEntity;
        server: McpRegistryServer;
    }>;
    deleteConnection(user: User, id: string): Promise<void>;
    updateConnection(user: User, id: string, payload: InstanceAiMcpUpdateConnectionRequestDto): Promise<InstanceAiMcpRegistryConnection>;
    listConnectionTools(user: User, id: string): Promise<InstanceAiMcpConnectionToolResponse[]>;
    getRegistryMcpServers(user: User): Promise<McpServerConfig[]>;
    private resolveRegistryServer;
    private buildRegistryServerFetch;
    private buildOAuth2FetchContext;
    private getCredentialWithData;
    private swapCredential;
}
