import type { AxiosInstance } from 'axios'; import type { AuthClient } from './types'; /** * Attaches Bearer token to requests and retries once on 401 after refreshing. * * Concurrent 401s are safe: `authClient.refreshToken()` is a single-flight * guard inside the refresh manager, so multiple interceptors will share the * same in-flight refresh promise rather than queuing separate refresh calls. * * @returns eject function that removes both interceptors */ export declare function createAuthInterceptor(axiosInstance: AxiosInstance, authClient: AuthClient): () => void; /** * React hook that wires auth interceptors onto an Axios instance. * Automatically ejects on unmount. * * Must be used inside ``. * * ```tsx * import { useAuthInterceptor } from '@mongrov/auth/interceptor'; * useAuthInterceptor(axiosClient); * ``` */ export declare function useAuthInterceptor(axiosInstance: AxiosInstance): void; //# sourceMappingURL=interceptor.d.ts.map