import type { InstanceAiAdminSettingsResponse, InstanceAiAdminSettingsUpdateRequest, InstanceAiUserPreferencesResponse, InstanceAiUserPreferencesUpdateRequest, InstanceAiModelCredential, InstanceAiPermissions } from '@n8n/api-types';
import { GlobalConfig } from '@n8n/config';
import { SettingsRepository, UserRepository } from '@n8n/db';
import type { User } from '@n8n/db';
import type { ModelConfig } from '@n8n/instance-ai';
import { CredentialsFinderService } from '../../credentials/credentials-finder.service';
import { CredentialsService } from '../../credentials/credentials.service';
import { AiService } from '../../services/ai.service';
import { UserService } from '../../services/user.service';
export declare class InstanceAiSettingsService {
    private readonly settingsRepository;
    private readonly userRepository;
    private readonly userService;
    private readonly aiService;
    private readonly credentialsService;
    private readonly credentialsFinderService;
    private readonly config;
    private readonly deploymentConfig;
    private enabled;
    private permissions;
    private adminDaytonaCredentialId;
    private adminN8nSandboxCredentialId;
    private adminSearchCredentialId;
    private optinModalDismissed;
    constructor(globalConfig: GlobalConfig, settingsRepository: SettingsRepository, userRepository: UserRepository, userService: UserService, aiService: AiService, credentialsService: CredentialsService, credentialsFinderService: CredentialsFinderService);
    private get isCloud();
    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): Promise<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 static readonly CLOUD_MANAGED_ADMIN_FIELDS;
    private static readonly CLOUD_MANAGED_PREFERENCE_FIELDS;
    private rejectManagedFields;
    private envVarModelConfig;
    private extractModelName;
    private applyAdminSettings;
    private readUserPreferences;
    private persistAdminSettings;
}
