import { AxiosInstance } from 'axios'; import type { OAuthConfig, RestClientConfig } from './models/config'; interface OAuthInterceptorConfig extends OAuthConfig { debug?: boolean; restClientConfig?: RestClientConfig; } /** * OAuth 2.0 Password Grant Flow Interceptor. */ declare class OAuthInterceptor { private tokenEndpoint; private username; private password; private clientId; private clientSecret?; private scope?; private restClientConfig; private debug; private accessToken; private refreshToken; private tokenExpiresAt; private tokenRenewPromise; constructor(config: OAuthInterceptorConfig); logDebug(message: string, data?: unknown): void; /** * Obtains or refreshes the access token. */ getAccessToken(): Promise; /** * Refreshes the access token using password grant or refresh token grant. */ renewToken(): Promise; /** * Requests a token using the specified grant type. */ private requestToken; /** * Attaches the interceptor to an axios instance. */ attach(axiosInstance: AxiosInstance): void; } export = OAuthInterceptor;