export interface ApiRequest { headers?: Record; method: string; path: string; query?: Record; body?: Record; } export interface ApiMiddleware { name: string; fetch(request: ApiRequest): Promise; }