import { GlobalConfig } from '@n8n/config';
import { SettingsRepository } from '@n8n/db';
import type { User } from '@n8n/db';
import type { InstanceAiAdminSettingsResponse, InstanceAiAdminSettingsUpdateRequest, InstanceAiUserPreferencesResponse, InstanceAiUserPreferencesUpdateRequest, InstanceAiModelCredential, InstanceAiPermissions } from '@n8n/api-types';
import type { ModelConfig } from '@n8n/instance-ai';
import { AiService } from '../../services/ai.service';
import { CredentialsFinderService } from '../../credentials/credentials-finder.service';
import { CredentialsService } from '../../credentials/credentials.service';
export declare class InstanceAiSettingsService {
    private readonly settingsRepository;
    private readonly aiService;
    private readonly credentialsService;
    private readonly credentialsFinderService;
    private readonly config;
    private enabled;
    private permissions;
    private adminDaytonaCredentialId;
    private adminN8nSandboxCredentialId;
    private adminSearchCredentialId;
    private optinModalDismissed;
    private readonly userPreferences;
    constructor(globalConfig: GlobalConfig, settingsRepository: SettingsRepository, aiService: AiService, credentialsService: CredentialsService, credentialsFinderService: CredentialsFinderService);
    isProxyEnabled(): boolean;
    loadFromDb(): Promise<void>;
    getAdminSettings(): InstanceAiAdminSettingsResponse;
    updateAdminSettings(update: InstanceAiAdminSettingsUpdateRequest): Promise<InstanceAiAdminSettingsResponse>;
    getUserPreferences(user: User): Promise<InstanceAiUserPreferencesResponse>;
    updateUserPreferences(user: User, update: InstanceAiUserPreferencesUpdateRequest): Promise<InstanceAiUserPreferencesResponse>;
    listModelCredentials(user: User): Promise<InstanceAiModelCredential[]>;
    listServiceCredentials(user: User): Promise<InstanceAiModelCredential[]>;
    resolveDaytonaConfig(user: User): Promise<{
        apiUrl?: string;
        apiKey?: string;
    }>;
    resolveN8nSandboxConfig(user: User): Promise<{
        serviceUrl?: string;
        apiKey?: string;
    }>;
    resolveSearchConfig(user: User): Promise<{
        braveApiKey?: string;
        searxngUrl?: string;
    }>;
    getPermissions(): InstanceAiPermissions;
    isLocalGatewayDisabledForUser(userId: string): boolean;
    isAgentEnabled(): boolean;
    isLocalGatewayDisabled(): boolean;
    isInstanceAiEnabled(): boolean;
    resolveModelName(user: User): Promise<string>;
    resolveModelConfig(user: User): Promise<ModelConfig>;
    private static readonly PROXY_MANAGED_ADMIN_FIELDS;
    private static readonly PROXY_MANAGED_PREFERENCE_FIELDS;
    private rejectProxyManagedFields;
    private envVarModelConfig;
    private extractModelName;
    private applyAdminSettings;
    private loadUserPreferences;
    private persistAdminSettings;
    private persistUserPreferences;
}
