import { CaptchaClient } from '@captcha-libs/captcha-client'; interface CaptchaClientParams { "clientKey": string; "pollingInterval"?: number; "timeout"?: number; } interface TwoCaptchaErrorResponse { "errorCode": string; "errorDescription": string; "errorId": number; } interface TwoCaptchaSuccessResponse { "errorId": number; "taskId": number; } interface TwoCaptchaReportTaskSuccessResponse { "errorId": number; "status": string; } type TwoCaptchaCreateTaskResponse = TwoCaptchaErrorResponse | TwoCaptchaSuccessResponse; declare const _TaskTypes: readonly ["ImageToTextTask", "TextCaptchaTask", "RotateTask", "CoordinatesTask", "GridTask", "DrawAroundTask", "BoundingBoxTask", "AudioTask", "RecaptchaV2TaskProxyless", "RecaptchaV2Task", "RecaptchaV2EnterpriseTask", "RecaptchaV2EnterpriseTaskProxyless", "RecaptchaV3TaskProxyless", "HCaptchaTask", "HCaptchaTaskProxyless", "FunCaptchaTask", "FunCaptchaTaskProxyless", "GeeTestTask", "GeeTestTaskProxyless", "TurnstileTask", "TurnstileTaskProxyless", "CapyTask", "CapyTaskProxyless", "KeyCaptchaTask", "KeyCaptchaTaskProxyless", "LeminTask", "LeminTaskProxyless", "AmazonTask", "AmazonTaskProxyless", "AntiCyberSiAraTask", "AntiCyberSiAraTaskProxyless", "MtCaptchaTask", "MtCaptchaTaskProxyless", "CutCaptchaTask", "CutCaptchaTaskProxyless", "DataDomeSliderTask", "FriendlyCaptchaTask", "FriendlyCaptchaTaskProxyless", "TencentTask", "TencentTaskProxyless", "AtbCaptchaTask", "AtbCaptchaTaskProxyless"]; type TaskTypes = typeof _TaskTypes[number]; interface BaseParams { "type": TaskTypes; } type ProxyTypes = "http" | "socks4" | "socks5"; type ProxyCredentials = { "proxyAddress": string; "proxyLogin"?: string; "proxyPassword"?: string; "proxyPort": number; "proxyType": ProxyTypes; }; type ProxyRequiredTaskParams = ProxyCredentials & T; type ProxylessTaskParams = Omit; /** * @type {_IsTaskType} _IsTaskType - Only used for correct method overloading intellisense */ type _IsTaskType = { readonly [type in TaskTypes as `_is${type}`]?: boolean; }; declare abstract class BaseTask { /** * @type {TaskTypes} type - task type */ protected type: TaskTypes; constructor({ type }: BaseParams); } type TextCaptchaParams = Omit & { "comment": string; }; declare class TextCaptchaTask extends BaseTask implements _IsTaskType, TextCaptchaParams { /** * @type {string} comment - Text with a question you need to answer. */ comment: string; /** * @type {boolean} _isTextCaptchaTask - Only used for correct method overloading intellisense */ readonly _isTextCaptchaTask: _IsTaskType["_isTextCaptchaTask"]; /** * Create TextCaptchaTask * @see {@link https://2captcha.com/api-docs/text} * @param {Object} params - TextCaptchaParams * @param {string} [params.comment] - Text with a question you need to answer. */ constructor({ comment }: TextCaptchaParams); } type RotateTaskParams = Omit & { "angle"?: number; "body": string; "comment"?: string; "imgInstructions"?: string; }; /** * The method is used to solve captchas where you need to rotate an object to place it properly. Returns the required rotation angle. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/rotate} */ declare class RotateTask extends BaseTask implements _IsTaskType, RotateTaskParams { /** * @type {string} comment - A comment will be shown to workers to help them to solve the captcha properly */ comment?: string; /** * @type {string} body - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported */ body: string; /** * @type {number} angle - One step rotation angle. You can count how many steps are required to rotate the image 360 degrees and then divide 360 by this count to get the angle value */ angle?: number; /** * @type {string} imgInstructions - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ imgInstructions?: string; /** * @type {boolean} _isRotateTask - Only used for correct method overloading intellisense */ readonly _isRotateTask: _IsTaskType["_isRotateTask"]; /** * Create RotateTask * @see {@link https://2captcha.com/api-docs/rotate} * @param {Object} params - RotateTaskParams * @param {string} [params.body] - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported * @param {string=} [params.comment] - A comment will be shown to workers to help them to solve the captcha properly * @param {string=} [params.angle] - One step rotation angle. You can count how many steps are required to rotate the image 360 degrees and then divide 360 by this count to get the angle value * @type {string} [params.imgInstructions] - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ constructor({ body, comment, angle, imgInstructions }: RotateTaskParams); } declare enum NumericOptions { "none" = 0, "onlyNumbers" = 1, "onlyLetters" = 2, "numbersOrLetters" = 3, "numbersAndLetters" = 4 } type ImageToTextParams = Omit & { "body": string; "case"?: boolean; "comment"?: string; "imgInstructions"?: string; "math"?: boolean; "maxLength"?: number; "minLength"?: number; "numeric"?: NumericOptions; "phrase"?: boolean; }; /** * Normal CAPTCHA is an image that contains distored but human-readable text. To solve the captcha user have to type the text from the image. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/normal-captcha} */ declare class ImageToTextTask extends BaseTask implements _IsTaskType, ImageToTextParams { /** * @type {string} body - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported */ body: string; /** * @type {string} case - Case sensitive or not */ case?: boolean; /** * @type {string} comment - A comment will be shown to workers to help them to solve the captcha properly */ comment?: string; /** * @type {string} imgInstructions - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. */ imgInstructions?: string; /** * @type {string} math - Captcha requires calculation */ math?: boolean; /** * @type {number} maxLength - defines maximal answer length */ maxLength?: number; /** * @type {number} maxLength - defines minimal answer length */ minLength?: number; /** * @type {number} maxLength - Numeric preference */ numeric?: NumericOptions; /** * @type {number} maxLength - The answer should contain at least two words separated by space. */ phrase?: boolean; /** * @type {boolean} _isImageToTextTask - Only used for correct method overloading intellisense */ readonly _isImageToTextTask: _IsTaskType["_isImageToTextTask"]; /** * Create ImageToTextTask * @see {@link https://2captcha.com/api-docs/normal-captcha} * @param {Object} params - ImageToTextParams * @param {string} [params.body] - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported * @param {boolean=} [params.case] - Case sensitive or not * @param {string=} [params.comment] - A comment will be shown to workers to help them to solve the captcha properly * @param {string=} [params.imgInstructions] - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. * @param {boolean=} [params.math] - captcha requires calculation * @param {number=} [params.maxLength] - defines maximal answer length * @param {number=} [params.minLength] - defines minimal answer length * @param {NumericOptions=} [params.numeric] - Numeric preference * @param {boolean=} [params.phrase] - The answer should contain at least two words separated by space. */ constructor({ body, "case": _case, comment, imgInstructions, math, maxLength, minLength, numeric, phrase }: ImageToTextParams); } type GridTaskParams = { "body": string; "columns"?: number; "comment"?: string; "imgInstructions"?: string; "rows"?: number; }; type GridTaskParamsCommentParams = GridTaskParams & { "comment": string; }; type GridTaskParamsImgInstructionsParams = GridTaskParams & { "imgInstructions": string; }; /** * The method can be used to bypass tasks where a grid is applied to an image and you need to click on grid tiles, like reCAPTCHA or hCaptcha images. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/grid} */ declare class GridTask extends BaseTask implements _IsTaskType, GridTaskParams { /** * @type {string} comment - A comment will be shown to workers to help them to solve the captcha properly */ comment?: string; /** * @type {string} body - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported */ body: string; /** * @type {string} imgInstructions - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ imgInstructions?: string; /** * @type {number} rows - Number of grid rows */ rows?: number; /** * @type {number} columns - Number of grid columns */ columns?: number; /** * @type {boolean} _isGridTask - Only used for correct method overloading intellisense */ readonly _isGridTask: _IsTaskType["_isGridTask"]; /** * Create GridTask * @see {@link https://2captcha.com/api-docs/grid} * @param {Object} params - GridTaskParams * @param {string} [params.body] - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported * @param {string=} [params.comment] - A comment will be shown to workers to help them to solve the captcha properly * @param {string} [params.imgInstructions] - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB * @param {number} [params.rows] - Number of grid rows * @param {number} [params.columns] - Number of grid columns */ constructor({ body, comment, imgInstructions, columns, rows }: GridTaskParamsCommentParams | GridTaskParamsImgInstructionsParams); } interface DrawAroundTaskParams { "body": string; "comment"?: string; "imgInstructions"?: string; } type DrawAroundTaskCommentParam = DrawAroundTaskParams & { "comment": string; }; type DrawAroundTaskImgInstructionsParam = DrawAroundTaskParams & { "imgInstructions": string; }; /** * The method can be used to bypass tasks where you need to draw a line around a specific object shown on an image. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/draw-around} */ declare class DrawAroundTask extends BaseTask implements _IsTaskType, DrawAroundTaskParams { /** * @type {string} comment - A comment will be shown to workers to help them to solve the captcha properly */ comment?: string; /** * @type {string} body - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported */ body: string; /** * @type {string} imgInstructions - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ imgInstructions?: string; /** * @type {boolean} _isDrawAroundTask - Only used for correct method overloading intellisense */ readonly _isDrawAroundTask: _IsTaskType["_isDrawAroundTask"]; /** * Create DrawAroundTask * @see {@link https://2captcha.com/api-docs/draw-around} * @param {Object} params - DrawAroundTaskParams * @param {string} [params.body] - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported * @param {string=} [params.comment] - A comment will be shown to workers to help them to solve the captcha properly * @type {string} [params.imgInstructions] - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ constructor({ body, comment, imgInstructions }: DrawAroundTaskCommentParam | DrawAroundTaskImgInstructionsParam); } type CoordinatesTaskParams = { "body": string; "comment"?: string; "imgInstructions"?: string; }; /** * The method can be used to bypass tasks where you need to click on some points of an image. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/coordinates} */ declare class CoordinatesTask extends BaseTask implements _IsTaskType, CoordinatesTaskParams { /** * @type {string} comment - A comment will be shown to workers to help them to solve the captcha properly */ comment?: string; /** * @type {string} body - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported */ body: string; /** * @type {string} imgInstructions - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ imgInstructions?: string; /** * @type {boolean} _isCoordinatesTask - Only used for correct method overloading intellisense */ readonly _isCoordinatesTask: _IsTaskType["_isCoordinatesTask"]; /** * Create CoordinatesTask * @see {@link https://2captcha.com/api-docs/coordinates} * @param {Object} params - CoordinatesTaskParams * @param {string} [params.body] - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported * @param {string=} [params.comment] - A comment will be shown to workers to help them to solve the captcha properly * @param {string} [params.imgInstructions] - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ constructor({ body, comment, imgInstructions }: CoordinatesTaskParams); } interface BoundingBoxTaskParams { "body": string; "comment"?: string; "imgInstructions"?: string; } type BoundingBoxTaskCommentParam = BoundingBoxTaskParams & { "comment": string; }; type BoundingBoxTaskImgInstructionsParam = BoundingBoxTaskParams & { "imgInstructions": string; }; /** * The method can be used to solve tasks where you need to select a specific object or draw a box around an object shown on an image. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/bounding-box} */ declare class BoundingBoxTask extends BaseTask implements _IsTaskType, BoundingBoxTaskParams { /** * @type {string} comment - A comment will be shown to workers to help them to solve the captcha properly */ comment?: string; /** * @type {string} body - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported */ body: string; /** * @type {string} imgInstructions - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ imgInstructions?: string; /** * @type {boolean} _isBoundingBoxTask - Only used for correct method overloading intellisense */ readonly _isBoundingBoxTask: _IsTaskType["_isBoundingBoxTask"]; /** * Create BoundingBoxTask * @see {@link https://2captcha.com/api-docs/bounding-box} * @param {Object} params - BoundingBoxTaskParams * @param {string} [params.body] - Image encoded into Base64 format. Data-URI format (containing data:content/type prefix) is also supported * @param {string=} [params.comment] - A comment will be shown to workers to help them to solve the captcha properly * @type {string=} [params.imgInstructions] - An optional image with instruction that will be shown to workers. Image should be encoded into Base64 format. Max file size: 100 kB */ constructor({ body, comment, imgInstructions }: BoundingBoxTaskCommentParam | BoundingBoxTaskImgInstructionsParam); } type AudioLangs = "de" | "el" | "en" | "fr" | "pt" | "ru"; type AudioTaskParams = Omit & { "body": string; "lang": AudioLangs; }; /** * We provide a speech recognition method that allows you to convert an audio record to text. The method can be used to bypass audio captchas or to recognize any audio record. * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/audio} */ declare class AudioTask extends BaseTask implements _IsTaskType, AudioTaskParams { /** * @type {string} body - Base64 encoded audio file in mp3 format */ body: string; /** * @type {string} lang - The language of audio record. Supported languages are: en, fr, de, el, pt, ru */ lang: AudioLangs; /** * @type {boolean} _isAudioTask - Only used for correct method overloading intellisense */ readonly _isAudioTask: _IsTaskType["_isAudioTask"]; /** * Create AudioTask * @see {@link https://2captcha.com/api-docs/audio} * @param {Object} params - AudioTaskParams * @param {string} [params.body] - Base64 encoded audio file in mp3 format * @param {string} [params.lang] - The language of audio record. Supported languages are: en, fr, de, el, pt, ru */ constructor({ lang, body }: AudioTaskParams); } type TencentTaskBaseParams = Partial & { "appId": string; "websiteURL": string; }; /** * Base class for TencentTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/tencent} */ declare abstract class TencentTaskBase extends BaseTask implements TencentTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} appId - The TencentTask sitekey value found in the page code. */ appId: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; proxy?: string; /** * TencentTaskBase * @see {@link https://2captcha.com/api-docs/tencent} * @param {Object} params - TencentTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.appId] - The TencentTask sitekey value found in the page code. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ appId, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: TencentTaskBaseParams, type: TaskTypes); } type TencentTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass Tencent captcha. * @extends {CapyTaskBase} * @see {@link https://2captcha.com/api-docs/tencent} */ declare class TencentTaskProxyless extends TencentTaskBase implements _IsTaskType { /** * @type {boolean} _isTencentTaskProxyless - Only used for correct method overloading intellisense */ readonly _isTencentTaskProxyless: _IsTaskType["_isTencentTaskProxyless"]; /** * Create TencentTaskProxyless * @see {@link https://2captcha.com/api-docs/tencent} * @param {Object} params - TencentTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.appId] - The TencentTask sitekey value found in the page code. */ constructor(params: TencentTaskProxylessParams); } type TencentTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass Tencent captcha. * @extends {TencentTaskBase} * @see {@link https://2captcha.com/api-docs/tencent} */ declare class TencentTask extends TencentTaskBase implements _IsTaskType { /** * @type {boolean} _isTencentTask - Only used for correct method overloading intellisense */ readonly _isTencentTask: _IsTaskType["_isTencentTask"]; /** * Create TencentTask * @see {@link https://2captcha.com/api-docs/tencent} * @param {Object} params - TencentTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.appId] - The TencentTask sitekey value found in the page code. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: TencentTaskParams); } type AtbCaptchaTaskBaseParams = Partial & { "apiServer": string; "appId": string; "websiteURL": string; }; /** * Base class for AtbCaptchaTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/atb-captcha} */ declare abstract class AtbCaptchaTaskBase extends BaseTask implements AtbCaptchaTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} appId - The value of appId parameter in the website source code. */ appId: string; /** * @type {string} apiServer - The value of apiServer parameter in the website source code. */ apiServer: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; proxy?: string; /** * AtbCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/atb-captcha} * @param {Object} params - AtbCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.appId] - The value of appId parameter in the website source code. * @param {string} [params.apiServer] - The value of apiServer parameter in the website source code. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ appId, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, apiServer }: AtbCaptchaTaskBaseParams, type: TaskTypes); } type AtbCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass Tencent captcha. * @extends {AtbCaptchaTaskProxylessBase} * @see {@link https://2captcha.com/api-docs/atb-captcha} */ declare class AtbCaptchaTaskProxyless extends AtbCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isAtbCaptchaTaskProxyless - Only used for correct method overloading intellisense */ readonly _isAtbCaptchaTaskProxyless: _IsTaskType["_isAtbCaptchaTaskProxyless"]; /** * Create AtbCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/atb-captcha} * @param {Object} params - AtbCaptchaTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.appId] - The value of appId parameter in the website source code. * @param {string} [params.apiServer] - The value of apiServer parameter in the website source code. */ constructor(params: AtbCaptchaTaskProxylessParams); } type AtbCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass Tencent captcha. * @extends {AtbCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/atb-captcha} */ declare class AtbCaptchaTask extends AtbCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isAtbCaptchaTask - Only used for correct method overloading intellisense */ readonly _isAtbCaptchaTask: _IsTaskType["_isAtbCaptchaTask"]; /** * Create AtbCaptchaTask * @see {@link https://2captcha.com/api-docs/atb-captcha} * @param {Object} params - AtbCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.appId] - The value of appId parameter in the website source code. * @param {string} [params.apiServer] - The value of apiServer parameter in the website source code. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: AtbCaptchaTaskParams); } type CutCaptchaTaskBaseParams = Partial & { "apiKey": string; "miseryKey": string; "websiteURL": string; }; /** * Base class for CutCaptchaTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/cutcaptcha} */ declare abstract class CutCaptchaTaskBase extends BaseTask implements CutCaptchaTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} miseryKey - The value of CUTCAPTCHA_MISERY_KEY variable defined on page. */ miseryKey: string; /** * @type {string} apiKey - The value of data-apikey attribute of iframe's body. Also the name of javascript file included on the page */ apiKey: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * CutCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/cutcaptcha} * @param {Object} params - CutCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.miseryKey] - The value of CUTCAPTCHA_MISERY_KEY variable defined on page. * @param {string} [params.apiKey] - The value of data-apikey attribute of iframe's body. Also the name of javascript file included on the page * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ miseryKey, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, apiKey }: CutCaptchaTaskBaseParams, type: TaskTypes); } type CutCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass Friendly Captcha. * @extends {CutCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/cutcaptcha} */ declare class CutCaptchaTaskProxyless extends CutCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isCutCaptchaTask - Only used for correct method overloading intellisense */ readonly _isCutCaptchaTaskProxyless: _IsTaskType["_isCutCaptchaTaskProxyless"]; /** * Create CutCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/cutcaptcha} * @param {Object} params - CutCaptchaTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.miseryKey] - The value of CUTCAPTCHA_MISERY_KEY variable defined on page. * @param {string} [params.apiKey] - The value of data-apikey attribute of iframe's body. Also the name of javascript file included on the page */ constructor(params: CutCaptchaTaskProxylessParams); } type CutCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass Friendly Captcha. * @extends {CutCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/cutcaptcha} */ declare class CutCaptchaTask extends CutCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isCutCaptchaTask - Only used for correct method overloading intellisense */ readonly _isCutCaptchaTask: _IsTaskType["_isCutCaptchaTask"]; /** * Create CutCaptchaTask * @see {@link https://2captcha.com/api-docs/cutcaptcha} * @param {Object} params - CutCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.miseryKey] - The value of CUTCAPTCHA_MISERY_KEY variable defined on page. * @param {string} [params.apiKey] - The value of data-apikey attribute of iframe's body. Also the name of javascript file included on the page * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: CutCaptchaTaskParams); } type TurnstileTaskBaseParams = Partial & { "action"?: string; "data"?: string; "pagedata"?: string; "userAgent": string; "websiteKey": string; "websiteURL": string; }; /** * Base class for TurnstileTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} */ declare abstract class TurnstileTaskBase extends BaseTask implements TurnstileTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - Turnstile sitekey. Can be found inside data-sitekey property of the Turnstile div element */ websiteKey: string; /** * @type {string} action - Required for Cloudflare Challenge pages. The value of action parameter of turnstile.render call */ action?: string; /** * @type {string} data - Required for Cloudflare Challenge pages. The value of cData parameter of turnstile.render call */ data?: string; /** * @type {string} pagedata - Required for Cloudflare Challenge pages. The value of chlPageData parameter of turnstile.render call */ pagedata?: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * TurnstileTaskBase * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} * @param {Object} params - TurnstileTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Turnstile sitekey. Can be found inside data-sitekey property of the Turnstile div element * @param {string} [params.actions] - Required for Cloudflare Challenge pages. The value of action parameter of turnstile.render call * @param {string} [params.data] - Required for Cloudflare Challenge pages. The value of cData parameter of turnstile.render call * @param {string} [params.pagedata] - Required for Cloudflare Challenge pages. The value of chlPageData parameter of turnstile.render call * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteKey, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, userAgent, pagedata, data, action }: TurnstileTaskBaseParams, type: TaskTypes); } type TurnstileTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass Cloudflare Turnstile. Both the standalone captcha and challenge mode are supported. * @extends {TurnstileTaskBase} * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} */ declare class TurnstileTaskProxyless extends TurnstileTaskBase implements _IsTaskType { /** * @type {boolean} _isTurnstileTaskProxyless - Only used for correct method overloading intellisense */ readonly _isTurnstileTaskProxyless: _IsTaskType["_isTurnstileTaskProxyless"]; /** * Create TurnstileTaskProxyless * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} * @param {Object} params - TurnstileTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Turnstile sitekey. Can be found inside data-sitekey property of the Turnstile div element * @param {string} [params.actions] - Required for Cloudflare Challenge pages. The value of action parameter of turnstile.render call * @param {string} [params.data] - Required for Cloudflare Challenge pages. The value of cData parameter of turnstile.render call * @param {string} [params.pagedata] - Required for Cloudflare Challenge pages. The value of chlPageData parameter of turnstile.render call */ constructor(params: TurnstileTaskProxylessParams); } type TurnstileTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass Cloudflare Turnstile. Both the standalone captcha and challenge mode are supported. * @extends {TurnstileTaskBase} * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} */ declare class TurnstileTask extends TurnstileTaskBase implements _IsTaskType { /** * @type {boolean} _isTurnstileTask - Only used for correct method overloading intellisense */ readonly _isTurnstileTask: _IsTaskType["_isTurnstileTask"]; /** * Create TurnstileTask * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} * @param {Object} params - TurnstileTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Turnstile sitekey. Can be found inside data-sitekey property of the Turnstile div element * @param {string} [params.actions] - Required for Cloudflare Challenge pages. The value of action parameter of turnstile.render call * @param {string} [params.data] - Required for Cloudflare Challenge pages. The value of cData parameter of turnstile.render call * @param {string} [params.pagedata] - Required for Cloudflare Challenge pages. The value of chlPageData parameter of turnstile.render call * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: TurnstileTaskParams); } type RecaptchaV2TaskBaseParams = Partial & { "apiDomain"?: string; "cookies"?: string; "isInvisible"?: boolean; "recaptchaDataSValue"?: string; "userAgent"?: string; "websiteKey": string; "websiteURL": string; }; /** * Base class for Recaptcha V2 * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/recaptcha-v2} */ declare abstract class RecaptchaV2TaskBase extends BaseTask implements RecaptchaV2TaskBaseParams { /** * @type {string} cookies - Your cookies will be set in a browser of our worker. Suitable for captcha on Google services. The format is: key1=val1; key2=val2 */ cookies?: string; /** * @type {string} apiDomain - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com */ apiDomain?: string; /** * @type {string} recaptchaDataSValue - The value of data-s parameter. Can be required to bypass the captcha on Google services */ recaptchaDataSValue?: string; /** * @type {boolean} isInvisible - Pass true for Invisible version of reCAPTCHA - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function */ isInvisible?: boolean; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value */ websiteKey: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * RecaptchaV2TaskBase * @see {@link https://2captcha.com/api-docs/recaptcha-v2} * @param {Object} params - RecaptchaV2TaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of reCAPTCHA - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {string} [params.recaptchaDataSValue] - The value of data-s parameter. Can be required to bypass the captcha on Google services * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.cookies] - Your cookies will be set in a browser of our worker. Suitable for captcha on Google services. The format is: key1=val1; key2=val2 * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port * */ constructor({ websiteKey, websiteURL, userAgent, isInvisible, recaptchaDataSValue, apiDomain, cookies, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: RecaptchaV2TaskBaseParams, type: TaskTypes); } interface _RecaptchaV2EnterpriseTaskParams { "enterprisePayload"?: Record; } type RecaptchaV2EnterpriseTaskParams = _RecaptchaV2EnterpriseTaskParams & ProxyRequiredTaskParams; /** * Token-based method for automated solving of reCAPTCHA V2. * @extends {RecaptchaV2TaskBase} * @see {@link https://2captcha.com/api-docs/recaptcha-v2-enterprise} */ declare class RecaptchaV2EnterpriseTask extends RecaptchaV2TaskBase implements _RecaptchaV2EnterpriseTaskParams, _IsTaskType { /** * @type {boolean} _isRecaptchaV2EnterpriseTask - Only used for correct method overloading intellisense */ readonly _isRecaptchaV2EnterpriseTask: _IsTaskType["_isRecaptchaV2EnterpriseTask"]; /** * @type {string} enterprisePayload - Additional parameters passed to grecaptcha.enterprise.render call. For example, there can be an object containing s value */ enterprisePayload?: Record; /** * Create RecaptchaV2EnterpriseTask * @see {@link https://2captcha.com/api-docs/recaptcha-v2-enterprise} * @param {Object} params - RecaptchaV2EnterpriseTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of reCAPTCHA - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {string} [params.recaptchaDataSValue] - The value of data-s parameter. Can be required to bypass the captcha on Google services * @param {string} [params.enterprisePayload] - Additional parameters passed to grecaptcha.enterprise.render call. For example, there can be an object containing s value * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.cookies] - Your cookies will be set in a browser of our worker. Suitable for captcha on Google services. The format is: key1=val1; key2=val2 * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port * */ constructor({ enterprisePayload, ...params }: RecaptchaV2EnterpriseTaskParams); } type RecaptchaV2EnterpriseTaskProxylessParams = _RecaptchaV2EnterpriseTaskParams & ProxylessTaskParams; /** * Token-based method for automated solving of reCAPTCHA V2. * @extends {RecaptchaV2TaskBase} * @see {@link https://2captcha.com/api-docs/recaptcha-v2-enterprise} */ declare class RecaptchaV2EnterpriseTaskProxyless extends RecaptchaV2TaskBase implements _RecaptchaV2EnterpriseTaskParams, _IsTaskType { /** * @type {boolean} _isRecaptchaV2EnterpriseTaskProxyless - Only used for correct method overloading intellisense */ readonly _isRecaptchaV2EnterpriseTaskProxyless: _IsTaskType["_isRecaptchaV2EnterpriseTaskProxyless"]; enterprisePayload?: Record; /** * Create RecaptchaV2EnterpriseTaskProxyless * @see {@link https://2captcha.com/api-docs/recaptcha-v2-enterprise} * @param {Object} params - RecaptchaV2EnterpriseTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of reCAPTCHA - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {string} [params.recaptchaDataSValue] - The value of data-s parameter. Can be required to bypass the captcha on Google services * @param {string} [params.enterprisePayload] - Additional parameters passed to grecaptcha.enterprise.render call. For example, there can be an object containing s value * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.cookies] - Your cookies will be set in a browser of our worker. Suitable for captcha on Google services. The format is: key1=val1; key2=val2 */ constructor({ enterprisePayload, ...params }: RecaptchaV2EnterpriseTaskProxylessParams); } type RecaptchaV2TaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of reCAPTCHA V2. * @extends {RecaptchaV2TaskProxylessBase} * @see {@link https://2captcha.com/api-docs/recaptcha-v2} */ declare class RecaptchaV2TaskProxyless extends RecaptchaV2TaskBase implements _IsTaskType { /** * @type {boolean} _isRecaptchaV2TaskProxyless - Only used for correct method overloading intellisense */ readonly _isRecaptchaV2TaskProxyless: _IsTaskType["_isRecaptchaV2TaskProxyless"]; /** * Create RecaptchaV2TaskProxyless * @see {@link https://2captcha.com/api-docs/recaptcha-v2} * @param {Object} params - RecaptchaV2TaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of reCAPTCHA - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {string} [params.recaptchaDataSValue] - The value of data-s parameter. Can be required to bypass the captcha on Google services * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.cookies] - Your cookies will be set in a browser of our worker. Suitable for captcha on Google services. The format is: key1=val1; key2=val2 */ constructor(params: RecaptchaV2TaskProxylessParams); } type RecaptchaV2TaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of reCAPTCHA V2. * @extends {RecaptchaV2TaskBase} * @see {@link https://2captcha.com/api-docs/recaptcha-v2} */ declare class RecaptchaV2Task extends RecaptchaV2TaskBase implements _IsTaskType { /** * @type {boolean} _isRecaptchaV2Task - Only used for correct method overloading intellisense */ readonly _isRecaptchaV2Task: _IsTaskType["_isRecaptchaV2Task"]; /** * Create RecaptchaV2Task * @see {@link https://2captcha.com/api-docs/recaptcha-v2} * @param {Object} params - RecaptchaV2TaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of reCAPTCHA - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {string} [params.recaptchaDataSValue] - The value of data-s parameter. Can be required to bypass the captcha on Google services * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.cookies] - Your cookies will be set in a browser of our worker. Suitable for captcha on Google services. The format is: key1=val1; key2=val2 * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port * */ constructor(params: RecaptchaV2TaskParams); } type MtCaptchaTaskBaseParams = Partial & { "websiteKey": string; "websiteURL": string; }; /** * Base class for MtCaptchaTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/mtcaptcha} */ declare abstract class MtCaptchaTaskBase extends BaseTask implements MtCaptchaTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - The MTCaptcha sitekey value found in the page code. */ websiteKey: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; proxy?: string; /** * MtCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/mtcaptcha} * @param {Object} params - MtCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - The MTCaptcha sitekey value found in the page code. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteKey, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: MtCaptchaTaskBaseParams, type: TaskTypes); } type MtCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of MTCaptcha. * @extends {MtCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/mtcaptcha} */ declare class MtCaptchaTaskProxyless extends MtCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isMtCaptchaTaskProxyless - Only used for correct method overloading intellisense */ readonly _isMtCaptchaTaskProxyless: _IsTaskType["_isMtCaptchaTaskProxyless"]; /** * Create MtCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/mtcaptcha} * @param {Object} params - MtCaptchaTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - The MTCaptcha sitekey value found in the page code. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ constructor(params: MtCaptchaTaskProxylessParams); } type MtCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of MTCaptcha. * @extends {MtCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/mtcaptcha} */ declare class MtCaptchaTask extends MtCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isMtCaptchaTask - Only used for correct method overloading intellisense */ readonly _isMtCaptchaTask: _IsTaskType["_isMtCaptchaTask"]; /** * Create MtCaptchaTask * @see {@link https://2captcha.com/api-docs/mtcaptcha} * @param {Object} params - MtCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - The MTCaptcha sitekey value found in the page code. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: MtCaptchaTaskParams); } type LeminTaskBaseParams = Partial & { "captchaId": string; "divId": string; "leminApiServerSubdomain"?: string; "userAgent"?: string; "websiteURL": string; }; /** * Base class for LeminTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/lemin} */ declare abstract class LeminTaskBase extends BaseTask implements LeminTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} captchaId - Lemin captchaId value. Unique for a website. */ captchaId: string; /** * @type {string} divId - The id of captcha parent div element */ divId: string; /** * @type {string} leminApiServerSubdomain - API domain used to load the captcha scripts. Default: https://api.leminnow.com/ */ leminApiServerSubdomain?: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * LeminTaskBase * @see {@link https://2captcha.com/api-docs/lemin} * @param {Object} params - LeminTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.captchaId] - Lemin captchaId value. Unique for a website. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.divId] - The id of captcha parent div element * @param {string} [params.leminApiServerSubdomain] - API domain used to load the captcha scripts. Default: https://api.leminnow.com/ * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ captchaId, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, divId, leminApiServerSubdomain, userAgent }: LeminTaskBaseParams, type: TaskTypes); } type LeminTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass Lemin Puzzle CAPTCHA. * @extends {LeminTaskBase} * @see {@link https://2captcha.com/api-docs/lemin} */ declare class LeminTaskProxyless extends LeminTaskBase implements _IsTaskType { /** * @type {boolean} _isLeminTaskProxyless - Only used for correct method overloading intellisense */ readonly _isLeminTaskProxyless: _IsTaskType["_isLeminTaskProxyless"]; /** * Create LeminTaskProxyless * @see {@link https://2captcha.com/api-docs/lemin} * @param {Object} params - LeminTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.captchaId] - Lemin captchaId value. Unique for a website. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.divId] - The id of captcha parent div element * @param {string} [params.leminApiServerSubdomain] - API domain used to load the captcha scripts. Default: https://api.leminnow.com/ */ constructor(params: LeminTaskProxylessParams); } type LeminTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass Lemin Puzzle CAPTCHA. * @extends {LeminTaskBase} * @see {@link https://2captcha.com/api-docs/lemin} */ declare class LeminTask extends LeminTaskBase implements _IsTaskType { /** * @type {boolean} _isLeminTask - Only used for correct method overloading intellisense */ readonly _isLeminTask: _IsTaskType["_isLeminTask"]; /** * Create LeminTask * @see {@link https://2captcha.com/api-docs/lemin} * @param {Object} params - LeminTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.captchaId] - Lemin captchaId value. Unique for a website. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.divId] - The id of captcha parent div element * @param {string} [params.leminApiServerSubdomain] - API domain used to load the captcha scripts. Default: https://api.leminnow.com/ * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: LeminTaskParams); } type KeyCaptchaTaskBaseParams = Partial & { "s_s_c_session_id": string; "s_s_c_user_id": number; "s_s_c_web_server_sign": string; "s_s_c_web_server_sign2": string; "websiteURL": string; }; /** * Base class for KeyCaptchaTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/keycaptcha} */ declare abstract class KeyCaptchaTaskBase extends BaseTask implements KeyCaptchaTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {number} s_s_c_user_id - The value of s_s_c_user_id parameter found on page */ s_s_c_user_id: number; /** * @type {string} s_s_c_session_id - The value of s_s_c_session_id parameter found on page */ s_s_c_session_id: string; /** * @type {string} s_s_c_web_server_sign - The value of s_s_c_web_server_sign parameter found on page */ s_s_c_web_server_sign: string; /** * @type {string} s_s_c_web_server_sign2 - The value of s_s_c_web_server_sign2 parameter found on page */ s_s_c_web_server_sign2: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * KeyCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/keycaptcha} * @param {Object} params - KeyCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {number} [params.s_s_c_user_id] - The value of s_s_c_user_id parameter found on page * @param {string} [params.s_s_c_session_id] - The value of s_s_c_session_id parameter found on page * @param {string} [params.s_s_c_web_server_sign] - The value of s_s_c_web_server_sign parameter found on page * @param {string} [params.s_s_c_web_server_sign2] - The value of s_s_c_web_server_sign2 parameter found on page * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, s_s_c_session_id, s_s_c_user_id, s_s_c_web_server_sign, s_s_c_web_server_sign2 }: KeyCaptchaTaskBaseParams, type: TaskTypes); } type KeyCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of Capy Puzzle Captcha. * @extends {KeyCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/keycaptcha} */ declare class KeyCaptchaTaskProxyless extends KeyCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isKeyCaptchaTaskProxyless - Only used for correct method overloading intellisense */ readonly _isKeyCaptchaTaskProxyless: _IsTaskType["_isKeyCaptchaTaskProxyless"]; /** * Create KeyCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/keycaptcha} * @param {Object} params - KeyCaptchaTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.s_s_c_user_id] - The value of s_s_c_user_id parameter found on page * @param {string} [params.s_s_c_session_id] - The value of s_s_c_session_id parameter found on page * @param {string} [params.s_s_c_web_server_sign] - The value of s_s_c_web_server_sign parameter found on page * @param {string} [params.s_s_c_web_server_sign2] - The value of s_s_c_web_server_sign2 parameter found on page * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: KeyCaptchaTaskProxylessParams); } type KeyCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of Capy Puzzle Captcha. * @extends {KeyCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/keycaptcha} */ declare class KeyCaptchaTask extends KeyCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isKeyCaptchaTask - Only used for correct method overloading intellisense */ readonly _isKeyCaptchaTask: _IsTaskType["_isKeyCaptchaTask"]; /** * Create KeyCaptchaTask * @see {@link https://2captcha.com/api-docs/keycaptcha} * @param {Object} params - KeyCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.s_s_c_user_id] - The value of s_s_c_user_id parameter found on page * @param {string} [params.s_s_c_session_id] - The value of s_s_c_session_id parameter found on page * @param {string} [params.s_s_c_web_server_sign] - The value of s_s_c_web_server_sign parameter found on page * @param {string} [params.s_s_c_web_server_sign2] - The value of s_s_c_web_server_sign2 parameter found on page * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: KeyCaptchaTaskParams); } type HCaptchaTaskBaseParams = Partial & { "enterprisePayload"?: Record; "isInvisible"?: boolean; "websiteKey": string; "websiteURL": string; }; /** * Base class for hcaptcha * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/hcaptcha} */ declare abstract class HCaptchaTaskBase extends BaseTask implements HCaptchaTaskBaseParams { /** * @type {object} enterprisePayload - An object containing additional parameters like: rqdata, sentry, apiEndpoint, endpoint, reportapi, assethost, imghost */ enterprisePayload?: Record; /** * @type {boolean} isInvisible - Pass true for Invisible version of hcaptcha - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function */ isInvisible?: boolean; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - hCaptcha sitekey. Can be found inside data-sitekey property of the hCaptcha div element or inside sitekey parameter of the requests to hCaptcha API */ websiteKey: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * HCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/hcaptcha} * @param {Object} params - HCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - hCaptcha sitekey. Can be found inside data-sitekey property of the hCaptcha div element or inside sitekey parameter of the requests to hCaptcha API * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of hcaptcha - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {object} [params.enterprisePayload] - An object containing additional parameters like: rqdata, sentry, apiEndpoint, endpoint, reportapi, assethost, imghost * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port * */ constructor({ websiteKey, websiteURL, isInvisible, enterprisePayload, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: HCaptchaTaskBaseParams, type: TaskTypes); } type HCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass hCaptcha. The method is quite similar to reCAPTCHA V2. The token can be used on the target website inside h-captcha-response form field or passed to a callback function. It's recommended to use the userAgent value together with the token. * @extends {HCaptchaTaskProxylessBase} * @see {@link https://2captcha.com/api-docs/hcaptcha} */ declare class HCaptchaTaskProxyless extends HCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isHCaptchaTaskProxyless - Only used for correct method overloading intellisense */ readonly _isHCaptchaTaskProxyless: _IsTaskType["_isHCaptchaTaskProxyless"]; /** * Create HCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/hcaptcha} * @param {Object} params - HCaptchaTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - hCaptcha sitekey. Can be found inside data-sitekey property of the hCaptcha div element or inside sitekey parameter of the requests to hCaptcha API * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of hcaptcha - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function */ constructor(params: HCaptchaTaskProxylessParams); } type HCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass hCaptcha. The method is quite similar to reCAPTCHA V2. The token can be used on the target website inside h-captcha-response form field or passed to a callback function. It's recommended to use the userAgent value together with the token. * @extends {HCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/hcaptcha} */ declare class HCaptchaTask extends HCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isHCaptchaTask - Only used for correct method overloading intellisense */ readonly _isHCaptchaTask: _IsTaskType["_isHCaptchaTask"]; /** * Create HCaptchaTask * @see {@link https://2captcha.com/api-docs/hcaptcha} * @param {Object} params - HCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - hCaptcha sitekey. Can be found inside data-sitekey property of the hCaptcha div element or inside sitekey parameter of the requests to hCaptcha API * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {boolean}[params.isInvisible] - Pass true for Invisible version of hcaptcha - a case when you don't see the checkbox, but the challenge appears. Mostly used with a callback function * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: HCaptchaTaskParams); } type GeetestV3TaskBaseParams = { "challenge": string; "geetestApiServerSubdomain"?: string; "gt": string; }; type GeetestV4TaskBaseParams = { "initParameters": Record & { "captcha_id": string; }; }; type GeetestCommonParams = { "userAgent"?: string; "websiteURL"?: string; }; type GeeTestTaskBaseParams = Partial & { "version": 3 | 4; }; type GeeTestV3TaskParams$1 = GeetestCommonParams & GeetestV3TaskBaseParams & Partial; type GeeTestV4TaskParams$1 = GeetestCommonParams & GeetestV4TaskBaseParams & Partial; /** * Base class for geetest * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/geetest} */ declare abstract class GeeTestTaskBase extends BaseTask implements GeeTestTaskBaseParams { /** * @type {object} initParameters - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value, for example: {"captcha_id" : "e392e1d7fd421dc63325744d5a2b9c73"} */ initParameters?: GeetestV4TaskBaseParams["initParameters"]; /** * @type {boolean} challenge - GeeTest challenge value. */ challenge?: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL?: string; /** * @type {string} gt - GeeTest gt value */ gt?: string; /** * @type {string} geetestApiServerSubdomain - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. */ geetestApiServerSubdomain?: string; /** * @type {number} version - Should be set to 4 for GeeTest V4. */ version: 3 | 4; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * GeeTestTaskBase * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestTaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.gt] - GeeTest gt value * @param {boolean}[params.challenge] - GeeTest challenge value. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {object} [params.initParameters] - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value, for example: {"captcha_id" : "e392e1d7fd421dc63325744d5a2b9c73"} * @param {string} [params.geetestApiServerSubdomain] - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. * @param {number} [params.version] - Should be set to 4 for GeeTest V4. GeeTest version: 3 or 4 * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port * */ constructor({ websiteURL, userAgent, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, ...versionSpecific }: GeeTestV3TaskParams$1 | GeeTestV4TaskParams$1, type: TaskTypes); } /** * Base class for geetest * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/geetest} */ declare abstract class GeeTestV4TaskBase extends BaseTask implements GeeTestV4TaskParams$1 { /** * @type {object} initParameters - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value */ initParameters: GeeTestV4TaskParams$1["initParameters"]; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL?: string; version: number; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * GeeTestV4TaskBase * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestV4TaskParams * @param {object} [params.initParameters] - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, userAgent, initParameters }: GeeTestV4TaskParams$1, type: TaskTypes); } type GeeTestV4TaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass GeeTest v4. * @extends {GeeTestV4TaskBase} * @see {@link https://2captcha.com/api-docs/geetest} */ declare class GeeTestV4TaskProxyless extends GeeTestV4TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTaskProxyless - Only used for correct method overloading intellisense */ readonly _isGeeTestTaskProxyless: _IsTaskType["_isGeeTestTaskProxyless"]; /** * Create GeeTestV4TaskProxyless * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestV4TaskProxylessParams * @param {object} [params.initParameters] - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ constructor(params: GeeTestV4TaskProxylessParams); } /** * Base class for geetest * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/geetest} */ declare abstract class GeeTestV3TaskBase extends BaseTask implements GeeTestV3TaskParams$1 { /** * @type {boolean} challenge - GeeTest challenge value. */ challenge: string; /** * @type {string} gt - GeeTest gt value */ gt: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL?: string; /** * @type {string} geetestApiServerSubdomain - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. */ geetestApiServerSubdomain?: string; version: number; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * GeeTestV3TaskBase * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestV3TaskBaseParams * @param {string} [params.gt] - GeeTest gt value * @param {boolean}[params.challenge] - GeeTest challenge value. * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.geetestApiServerSubdomain] - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port * */ constructor({ gt, websiteURL, challenge, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, userAgent, geetestApiServerSubdomain }: GeeTestV3TaskParams$1, type: TaskTypes); } type GeeTestV3TaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass GeeTest v3. * @extends {GeeTestV3TaskBase} * @see {@link https://2captcha.com/api-docs/geetest} */ declare class GeeTestV3TaskProxyless extends GeeTestV3TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTaskProxyless - Only used for correct method overloading intellisense */ readonly _isGeeTestTaskProxyless: _IsTaskType["_isGeeTestTaskProxyless"]; /** * Create GeeTestV3TaskProxyless * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestV3TaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.gt] - GeeTest gt value * @param {boolean}[params.challenge] - GeeTest challenge value. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.geetestApiServerSubdomain] - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. */ constructor(params: GeeTestV3TaskProxylessParams); } type GeeTestV3TaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass GeeTest v3. * @extends {GeeTestV3TaskBase} * @see {@link https://2captcha.com/api-docs/geetest} */ declare class GeeTestV3Task extends GeeTestV3TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTask - Only used for correct method overloading intellisense */ readonly _isGeeTestTask: _IsTaskType["_isGeeTestTask"]; /** * Create GeeTestV3Task * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestV3TaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.gt] - GeeTest gt value * @param {boolean}[params.challenge] - GeeTest challenge value. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.geetestApiServerSubdomain] - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: GeeTestV3TaskParams); } type GeeTestTaskProxylessParams = ProxylessTaskParams | ProxylessTaskParams; /** * Token-based method to bypass GeeTestTaskProxyless * @extends {GeeTestTaskBase} * @see {@link https://2captcha.com/api-docs/geetest} */ declare class GeeTestTaskProxyless extends GeeTestTaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTaskProxyless - Only used for correct method overloading intellisense */ readonly _isGeeTestTaskProxyless: _IsTaskType["_isGeeTestTaskProxyless"]; /** * Create GeeTestTaskProxyless * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.gt] - GeeTest gt value * @param {boolean}[params.challenge] - GeeTest challenge value. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {object} [params.initParameters] - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value, for example: {"captcha_id" : "e392e1d7fd421dc63325744d5a2b9c73"} * @param {string} [params.geetestApiServerSubdomain] - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. */ constructor(params: GeeTestTaskProxylessParams); } type GeeTestTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass GeeTest * @extends {GeeTestTaskBase} * @see {@link https://2captcha.com/api-docs/geetest} */ declare class GeeTestTask extends GeeTestTaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTask - Only used for correct method overloading intellisense */ readonly _isGeeTestTask: _IsTaskType["_isGeeTestTask"]; /** * Create GeeTestTask * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.gt] - GeeTest gt value * @param {boolean}[params.challenge] - GeeTest challenge value. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {object} [params.initParameters] - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value, for example: {"captcha_id" : "e392e1d7fd421dc63325744d5a2b9c73"} * @param {string} [params.geetestApiServerSubdomain] - Only for GeeTest V3. Custom GeeTest API domain, for example: api-na.geetest.com. Can be defined inside initGeetest call. Also you can check the domain used to load the scripts, the default domain is api.geetest.com. * @param {number} [params.version] - Should be set to 4 for GeeTest V4. GeeTest version: 3 or 4 * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: GeeTestTaskParams); } type FunCaptchaTaskBaseParams = Partial & { "data"?: string; "funcaptchaApiJSSubdomain"?: string; "userAgent"?: string; "websitePublicKey": string; "websiteURL": string; }; /** * Base class for FunCaptcha * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} */ declare abstract class FunCaptchaTaskBase extends BaseTask implements FunCaptchaTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websitePublicKey - ArkoseLabs CAPTCHA public key. The public key can be found in the value of the data-pkey parameter of the div element FunCaptcha, or you can find an element named (name) fc-token and from its value cut out the key that is specified after pk. */ websitePublicKey: string; /** * @type {string} funcaptchaApiJSSubdomain - Custom subdomain used to load the captcha widget, like: sample-api.arkoselabs.com */ funcaptchaApiJSSubdomain?: string; /** * @type {string} data - Additional data payload object converted to a string with JSON.stringify */ data?: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * FunCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} * @param {Object} params - FunCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websitePublicKey] - ArkoseLabs CAPTCHA public key. The public key can be found in the value of the data-pkey parameter of the div element FunCaptcha, or you can find an element named (name) fc-token and from its value cut out the key that is specified after pk. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.data] - Additional data payload object converted to a string with JSON.stringify * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websitePublicKey, websiteURL, userAgent, funcaptchaApiJSSubdomain, data, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: FunCaptchaTaskBaseParams, type: TaskTypes); } type FunCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of ArkoseLabs CAPTCHA (previously FunCaptcha). * @extends {FunCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} */ declare class FunCaptchaTaskProxyless extends FunCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isFunCaptchaTaskProxyless - Only used for correct method overloading intellisense */ readonly _isFunCaptchaTaskProxyless: _IsTaskType["_isFunCaptchaTaskProxyless"]; /** * Create FunCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} * @param {Object} params - FunCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websitePublicKey] - ArkoseLabs CAPTCHA public key. The public key can be found in the value of the data-pkey parameter of the div element FunCaptcha, or you can find an element named (name) fc-token and from its value cut out the key that is specified after pk. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.data] - Additional data payload object converted to a string with JSON.stringify * @param {string} [params.websitePublicKey] - ArkoseLabs CAPTCHA public key. The public key can be found in the value of the data-pkey parameter of the div element FunCaptcha, or you can find an element named (name) fc-token and from its value cut out the key that is specified after pk. */ constructor(params: FunCaptchaTaskProxylessParams); } type FunCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of ArkoseLabs CAPTCHA (previously FunCaptcha). * @extends {FunCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} */ declare class FunCaptchaTask extends FunCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isFunCaptchaTask - Only used for correct method overloading intellisense */ readonly _isFunCaptchaTask: _IsTaskType["_isFunCaptchaTask"]; /** * Create FunCaptchaTask * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} * @param {Object} params - FunCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websitePublicKey] - ArkoseLabs CAPTCHA public key. The public key can be found in the value of the data-pkey parameter of the div element FunCaptcha, or you can find an element named (name) fc-token and from its value cut out the key that is specified after pk. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.data] - Additional data payload object converted to a string with JSON.stringify * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: FunCaptchaTaskParams); } type FriendlyCaptchaTaskBaseParams = Partial & { "websiteKey": string; "websiteURL": string; }; /** * Base class for FriendlyCaptchaTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/friendly-captcha} */ declare abstract class FriendlyCaptchaTaskBase extends BaseTask implements FriendlyCaptchaTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - Capy Puzzle Captcha captchakey. */ websiteKey: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * FriendlyCaptchaTaskBase * @see {@link https://2captcha.com/api-docs/friendly-captcha} * @param {Object} params - FriendlyCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Capy Puzzle Captcha captchakey. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteKey, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: FriendlyCaptchaTaskBaseParams, type: TaskTypes); } type FriendlyCaptchaTaskProxylessParams = ProxylessTaskParams; /** * Token-based method to bypass Friendly Captcha. * @extends {FriendlyCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/friendly-captcha} */ declare class FriendlyCaptchaTaskProxyless extends FriendlyCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isFriendlyCaptchaTaskProxyless - Only used for correct method overloading intellisense */ readonly _isFriendlyCaptchaTaskProxyless: _IsTaskType["_isFriendlyCaptchaTaskProxyless"]; /** * Create FriendlyCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/friendly-captcha} * @param {Object} params - FriendlyCaptchaTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Capy Puzzle Captcha captchakey. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: FriendlyCaptchaTaskProxylessParams); } type FriendlyCaptchaTaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass Friendly Captcha. * @extends {FriendlyCaptchaTaskBase} * @see {@link https://2captcha.com/api-docs/friendly-captcha} */ declare class FriendlyCaptchaTask extends FriendlyCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isFriendlyCaptchaTask - Only used for correct method overloading intellisense */ readonly _isFriendlyCaptchaTask: _IsTaskType["_isFriendlyCaptchaTask"]; /** * Create FriendlyCaptchaTask * @see {@link https://2captcha.com/api-docs/friendly-captcha} * @param {Object} params - FriendlyCaptchaTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Capy Puzzle Captcha captchakey. * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: FriendlyCaptchaTaskParams); } type _DataDomeSliderTaskBaseParams = { "captchaUrl": string; "userAgent"?: string; "websiteURL": string; }; type DataDomeSliderTaskBaseParams = ProxyRequiredTaskParams<_DataDomeSliderTaskBaseParams>; /** * Base class for DataDomeSliderTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/datadome-slider-captcha} */ declare abstract class DataDomeSliderTaskBase extends BaseTask implements DataDomeSliderTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} captchaUrl - The value of the src parameter for the iframe element containing the captcha on the page. */ captchaUrl: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents. It is important to use the supported User-Agent values. @see https://2captcha.com/api-docs/datadome-slider-captcha */ userAgent?: string; proxyAddress: string; proxyLogin?: string; proxyPassword?: string; proxyPort: number; proxyType: ProxyTypes; /** * DataDomeSliderTaskBase * @see {@link https://2captcha.com/api-docs/datadome-slider-captcha} * @param {Object} params - DataDomeSliderTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.captchaUrl] - The value of the src parameter for the iframe element containing the captcha on the page. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents. It is important to use the supported User-Agent values. @see https://2captcha.com/api-docs/datadome-slider-captcha * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ captchaUrl, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, userAgent }: DataDomeSliderTaskBaseParams, type: TaskTypes); } type DataDomeSliderTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of DataDome. * @extends {DataDomeSliderTaskBase} * @see {@link https://2captcha.com/api-docs/datadome-slider-captcha} */ declare class DataDomeSliderTask extends DataDomeSliderTaskBase implements _IsTaskType { /** * @type {boolean} _isDataDomeSliderTask - Only used for correct method overloading intellisense */ readonly _isDataDomeSliderTask: _IsTaskType["_isDataDomeSliderTask"]; /** * Create DataDomeSliderTask * @see {@link https://2captcha.com/api-docs/datadome-slider-captcha} * @param {Object} params - DataDomeSliderTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.captchaUrl] - The value of the src parameter for the iframe element containing the captcha on the page. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents. It is important to use the supported User-Agent values. @see https://2captcha.com/api-docs/datadome-slider-captcha * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: DataDomeSliderTaskParams); } type CapyTaskBaseParams = Partial & { "userAgent"?: string; "websiteKey": string; "websiteURL": string; }; /** * Base class for CapyTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} */ declare abstract class CapyTaskBase extends BaseTask implements CapyTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - Capy Puzzle Captcha captchakey. */ websiteKey: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * CapyTaskBase * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} * @param {Object} params - CapyTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Capy Puzzle Captcha captchakey. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteKey, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, userAgent }: CapyTaskBaseParams, type: TaskTypes); } type CapyTaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of Capy Puzzle Captcha. * @extends {CapyTaskBase} * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} */ declare class CapyTaskProxyless extends CapyTaskBase implements _IsTaskType { /** * @type {boolean} _isCapyTaskProxyless - Only used for correct method overloading intellisense */ readonly _isCapyTaskProxyless: _IsTaskType["_isCapyTaskProxyless"]; /** * Create CapyTaskProxyless * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} * @param {Object} params - CapyTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Capy Puzzle Captcha captchakey. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ constructor(params: CapyTaskProxylessParams); } type CapyTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of Capy Puzzle Captcha. * @extends {CapyTaskBase} * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} */ declare class CapyTask extends CapyTaskBase implements _IsTaskType { /** * @type {boolean} _isCapyTask - Only used for correct method overloading intellisense */ readonly _isCapyTask: _IsTaskType["_isCapyTask"]; /** * Create CapyTask * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} * @param {Object} params - CapyTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Capy Puzzle Captcha captchakey. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: CapyTaskParams); } type AntiCyberSiAraTaskBaseParams = Partial & { "SlideMasterUrlId": string; "userAgent": string; "websiteURL": string; }; /** * Base class for AntiCyberSiAraTaskBase * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} */ declare abstract class AntiCyberSiAraTaskBase extends BaseTask implements AntiCyberSiAraTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} SlideMasterUrlId - The value of the MasterUrlId parameter obtained from the request to the endpoint API/CyberSiara/GetCyberSiara. */ SlideMasterUrlId: string; /** * @type {string} userAgent - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ userAgent: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * AntiCyberSiAraTaskBase * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} * @param {Object} params - CapyTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.SlideMasterUrlId] - The value of the MasterUrlId parameter obtained from the request to the endpoint API/CyberSiara/GetCyberSiara. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ SlideMasterUrlId, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, userAgent }: AntiCyberSiAraTaskBaseParams, type: TaskTypes); } type AntiCyberSiAraTaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of CyberSiARA. * @extends {AntiCyberSiAraTaskBase} * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} */ declare class AntiCyberSiAraTaskProxyless extends AntiCyberSiAraTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiCyberSiAraTaskProxyless - Only used for correct method overloading intellisense */ readonly _isAntiCyberSiAraTaskProxyless: _IsTaskType["_isAntiCyberSiAraTaskProxyless"]; /** * Create AntiCyberSiAraTaskProxyless * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} * @param {Object} params - CapyTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.SlideMasterUrlId] - The value of the MasterUrlId parameter obtained from the request to the endpoint API/CyberSiara/GetCyberSiara. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents */ constructor(params: AntiCyberSiAraTaskProxylessParams); } type AntiCyberSiAraTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of CyberSiARA. * @extends {AntiCyberSiAraTaskBase} * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} */ declare class AntiCyberSiAraTask extends AntiCyberSiAraTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiCyberSiAraTask - Only used for correct method overloading intellisense */ readonly _isAntiCyberSiAraTask: _IsTaskType["_isAntiCyberSiAraTask"]; /** * Create AntiCyberSiAraTask * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} * @param {Object} params - CapyTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.SlideMasterUrlId] - The value of the MasterUrlId parameter obtained from the request to the endpoint API/CyberSiara/GetCyberSiara. * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: AntiCyberSiAraTaskParams); } type AmazonTaskBaseParams = Partial & { "captchaScript"?: string; "challengeScript"?: string; "context": string; "iv": string; "websiteKey": string; "websiteURL": string; }; /** * Base class for AmazonTask * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} */ declare abstract class AmazonTaskBase extends BaseTask implements AmazonTaskBaseParams { /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - Value of key parameter you found on the page */ websiteKey: string; /** * @type {string} iv - Value of iv parameter you found on the */ iv: string; /** * @type {string} context - Value of context parameter you found on the page */ context: string; /** * @type {string} challengeScript - The source URL of challenge.js script on the page */ challengeScript?: string; /** * @type {string} captchaScript - The source URL of captcha.js script on the page */ captchaScript?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyTypes; /** * AmazonTaskBase * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} * @param {Object} params - AmazonTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Value of key parameter you found on the page * @param {string} [params.iv] - Value of iv parameter you found on the * @param {string} [params.context] - Value of context parameter you found on the page * @param {string} [params.challengeScript] - The source URL of challenge.js script on the page * @param {string} [params.captchaScript] - The source URL of captcha.js script on the page * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor({ websiteKey, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, iv, challengeScript, captchaScript, context }: AmazonTaskBaseParams, type: TaskTypes); } type AmazonTaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of Amazon AWS CAPTCHA. * @extends {AmazonTaskBase} * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} */ declare class AmazonTaskProxyless extends AmazonTaskBase implements _IsTaskType { /** * @type {boolean} _isKeyCaptchaTask - Only used for correct method overloading intellisense */ readonly _isAmazonTaskProxyless: _IsTaskType["_isAmazonTaskProxyless"]; /** * Create AmazonTaskProxyless * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} * @param {Object} params - AmazonTaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Value of key parameter you found on the page * @param {string} [params.iv] - Value of iv parameter you found on the * @param {string} [params.context] - Value of context parameter you found on the page * @param {string} [params.challengeScript] - The source URL of challenge.js script on the page * @param {string} [params.captchaScript] - The source URL of captcha.js script on the page */ constructor(params: AmazonTaskProxylessParams); } type AmazonTaskParams = ProxyRequiredTaskParams; /** * Token-based method for automated solving of Amazon AWS CAPTCHA. * @extends {AmazonTaskBase} * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} */ declare class AmazonTask extends AmazonTaskBase implements _IsTaskType { /** * @type {boolean} _isAmazonTask - Only used for correct method overloading intellisense */ readonly _isAmazonTask: _IsTaskType["_isAmazonTask"]; /** * Create AmazonTask * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} * @param {Object} params - AmazonTaskParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - Value of key parameter you found on the page * @param {string} [params.iv] - Value of iv parameter you found on the * @param {string} [params.context] - Value of context parameter you found on the page * @param {string} [params.challengeScript] - The source URL of challenge.js script on the page * @param {string} [params.captchaScript] - The source URL of captcha.js script on the page * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: AmazonTaskParams); } type GeeTestV4TaskParams = ProxyRequiredTaskParams; /** * Token-based method to bypass GeeTest v4. * @extends {GeeTestV4TaskBase} * @see {@link https://2captcha.com/api-docs/geetest} */ declare class GeeTestV4Task extends GeeTestV4TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTask - Only used for correct method overloading intellisense */ readonly _isGeeTestTask: _IsTaskType["_isGeeTestTask"]; /** * Create GeeTestV4Task * @see {@link https://2captcha.com/api-docs/geetest} * @param {Object} params - GeeTestV4TaskParams * @param {object} [params.initParameters] - Required for GeeTest V4. Captcha parameters passed to initGeetest4 call, must contain captcha_id value * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.userAgent] - User-Agent of your browser will be used to load the captcha. Use only modern browser's User-Agents * @param {string} [params.proxyAddress] - Proxy IP address or hostname * @param {string} [params.proxyLogin] - Login for basic authentication on the proxy * @param {string} [params.proxyPassword] - Password for basic authentication on the proxy * @param {string} [params.proxyType] - Type of your proxy: HTTP, HTTPS, SOCKS4, SOCKS5 * @param {string} [params.proxyPort] - Proxy port */ constructor(params: GeeTestV4TaskParams); } type RecaptchaV3TaskBaseParams = { "apiDomain"?: string; "isEnterprise"?: boolean; "minScore": number; "pageAction"?: string; "websiteKey": string; "websiteURL": string; }; /** * Base class for Recaptcha V3 * @extends {BaseTask} * @see {@link https://2captcha.com/api-docs/recaptcha-v3} */ declare abstract class RecaptchaV3TaskBase extends BaseTask implements RecaptchaV3TaskBaseParams { /** * @type {string} apiDomain - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com */ apiDomain?: string; /** * @type {string} websiteURL - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users */ websiteURL: string; /** * @type {string} websiteKey - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value */ websiteKey: string; /** * @type {number} minScore - Required score value: */ minScore: number; /** * @type {string} pageAction - Action parameter value. The value is set by website owner inside data-action property of the reCAPTCHA div element or passed inside options object of execute method call, like grecaptcha.execute('websiteKey'{ action: 'myAction' }) */ pageAction?: string; /** * @type {boolean} isEnterprise - Pass true for Enterprise version of reCAPTCHA. You can identify it by enterprise.js script used instead of api.js or by grecaptcha.enterprise.execute call used instead of grecaptcha.execute */ isEnterprise?: boolean; /** * RecaptchaV3TaskBase * @see {@link https://2captcha.com/api-docs/recaptcha-v3} * @param {Object} params - RecaptchaV3TaskBaseParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.pageAction] - Action parameter value. The value is set by website owner inside data-action property of the reCAPTCHA div element or passed inside options object of execute method call, like grecaptcha.execute('websiteKey'{ action: 'myAction' }) * @param {number} [params.minScore] - Required score value * @param {boolean} [params.isEnterprise] - Pass true for Enterprise version of reCAPTCHA. You can identify it by enterprise.js script used instead of api.js or by grecaptcha.enterprise.execute call used instead of grecaptcha.execute */ constructor({ websiteKey, websiteURL, apiDomain, minScore, pageAction, isEnterprise }: RecaptchaV3TaskBaseParams, type: TaskTypes); } type RecaptchaV3TaskProxylessParams = ProxylessTaskParams; /** * Token-based method for automated solving of reCAPTCHA V3. * @extends {RecaptchaV3TaskBase} * @see {@link https://3captcha.com/api-docs/recaptcha-v3} */ declare class RecaptchaV3TaskProxyless extends RecaptchaV3TaskBase implements _IsTaskType { /** * @type {boolean} _isRecaptchaV3TaskProxyless - Only used for correct method overloading intellisense */ readonly _isRecaptchaV3TaskProxyless: _IsTaskType["_isRecaptchaV3TaskProxyless"]; /** * Create RecaptchaV3TaskProxyless * @see {@link https://2captcha.com/api-docs/recaptcha-v3} * @param {Object} params - RecaptchaV3TaskProxylessParams * @param {string} [params.websiteURL] - The full URL of target web page where the captcha is loaded. We do not open the page, not a problem if it is available only for authenticated users * @param {string} [params.websiteKey] - reCAPTCHA sitekey. Can be found inside data-sitekey property of the reCAPTCHA div element or inside k parameter of the requests to reCAPTHCHA API. You can also use the script to find the value * * @param {string} [params.apiDomain] - Domain used to load the captcha: google.com or recaptcha.net. Default value: google.com * @param {string} [params.pageAction] - Action parameter value. The value is set by website owner inside data-action property of the reCAPTCHA div element or passed inside options object of execute method call, like grecaptcha.execute('websiteKey'{ action: 'myAction' }) * @param {number} [params.minScore] - Required score value: */ constructor(params: RecaptchaV3TaskProxylessParams); } type Requests = AmazonTask | AmazonTaskProxyless | AntiCyberSiAraTask | AntiCyberSiAraTaskProxyless | AtbCaptchaTask | AtbCaptchaTaskProxyless | AudioTask | BoundingBoxTask | CapyTask | CapyTaskProxyless | CoordinatesTask | CutCaptchaTask | CutCaptchaTaskProxyless | DataDomeSliderTask | DrawAroundTask | FriendlyCaptchaTask | FriendlyCaptchaTaskProxyless | FunCaptchaTask | FunCaptchaTaskProxyless | GeeTestTask | GeeTestTaskProxyless | GeeTestV3Task | GeeTestV3TaskProxyless | GeeTestV4Task | GeeTestV4TaskProxyless | GridTask | HCaptchaTask | HCaptchaTaskProxyless | ImageToTextTask | KeyCaptchaTask | KeyCaptchaTaskProxyless | LeminTask | LeminTaskProxyless | MtCaptchaTask | MtCaptchaTaskProxyless | RecaptchaV2EnterpriseTask | RecaptchaV2EnterpriseTaskProxyless | RecaptchaV2Task | RecaptchaV2TaskProxyless | RecaptchaV3TaskProxyless | RotateTask | TencentTask | TencentTaskProxyless | TextCaptchaTask | TurnstileTask | TurnstileTaskProxyless; type TwoCaptchaSuccessSolution = { "cost": string; "createTime": number; "endTime": number; "errorId": number; "ip": string; "solution": TSolution; "solveCount": number; "status": string; "taskId": number; }; /** * @see {@link https://2captcha.com/api-docs/tencent} */ interface TencentTaskSolution { "appid": string; "randstr": string; "ret": number; "ticket": string; } /** * @see {@link https://2captcha.com/api-docs/atb-captcha} */ interface AtbCaptchaTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} */ interface TurnstileTaskSolution { "token": string; "userAgent": string; } /** * @see {@link https://3captcha.com/api-docs/recaptcha-v3} */ interface RecaptchaV3TaskSolution { "gRecaptchaResponse": string; "token": string; } /** * - {@link https://2captcha.com/api-docs/recaptcha-v2} * - {@link https://2captcha.com/api-docs/recaptcha-v2-enterprise} */ interface RecaptchaV2TaskSolution { "gRecaptchaResponse": string; "token": string; } /** * @see {@link https://2captcha.com/api-docs/mtcaptcha} */ interface MtCaptchaTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/lemin} */ interface LeminTaskSolution { "answer": string; "challenge_id": string; } /** * @see {@link https://2captcha.com/api-docs/keycaptcha} */ interface KeyCaptchaTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/hcaptcha} */ interface HCaptchaTaskSolution { "gRecaptchaResponse": string; "respKey": string; "token": string; "userAgent": string; } /** * @see {@link https://2captcha.com/api-docs/geetest} */ interface GeeTestV3TaskSolution { "challenge": string; "seccode": string; "validate": string; } /** * @see {@link https://2captcha.com/api-docs/geetest} */ interface GeeTestV4TaskSolution { "captcha_id": string; "captcha_output": string; "gen_time": string; "lot_number": string; "pass_token": string; } /** * @see {@link https://2captcha.com/api-docs/geetest} */ type GeeTestTaskSolution = GeeTestV3TaskSolution & GeeTestV4TaskSolution; /** * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} */ interface FunCaptchaTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/friendly-captcha} */ interface FriendlyCaptchaTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/datadome-slider-captcha} */ interface DataDomeSliderTaskSolution { "cookie": string; } /** * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} */ interface CapyTaskSolution { "answer": string; "captchakey": string; "challengekey": string; "respKey": string; } /** * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} */ interface AntiCyberSiAraTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} */ interface AmazonTaskSolution { "captcha_voucher": string; "existing_token": string; } /** * @see {@link https://2captcha.com/api-docs/cutcaptcha} */ interface CutCaptchaTaskSolution { "token": string; } /** * @see {@link https://2captcha.com/api-docs/text} */ interface TextCaptchaTaskSolution { "text": string; } /** * @see {@link https://2captcha.com/api-docs/rotate} */ interface RotateTaskSolution { "rotate": number; } /** * @see {@link https://2captcha.com/api-docs/grid} */ interface GridTaskSolution { "click": number[]; } interface Coordinate$1 { "x": number; "y": number; } /** * @see {@link https://2captcha.com/api-docs/draw-around} */ interface DrawAroundTaskSolution { "canvas": Coordinate$1[][]; } interface BoundingBox { "xMax": number; "xMin": number; "yMax": number; "yMin": number; } /** * @see {@link https://2captcha.com/api-docs/bounding-box} */ interface BoundingBoxTaskSolution { "bounding_boxes": BoundingBox[]; } /** * @see {@link https://2captcha.com/api-docs/audio} */ interface AudioTaskSolution { "text": string; } interface Coordinate { "x": number; "y": number; } /** * @see {@link https://2captcha.com/api-docs/coordinates} */ interface CoordinatesTaskSolution { "coordinates": Coordinate[]; } /** * @see {@link https://2captcha.com/api-docs/normal-captcha} */ interface ImageToTextTaskSolution { "text": string; } /** * @classdesc TwoCaptcha client * @class * @see {@link https://2captcha.com/api-docs/quick-start} */ declare class TwoCaptcha extends CaptchaClient { /** * @type {string} clientKey - YOUR_API_KEY from dashboard */ protected clientKey: string; /** * @type {number} pollingInterval - polling interval to getTaskResult in ms. Default to 5000 */ protected pollingInterval: number; /** * @type {number} timeout - max timeout to getTaskResult in ms. Default to 120_000 */ protected timeout: number; /** * @type {string} baseUrl - api base url */ protected baseUrl: string; /** * @param {object} [params] - CaptchaClientParams * @param {string} [params.clientKey] - YOUR_API_KEY from dashboard * @param {number} [params.timeout] - max timeout to getTaskResult * @param {number} [params.pollingInterval] - polling interval to getTaskResult */ constructor(params: CaptchaClientParams); getBalance(): Promise; /** * @param {object} request - task payload to create task * @return {Promise} - response of createTask */ protected createTask(request: Requests): Promise; /** * The method is used for automated feedback on captcha solutions. * Make this request if the answer was declined by the target website. * We use the collected statistics to improve our service, * we check the solutions, we check workers who provided the solution * and after the analysis we issue refunds for incorrectly solved captchas. * If your success rate is close to 0% please do not send this request, there is definitely wrong with your code/software. * @see {@link https://2captcha.com/api-docs/report-incorrect} * @param {number} taskId - The id of your task * @return {Promise} - response of createTask */ reportIncorrect(taskId: number): Promise; /** * The method is used for automated feedback on captcha solutions. * If the answer was accepted by the target website send this request. * We use the collected statistics to make our service better. * @see {@link https://2captcha.com/api-docs/report-correct} * @param {number} taskId - The id of your task * @return {Promise} - response of createTask */ reportCorrect(taskId: number): Promise; /** * @param {AudioTask} request - task payload to create AudioTask * @see {@link https://2captcha.com/api-docs/audio} * @return {Promise>} - response of createTask */ solve(request: AudioTask): Promise>; /** * @param {GridTask} request - task payload to create GridTask * @see {@link https://2captcha.com/api-docs/grid} * @return {Promise>} - response of createTask */ solve(request: GridTask): Promise>; /** * @param {BoundingBoxTask} request - task payload to create BoundingBoxTask * @see {@link https://2captcha.com/api-docs/bounding-box} * @return {Promise>} - response of createTask */ solve(request: BoundingBoxTask): Promise>; /** * @param {CoordinatesTask} request - task payload to create CoordinatesTask * @see {@link https://2captcha.com/api-docs/coordinates} * @return {Promise>} - response of createTask */ solve(request: CoordinatesTask): Promise>; /** * @param {DrawAroundTask} request - task payload to create DrawAroundTask * @see {@link https://2captcha.com/api-docs/draw-around} * @return {Promise>} - response of createTask */ solve(request: DrawAroundTask): Promise>; /** * @param {ImageToTextTask} request - task payload to create ImageToTextTask * @see {@link https://2captcha.com/api-docs/normal-captcha} * @return {Promise>} - response of createTask */ solve(request: ImageToTextTask): Promise>; /** * @param {RotateTask} request - task payload to create RotateTask * @see {@link https://2captcha.com/api-docs/rotate} * @return {Promise>} - response of createTask */ solve(request: RotateTask): Promise>; /** * @param {TextCaptchaTask} request - task payload to create TextCaptchaTask * @see {@link https://2captcha.com/api-docs/text} * @return {Promise>} - response of createTask */ solve(request: TextCaptchaTask): Promise>; /** * @param {AmazonTask | AmazonTaskProxyless} request - task payload to create AmazonTask or AmazonTaskProxyless * @see {@link https://2captcha.com/api-docs/amazon-aws-waf-captcha} * @return {Promise>} - response of createTask */ solve(request: AmazonTask | AmazonTaskProxyless): Promise>; /** * @param {AntiCyberSiAraTask | AntiCyberSiAraTaskProxyless} request - task payload to create AntiCyberSiAraTask or AntiCyberSiAraTaskProxyless * @see {@link https://2captcha.com/api-docs/anti-cyber-siara} * @return {Promise>} - response of createTask */ solve(request: AntiCyberSiAraTask | AntiCyberSiAraTaskProxyless): Promise>; /** * @param {CapyTask | CapyTaskProxyless} request - task payload to create CapyTask or CapyTaskProxyless * @see {@link https://2captcha.com/api-docs/capy-puzzle-captcha} * @return {Promise>} - response of createTask */ solve(request: CapyTask | CapyTaskProxyless): Promise>; /** * @param {CutCaptchaTask | CutCaptchaTaskProxyless} request - task payload to create CutCaptchaTask or CutCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/cutcaptcha} * @return {Promise>} - response of createTask */ solve(request: CutCaptchaTask | CutCaptchaTaskProxyless): Promise>; /** * @param {DataDomeSliderTask} request - task payload to create DataDomeSliderTask or DataDomeSliderTaskProxyless * @see {@link https://2captcha.com/api-docs/datadome-slider-captcha} * @return {Promise>} - response of createTask */ solve(request: DataDomeSliderTask): Promise>; /** * @param {FriendlyCaptchaTask | FriendlyCaptchaTaskProxyless} request - task payload to create FriendlyCaptchaTask or FriendlyCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/friendly-captcha} * @return {Promise>} - response of createTask */ solve(request: FriendlyCaptchaTask | FriendlyCaptchaTaskProxyless): Promise>; /** * @param {FunCaptchaTask | FunCaptchaTaskProxyless} request - task payload to create FunCaptchaTask or FunCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/arkoselabs-funcaptcha} * @return {Promise>} - response of createTask */ solve(request: FunCaptchaTask | FunCaptchaTaskProxyless): Promise>; /** * @param {GeeTestV3Task | GeeTestV3TaskProxyless} request - task payload to create GeeTestV3Task or GeeTestV3TaskProxyless * @see {@link https://2captcha.com/api-docs/geetest} * @return {Promise>} - response of createTask */ solve(request: GeeTestV3Task | GeeTestV3TaskProxyless): Promise>; /** * @param {GeeTestV4Task | GeeTestV4TaskProxyless} request - task payload to create GeeTestV4Task or GeeTestV4TaskProxyless * @see {@link https://2captcha.com/api-docs/geetest} * @return {Promise>} - response of createTask */ solve(request: GeeTestV4Task | GeeTestV4TaskProxyless): Promise>; /** * @param {GeeTestTask | GeeTestTaskProxyless} request - task payload to create GeeTestTask or GeeTestTaskProxyless * @see {@link https://2captcha.com/api-docs/geetest} * @return {Promise>} - response of createTask */ solve(request: GeeTestTask | GeeTestTaskProxyless): Promise>; /** * @param {HCaptchaTask | HCaptchaTaskProxyless} request - task payload to create HCaptchaTask or HCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/hcaptcha} * @return {Promise>} - response of createTask */ solve(request: HCaptchaTask | HCaptchaTaskProxyless): Promise>; /** * @param {KeyCaptchaTask | KeyCaptchaTaskProxyless} request - task payload to create KeyCaptchaTask or KeyCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/keycaptcha} * @return {Promise>} - response of createTask */ solve(request: KeyCaptchaTask | KeyCaptchaTaskProxyless): Promise>; /** * @param {LeminTask | LeminTaskProxyless} request - task payload to create LeminTask or LeminTaskProxyless * @see {@link https://2captcha.com/api-docs/lemin} * @return {Promise>} - response of createTask */ solve(request: LeminTask | LeminTaskProxyless): Promise>; /** * @param {MtCaptchaTask | MtCaptchaTaskProxyless} request - task payload to create MtCaptchaTask or MtCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/mtcaptcha} * @return {Promise>} - response of createTask */ solve(request: MtCaptchaTask | MtCaptchaTaskProxyless): Promise>; /** * @param {RecaptchaV2EnterpriseTask | RecaptchaV2EnterpriseTaskProxyless | RecaptchaV2Task | RecaptchaV2TaskProxyless} request - task payload to create RecaptchaV2 task * - {@link https://2captcha.com/api-docs/recaptcha-v2} * - {@link https://2captcha.com/api-docs/recaptcha-v2-enterprise} * @return {Promise>} - response of createTask */ solve(request: RecaptchaV2EnterpriseTask | RecaptchaV2EnterpriseTaskProxyless | RecaptchaV2Task | RecaptchaV2TaskProxyless): Promise>; /** * @param {RecaptchaV3TaskProxyless} request - task payload to create RecaptchaV3TaskProxyless * @see {@link https://3captcha.com/api-docs/recaptcha-v3} * @return {Promise>} - response of createTask */ solve(request: RecaptchaV3TaskProxyless): Promise>; /** * @param {TurnstileTask | TurnstileTaskProxyless} request - task payload to create TurnstileTask or TurnstileTaskProxyless * @see {@link https://2captcha.com/api-docs/cloudflare-turnstile} * @return {Promise>} - response of createTask */ solve(request: TurnstileTask | TurnstileTaskProxyless): Promise>; /** * @param {TencentTask | TencentTaskProxyless} request - task payload to create TencentTask or TencentTaskProxyless * @see {@link https://2captcha.com/api-docs/tencent} * @return {Promise>} - response of createTask */ solve(request: TencentTask | TencentTaskProxyless): Promise>; /** * @param {AtbCaptchaTask | AtbCaptchaTaskProxyless} request - task payload to create AtbCaptchaTask or AtbCaptchaTaskProxyless * @see {@link https://2captcha.com/api-docs/atb-captcha} * @return {Promise>} - response of createTask */ solve(request: AtbCaptchaTask | AtbCaptchaTaskProxyless): Promise>; } export { AmazonTask, AmazonTaskProxyless, AntiCyberSiAraTask, AntiCyberSiAraTaskProxyless, AtbCaptchaTask, AtbCaptchaTaskProxyless, AudioTask, BoundingBoxTask, CapyTask, CapyTaskProxyless, CoordinatesTask, CutCaptchaTask, CutCaptchaTaskProxyless, DataDomeSliderTask, DrawAroundTask, FriendlyCaptchaTask, FriendlyCaptchaTaskProxyless, FunCaptchaTask, FunCaptchaTaskProxyless, GeeTestTask, GeeTestTaskProxyless, GeeTestV3Task, GeeTestV3TaskProxyless, GeeTestV4Task, GeeTestV4TaskProxyless, GridTask, HCaptchaTask, HCaptchaTaskProxyless, ImageToTextTask, KeyCaptchaTask, KeyCaptchaTaskProxyless, LeminTask, LeminTaskProxyless, MtCaptchaTask, MtCaptchaTaskProxyless, RecaptchaV2EnterpriseTask, RecaptchaV2EnterpriseTaskProxyless, RecaptchaV2Task, RecaptchaV2TaskProxyless, RecaptchaV3TaskProxyless, RotateTask, TencentTask, TencentTaskProxyless, TextCaptchaTask, TurnstileTask, TurnstileTaskProxyless, TwoCaptcha };