export interface WebhookRecord { type: 'webhook'; timestamp: number; platform: string; method: string; url: string; headers: Record; body: string; } export interface ApiCallRecord { type: 'api-call'; timestamp: number; platform: string; method: string; args: unknown[]; response?: unknown; error?: string; } export interface FetchRecord { type: 'fetch'; timestamp: number; method: string; url: string; durationMs: number; requestHeaders?: Record; requestBody?: string; responseHeaders?: Record; responseBody?: string; status?: number; error?: string; } export type ChannelIntegrationRecord = WebhookRecord | ApiCallRecord | FetchRecord; export declare class ChannelIntegrationRecorder { private readonly enabled; private readonly sessionId; private readonly recordingDir; private originalFetch; private fetchUrlPatterns; private readonly pendingRecords; constructor(options?: { enabled?: boolean; sessionId?: string; recordingDir?: string; }); get isEnabled(): boolean; get currentSessionId(): string; get currentSessionPath(): string; recordWebhook(platform: string, request: Request): Promise; recordApiCall(platform: string, method: string, args: unknown[], response?: unknown, error?: Error): Promise; startFetchRecording(urlPatterns?: RegExp[]): void; stopFetchRecording(): void; listSessions(): Promise>; getRecords(sessionId?: string): Promise; exportRecords(sessionId?: string): Promise; deleteSession(sessionId?: string): Promise; flush(): Promise; private appendRecord; private recordBestEffort; private trackPendingRecord; } export declare const channelIntegrationRecorder: ChannelIntegrationRecorder;