export type ScanOrderLogLevel = 'info' | 'warning' | 'error' | 'debug';
export type ScanOrderLoggerProviderType = 'feishu' | 'grafana';
export interface ScanOrderLoggerProviderFeishuConfig {
    webhook?: string;
    /**
     * 节流窗口毫秒数，默认 3000ms
     * - >0：首条日志进入队列并启动定时器，窗口结束后合并成一条 Feishu post 统一发送
     * - <=0：关闭节流，保持每条日志立即单独发送
     */
    throttleMs?: number;
}
export interface ScanOrderLoggerProviderGrafanaConfig {
    endpoint?: string;
    headers?: Record<string, string>;
}
export interface ScanOrderLoggerProviderConfig {
    feishu?: ScanOrderLoggerProviderFeishuConfig;
    grafana?: ScanOrderLoggerProviderGrafanaConfig;
}
export interface ScanOrderLoggerContext {
    cacheId?: string;
    solutionName?: string;
    moduleName?: string;
    [key: string]: any;
}
export interface ScanOrderLogInput {
    level?: ScanOrderLogLevel;
    title: string;
    payload?: Record<string, any>;
    extra?: Record<string, any>;
    timestamp?: string;
}
export interface ScanOrderLogRecord {
    level: ScanOrderLogLevel;
    title: string;
    timestamp: string;
    payload: Record<string, any>;
    extra: Record<string, any>;
    context: ScanOrderLoggerContext;
}
export interface ScanOrderLoggerDispatchPayload {
    record: ScanOrderLogRecord;
    providerConfig?: ScanOrderLoggerProviderConfig;
}
export interface ScanOrderLoggerProvider {
    send: (payload: ScanOrderLoggerDispatchPayload) => Promise<void>;
}
export interface ScanOrderLoggerState {
    provider: ScanOrderLoggerProviderType;
    providerConfig: ScanOrderLoggerProviderConfig;
    context: ScanOrderLoggerContext;
}
