From 1671f6fa362602b6807451ee8a59e429218c1086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ketill=20Anton=C3=ADus=20=C3=81g=C3=BAstsson?= Date: Fri, 21 Nov 2025 10:49:57 +0100 Subject: [PATCH] feat(openapi-fetch): enable middleware request param module augmentation --- packages/openapi-fetch/src/index.d.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/openapi-fetch/src/index.d.ts b/packages/openapi-fetch/src/index.d.ts index 387a5642f..b431396db 100644 --- a/packages/openapi-fetch/src/index.d.ts +++ b/packages/openapi-fetch/src/index.d.ts @@ -131,18 +131,20 @@ export type MergedOptions = { fetch: typeof globalThis.fetch; }; +export interface MiddlewareRequestParams { + query?: Record; + header?: Record; + path?: Record; + cookie?: Record; +} + export interface MiddlewareCallbackParams { /** Current Request object */ request: Request; /** The original OpenAPI schema path (including curly braces) */ readonly schemaPath: string; /** OpenAPI parameters as provided from openapi-fetch */ - readonly params: { - query?: Record; - header?: Record; - path?: Record; - cookie?: Record; - }; + readonly params: MiddlewareRequestParams; /** Unique ID for this request */ readonly id: string; /** createClient options (read-only) */