import { OnModuleInit } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { PrismaService } from '../database/prisma.service';
type UpdateIntegrationConfigInput = {
    category?: string;
    displayName?: string;
    enabled?: boolean;
    publicConfig?: Record<string, unknown>;
    secretConfig?: Record<string, unknown>;
    clearPublicKeys?: string[];
    clearSecretKeys?: string[];
};
export declare class IntegrationConfigService implements OnModuleInit {
    private readonly prisma;
    private readonly config;
    private readonly cache;
    constructor(prisma: PrismaService, config: ConfigService);
    onModuleInit(): Promise<void>;
    refreshCache(): Promise<void>;
    listTemplates(): import("./integration-config.types").IntegrationTemplate[];
    listConfigs(): {
        category: string;
        provider: string;
        displayName: string;
        enabled: boolean;
        configured: boolean;
        publicConfig: Record<string, unknown>;
        secrets: {
            [k: string]: {
                configured: boolean;
                masked: string | null;
            };
        };
        template: {
            publicKeys: string[];
            secretKeys: string[];
            description: string;
        } | null;
        updatedById: string | null;
        updatedAt: Date | null;
    }[];
    getConfig(provider: string): {
        category: string;
        provider: string;
        displayName: string;
        enabled: boolean;
        configured: boolean;
        publicConfig: Record<string, unknown>;
        secrets: {
            [k: string]: {
                configured: boolean;
                masked: string | null;
            };
        };
        template: {
            publicKeys: string[];
            secretKeys: string[];
            description: string;
        } | null;
        updatedById: string | null;
        updatedAt: Date | null;
    };
    updateConfig(provider: string, input: UpdateIntegrationConfigInput, actorId: string): Promise<{
        category: string;
        provider: string;
        displayName: string;
        enabled: boolean;
        configured: boolean;
        publicConfig: Record<string, unknown>;
        secrets: {
            [k: string]: {
                configured: boolean;
                masked: string | null;
            };
        };
        template: {
            publicKeys: string[];
            secretKeys: string[];
            description: string;
        } | null;
        updatedById: string | null;
        updatedAt: Date | null;
    }>;
    getValue(provider: string, key: string, envKey?: string, fallback?: string): string;
    getPublicValue(provider: string, key: string, envKey?: string): string | undefined;
    getSecretValue(provider: string, key: string, envKey?: string): string | undefined;
    isEnabled(provider: string): boolean;
    hasUsableValue(value?: string | null): boolean;
    private describeProvider;
    private cachedPublicValue;
    private cachedSecretValue;
    private normalizeCategory;
    private cleanPublicConfig;
    private encryptSecretConfig;
    private encrypt;
    private decrypt;
    private decryptOptional;
    private encryptionKey;
    private maskSecret;
    private jsonObject;
    private stringMap;
    private toJson;
}
export {};
