import "../../config-DDAC7XCF.js"; import { a as ProxyErrorType } from "../../types-CfIx-Sbs.js"; //#region src/services/proxy/recorder.d.ts interface BodyPreview { bodyPreview?: string; truncated?: boolean; size?: number; } interface HeadersPreview { headers?: Record; } interface ProxyRecord { id: string; method: string; path: string; model?: string; provider?: string; streaming?: boolean; status?: number; durationMs?: number; upstreamStatus?: number; upstreamDurationMs?: number; retryCount?: number; errorType?: ProxyErrorType; errorMessage?: string; startedAt: number; finishedAt?: number; request: HeadersPreview & BodyPreview; response?: HeadersPreview & BodyPreview; upstream?: { url?: string; status?: number; headers?: Record; } & BodyPreview; } interface ProxyEventStoreOptions { maxRecords?: number; maxBodyBytes?: number; captureBodies?: boolean; } type Subscriber = (record: ProxyRecord) => void; declare class ProxyEventStore { #private; constructor(options?: ProxyEventStoreOptions); startRecord(data: { id: string; method: string; path: string; model?: string; provider?: string; streaming?: boolean; headers?: Headers | Record; body?: unknown; }): ProxyRecord; updateRecord(id: string, patch: Partial>): ProxyRecord | null; finalizeRecord(id: string, data: { status?: number; durationMs?: number; finishedAt?: number; responseHeaders?: Headers | Record; responseBody?: unknown; upstream?: ProxyRecord["upstream"]; errorType?: ProxyErrorType; errorMessage?: string; retryCount?: number; }): ProxyRecord | null; getSnapshot(): ProxyRecord[]; subscribe(subscriber: Subscriber): () => void; } declare function sanitizeHeaders(headers: Headers | Record | undefined): Record | undefined; declare function makeBodyPreview(body: unknown, maxBytes: number, captureBodies: boolean): BodyPreview; //#endregion export { ProxyEventStore, ProxyEventStoreOptions, ProxyRecord, makeBodyPreview, sanitizeHeaders };