File tree Expand file tree Collapse file tree
packages/openapi-fetch/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -132,18 +132,20 @@ export type MergedOptions<T = unknown> = {
132132 fetch : typeof globalThis . fetch ;
133133} ;
134134
135+ export interface MiddlewareRequestParams {
136+ query ?: Record < string , unknown > ;
137+ header ?: Record < string , unknown > ;
138+ path ?: Record < string , unknown > ;
139+ cookie ?: Record < string , unknown > ;
140+ }
141+
135142export interface MiddlewareCallbackParams {
136143 /** Current Request object */
137144 request : Request ;
138145 /** The original OpenAPI schema path (including curly braces) */
139146 readonly schemaPath : string ;
140147 /** OpenAPI parameters as provided from openapi-fetch */
141- readonly params : {
142- query ?: Record < string , unknown > ;
143- header ?: Record < string , unknown > ;
144- path ?: Record < string , unknown > ;
145- cookie ?: Record < string , unknown > ;
146- } ;
148+ readonly params : MiddlewareRequestParams ;
147149 /** Unique ID for this request */
148150 readonly id : string ;
149151 /** createClient options (read-only) */
You can’t perform that action at this time.
0 commit comments