import { ILogDestination, LogEntry, LogFilter, ICamstackAddon, IConfigurable, AddonManifest, AddonContext, CapabilityProviderMap, ConfigUISchema } from '@camstack/types';

interface WinstonConfig {
    readonly level: string;
    readonly retentionDays: number;
    /** Resolved absolute path to the logs directory (replaces the old dataPath field). */
    readonly logsDir: string;
}
declare class WinstonDestination implements ILogDestination {
    private logger;
    initialize(config?: WinstonConfig): Promise<void>;
    write(entry: LogEntry): void;
    query(_filter: LogFilter): Promise<readonly LogEntry[]>;
    shutdown(): Promise<void>;
}

declare class WinstonLoggingAddon implements ICamstackAddon, IConfigurable {
    readonly manifest: AddonManifest;
    private destination;
    private currentConfig;
    initialize(context: AddonContext): Promise<void>;
    shutdown(): Promise<void>;
    getDestination(): WinstonDestination;
    getCapabilityProvider<K extends keyof CapabilityProviderMap>(name: K): CapabilityProviderMap[K] | null;
    getConfigSchema(): ConfigUISchema;
    getConfig(): Record<string, unknown>;
    onConfigChange(config: Record<string, unknown>): Promise<void>;
}

export { WinstonDestination, WinstonLoggingAddon, WinstonLoggingAddon as default };
