import { CaptchaClient } from '@captcha-libs/captcha-client'; interface CaptchaClientParams { "clientKey": string; "pollingInterval"?: number; "timeout"?: number; "baseUrl"?: string; } type CapSolverCreateTaskResponse = { "errorCode": string; "errorDescription": string; "errorId": number; "solution"?: TSolution; "taskId": string; }; interface CapSolverBalanceSuccessResponse { "balance": number; "errorId": number; "packages": Package[]; } interface Package { "packageId": string; "type": number; "title": string; "numberOfCalls": number; "status": number; "token": string; "expireTime": number; } interface FeedbackTaskParams { "code"?: number; "invalid": boolean; "message"?: string; "taskId": string; } interface FeedbackResponseError { "errorCode": string; "errorDescription": string; "errorId": number; } interface FeedbackResponseSuccess { "errorId": number; "message": string; } type FeedbackResponse = FeedbackResponseError | FeedbackResponseSuccess; interface VisionEngineAngleSolution { "angle": number; } interface VisionEngineDistanceSolution { "distance": number; } interface VisionEngineSpaceDetectionSolution { "box": number[]; } interface VisionEngineSheinSolutionRect { "x1": number; "y1": number; "x2": number; "y2": number; } interface VisionEngineSheinSolution { "rects": VisionEngineSheinSolutionRect[]; } /** * @see {@link https://docs.capsolver.com/guide/recognition/VisionEngine.html#example-response} */ type VisionEngineSolution = VisionEngineAngleSolution & VisionEngineDistanceSolution & VisionEngineSpaceDetectionSolution & VisionEngineSheinSolution; /** * @see {@link https://docs.capsolver.com/guide/recognition/AwsWafClassification.html#example-response} */ interface AwsWafClassificationSolution { "box": number[]; "distance": number; "objects": number[]; } /** * @deprecated removed from service support */ interface FunCaptchaClassificationSolution { "objects": Array; } /** * @deprecated removed from service support */ interface HCaptchaClassificationSolution { "box": Array; "imageSize": Array; "objects": Array; "tags": Array; } /** * @see {@link https://docs.capsolver.com/guide/recognition/ImageToTextTask.html#example-response} */ interface ImageToTextSolution { "text": string; "answers": string[]; } /** * @see {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html#response-example} */ interface MultiSolution { "objects": number[]; "size": number; "type": string; } /** * @see {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html#response-example} */ interface SingleSolution { "hasObject": boolean; "size": number; "type": string; } type ReCaptchaV2ClassificationSolution = MultiSolution | SingleSolution; /** * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2#example-response-1} */ interface ReCaptchaV2TaskSolution { "userAgent": string; "secChUa": string; "createTime": number; "gRecaptchaResponse": string; "recaptcha-ca-t": string; "recaptcha-ca-e": string; } /** * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html#example-response-1} */ interface MtCaptchaTaskSolution { "token": string; } /** * @deprecated removed from service support */ interface HCaptchaTaskSolution { "captchaKey": string; "expireTime": number; "gRecaptchaResponse": string; "timestamp": number; "userAgent": string; } /** * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html#example-response-1} */ interface GeeTestV3TaskSolution { "challenge": string; "validate": string; "seccode": string; "userAgent": string; } /** * @deprecated removed from service support */ interface FunCaptchaTaskSolution { "token": string; "userAgent": string; } /** * @see {@link https://docs.capsolver.com/en/guide/captcha/datadome#example-response-1} */ interface DataDomeSliderTaskSolution { "cookie": string; } /** * @deprecated removed from service support */ interface AntiImpervaTaskSolution { "token": string; } /** * @deprecated removed from service support */ interface AntiCyberSiAraTaskSolution { "token": string; } /** * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/#example-response-1} */ interface AntiCloudflareTaskSolution { "token": string; "type": string; "userAgent": string; "cookies": Record; } /** * @deprecated removed from service support */ interface AntiAwsWafTaskSolution { "cookie": string; } /** * @deprecated removed from service support */ interface AntiAkamaiPowTaskSolution { "pow": string; } /** * @deprecated removed from service support */ interface AntiAkamaiSensorTaskSolution { "deviceId": string; "deviceName": string; "sensors": string[]; "version": string; } /** * @deprecated removed from service support */ interface AntiAkamaiWebTaskSolution { "sensorData": string; } /** * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html#example-response-1} */ interface GeeTestV4TaskSolution { "captcha_id": string; "captcha_output": string; "gen_time": string; "lot_number": string; "pass_token": string; "risk_type": string; } /** * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html#example-response-1} */ interface ReCaptchaV3TaskSolution { "userAgent": string; "secChUa": string; "createTime": number; "gRecaptchaResponse": string; "recaptcha-ca-t": string; "recaptcha-ca-e": string; } declare const _TaskTypes: readonly ["HCaptchaClassification", "ImageToTextTask", "ReCaptchaV2EnterpriseTask", "ReCaptchaV2EnterpriseTaskProxyLess", "ReCaptchaV2Task", "ReCaptchaV2TaskProxyLess", "ReCaptchaV3EnterpriseTask", "ReCaptchaV3EnterpriseTaskProxyLess", "ReCaptchaV3M1TaskProxyLess", "ReCaptchaV3Task", "ReCaptchaV3TaskProxyLess", "FunCaptchaClassification", "ImageToTextTask", "HCaptchaClassification", "ReCaptchaV2Classification", "AwsWafClassification", "MtCaptchaTask", "MtCaptchaTaskProxyLess", "DataDomeSliderTask", "AntiAwsWafTask", "AntiAwsWafTaskProxyLess", "AntiCyberSiAraTask", "AntiCyberSiAraTaskProxyLess", "AntiImpervaTask", "AntiImpervaTaskProxyLess", "AntiCloudflareTask", "AntiAkamaiBMPTask", "AntiAkamaiWebTask", "HCaptchaTask", "HCaptchaTaskProxyLess", "FunCaptchaTaskProxyLess", "FunCaptchaTask", "GeeTestTask", "GeeTestTaskProxyLess", "VisionEngine", "AntiTurnstileTaskProxyLess"]; type TaskTypes = typeof _TaskTypes[number]; interface BaseParams { "_endpoint"?: string; "type": TaskTypes; } type ProxyTypes = "http" | "https" | "socks5"; interface ProxyCredentials { "proxyAddress": string; "proxyLogin"?: string; "proxyPassword"?: string; "proxyPort": number; "proxyType": ProxyTypes; "proxy": string; } type ProxylessTaskParams = Omit; type ProxyRequiredTaskParams = Omit & T & { "proxy"?: never; } | T & { [PC in keyof ProxyCredentials]?: never; } & { "proxy": string; }; /** * @type {_IsTaskType} _IsTaskType - Only used for correct method overloading intellisense */ type _IsTaskType = { readonly [type in TaskTypes as `_is${type}`]?: boolean; }; /** * @classdesc BaseTask for Capsolver tasks * @class */ declare abstract class BaseTask { /** * @type {TaskTypes} type - task type */ protected type: TaskTypes; /** * @type {string} _endpoint - special endpoint for task request */ readonly _endpoint: string; constructor(params: BaseParams); } interface AwsWafClassificationParams { "images": Array; "question": string; "websiteKey"?: string; "websiteURL"?: string; } /** * @classdesc AWS WAF Images Recognize * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/recognition/AwsWafClassification.html} */ declare class AwsWafClassification extends BaseTask implements AwsWafClassificationParams, _IsTaskType { /** * @type {boolean} _isAwsWafClassification - Only used for correct method overloading intellisense */ readonly _isAwsWafClassification: _IsTaskType["_isAwsWafClassification"]; /** * Create AwsWafClassification * @see {@link https://docs.capsolver.com/guide/recognition/AwsWafClassification.html} * @param {object} params - AwsWafClassificationParams * @param {string} [params.question] - For full names of questions, please refer to the following list of questions. * @param {string[]} [params.images] - base64 image string * @param {string=} [params.websiteKey] - Website key to improve accuracy * @param {string=} [params.websiteURL] - Page source url to improve accuracy */ constructor({ websiteKey, question, websiteURL, images }: AwsWafClassificationParams); /** * @type {string} question - For full names of questions, please refer to the following list of questions. */ question: string; /** * @type {string[]} images - base64 image string */ images: Array; /** * @type {string=} websiteKey - Website key to improve accuracy */ websiteKey?: string; /** * * @type {string=} websiteURL - Page source url to improve accuracy */ websiteURL?: string; } interface FunCaptchaClassificationParams { "images": string; "module"?: string; "question": string; "websiteKey"?: string; "websiteURL"?: string; } /** * @classdesc FunCaptcha Images Recognize * @class * @deprecated deleted from service support * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/recognition/FunCaptchaClassification.html} * @deprecated deleted from service support */ declare class FunCaptchaClassification extends BaseTask implements FunCaptchaClassificationParams, _IsTaskType { /** * @type {boolean} _isFunCaptchaClassification - Only used for correct method overloading intellisense */ readonly _isFunCaptchaClassification: _IsTaskType["_isFunCaptchaClassification"]; /** * Create FunCaptchaClassification * @see {@link https://docs.capsolver.com/guide/recognition/FunCaptchaClassification.html} * @param {Object} params - ImageToTextParams * @param {string} [params.question] - Question name. this param value from API response game_variant field. Exmaple: maze,maze2,flockCompass,3d_rollball_animals * @param {string} [params.images] - Base64 encoded image, can be a screenshot (pass only the hexagonal image, do not pass the rest of the content) * @param {string} [params.module] - module name {@see https://docs.capsolver.com/guide/recognition/FunCaptchaClassification.html} * @param {string} [params.websiteURL] - Page source url to improve accuracy * @param {string} [params.websiteKey] - Website key to improve accuracy */ constructor({ images, module, question, websiteKey, websiteURL }: FunCaptchaClassificationParams); /** * @type {string} question - Question name. this param value from API response game_variant field. Exmaple: maze,maze2,flockCompass,3d_rollball_animals */ question: string; /** * @type {string} images - Base64 encoded image, can be a screenshot (pass only the hexagonal image, do not pass the rest of the content) */ images: string; /** * @type {string} module - module name * @see {@link https://docs.capsolver.com/guide/recognition/FunCaptchaClassification.html} */ module?: string; /** * @type {string} websiteURL - Page source url to improve accuracy */ websiteURL?: string; /** * @type {string} websiteKey - Website key to improve accuracy */ websiteKey?: string; } interface HCaptchaClassificationParams { "queries": Array; "question": string; "websiteKey"?: string; "websiteURL"?: string; } /** * @classdesc HCaptcha Images Recognize * @class * @deprecated deleted from service support * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/recognition/HCaptchaClassification.html} */ declare class HCaptchaClassification extends BaseTask implements HCaptchaClassificationParams, _IsTaskType { /** * @type {boolean} _isHCaptchaClassification - Only used for correct method overloading intellisense */ readonly _isHCaptchaClassification: _IsTaskType["_isHCaptchaClassification"]; /** * Create HCaptchaClassification * @see {@link https://docs.capsolver.com/guide/recognition/HCaptchaClassification.html} * @param {Object} params - ImageToTextParams * @param {string} [params.question] - English is supported only. Please convert other languages by yourself * @param {string} [params.queries] - Base64 encoded image, do not include "data:image/***; base64," Assembles the picture as a list: [base64,base64,base64...] * @param {string} [params.websiteKey] - Website key to improve accuracy * @param {string} [params.websiteURL] - Page source url to improve accuracy */ constructor({ queries, question, websiteKey, websiteURL }: HCaptchaClassificationParams); /** * @type {string} question - English is supported only. Please convert other languages by yourself */ question: string; queries: string[]; /** * @type {string} websiteKey - Website key to improve accuracy */ websiteKey?: string; /** * @type {string} websiteURL - Page source url to improve accuracy */ websiteURL?: string; } declare const _ImageToTextModules: readonly ["common", "common2", "number", "module_001", "module_002", "module_003", "module_004", "module_005", "module_006", "module_007", "module_008", "module_010", "module_012", "module_013", "module_014", "module_015", "module_016", "module_017", "module_018", "module_019", "module_020", "module_021", "module_022", "module_023", "module_024", "module_025", "module_026", "module_027", "module_028", "module_029", "module_030", "module_031", "module_032"]; type ImageToTextModules = typeof _ImageToTextModules[number]; interface ImageToTextParams { "body": string; "module"?: ImageToTextModules; "score"?: number; "websiteURL"?: string; "images"?: string[]; } /** * @classdesc OCR ImageToText * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/recognition/ImageToTextTask.html} */ declare class ImageToTextTask extends BaseTask implements ImageToTextParams, _IsTaskType { /** * @type {boolean} _isImageToTextTask - Only used for correct method overloading intellisense */ readonly _isImageToTextTask: _IsTaskType["_isImageToTextTask"]; /** * Create ImageToTextTask * @see {@link https://docs.capsolver.com/guide/recognition/ImageToTextTask.html} * @param {Object} params - ImageToTextParams * @param {string} [params.body] - base64 encoded content of the image (no newlines) (no data:image/*; base64, content * @param {boolean=} [params.isCaseSensitive] - Case sensitive or not * @param {ImageToTextModules=} [params.module] - Specifies the module. Currently, the supported modules are common and queueit * @param {number=} [params.score] - 0.8 ~ 1, Identify the matching degree. If the recognition rate is not within the range, no deduction * @param {string} [params.websiteURL] - Page source url to improve accuracy * @param {string[]} [params.images] - Only for number module, Support up to 9 base64 encoded images each time */ constructor({ body, "module": _module, score, websiteURL, images }: ImageToTextParams); /** * @type {string} body - base64 encoded content of the image (no newlines) (no data:image/*; base64, content */ body: string; /** * @type {boolean=} case - Case sensitive or not */ case?: boolean; /** * @type {ImageToTextModules=} module - Specifies the module. Currently, the supported modules are common and queueit * {@see https://docs.capsolver.com/guide/recognition/ImageToTextTask.html} */ module?: ImageToTextModules; /** * @type {number=} score - 0.8 ~ 1, Identify the matching degree. If the recognition rate is not within the range, no deduction */ score?: number; /** * @type {string} websiteURL - Page source url to improve accuracy */ websiteURL?: string; images?: string[]; } interface ReCaptchaClassificationParams { "image": string; "question": string; "websiteKey"?: string; "websiteURL"?: string; } /** * @classdesc ReCaptcha Images Recognize * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html} */ declare class ReCaptchaV2Classification extends BaseTask implements ReCaptchaClassificationParams, _IsTaskType { /** * @type {boolean} _isReCaptchaV2Classification - Only used for correct method overloading intellisense */ readonly _isReCaptchaV2Classification: _IsTaskType["_isReCaptchaV2Classification"]; /** * Create ReCaptchaV2Classification * @see {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html} * @param {Object} params - ReCaptchaClassificationParams * @param {string} [params.question] - please refer to the following list of questions. * @param {string} [params.image] - base64 image string * @param {string=} [params.websiteKey] - Website key to improve accuracy * @param {string=} [params.websiteURL] - Page source url to improve accuracy */ constructor({ websiteKey, question, websiteURL, image }: ReCaptchaClassificationParams); /** * @type {string} question - please refer to the following list of questions. * @see {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html} */ question: string; /** * @type {string} image - base64 image string */ image: string; /** * @type {string=} websiteKey - Website key to improve accuracy */ websiteKey?: string; /** * @type {string=} websiteURL - Page source url to improve accuracy */ websiteURL?: string; } declare const _VisionEngineModules: readonly ["slider_1", "rotate_1", "rotate_2", "shein", "ocr_gif", "botdeflector"]; type VisionEngineModules = typeof _VisionEngineModules[number]; interface VisionEngineParams { "image": string; "imageBackground"?: string; "module": VisionEngineModules; "question"?: string; "websiteURL"?: string; } /** * @classdesc OCR VisionEngine * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/recognition/VisionEngine.html} */ declare class VisionEngine extends BaseTask implements VisionEngineParams, _IsTaskType { /** * @type {boolean} _isVisionEngine - Only used for correct method overloading intellisense */ readonly _isVisionEngine: _IsTaskType["_isVisionEngine"]; /** * Create VisionEngine * @see {@link https://docs.capsolver.com/guide/recognition/VisionEngine.html} * @param {Object} params - VisionEngineParams * @param {string} [params.image] - base64 encoded content of the image (no newlines, no data:image/***;charset=utf-8;base64,) * @param {string} [params.imageBackground] - base64 encoded content of the image (no newlines, no data:image/***;charset=utf-8;base64,) * @param {string} [params.question] - required for "space_detection" module * @param {VisionEngineModules=} [params.module] - Specifies the module. * @param {string} [params.websiteURL] - Page source url to improve accuracy */ constructor({ image, imageBackground, question, module, websiteURL }: VisionEngineParams); /** * @type {string} image - base64 encoded content of the image (no newlines, no data:image/***;charset=utf-8;base64,) */ image: string; /** * @type {string} image - base64 encoded content of the image (no newlines, no data:image/***;charset=utf-8;base64,) */ imageBackground?: string; /** * @type {VisionEngineModules=} module - Specifies the module * {@see https://docs.capsolver.com/guide/recognition/VisionEngine.html} */ module: VisionEngineModules; /** * @param {string} question - required for "space_detection" module */ question?: string; /** * @type {string} websiteURL - Page source url to improve accuracy */ websiteURL?: string; } interface AntiAkamaiBMPTaskParams { "count"?: number; "country"?: string; "deviceId"?: string; "deviceName"?: string; "metadata"?: Record; "packageName"?: string; "pow"?: string; "version"?: string; } /** * @classdesc Class for AntiAkamaiBMPTask. This task type uses a separate endpoint for fetching /akamaibmp/invoke * @class * @deprecated deleted from service support * @extends {AntiAkamaiBMPTaskBase} * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} */ declare class AntiAkamaiBMPTask extends BaseTask implements AntiAkamaiBMPTaskParams, _IsTaskType { /** * @type {boolean} _isAntiAkamaiBMPTask - Only used for correct method overloading intellisense */ readonly _isAntiAkamaiBMPTask: _IsTaskType["_isAntiAkamaiBMPTask"]; /** * Create AntiAkamaiBMPTaskBase * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} * @param {object} params - AntiAkamaiBMPTaskBaseParams * @param {number} [params.count] - Sensor combinations acquired at once, 0< count <= 50, max 50 items acquired at once * @param {string} [params.deviceId] - If you want to have a fixed device ID in the sensor, you can pass this parameter * @param {string} [params.deviceName] - Input fixed deviceInfo,default is: random. example: iPhone14,2/16.0.2 * @param {string} [params.packageName] - Package name of AkamaiBMP mobile APP, de.package.iphone * @param {string} [params.pow] - Support: /_bm/get_params data. If this parameter is passed in, the other parameters will be ignored to generate the pow string * @param {string} [params.version] - AKAMAI BMP Version number, default is: 3.2.6 , max support 3.3.1 */ constructor({ count, deviceId, deviceName, packageName, pow, version, metadata, country }: AntiAkamaiBMPTaskParams); /** * @type {number} count - Sensor combinations acquired at once, 0< count <= 50, max 50 items acquired at once */ count?: number; /** * @type {string} deviceId - If you want to have a fixed device ID in the sensor, you can pass this parameter */ deviceId?: string; /** * @type {string} deviceName - Input fixed deviceInfo,default is: random. example: iPhone14,2/16.0.2 */ deviceName?: string; /** * @type {string} packageName - Package name of AkamaiBMP mobile APP, de.package.iphone */ packageName?: string; pow?: string; /** * @type {string} version - AKAMAI BMP Version number, default is: 3.2.6 , max support 3.3.1 */ version?: string; /** * @type {object} metadata - Use for sensor task */ metadata?: Record; /** * @type {string} country - */ country?: string; } type AntiAkamaiPowTaskParams = Required>; /** * @classdesc AntiAkamaiPowTask This task type uses a separate endpoint for fetching /akamaibmp/invoke * @class * @deprecated deleted from service support * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} */ declare class AntiAkamaiPowTask extends BaseTask implements AntiAkamaiPowTaskParams, _IsTaskType { /** * @type {boolean} _isAntiAkamaiBMPTask - Only used for correct method overloading intellisense */ readonly _isAntiAkamaiBMPTask: _IsTaskType["_isAntiAkamaiBMPTask"]; /** * Create AntiAkamaiPowTask * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} * @param {object} params - AntiAkamaiPowTaskParams * @param {string} [params.deviceId] - If you want to have a fixed device ID in the sensor, you can pass this parameter * @param {string} [params.pow] - Support: /_bm/get_params data. If this parameter is passed in, the other parameters will be ignored to generate the pow string */ constructor({ deviceId, pow }: AntiAkamaiPowTaskParams); /** * @type {string} deviceName - Input fixed deviceInfo,default is: random. example: iPhone14,2/16.0.2 */ deviceId: string; pow: string; } type AntiAkamaiSensorTaskParams = Omit & Required>; /** * @classdesc AntiAkamaiSensorTask This task type uses a separate endpoint for fetching /akamaibmp/invoke * @class * @deprecated deleted from service support * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} */ declare class AntiAkamaiSensorTask extends BaseTask implements AntiAkamaiSensorTaskParams, _IsTaskType { /** * @type {boolean} _isAntiAkamaiBMPTask - Only used for correct method overloading intellisense */ readonly _isAntiAkamaiBMPTask: _IsTaskType["_isAntiAkamaiBMPTask"]; /** * Create AntiAkamaiSensorTask * This task type uses a separate endpoint for fetching /akamaibmp/invoke * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} * @param {object} params - AntiAkamaiSensorTaskParams * @param {string} [params.packageName] - required. Package name of AkamaiBMP mobile APP, de.package.iphone * @param {string} [params.version] - required. AKAMAI BMP Version number, default is: 3.2.6 , max support 3.3.1 * @param {number} [params.count] - Sensor combinations acquired at once, 0< count <= 50, max 50 items acquired at once * @param {string} [params.deviceId] - If you want to have a fixed device ID in the sensor, you can pass this parameter * @param {string} [params.deviceName] - Input fixed deviceInfo,default is: random. example: iPhone14,2/16.0.2 */ constructor({ count, country, deviceId, deviceName, metadata, packageName, version }: AntiAkamaiSensorTaskParams); /** * @type {number} count - Sensor combinations acquired at once, 0< count <= 50, max 50 items acquired at once */ count?: number; /** * @type {string} country - */ country?: string; /** * @type {string} deviceId - If you want to have a fixed device ID in the sensor, you can pass this parameter */ deviceId?: string; /** * @type {string} deviceName - Input fixed deviceInfo,default is: random. example: iPhone14,2/16.0.2 */ deviceName?: string; /** * @type {object} metadata - Use for sensor task */ metadata?: Record; /** * @type {string} packageName - Package name of AkamaiBMP mobile APP, de.package.iphone */ packageName: string; /** * @type {string} version - AKAMAI BMP Version number, default is: 3.2.6 , max support 3.3.1 */ version: string; } type AntiAkamaiWebTaskParams = { "abck"?: string; "bmsz"?: string; "url": string; "userAgent"?: string; }; /** * @classdesc AntiAkamaiWebTask This task type uses a separate endpoint for fetching /akamaibmp/invoke * @class * @extends {AntiAkamaiWebTaskBase} * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} * @deprecated deleted from service support */ declare class AntiAkamaiWebTask extends BaseTask implements AntiAkamaiWebTaskParams, _IsTaskType { /** * @type {boolean} _isAntiAkamaiWebTask - Only used for correct method overloading intellisense */ readonly _isAntiAkamaiWebTask: _IsTaskType["_isAntiAkamaiWebTask"]; /** * Create AntiAkamaiWebTaskBase * @see {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} * @param {object} params - AntiAkamaiWebTaskBaseParams * @param {string} [params.url] - browser url address * @param {string} [params.abck] - akamai cookie * @param {string} [params.userAgent] - The browser's request header ua */ constructor({ abck, bmsz, url, userAgent }: AntiAkamaiWebTaskParams); /** * @type {string} url - browser url address */ url: string; /** * @type {string} abck - akamai cookie */ abck?: string; /** * @type {string} bmsz - akamai cookie */ bmsz?: string; /** * @type {string} userAgent - The browser's request header ua */ userAgent?: string; } type AntiAwsWafTaskBaseParams = Partial & { "awsChallengeJS"?: string; "awsContext"?: string; "awsIv"?: string; "awsKey"?: string; "awsApiJs"?: string; "awsProblemUrl"?: string; "awsApiKey"?: string; "awsExistingToken"?: string; "websiteURL": string; }; type Type$1 = Extract; /** * @classdesc Base class for AntiAwsWafTask * @class * @see {@link https://docs.capsolver.com/en/guide/captcha/awsWaf/} * @extends {BaseTask} */ declare abstract class AntiAwsWafTaskBase extends BaseTask implements AntiAwsWafTaskBaseParams { /** * Create AntiAwsWafTaskBase * {@link https://docs.capsolver.com/en/guide/captcha/awsWaf/} * @param {Object} params - AntiAwsWafTaskBaseParams * @param {string=} [params.awsChallengeJS] - When the status code returned by the websiteURL page is 202, you only need to pass in awsChallengeJs; * @param {string=} [params.awsContext] - When the status code returned by the websiteURL page is 405, you need to pass in awsContext * @param {string=} [params.awsIv] - When the status code returned by the websiteURL page is 405, you need to pass in awsIv * @param {string=} [params.awsKey] - When the status code returned by the websiteURL page is 405, you need to pass in awsKey * @param {string=} [params.awsApiJs] - The jsapi.js link returned by the captcha page * @param {string=} [params.awsProblemUrl] - The problem endpoint url containing keywords like problem, num_solutions_required, etc. * @param {string=} [params.awsApiKey] - The api_key value of the problem endpoint * @param {string=} [params.awsExistingToken] - The aws-waf-token used for the last verification * @param {string} [params.websiteURL] - The URL of the page that returns the captcha info * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ awsChallengeJS, awsContext, awsIv, awsKey, awsApiJs, awsProblemUrl, awsApiKey, awsExistingToken, proxy, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: AntiAwsWafTaskBaseParams, type: Type$1); proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; /** * @type {string=} awsChallengeJS - When the status code returned by the websiteURL page is 202, you only need to pass in awsChallengeJs; */ awsChallengeJS?: string; /** * @type {string=} awsContext - When the status code returned by the websiteURL page is 405, you need to pass in awsContext */ awsContext?: string; /** * @type {string=} awsIv - When the status code returned by the websiteURL page is 405, you need to pass in awsIv */ awsIv?: string; /** * @type {string=} awsKey - When the status code returned by the websiteURL page is 405, you need to pass in awsKey */ awsKey?: string; /** * @type {string=} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - The URL of the page that returns the captcha info */ websiteURL: string; /** * @type {string} awsApiJs - The jsapi.js link returned by the captcha page */ awsApiJs?: string; /** * @type {string} awsProblemUrl - The problem endpoint url containing keywords like problem, num_solutions_required, etc. */ awsProblemUrl?: string; /** * @type {string} awsApiKey - The api_key value of the problem endpoint */ awsApiKey?: string; /** * @type {string} awsExistingToken - The aws-waf-token used for the last verification */ awsExistingToken?: string; } type AntiAwsWafTaskParams = ProxyRequiredTaskParams; /** * @classdesc AntiAwsWafTask this task type require your own proxies. * @class * @extends {AntiAwsWafTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/awsWaf.html} */ declare class AntiAwsWafTask extends AntiAwsWafTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiAwsWafTask - Only used for correct method overloading intellisense */ readonly _isAntiAwsWafTask: _IsTaskType["_isAntiAwsWafTask"]; /** * Create AntiAwsWafTask - this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/awsWaf.html} * @param {Object} params - AntiAwsWafTaskParams * @param {string=} [params.awsChallengeJS] - When the status code returned by the websiteURL page is 202, you only need to pass in awsChallengeJs; * @param {string=} [params.awsContext] - When the status code returned by the websiteURL page is 405, you need to pass in awsContext * @param {string=} [params.awsIv] - When the status code returned by the websiteURL page is 405, you need to pass in awsIv * @param {string=} [params.awsKey] - When the status code returned by the websiteURL page is 405, you need to pass in awsKey * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType * @param {string} [params.websiteURL] - The URL of the page that returns the captcha info */ constructor(params: AntiAwsWafTaskParams); } type AntiAwsWafTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc AntiAwsWafTaskProxyLess this task type don't require your own proxies. * @class * @extends {AntiAwsWafTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/awsWaf.html} */ declare class AntiAwsWafTaskProxyLess extends AntiAwsWafTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiAwsWafTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isAntiAwsWafTaskProxyLess: _IsTaskType["_isAntiAwsWafTaskProxyLess"]; /** * Create AntiAwsWafTask * @see {@link https://docs.capsolver.com/guide/captcha/awsWaf.html} * @param {Object} params - AntiAwsWafTaskProxyLessParams * @param {string=} [params.awsChallengeJS] - When the status code returned by the websiteURL page is 202, you only need to pass in awsChallengeJs; * @param {string=} [params.awsContext] - When the status code returned by the websiteURL page is 405, you need to pass in awsContext * @param {string=} [params.awsIv] - When the status code returned by the websiteURL page is 405, you need to pass in awsIv * @param {string=} [params.awsKey] - When the status code returned by the websiteURL page is 405, you need to pass in awsKey * @param {string=} [params.awsApiJs] - The jsapi.js link returned by the captcha page * @param {string=} [params.awsProblemUrl] - The problem endpoint url containing keywords like problem, num_solutions_required, etc. * @param {string=} [params.awsApiKey] - The api_key value of the problem endpoint * @param {string=} [params.awsExistingToken] - The aws-waf-token used for the last verification * @param {string} [params.websiteURL] - The URL of the page that returns the captcha info */ constructor(params: AntiAwsWafTaskProxyLessParams); } type AntiCloudflareTaskBaseParams = Partial & { "websiteURL": string; "userAgent"?: string; "html"?: string; }; type Type = Extract; /** * @classdesc Base class for AntiCloudflareTask * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html} */ declare abstract class AntiCloudflareTaskBase extends BaseTask implements AntiCloudflareTaskBaseParams { /** * Create AntiCloudflareTask * @see {@link https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html} * @param {object} params - AntiCloudflareTaskParams * @param {string} [params.websiteURL] - The address of the target page. * @param {string=} [params.userAgent] - The user-agent you used to request the target website. Only Chrome’s userAgent is supported. * @param {string=} [params.html] - The response of requesting the target website, it usually contains “Just a moment…” and status code is 403. we need this html for some websites, please be sure to use your sticky proxy to dynamically scrape the HTML every time. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteURL, userAgent, html, proxy, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: AntiCloudflareTaskBaseParams, type: Type); /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - The address of the target page. */ websiteURL: string; /** * @type {string} websiteURL - The user-agent you used to request the target website. Only Chrome’s userAgent is supported. */ userAgent?: string; /** * @type {string=} html - The response of requesting the target website, it usually contains “Just a moment…” and status code is 403. we need this html for some websites, please be sure to use your sticky proxy to dynamically scrape the HTML every time. */ html?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type AntiCloudflareTaskParams = AntiCloudflareTaskBaseParams; /** * @classdesc AntiCloudflareTask * @class * @extends {AntiCloudflareTaskBase} * @see {@link https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html} */ declare class AntiCloudflareTask extends AntiCloudflareTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiCloudflareTask - Only used for correct method overloading intellisense */ readonly _isAntiCloudflareTask: _IsTaskType["_isAntiCloudflareTask"]; /** * Create AntiCloudflareTask * @see {@link https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html} * @param {object} params - AntiCloudflareTaskParams * @param {string} [params.websiteURL] - The address of the target page. * @param {string=} [params.userAgent] - The user-agent you used to request the target website. Only Chrome’s userAgent is supported. * @param {string=} [params.html] - The response of requesting the target website, it usually contains “Just a moment…” and status code is 403. we need this html for some websites, please be sure to use your sticky proxy to dynamically scrape the HTML every time. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: AntiCloudflareTaskParams); } type AntiCloudflareTurnstileTaskTypes = "challenge" | "turnstile"; interface AntiCloudflareTurnstileTaskMetadata { "action"?: string; "cdata"?: string; "type": AntiCloudflareTurnstileTaskTypes; } type AntiCloudflareTurnstileTaskParams = AntiCloudflareTaskBaseParams & { "metadata": AntiCloudflareTurnstileTaskMetadata; "websiteKey": string; }; /** * @classdesc AntiCloudflareTurnstileTask * @class * @extends {AntiCloudflareTaskBase} * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/} * @deprecated deleted from service support, * @see AntiTurnstileTaskProxyLess */ declare class AntiCloudflareTurnstileTask extends AntiCloudflareTaskBase implements AntiCloudflareTurnstileTaskParams, _IsTaskType { /** * @type {boolean} _isAntiCloudflareTask - Only used for correct method overloading intellisense */ readonly _isAntiCloudflareTask: _IsTaskType["_isAntiCloudflareTask"]; /** * Create AntiCloudflareTurnstileTask * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/} * @param {Object} params - AntiCloudflareTurnstileTaskParams * @param {string} [params.websiteURL] - The address of the target page. * @param {string=} [params.websiteKey] - Turnstile website key. * @param {object} [params.metadata] - Turnstile extra data {@link https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/} * @param {string} [params.metadata.type] - challenge or turnstile fixed value, default: "turnstile" * @param {string} [params.metadata.cdata] - The value of the data-cdata attribute of the Turnstile element if it exists. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteURL, proxy, metadata, websiteKey, proxyAddress, proxyLogin, proxyPassword, proxyPort, proxyType }: AntiCloudflareTurnstileTaskParams); websiteKey: string; /** * @type {object} [type.metadata] - Turnstile extra data {@link https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/} * @type {string} [type.metadata.type] - challenge or turnstile fixed value. * @type {string} [type.proxy] - proxy * @type {string} [type.websiteURL] - The URL of the page that returns the captcha info */ metadata: AntiCloudflareTurnstileTaskMetadata; } interface AntiTurnstileMetaData { "action"?: string; "cdata"?: string; } type AntiTurnstileTaskProxyLessBaseParams = { "metadata"?: AntiTurnstileMetaData; "websiteKey": string; "websiteURL": string; }; type Task = Extract; /** * @classdesc Base class for AntiTurnstileTaskProxyLess * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/} */ declare abstract class AntiTurnstileTaskProxyLessBase extends BaseTask implements AntiTurnstileTaskProxyLessBaseParams { /** * Create AntiTurnstileTaskProxyLess * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/} * @param {object} params - AntiTurnstileTaskProxyLessBaseParams * @param {string} [params.websiteURL] - The address of the target page. * @param {string} [params.websiteKey] - Turnstile website key. * @param {Object} [params.metadata] - Turnstile extra data. @see https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/ * @param {string=} [params.metdata.action] - The value of the data-action attribute of the Turnstile element if it exists. * @param {string=} [params.metadata.cdata] - The value of the data-cdata attribute of the Turnstile element if it exists. */ constructor({ websiteURL, websiteKey, metadata }: AntiTurnstileTaskProxyLessBaseParams, type: Task); /** * @type {string} websiteKey - Turnstile website key. */ websiteKey: string; /** * @type {Object} metadata - Turnstile extra data. @see https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/ * @type {string=?} [metdata.action] - The value of the data-action attribute of the Turnstile element if it exists. * @type {string=?} [metadata.cdata] - The value of the data-cdata attribute of the Turnstile element if it exists. */ metadata?: { "action"?: string | undefined; "cdata"?: string | undefined; } | undefined; /** * @type {string} websiteURL - The address of the target page. */ websiteURL: string; } /** * @classdesc AntiTurnstileTaskProxyLess * @class * @extends {AntiTurnstileTaskProxyLessBase} * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/} */ declare class AntiTurnstileTaskProxyLess extends AntiTurnstileTaskProxyLessBase implements _IsTaskType { /** * @type {boolean} _isAntiTurnstileTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isAntiTurnstileTaskProxyLess: _IsTaskType["_isAntiTurnstileTaskProxyLess"]; /** * Create AntiTurnstileTaskProxyLess * @see {@link https://docs.capsolver.com/en/guide/captcha/cloudflare_turnstile/} * @param {object} params - AntiCloudflareTaskParams * @param {string} [params.websiteURL] - The address of the target page. * @param {string} [params.websiteKey] - Turnstile website key. * @param {Object} [params.metadata] - Turnstile extra data. @see https://developers.cloudflare.com/turnstile/get-started/client-side-rendering/ * @param {string=} [params.metdata.action] - The value of the data-action attribute of the Turnstile element if it exists. * @param {string=} [params.metadata.cdata] - The value of the data-cdata attribute of the Turnstile element if it exists. */ constructor({ websiteURL, websiteKey, metadata }: AntiTurnstileTaskProxyLessBaseParams); } type AntiCyberSiAraTaskBaseParams = Partial & { "SlideMasterUrlId": string; "userAgent": string; "websiteURL": string; }; /** * @classdesc Base class for AntiCyberSiAraTaskBase * @class * @see {@link https://docs.capsolver.com/guide/captcha/CyberSiara.html} * @extends {BaseTask} */ declare abstract class AntiCyberSiAraTaskBase extends BaseTask implements AntiCyberSiAraTaskBaseParams { /** * Create AntiCyberSiAraTaskBase * @see {@link https://docs.capsolver.com/guide/captcha/CyberSiara.html} * @param {Object} params - AntiCyberSiAraTaskBaseParams * @param {string} [params.SlideMasterUrlId] - you can get MasterUrlId param form api/CyberSiara/GetCyberSiara endpoint * @param {string} [params.userAgent] - browser userAgent,you need submit your userAgent * @param {string} [params.websiteURL] - the current website home page url * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ proxy, SlideMasterUrlId, userAgent, websiteURL, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: AntiCyberSiAraTaskBaseParams, type: TaskTypes); /** * @type {string} SlideMasterUrlId - you can get MasterUrlId param form api/CyberSiara/GetCyberSiara endpoint */ SlideMasterUrlId: string; /** * @type {string} userAgent - browser userAgent,you need submit your userAgent */ userAgent: string; /** * @type {string=} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - the current website home page url */ websiteURL: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type AntiCyberSiAraTaskParams = ProxyRequiredTaskParams; /** * @classdesc AntiCyberSiAraTask this task type require your own proxies. * @class * @deprecated deleted from service support * @extends {AntiCyberSiAraTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/CyberSiara.html} */ declare class AntiCyberSiAraTask extends AntiCyberSiAraTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiCyberSiAraTask - Only used for correct method overloading intellisense */ readonly _isAntiCyberSiAraTask: _IsTaskType["_isAntiCyberSiAraTask"]; /** * Create AntiCyberSiAraTask this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/CyberSiara.html} * @param {Object} params - AntiCyberSiAraTaskParams * @param {string} [params.SlideMasterUrlId] - you can get MasterUrlId param form api/CyberSiara/GetCyberSiara endpoint * @param {string} [params.userAgent] - browser userAgent,you need submit your userAgent * @param {string} [params.websiteURL] - the current website home page url * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: AntiCyberSiAraTaskParams); } type AntiCyberSiAraTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc AntiCyberSiAraTaskProxyLess this task type don't require your own proxies. * @class * @deprecated deleted from service support * @extends {AntiCyberSiAraTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/CyberSiara.html} */ 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://docs.capsolver.com/guide/captcha/CyberSiara.html} * @param {object} params - AntiCyberSiAraTaskProxyLessParams * @param {string} [params.SlideMasterUrlId] - you can get MasterUrlId param form api/CyberSiara/GetCyberSiara endpoint * @param {string} [params.userAgent] - browser userAgent,you need submit your userAgent * @param {string} [params.websiteURL] - the current website home page url */ constructor(params: AntiCyberSiAraTaskProxyLessParams); } type AntiImpervaTaskBaseParams = Partial & { "reese84"?: boolean; "reeseScriptUrl"?: string; "reeseToken"?: string; "userAgent": string; "utmvc"?: boolean; "websiteUrl": string; }; /** * @classdesc Base class for AntiImperva task * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/antibots/imperva.html} */ declare abstract class AntiImpervaTaskBase extends BaseTask implements AntiImpervaTaskBaseParams { /** * Create AntiImpervaTaskBase * @see {@link https://docs.capsolver.com/guide/antibots/imperva.html} * @param {object} params - AntiImpervaTaskBaseParams * @param {string} [params.websiteUrl] - The website url * @param {string} [params.userAgent] - browser userAgent * @param {boolean} [params.utmvc] - if type is AntiImpervaTask,you need submit it. Default: false * @param {boolean} [params.reese84=false] - if cookie contains incap_see_xxx,nlbi_xxx,visid_inap_xxx,mean is true. Default = false * @param {string} [params.reeseScriptUrl] - The URL typically has several dashes (-) and random words * @param {string} [params.reeseToken] - If your reeseToken has expired, you can send current reeseToken to obtain a new * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteUrl, userAgent, utmvc, reese84, reeseScriptUrl, reeseToken, proxy, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: AntiImpervaTaskBaseParams, type: TaskTypes); /** * @type {string} websiteUrl - The website url */ websiteUrl: string; /** * @type {string} userAgent - browser userAgent */ userAgent: string; /** * proxy */ proxy?: string; /** * @type {boolean=} utmvc - if type is AntiImpervaTask,you need submit it */ utmvc?: boolean; /** * @type {boolean=} [reese84=false] - if cookie contains incap_see_xxx,nlbi_xxx,visid_inap_xxx,mean is true */ reese84?: boolean; /** * @type {string=} reeseScriptUrl - The URL typically has several dashes (-) and random words */ reeseScriptUrl?: string; /** * @type {string=} reeseToken - If your reeseToken has expired, you can send current reeseToken to obtain a new reeseToken. */ reeseToken?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type AntiImpervaTaskParams = ProxyRequiredTaskParams; /** * @classdesc AntiImpervaTask this task type require your own proxies. * @class * @deprecated deleted from service support * @extends {AntiImpervaTaskBase} * @see {@link https://docs.capsolver.com/guide/antibots/imperva.html} */ declare class AntiImpervaTask extends AntiImpervaTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiImpervaTask - Only used for correct method overloading intellisense */ readonly _isAntiImpervaTask: _IsTaskType["_isAntiImpervaTask"]; /** * Create AntiImpervaTask * @see {@link https://docs.capsolver.com/guide/antibots/imperva.html} * @param {object} params - AntiImpervaTaskParams * @param {string} [params.websiteUrl] - The website url * @param {string} [params.userAgent] - browser userAgent * @param {boolean} [params.utmvc] - if type is AntiImpervaTask,you need submit it. Default = false * @param {boolean} [params.reese84=false] - if cookie contains incap_see_xxx,nlbi_xxx,visid_inap_xxx,mean is true. Default = false * @param {string} [params.reeseScriptUrl] - The URL typically has several dashes (-) and random words * @param {string} [params.reeseToken] - If your reeseToken has expired, you can send current reeseToken to obtain a new * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: AntiImpervaTaskParams); } type AntiImpervaTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc AntiImpervaTaskProxyLess this task type require your own proxies. * @class * * @deprecated deleted from service support * @extends {AntiImpervaTaskBase} * @see {@link https://docs.capsolver.com/guide/antibots/imperva.html} */ declare class AntiImpervaTaskProxyLess extends AntiImpervaTaskBase implements _IsTaskType { /** * @type {boolean} _isAntiImpervaTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isAntiImpervaTaskProxyLess: _IsTaskType["_isAntiImpervaTaskProxyLess"]; /** * Create AntiImpervaTaskProxyLess * @see {@link https://docs.capsolver.com/guide/antibots/imperva.html} * @param {object} params - AntiImpervaTaskProxyLessParams * @param {string} [params.websiteUrl] - The website url * @param {string} [params.userAgent] - browser userAgent * @param {string} [params.utmvc] - if type is AntiImpervaTask,you need submit it * @param {boolean} [params.reese84=false] - if cookie contains incap_see_xxx,nlbi_xxx,visid_inap_xxx,mean is true * @param {string} [params.reeseScriptUrl] - The URL typically has several dashes (-) and random words * @param {string} [params.reeseToken] - If your reeseToken has expired, you can send current reeseToken to obtain a new */ constructor(params: AntiImpervaTaskProxyLessParams); } type _DataDomeSliderTaskParams = Partial & { "captchaUrl": string; "proxy"?: string; "userAgent": string; }; type DataDomeSliderTaskParams = ProxyRequiredTaskParams<_DataDomeSliderTaskParams>; /** * @classdesc DataDome: solving DataDome captcha * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/en/guide/captcha/datadome} */ declare class DataDomeSliderTask extends BaseTask implements _IsTaskType, _DataDomeSliderTaskParams { /** * @type {boolean} _isDataDomeSliderTask - Only used for correct method overloading intellisense */ readonly _isDataDomeSliderTask: _IsTaskType["_isDataDomeSliderTask"]; /** * Create DataDome: solving DataDome captcha * @see {@link https://docs.capsolver.com/en/guide/captcha/datadome} * @param {object} params - DataDomeSliderTaskParams * @param {string} [params.captchaUrl] - If the url contains t=bv that means that your ip must be banned, t should be t=fe * @param {string} [params.userAgent] - You need to keep your userAgent consistent with the one used to request the captchaUrl. Currently, we only support two fixed userAgents. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ captchaUrl, userAgent, proxy, proxyType, proxyAddress, proxyLogin, proxyPassword, proxyPort }: DataDomeSliderTaskParams); /** * @type {string} captchaUrl - If the url contains t=bv that means that your ip must be banned, t should be t=fe */ captchaUrl: string; /** * @type {string} userAgent - You need to keep your userAgent consistent with the one used to request the captchaUrl. Currently, we only support two fixed userAgents. */ userAgent: string; /** * @type {string} proxy - proxy */ proxy?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type FunCaptchaTaskBaseParams = Partial & { "data"?: string; "userAgent"?: string; "websitePublicKey": string; "websiteURL": string; }; /** * @classdesc Base class for FunCaptchaTask * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/captcha/FunCaptcha.html} */ declare abstract class FunCaptchaTaskBase extends BaseTask implements FunCaptchaTaskBaseParams { /** * Create FunCaptchaTask * @see {@link https://docs.capsolver.com/guide/captcha/FunCaptcha.html} * @param {object} params - FunCaptchaTaskParams * @param {string} [params.websiteURL] - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websitePublicKey] - The domain public key, rarely updated. (Ex: E8A75615-1CBA-5DFF-8031-D16BCF234E10) * @param {string} [params.data] - Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} Learn how to get FunCaptcha blob data * @param {string} [params.userAgent] - the user-agent you use to generate blob data. you need to use the user-agent we support (windows chrome browser) * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteURL, proxy, websitePublicKey, data, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: FunCaptchaTaskBaseParams, type: TaskTypes); /** * @type {string} websitePublicKey - The domain public key, rarely updated. (Ex: E8A75615-1CBA-5DFF-8031-D16BCF234E10) */ websitePublicKey: string; /** * @type {string} data - Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} Learn how to get FunCaptcha blob data */ data?: string; /** * @type {string} userAgent - the user-agent you use to generate blob data. you need to use the user-agent we support (windows chrome browser) */ userAgent?: string; /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type FunCaptchaTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc FunCaptchaTaskProxyLess is using the server's built-in proxy. * @class * * @deprecated deleted from service support * @extends {FunCaptchaTaskBase} * @implements {FunCaptchaTaskBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/FunCaptcha.html} */ declare class FunCaptchaTaskProxyLess extends FunCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isFunCaptchaTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isFunCaptchaTaskProxyLess: _IsTaskType["_isFunCaptchaTaskProxyLess"]; /** * Create FunCaptchaTask * @see {@link https://docs.capsolver.com/guide/captcha/FunCaptcha.html} * @param {object} params - FunCaptchaTaskProxyLessParams * @param {string} [params.websiteURL] - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websitePublicKey] - The domain public key, rarely updated. (Ex: E8A75615-1CBA-5DFF-8031-D16BCF234E10) * @param {string} [params.data] - Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} Learn how to get FunCaptcha blob data * @param {string} [params.userAgent] - the user-agent you use to generate blob data. you need to use the user-agent we support (windows chrome browser) */ constructor(params: FunCaptchaTaskProxyLessParams); } type FunCaptchaTaskParams = ProxyRequiredTaskParams; /** * @classdesc FunCaptchaTask is using the server's built-in proxy. * @class * * @deprecated deleted from service support * @extends {FunCaptchaTaskBase} * @implements {FunCaptchaTaskBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/FunCaptcha.html} */ 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://docs.capsolver.com/guide/captcha/FunCaptcha.html} * @param {object} params - FunCaptchaTaskParams * @param {string} [params.websiteURL] - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websitePublicKey] - The domain public key, rarely updated. (Ex: E8A75615-1CBA-5DFF-8031-D16BCF234E10) * @param {string} [params.userAgent] - the user-agent you use to generate blob data. you need to use the user-agent we support (windows chrome browser) * @param {string} [params.data] - Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} Learn how to get FunCaptcha blob data * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: FunCaptchaTaskParams); } type GeeTestTaskBaseParams = Partial & { "captchaId"?: string; "challenge"?: string; "geetestApiServerSubdomain"?: string; "gt"?: string; "riskType"?: string; "websiteURL": string; }; /** * @classdesc Base class for GeeTestTask * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare abstract class GeeTestTaskBase extends BaseTask implements GeeTestTaskBaseParams { /** * Create GeeTestTask * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskParams * @param {string} [params.gt] - The domain gt field. * @param {string} [params.websiteURL] - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.challenge] - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 * @param {string} [param.geetestApiServerSubdomain] - Special api subdomain * @param {string} [params.captchaId] - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 * @param {string} [params.riskType] - only Geetest V4 is required * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteURL, proxy, challenge, geetestApiServerSubdomain, gt, captchaId, riskType, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: GeeTestTaskBaseParams, type: TaskTypes); /** * @type {string} gt - The domain gt field. */ gt?: string; /** * @type {string} challenge - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 */ challenge?: string; /** * @type {string} geetestApiServerSubdomain - Special api subdomain */ geetestApiServerSubdomain?: string; /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; /** * @type {string} captchaId - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 */ captchaId?: string; /** * @type {string} riskType - only Geetest V4 is required */ riskType?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type GeeTestTaskParams = ProxyRequiredTaskParams; /** * @classdesc GeeTestTask this task type require your own proxies. * @class * @deprecated deleted from service support - use {@link GeeTestTaskProxyLess} instead * @extends {BaseTask} * @implements {GeeTestTaskBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare class GeeTestTask extends GeeTestTaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTask - Only used for correct method overloading intellisense */ readonly _isGeeTestTask: _IsTaskType["_isGeeTestTask"]; /** * Create GeeTestTask this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.gt] - The domain gt field. * @param {string} [params.websiteURL] - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.challenge] - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 * @param {string} [param.geetestApiServerSubdomain] - A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded. Most FunCaptcha installations work from shared domains. * @param {string} [params.data] - Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} Learn how to get FunCaptcha blob data * @param {string} [params.captchaId] - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: GeeTestTaskParams); } type GeeTestTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc GeeTestTaskProxyLess this task type require your own proxies. * @class * @extends {BaseTask} * @implements {GeeTestTaskProxyLessBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare class GeeTestTaskProxyLess extends GeeTestTaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isGeeTestTaskProxyLess: _IsTaskType["_isGeeTestTaskProxyLess"]; /** * Create GeeTestTaskProxyLess this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskProxyLessBaseParams * @param {string} [params.gt] - The domain gt field. * @param {string} [params.websiteURL] - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.challenge] - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 * @param {string} [param.geetestApiServerSubdomain] - Special api subdomain * @param {string} [params.data] - Additional parameter that may be required by FunCaptcha implementation. Use this property to send "blob" value as a stringified array. See example how it may look like. {"\blob":"HERE_COMES_THE_blob_VALUE"} Learn how to get FunCaptcha blob data * @param {string} [params.captchaId] - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 */ constructor(params: GeeTestTaskProxyLessParams); } type GeeTestV3TaskBaseParams = Partial & { "challenge": string; "geetestApiServerSubdomain"?: string; "gt": string; "userAgent"?: string; "websiteURL": string; }; /** * @classdesc Base class for GeeTestTask * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare abstract class GeeTestV3TaskBase extends BaseTask implements GeeTestV3TaskBaseParams { /** * GeeTestTask V3 this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.gt] - required. The domain gt field. * @param {string} [params.challenge] - required. If you need to solve Geetest V3 you must use this parameter * @param {string} [params.websiteURL] -required. Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [param.geetestApiServerSubdomain] - optional. Special api subdomain * @param {string} [param.userAgent] - Browser userAgent * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteURL, proxy, challenge, geetestApiServerSubdomain, gt, userAgent, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: GeeTestV3TaskBaseParams, type: TaskTypes); /** * @type {string} gt - The domain gt field. */ gt: string; /** * @type {string} challenge - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 */ challenge: string; /** * @type {string} geetestApiServerSubdomain - Special api subdomain */ geetestApiServerSubdomain?: string; /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; /** * @type {string} userAgent - Browser userAgent */ userAgent?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type GeeTestV3TaskParams = ProxyRequiredTaskParams; /** * @classdesc GeeTestTask V3 this task type require your own proxies. * @class * @deprecated deleted from service support - use {@link GeeTestV3TaskProxyLess} instead * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @extends {GeeTestV3TaskBase} * @implements {GeeTestTaskBaseParams} */ declare class GeeTestV3Task extends GeeTestV3TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTask - Only used for correct method overloading intellisense */ readonly _isGeeTestTask: _IsTaskType["_isGeeTestTask"]; /** * Create GeeTestTask V3, this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.gt] - required. The domain gt field. * @param {string} [params.challenge] - required. If you need to solve Geetest V3 you must use this parameter * @param {string} [params.websiteURL] -required. Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [param.geetestApiServerSubdomain] - optional. Special api subdomain * @param {string} [param.userAgent] - Browser userAgent * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: GeeTestV3TaskParams); } type GeeTestV3TaskProxyLessParams = ProxylessTaskParams; /** * @classdesc GeeTestTask V3 this using the server's built-in proxy * @class * @extends {BaseTask} * @implements {GeeTestTaskBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare class GeeTestV3TaskProxyLess extends GeeTestV3TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isGeeTestTaskProxyLess: _IsTaskType["_isGeeTestTaskProxyLess"]; /** * @classdesc GeeTestTask V3 this using the server's built-in proxy {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param { * @param {string} [params.gt] - required. The domain gt field. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType * @param {string} [params.websiteURL] -required. Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com)} params - GeeTestTaskBaseParams * @param {string} [param.geetestApiServerSubdomain] - optional. Special api subdomain */ constructor(params: GeeTestV3TaskProxyLessParams); } type GeeTestV4TaskBaseParams = Partial & { "captchaId": string; "geetestApiServerSubdomain"?: string; "userAgent"?: string; "riskType": string; "websiteURL": string; }; /** * @classdesc Base class for GeeTestTask * @class * @extends {BaseTask} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare abstract class GeeTestV4TaskBase extends BaseTask implements GeeTestV4TaskBaseParams { /** * GeeTestTask V4 this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.gt] - required. The domain gt field. * @param {string} [params.captchaId] - required. If you need to solve Geetest V4 you must use this parameter. * @param {string} [params.websiteURL] -required. Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [param.geetestApiServerSubdomain] - optional. Special api subdomain * @param {string} [param.userAgent] - Browser userAgent * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteURL, proxy, geetestApiServerSubdomain, userAgent, captchaId, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, riskType }: GeeTestV4TaskBaseParams, type: TaskTypes); /** * @type {string} geetestApiServerSubdomain - Special api subdomain */ geetestApiServerSubdomain?: string; /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} websiteURL - Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; /** * @type {string} captchaId - If you need to solve Geetest V4 you must use this parameter, don't need if you need to solve GeetestV3 */ captchaId: string; /** * @deprecated * @type {string} userAgent - Browser userAgent */ userAgent?: string; /** * @type {string} riskType - Browser riskType */ riskType: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type GeeTestV4TaskParams = ProxyRequiredTaskParams; /** * @classdesc GeeTestTask V4 this task type require your own proxies. * @class * @deprecated deleted from service support - use {@link GeeTestV4TaskProxyLess} instead * @extends {GeeTestTaskBase} * @implements {GeeTestTaskBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare class GeeTestV4Task extends GeeTestV4TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTask - Only used for correct method overloading intellisense */ readonly _isGeeTestTask: _IsTaskType["_isGeeTestTask"]; /** * @classdesc GeeTestTask V4 this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.captchaId] - required. captchaId * @param {string} [params.websiteURL] -required. Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [param.geetestApiServerSubdomain] - optional. A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded. Most FunCaptcha installations work from shared domains. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: GeeTestV4TaskParams); } type GeeTestV4TaskProxyLessParams = ProxylessTaskParams; /** * @classdesc GeeTestTask V4 this using the server's built-in proxy. * @class * @extends {GeeTestTaskBase} * @implements {GeeTestTaskBaseParams} * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} */ declare class GeeTestV4TaskProxyLess extends GeeTestV4TaskBase implements _IsTaskType { /** * @type {boolean} _isGeeTestTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isGeeTestTaskProxyLess: _IsTaskType["_isGeeTestTaskProxyLess"]; /** * @classdesc GeeTestTask V4 this using the server's built-in proxy. * @see {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.captchaId] - required. captchaId * @param {string} [params.websiteURL] -required. Web address of the website using funcaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [param.geetestApiServerSubdomain] - optional. A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded. Most FunCaptcha installations work from shared domains. */ constructor(params: GeeTestV4TaskProxyLessParams); } type HCaptchaTaskBaseParams = Partial & { "enterprisePayload"?: Record; "getCaptcha"?: unknown; "isInvisible"?: boolean; "userAgent"?: string; "websiteKey": string; "websiteURL": string; }; /** * @classdesc Base class for HCaptcha task * @class * @see {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html} * @extends {BaseTask} */ declare abstract class HCaptchaTaskBase extends BaseTask implements HCaptchaTaskBaseParams { /** * Create HCaptchaTaskBase * @see {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html} * @param {Object} params - HCaptchaTaskBaseParams * @param {Object=} params.enterprisePayload - Enterprise Payload * @param {string} params.websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} params.websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {boolean=} params.isInvisible - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". * @param {string=} params.proxy - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ isInvisible, websiteKey, websiteURL, proxy, enterprisePayload, userAgent, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, getCaptcha }: HCaptchaTaskBaseParams, type: TaskTypes); /** * @type {Object} enterprisePayload - Enterprise Payload */ enterprisePayload?: Record; /** * @type {boolean} isInvisible - if recaptcha don't have pageAction, reload request body content flag have "fi" */ isInvisible?: boolean; /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} userAgent - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser" */ userAgent?: string; /** * @type {string} websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) */ websiteKey: string; /** * @type {string} websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; getCaptcha?: unknown; } type HCaptchaTaskParams = ProxyRequiredTaskParams; /** * @classdesc HCaptchaTask this task type require your own proxies * @class * @deprecated deleted from service support * @see {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html} * @extends {BaseTask} * @implements {HCaptchaTaskBaseParams} */ declare class HCaptchaTask extends HCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isHCaptchaTask - Only used for correct method overloading intellisense */ readonly _isHCaptchaTask: _IsTaskType["_isHCaptchaTask"]; /** * Create HCaptchaTask this task type require your own proxies * @see {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html} * @param {Object} params - HCaptchaTaskParams * @param {Object=} params.enterprisePayload - Enterprise Payload * @param {string=} params.proxy - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType * @param {string} params.websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} params.websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {boolean=} params.isInvisible - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". */ constructor(params: HCaptchaTaskParams); } type HCaptchaTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc HCaptchaTaskProxyLess this task type require your own proxies * @class * @deprecated deleted from service support * @see {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html} * @extends {BaseTask} * @implements {HCaptchaTaskProxyLessParams} */ declare class HCaptchaTaskProxyLess extends HCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isHCaptchaTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isHCaptchaTaskProxyLess: _IsTaskType["_isHCaptchaTaskProxyLess"]; /** * Create HCaptchaTaskProxyLess this task type require your own proxies * @see {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html} * @param {Object} params - HCaptchaTaskProxyLessParams * @param {Object=} params.enterprisePayload - Enterprise Payload * @param {string} params.websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} params.websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {boolean=} params.isInvisible - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". */ constructor(params: HCaptchaTaskProxyLessParams); } type MtCaptchaTaskBaseParams = Partial & { "websiteKey": string; "websiteURL": string; }; /** * @classdesc Base class for MtCaptcha * @class * @extends {MtCaptchaTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html} */ declare abstract class MtCaptchaTaskBase extends BaseTask implements MtCaptchaTaskBaseParams { /** * Create MtCaptchaTaskBase * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html} * @param {object} params - MtCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The website url * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: sk=MTPublic-xxx public key) * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ websiteKey, websiteURL, proxy, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: MtCaptchaTaskBaseParams, type: TaskTypes); /** * @type {string} proxy - proxy */ proxy?: string; /** * @type {string} websiteKey - The domain public key, rarely updated. (Ex: sk=MTPublic-xxx public key) */ websiteKey: string; /** * @type {string} websiteURL - Web address of the website using hcaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type MtCaptchaTaskParams = ProxyRequiredTaskParams; /** * @classdesc MtCaptchaTask this task type require your own proxies * @class * @extends {MtCaptchaTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html} */ declare class MtCaptchaTask extends MtCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isMtCaptchaTask - Only used for correct method overloading intellisense */ readonly _isMtCaptchaTask: _IsTaskType["_isMtCaptchaTask"]; /** * Create MtCaptchaTaskBase * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html} * @param {object} params - MtCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The website url * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: sk=MTPublic-xxx public key) * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: MtCaptchaTaskParams); } type MtCaptchaTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc MtCaptchaTaskProxyLess is using the server's built-in proxy. * @class * @extends {MtCaptchaTaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html} */ declare class MtCaptchaTaskProxyLess extends MtCaptchaTaskBase implements _IsTaskType { /** * @type {boolean} _isMtCaptchaTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isMtCaptchaTaskProxyLess: _IsTaskType["_isMtCaptchaTaskProxyLess"]; /** * Create MtCaptchaTaskBase * @see {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html} * @param {object} params - MtCaptchaTaskBaseParams * @param {string} [params.websiteURL] - The website url * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: sk=MTPublic-xxx public key) */ constructor(params: MtCaptchaTaskProxyLessParams); } type RecaptchaV2TaskBaseParams = Partial & { "apiDomain"?: string; "cookies"?: Array>; "enterprisePayload"?: Record; "isInvisible"?: boolean; "pageAction"?: string; "isSession"?: boolean; "userAgent"?: string; "websiteKey": string; "websiteURL": string; "recaptchaDataSValue"?: string; }; /** * @classdesc Base class for Recaptcha V2 task * @class * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} * @extends {BaseTask} */ declare abstract class RecaptchaV2TaskBase extends BaseTask implements RecaptchaV2TaskBaseParams { /** * Create RecaptchaV2TaskBase * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} * @param {object} params - RecaptchaV2TaskBaseParams * @param {string} params.apiDomain - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {object=} params.enterprisePayload - For ReCaptchaV2 enterprise version, if there is an s parameter in the payload of the /anchor endpoint, please submit its value * @param {string} params.websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} params.websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} params.pageAction - For ReCaptchaV2, if there is an sa parameter in the payload of the /anchor endpoint, please submit its value * @param {boolean=} params.isInvisible - Pass true if there is no “I’m not a robot” checkbox but the challenge will still appear, usually required in v2 invisible mode. * @param {boolean} [params.isSession] - Session mode, when enabled, will return a recaptcha-ca-t value, which is used as a cookie. It usually appears in v3. Note: Some websites require a recaptcha-ca-e value, which usually appears in v2. If this value is present, it will be automatically returned without any additional parameter settings. * @param {string=} [params.recaptchaDataSValue] - For ReCaptchaV2 normal version, if there is an s parameter in the payload of the /anchor endpoint, please submit its value * @param {string=} params.proxy - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {number} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ apiDomain, cookies, isInvisible, websiteKey, websiteURL, pageAction, enterprisePayload, userAgent, isSession, proxyAddress, proxyLogin, proxyPassword, proxyPort, proxyType, proxy, recaptchaDataSValue }: RecaptchaV2TaskBaseParams, type: TaskTypes); /** * @type {string} apiDomain - apiDomain - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. */ apiDomain?: string; /** * @deprecated @type {object} cookies - cookies */ cookies?: Record[]; /** * @type {Object} enterprisePayload - For ReCaptchaV2 enterprise version, if there is an s parameter in the payload of the /anchor endpoint, please submit its value */ enterprisePayload?: Record; /** * @type {boolean} isInvisible - Pass true if there is no “I’m not a robot” checkbox but the challenge will still appear, usually required in v2 invisible mode. */ isInvisible?: boolean; /** * @type {string} pageAction - For ReCaptchaV2, if there is an sa parameter in the payload of the /anchor endpoint, please submit its value */ pageAction?: string; /** * @type {string} proxy - proxy */ proxy?: string; /** * @deprecated * @type {string} userAgent - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser" */ userAgent?: string; /** * @type {string} websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) */ websiteKey: string; /** * @type {string} websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) */ websiteURL: string; /** * @type {boolean} isSession -Session mode, when enabled, will return a recaptcha-ca-t value, which is used as a cookie. It usually appears in v3. Note: Some websites require a recaptcha-ca-e value, which usually appears in v2. If this value is present, it will be automatically returned without any additional parameter settings. */ isSession?: boolean; /** * @type {string} recaptchaDataSValue - For ReCaptchaV2 normal version, if there is an s parameter in the payload of the /anchor endpoint, please submit its value */ recaptchaDataSValue?: string; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type ReCaptchaV2EnterpriseTaskParams = ProxyRequiredTaskParams; /** * ReCaptchaV2EnterpriseTask this task type require your own proxies * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} */ declare class ReCaptchaV2EnterpriseTask extends RecaptchaV2TaskBase implements _IsTaskType { /** * @type {boolean} _isReCaptchaV2EnterpriseTask - Only used for correct method overloading intellisense */ readonly _isReCaptchaV2EnterpriseTask: _IsTaskType["_isReCaptchaV2EnterpriseTask"]; /** * Create ReCaptchaV2EnterpriseTask * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} * @param {Object} params - ReCaptchaV2EnterpriseTaskParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - some site in anchor endpoint have sa param ,it's action value * @param {boolean=} [params.isInvisible] - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: ReCaptchaV2EnterpriseTaskParams); } type ReCaptchaV2EnterpriseTaskProxyLessParams = ProxylessTaskParams; /** * ReCaptchaV2EnterpriseTaskProxyLess is using the server's built-in proxy. * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} */ declare class ReCaptchaV2EnterpriseTaskProxyLess extends RecaptchaV2TaskBase implements _IsTaskType { /** * @type {boolean} _isReCaptchaV2EnterpriseTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isReCaptchaV2EnterpriseTaskProxyLess: _IsTaskType["_isReCaptchaV2EnterpriseTaskProxyLess"]; /** * Create ReCaptchaV2EnterpriseTaskProxyLess * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} * @param {Object} params - ReCaptchaV2EnterpriseTaskProxyLessParams * @param {string} params.apiDomain - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} params.enterprisePayload - Enterprise Payload * @param {Object=} params.cookies - cookies * @param {string} params.websiteURL - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} params.websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} params.pageAction - some site in anchor endpoint have sa param ,it's action value * @param {boolean=} params.isInvisible - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". */ constructor(params: ReCaptchaV2EnterpriseTaskProxyLessParams); } type RecaptchaV2TaskParams = ProxyRequiredTaskParams; /** * @classdesc ReCaptchaV2Task this task type require your own proxies. * @deprecated deleted from service support @see ReCaptchaV2TaskProxyLess instead * @class * @extends {RecaptchaV2TaskBase} * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} */ 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://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} * @param {Object} params - RecaptchaV2TaskParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - some site in anchor endpoint have sa param ,it's action value * @param {boolean=} [params.isInvisible] - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: RecaptchaV2TaskParams); } type RecaptchaV2TaskProxylessParams = ProxylessTaskParams; /** * @classdesc ReCaptchaV2TaskProxyLess is using the server's built-in proxy. * @class * @extends {RecaptchaV2TaskBase} * @see {@link https://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} */ 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://docs.capsolver.com/en/guide/captcha/ReCaptchaV2} * @param {Object} params - RecaptchaV2TaskProxylessParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - some site in anchor endpoint have sa param ,it's action value * @param {boolean=} [params.isInvisible] - if recaptcha don't have pageAction, reload request body content flag have "fi" * @param {string} [params.userAgent] - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". */ constructor(params: RecaptchaV2TaskProxylessParams); } type RecaptchaV3TaskBaseParams = Partial & { "anchor"?: string; "apiDomain"?: string; "cookies"?: Array>; "enterprisePayload"?: Record; "minScore"?: number; "pageAction"?: string; "isSession"?: boolean; "reload"?: string; "userAgent"?: string; "websiteKey": string; "websiteURL": string; }; /** * @classdesc Base class for Recaptcha V3 task * @class * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @extends {BaseTask} */ declare abstract class RecaptchaV3TaskBase extends BaseTask implements RecaptchaV3TaskBaseParams { /** * Create RecaptchaV3TaskBase * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @param {Object} params - RecaptchaV3TaskBaseParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies - deprecated * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify * @param {boolean} [params.isSession] - Session mode, when enabled, will return a recaptcha-ca-t value, which is used as a cookie. It usually appears in v3. Note: Some websites require a recaptcha-ca-e value, which usually appears in v2. If this value is present, it will be automatically returned without any additional parameter settings. * @param {number=} [params.minScore] - Value from 0.1 to 0.9. - deprecated * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor({ apiDomain, cookies, websiteKey, websiteURL, pageAction, proxy, minScore, enterprisePayload, userAgent, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, anchor, reload }: RecaptchaV3TaskBaseParams, type: TaskTypes); /** * @deprecated */ "anchor"?: string | undefined; /** * @deprecated */ "reload"?: string | undefined; /** * Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. */ apiDomain?: string; /** * @deprecated * @type {object} cookies - cookies */ cookies?: Record[]; /** * Enterprise Payload */ enterprisePayload?: Record; /** * @type {string} pageAction - For ReCaptchaV3: You can find the value of the action parameter by searching for grecaptcha.execute */ pageAction?: string; /** * @type {string} proxy - proxy */ proxy?: string; /** * @deprecated * @type {string} userAgent - Browser's User-Agent which is used in emulation. It is required that you use a signature of a modern browser, otherwise Google will ask you to "update your browser". */ userAgent?: string; /** * @type {string} websiteKey - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) */ websiteKey: string; /** * @type {string} websiteKey - Web address of the website using hcaptcha, generally it's fixed value. */ websiteURL: string; /** * @deprecated * @type {number} minScore - description Value from 0.1 to 0.9. */ minScore?: number; /** * @type {boolean} isSession - Session mode, when enabled, will return a recaptcha-ca-t value, which is used as a cookie. It usually appears in v3. Note: Some websites require a recaptcha-ca-e value, which usually appears in v2. If this value is present, it will be automatically returned without any additional parameter settings. */ isSession?: boolean; proxyAddress?: string; proxyLogin?: string; proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; } type ReCaptchaV3EnterpriseTaskParams = ProxyRequiredTaskParams; /** * ReCaptchaV3EnterpriseTask this task type require your own proxies. * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} */ declare class ReCaptchaV3EnterpriseTask extends RecaptchaV3TaskBase implements _IsTaskType { /** * @type {boolean} _isReCaptchaV3EnterpriseTask - Only used for correct method overloading intellisense */ readonly _isReCaptchaV3EnterpriseTask: _IsTaskType["_isReCaptchaV3EnterpriseTask"]; /** * Create ReCaptchaV3EnterpriseTask * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @param {Object} params - ReCaptchaV3EnterpriseTaskParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify * @param {number} [params.minScore] - Value from 0.1 to 0.9. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: ReCaptchaV3EnterpriseTaskParams); } type ReCaptchaV3EnterpriseTaskProxyLessParams = ProxylessTaskParams; /** * @classdesc ReCaptchaV3EnterpriseTaskProxyLess is using the server's built-in proxy. * @class * @extends {RecaptchaV3TaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} */ declare class ReCaptchaV3EnterpriseTaskProxyLess extends RecaptchaV3TaskBase implements _IsTaskType { /** * @type {boolean} _isReCaptchaV3EnterpriseTaskProxyLess - Only used for correct method overloading intellisense */ readonly _isReCaptchaV3EnterpriseTaskProxyLess: _IsTaskType["_isReCaptchaV3EnterpriseTaskProxyLess"]; /** * Create ReCaptchaV3EnterpriseTaskProxyLess * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @param {Object} params - ReCaptchaV3EnterpriseTaskProxyLessParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify * @param {number} [params.minScore] - Value from 0.1 to 0.9. */ constructor(params: ReCaptchaV3EnterpriseTaskProxyLessParams); } type ReCaptchaV3M1TaskProxyLessParams = ProxylessTaskParams; /** * @classdesc ReCaptchaV3M1TaskProxyLess built-in with high-quality proxies, the score can remain stable at 0.7 or above. * @class * @extends {RecaptchaV3TaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @deprecated removed from service support */ declare class ReCaptchaV3M1TaskProxyLess extends RecaptchaV3TaskBase implements _IsTaskType { /** * @type {boolean} _isReCaptchaV3M1TaskProxyLess - Only used for correct method overloading intellisense */ readonly _isReCaptchaV3M1TaskProxyLess: _IsTaskType["_isReCaptchaV3M1TaskProxyLess"]; /** * Create ReCaptchaV3Task * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @param {Object} params - ReCaptchaV3TaskParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify * @param {number} [params.minScore] - Value from 0.1 to 0.9. */ constructor(params: ReCaptchaV3M1TaskProxyLessParams); } type ReCaptchaV3TaskParams = ProxyRequiredTaskParams; /** * @classdesc ReCaptchaV3Task this task type require your own proxies. * @class * @extends {RecaptchaV3TaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} */ declare class ReCaptchaV3Task extends RecaptchaV3TaskBase implements _IsTaskType { /** * @type {boolean} _isReCaptchaV3Task - Only used for correct method overloading intellisense */ readonly _isReCaptchaV3Task: _IsTaskType["_isReCaptchaV3Task"]; /** * Create ReCaptchaV3Task * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @param {Object} params - ReCaptchaV3TaskParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify * @param {number} [params.minScore] - Value from 0.1 to 0.9. * @param {string} [params.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress * @param {string} [params.proxyLogin] - proxyLogin * @param {string} [params.proxyPassword] - proxyPassword * @param {string} [params.proxyPort] - proxyPort * @param {string} [params.proxyType] - proxyType */ constructor(params: ReCaptchaV3TaskParams); } type ReCaptchaV3TaskProxyLessParams = ProxylessTaskParams; /** * @classdesc ReCaptchaV3TaskProxyLess is using the server's built-in proxy. * @class * @extends {RecaptchaV3TaskBase} * @see {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} */ 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://docs.capsolver.com/guide/captcha/ReCaptchaV3.html} * @param {Object} params - ReCaptchaV3TaskProxyLessParams * @param {string} [params.apiDomain] - Domain address from which to load reCAPTCHA Enterprise. For example: http://www.google.com/, http://www.recaptcha.net/. Don't use a parameter if you don't know why it's needed. * @param {Object=} [params.enterprisePayload] - Enterprise Payload * @param {Object=} [params.cookies] - cookies * @param {string} [params.websiteURL] - Web address of the website using recaptcha, generally it's fixed value. (Ex: https://google.com) * @param {string} [params.websiteKey] - The domain public key, rarely updated. (Ex: b989d9e8-0d14-41sda0-870f-97b5283ba67d) * @param {string=} [params.pageAction] - Widget action value. Website owner defines what user is doing on the page through this parameter. Default value: verify * @param {number} [params.minScore] - Value from 0.1 to 0.9. */ constructor(params: ReCaptchaV3TaskProxyLessParams); } type Requests = AntiAkamaiBMPTask | AntiAkamaiPowTask | AntiAkamaiSensorTask | AntiAkamaiWebTask | AntiAwsWafTask | AntiAwsWafTaskProxyLess | AntiCloudflareTask | AntiCloudflareTurnstileTask | AntiCyberSiAraTask | AntiCyberSiAraTaskProxyLess | AntiImpervaTask | AntiImpervaTaskProxyLess | AntiTurnstileTaskProxyLess | AwsWafClassification | DataDomeSliderTask | FunCaptchaClassification | FunCaptchaTask | FunCaptchaTaskProxyLess | GeeTestTask | GeeTestTaskProxyLess | GeeTestV3Task | GeeTestV3TaskProxyLess | GeeTestV4Task | GeeTestV4TaskProxyLess | HCaptchaClassification | HCaptchaTask | HCaptchaTaskProxyLess | ImageToTextTask | MtCaptchaTask | MtCaptchaTaskProxyLess | ReCaptchaV2Classification | ReCaptchaV2EnterpriseTask | ReCaptchaV2EnterpriseTaskProxyLess | ReCaptchaV2Task | ReCaptchaV2TaskProxyLess | ReCaptchaV3EnterpriseTask | ReCaptchaV3EnterpriseTaskProxyLess | ReCaptchaV3M1TaskProxyLess | ReCaptchaV3Task | ReCaptchaV3TaskProxyLess | VisionEngine; /** * @see {@link https://docs.capsolver.com/guide/api-gettaskresult.html#example-response} */ interface CapSolverSolution { "errorCode"?: string; "errorDescription"?: string; "errorId": number; "solution": Solution; "status": string; "taskId": string; } /** * @classdesc CapSolver client * @class * @see {@link https://docs.capsolver.com/guide/getting-started.html} */ declare class CapSolver 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 * @see {@link https://docs.capsolver.com/en/guide/api-server/} */ protected baseUrl: string; private appId; /** * @param {object} [params] - CaptchaClientParams * @param {string} [params.baseUrl] - @see {@link https://docs.capsolver.com/en/guide/api-server/} * @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>; /** * We rely on reports to automatically analyze the quality of tokens issued by our API. These reports are processed automatically, and our team takes proactive steps to enhance token quality, such as updating the system for new tasks, improving grids, and more. * @see {@link https://docs.capsolver.com/guide/api-feedback.html} * @param {FeedbackTaskParams} params - task feedback payload * @param {string} [params.taskId] - Your task id * @param {boolean} [params.invalid] - is task result invalid? * @param {number} [params.code] - code of task result * @param {number} [params.message] - invalid token messages */ feedbackTask(params: FeedbackTaskParams): Promise; /** * @param {ReCaptchaV2EnterpriseTask | ReCaptchaV2EnterpriseTaskProxyLess | ReCaptchaV2Task | ReCaptchaV2TaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: ReCaptchaV2EnterpriseTask | ReCaptchaV2EnterpriseTaskProxyLess | ReCaptchaV2Task | ReCaptchaV2TaskProxyLess): Promise>; /** * @param {ReCaptchaV3EnterpriseTask | ReCaptchaV3EnterpriseTaskProxyLess | ReCaptchaV3M1TaskProxyLess | ReCaptchaV3Task | ReCaptchaV3TaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: ReCaptchaV3EnterpriseTask | ReCaptchaV3EnterpriseTaskProxyLess | ReCaptchaV3M1TaskProxyLess | ReCaptchaV3Task | ReCaptchaV3TaskProxyLess): Promise>; /** * @param {AntiAwsWafTask | AntiAwsWafTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiAwsWafTask | AntiAwsWafTaskProxyLess): Promise>; /** * @param {AntiCyberSiAraTask | AntiCyberSiAraTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiCyberSiAraTask | AntiCyberSiAraTaskProxyLess): Promise>; /** * @param {FunCaptchaTask | FunCaptchaTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: FunCaptchaTask | FunCaptchaTaskProxyLess): Promise>; /** * @param {GeeTestV3Task | GeeTestV3TaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: GeeTestV3Task | GeeTestV3TaskProxyLess): Promise>; /** * @param {GeeTestV4Task | GeeTestV4TaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: GeeTestV4Task | GeeTestV4TaskProxyLess): Promise>; /** * @param {GeeTestTask | GeeTestTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: GeeTestTask | GeeTestTaskProxyLess): Promise>; /** * @param {HCaptchaTask | HCaptchaTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: HCaptchaTask | HCaptchaTaskProxyLess): Promise>; /** * @param {MtCaptchaTask | MtCaptchaTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: MtCaptchaTask | MtCaptchaTaskProxyLess): Promise>; /** * @param {AntiCloudflareTask | AntiCloudflareTurnstileTask | AntiTurnstileTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiCloudflareTask | AntiCloudflareTurnstileTask | AntiTurnstileTaskProxyLess): Promise>; /** * @param {AntiImpervaTask | AntiImpervaTaskProxyLess} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiImpervaTask | AntiImpervaTaskProxyLess): Promise>; /** * @param {DataDomeSliderTask} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: DataDomeSliderTask): Promise>; /** * @param {AntiAkamaiSensorTask} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiAkamaiSensorTask): Promise>; /** * @param {AntiAkamaiPowTask} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiAkamaiPowTask): Promise>; /** * @param {AntiAkamaiBMPTask} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiAkamaiBMPTask): Promise>; /** * @param {AntiAkamaiWebTask} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AntiAkamaiWebTask): Promise>; /** * @param {ImageToTextTask} request - ImageToTextTask * @return {Promise} - response of createTask */ solve(request: ImageToTextTask): Promise>; /** * @param {AwsWafClassification} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: AwsWafClassification): Promise>; /** * @param {HCaptchaClassification} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: HCaptchaClassification): Promise>; /** * @param {ReCaptchaV2Classification} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: ReCaptchaV2Classification): Promise>; /** * @param {FunCaptchaClassification} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: FunCaptchaClassification): Promise>; /** * @param {VisionEngine} request - task payload to create task * @return {Promise>} - response of createTask */ solve(request: VisionEngine): Promise>; } export { AntiAkamaiBMPTask, AntiAkamaiPowTask, AntiAkamaiSensorTask, AntiAkamaiWebTask, AntiAwsWafTask, AntiAwsWafTaskProxyLess, AntiCloudflareTask, AntiCloudflareTurnstileTask, AntiCyberSiAraTask, AntiCyberSiAraTaskProxyLess, AntiImpervaTask, AntiImpervaTaskProxyLess, AntiTurnstileTaskProxyLess, AwsWafClassification, CapSolver, DataDomeSliderTask, FunCaptchaClassification, FunCaptchaTask, FunCaptchaTaskProxyLess, GeeTestTask, GeeTestTaskProxyLess, GeeTestV3Task, GeeTestV3TaskProxyLess, GeeTestV4Task, GeeTestV4TaskProxyLess, HCaptchaClassification, HCaptchaTask, HCaptchaTaskProxyLess, ImageToTextTask, MtCaptchaTask, MtCaptchaTaskProxyLess, ReCaptchaV2Classification, ReCaptchaV2EnterpriseTask, ReCaptchaV2EnterpriseTaskProxyLess, ReCaptchaV2Task, ReCaptchaV2TaskProxyLess, ReCaptchaV3EnterpriseTask, ReCaptchaV3EnterpriseTaskProxyLess, ReCaptchaV3M1TaskProxyLess, ReCaptchaV3Task, ReCaptchaV3TaskProxyLess, VisionEngine };