/** * Log Entries Interface * 日志条目接口 */ import { PipelineIOEntry } from './IRequestContext'; /** * Pipeline Request Log Entry * 流水线请求日志条目 */ export interface PipelineRequestLogEntry { requestId: string; pipelineId: string; timestamp: number; provider: string; operation: string; request: { headers?: Record; body: any; metadata?: Record; }; response: { status: number; headers?: Record; body: any; metadata?: Record; }; duration: number; success: boolean; error?: string; stages: any[]; } /** * Pipeline Error Log Entry * 流水线错误日志条目 */ export interface PipelineErrorLogEntry { requestId: string; pipelineId: string; timestamp: number; provider: string; operation: string; error: { message: string; stack?: string; code?: string; type: string; }; request: { headers?: Record; body: any; metadata?: Record; }; failedStage?: string; stages: any[]; debugInfo?: Record; } /** * Pipeline System Log Entry * 流水线系统日志条目 */ export interface PipelineSystemLogEntry { level: 'debug' | 'info' | 'warn' | 'error'; message: string; timestamp: number; requestId?: string; provider?: string; operation?: string; metadata?: Record; } /** * Pipeline Performance Metrics * 流水线性能指标 */ export interface PipelinePerformanceMetrics { requestId: string; pipelineId: string; provider: string; operation: string; totalDuration: number; validationDuration?: number; mappingDuration?: number; executionDuration?: number; responseDuration?: number; success: boolean; error?: string; stagePerformance: { [stage: string]: { duration: number; success: boolean; error?: string; }; }; } /** * Pipeline Log Entry Types Union * 流水线日志条目类型联合 */ export type PipelineLogEntry = PipelineRequestLogEntry | PipelineErrorLogEntry | PipelineSystemLogEntry | PipelinePerformanceMetrics; /** * Log Entry Manager Interface * 日志条目管理器接口 */ export interface ILogEntryManager { createRequestLogEntry(entry: Omit): void; createErrorLogEntry(entry: Omit): void; createSystemLogEntry(entry: Omit): void; createPerformanceMetricsEntry(entry: Omit): void; getRequestLogEntries(requestId?: string): PipelineRequestLogEntry[]; getErrorLogEntries(requestId?: string): PipelineErrorLogEntry[]; getSystemLogEntries(level?: string): PipelineSystemLogEntry[]; getPerformanceMetrics(requestId?: string): PipelinePerformanceMetrics[]; createPipelineIOEntry(entry: Omit): void; getPipelineIOEntries(pipelineId?: string): PipelineIOEntry[]; clearEntries(): void; clearEntriesByRequestId(requestId: string): void; } //# sourceMappingURL=ILogEntries.d.ts.map