import { AxiosResponse } from 'axios'; import { Evogram } from '..'; import { MiddlewareManager } from './middleware/MiddlewareManager'; import { BaseMiddleware } from './middleware/types'; export declare class ApiWorker { protected client: Evogram; state: any; private url; private defaultParams; middlewareManager: MiddlewareManager; /** * Set default parameters for a specific API method. * @param {string} method - The API method for which default parameters are being set. * @param {Record} [params] - Optional default parameters to be set for the specified method. */ setDefaultParams(method: string, params?: Record): void; /** * Initializes the ApiWorker instance with the provided bot token. */ constructor(client: Evogram, state?: any); use(middleware: BaseMiddleware): void; private isUpload; /** * Convert parameters into FormData object for API requests. * This method prepares the parameters to be sent in a POST request as FormData, * which is suitable for uploading files or other multipart data. * @param {Record} params - The parameters to be converted into FormData. * @returns {FormData} - The FormData object containing the converted parameters. */ private getFormData; /** * Make an API call to the Telegram Bot API. * @param {string} method - The API method to be called. * @param {Record} [params] - Optional parameters to be passed in the API call. * @returns {Promise} - A promise resolving to the response data from the API call. */ call(method: string, params?: Record): Promise; static request(client: Evogram, url: string, method: string, data: any): Promise>; getContext(methodName: string, params: Record, context: string): Promise; }