import type { TriggerAction, TriggerErrorCode } from './trigger-types.js';
export interface TriggerLogEntry {
    triggerId: string;
    connectorId?: string;
    action: TriggerAction | 'failed';
    status: 'ok' | 'error';
    error?: string;
    errorCode?: TriggerErrorCode;
    createdAt: string;
}
export interface TriggerLogListOptions {
    limit?: number;
    connectorId?: string;
    status?: TriggerLogEntry['status'];
    errorCode?: TriggerErrorCode;
    since?: string | Date;
}
export interface TriggerLogStats {
    connectorId?: string;
    total: number;
    ok: number;
    error: number;
    actions: Partial<Record<TriggerLogEntry['action'], number>>;
    errorCodes: Partial<Record<TriggerErrorCode, number>>;
    lastTriggeredAt?: string;
    lastOkAt?: string;
    lastErrorAt?: string;
    lastError?: string;
    lastErrorCode?: TriggerErrorCode;
}
export interface TriggerLogPruneResult {
    before: number;
    after: number;
    deleted: number;
}
export declare function appendTriggerLog(entry: Omit<TriggerLogEntry, 'createdAt'> & {
    createdAt?: string;
}, dataDir?: string): TriggerLogEntry;
export declare function listTriggerLogs(opts?: TriggerLogListOptions, dataDir?: string): TriggerLogEntry[];
export declare function summarizeTriggerLogs(opts?: Pick<TriggerLogListOptions, 'connectorId' | 'since'>, dataDir?: string): TriggerLogStats[];
export declare function pruneTriggerLogs(opts?: {
    retentionDays?: number;
    maxEntries?: number;
    now?: Date | string | number;
}, dataDir?: string): TriggerLogPruneResult;
//# sourceMappingURL=trigger-log-store.d.ts.map