import { LanguagePoolTypes, QueueTypes } from "./enum"; import { IGetQueueStatsResponse, IGetTaskResultResponse } from "./interfaces"; export declare class AntiCaptcha { private api; private debug; /** * Creates an instance of AntiCaptcha. * * @param {strig} clientKey - The client key provided in your admin panel. * @param {boolean} [debugMode=false] - Whether you want to get debug log in the console. * @memberof AntiCaptcha */ constructor(clientKey: string, debugMode?: boolean); /** * Get queue stats */ getQueueStats(queueType: QueueTypes): Promise; /** * Get the account balance. */ getBalance(): Promise; /** * Helper method to check whether the account balance is greater than the given amount. * * @param {number} amount - The amount to compare. */ isBalanceGreaterThan(amount: number): Promise; /** * Dispatch a task creation to the service. This will return a taskId. * * @param {string} task - Task to perform * @param {string} websiteKey - The value of the "data-site-key" attribute. * @param {string} languagePool - The language pool. Default to English if not provided. * * @memberof AntiCaptcha */ createTask(task: T, languagePool?: LanguagePoolTypes): Promise; /** * * @param {string} websiteURL - The URL where the captcha is defined. * @param {string} websiteKey - The value of the "data-site-key" attribute. * @param {string} languagePool - The language pool. Default to English if not provided. * @returns {Promise} * @memberof AntiCaptcha */ createTaskRecaptchaV2Proxyless(websiteURL: string, websiteKey: string, languagePool?: string): Promise; /** * * @param {string} websiteURL - The URL where the captcha is defined. * @param {string} websiteKey - The value of the "data-site-key" attribute. * @param {string} languagePool - The language pool. Default to English if not provided. * @param {number} minScore - minimum score you want to get * @param {string} pageAction - the action name is defined by the website owner * @param {boolean} isEnterprise - Set this flag to "true" if you need this V3 solved with Enterprise API. Default value is "false" and Recaptcha is solved with non-enterprise API. * @returns {Promise} * @memberof AntiCaptcha */ createTaskRecaptchaV3Proxyless(websiteURL: string, websiteKey: string, minScore: number, pageAction: string, languagePool?: string, isEnterprise?: boolean): Promise; /** * Check a task to be resolved. Will try for given amount at the give time interval. * * @param {number} taskId - The task ID you want to check result. * @param {number} [retry=12] - The number of time the request must be tryed if worker is busy. * @param {number} [retryInterval=10000] - The amount of time before first and each try. * * @see createTask * @memberof AntiCaptcha */ getTaskResult(taskId: number, retry?: number, retryInterval?: number): Promise>; }