import { AxiosInstance } from 'axios'; export declare type AxiosSingletonConfiguration = { isLogging?: boolean; }; export declare class AxiosSingleton { private static _axiosInstance; private static _isLogging; /** * Get the singleton instance of Axios. * @param configuration - Configuration object for AxiosSingleton. * * @returns The Axios instance. */ static getInstance(configuration?: AxiosSingletonConfiguration): AxiosInstance; /** * Initialize the request interceptor. */ private static _initializedRequestInterceptor; /** * Initialize the response interceptor. */ private static _initializedResponseInterceptor; /** * Handle the request before it is sent. * * @param request - The Axios request configuration. * @param isLogging - Whether logging is enabled. * * @returns The modified request configuration. */ private static _handleRequest; /** * Handle the response after it is received. * * @param response - The Axios response. * @param isLogging - Whether logging is enabled. * * @returns The modified response. */ private static _handleResponse; /** * Clean the response log by removing sensitive information. * * @param response - The Axios response. * * @returns The sanitized response. */ private static cleanResponseLog; /** * Sanitize an object by obfuscating sensitive fields. * This function is recursive and supports circular references using WeakMap. * * @param obj - The object to sanitize. * @param fieldsToObfuscate - List of keys whose values should be replaced with '***'. Defaults to ["authorization", "x-api-key", "password", "token"]. * @param seen - Internal map to track processed objects and prevent infinite loops. Defaults to new WeakMap(). * * @returns A new sanitized object with sensitive data obfuscated or removed. */ private static sanitizeObject; }