/** * Interceptor type definitions */ /** * Request interceptor * Transforms the request before it's sent */ export type TRequestInterceptor = ( request: Request, ) => Request | Promise; /** * Response interceptor * Transforms the response after it's received */ export type TResponseInterceptor = ( response: Response, ) => Response | Promise; /** * Error interceptor * Handles errors during request/response processing */ export type TErrorInterceptor = (error: Error) => Error | Promise; export interface IInterceptors { request?: TRequestInterceptor[]; response?: TResponseInterceptor[]; error?: TErrorInterceptor[]; }