import { Agent as HttpAgent } from 'http'; import { Agent as HttpsAgent } from 'https'; import { AxiosProxyConfig, AxiosResponse } from 'axios'; import { IErrorHandler } from '../types/ErrorHandler'; import { IRettiwtConfig } from '../types/RettiwtConfig'; /** * The default headers. * * @public */ declare const DefaultHeaders: { Authority: string; 'Accept-Language': string; 'Cache-Control': string; Referer: string; 'User-Agent': string; 'X-Twitter-Active-User': string; 'X-Twitter-Client-Language': string; }; /** * The configuration for initializing a new Rettiwt instance. * * @public */ export declare class RettiwtConfig implements IRettiwtConfig { private _apiKey?; private _headers; private _httpAgent; private _httpsAgent; private _proxy?; private _userId; readonly delay?: number | (() => number | Promise); readonly errorHandler?: IErrorHandler; readonly logging?: boolean; readonly maxRetries: number; readonly responseMiddleware?: (response: AxiosResponse) => void | Promise; readonly timeout?: number; /** * @param config - The config for Rettiwt of type {@link IRettiwtConfig}. */ constructor(config?: IRettiwtConfig); get apiKey(): string | undefined; /** * The Axios proxy configuration to use. * * @remarks *
* - If `proxy` is set, Axios' built-in env-variable-based proxy is disabled. */ get axiosProxyConfig(): AxiosProxyConfig | false | undefined; get headers(): { [key: string]: string; }; /** The HTTP agent instance to use. */ get httpAgent(): HttpAgent; /** The HTTPS agent instance to use. */ get httpsAgent(): HttpsAgent; /** The ID of the user associated with the API key, if any. */ get userId(): string | undefined; set apiKey(apiKey: string | undefined); set headers(headers: { [key: string]: string; } | undefined); set proxy(proxy: AxiosProxyConfig | string | null | undefined); /** * Returns the appropriate HTTP(s) agents based on the type of proxy config. * * @param proxy - The proxy configuration. * * @returns The HTTP(s) agents. */ private _getRequestAgents; } export { DefaultHeaders as DefaultRettiwtHeaders };