From 86cc66fe62a9205e9af095146e64b4abf9b95f96 Mon Sep 17 00:00:00 2001 From: Max Shyn Date: Mon, 13 May 2024 03:41:00 +0500 Subject: [PATCH] Update package --- capsolver/README.md | 23 +++++++++---------- .../FunCaptchaClassification.ts | 2 +- .../Classification/ImageToTextTask.ts | 5 ++-- .../lib/Requests/Token/AntiAkamaiBMPTask.ts | 1 + .../lib/Requests/Token/AntiAkamaiPowTask.ts | 1 + .../Requests/Token/AntiAkamaiSensorTask.ts | 1 + .../lib/Requests/Token/AntiAkamaiWebTask.ts | 1 + .../src/lib/Requests/Token/AntiAwsWafTask.ts | 10 +------- .../lib/Requests/Token/AntiCyberSiAraTask.ts | 1 + .../Token/AntiCyberSiAraTaskProxyLess.ts | 1 + .../Requests/Token/Base/_FunCaptchaBase.ts | 10 +------- .../Requests/Token/Base/_HCaptchaTaskBase.ts | 5 +++- .../Requests/Token/FunCaptchaTaskProxyLess.ts | 1 - .../Requests/Token/GeeTestV4TaskProxyLess.ts | 10 ++------ .../Token/ReCaptchaV3M1TaskProxyLess.ts | 1 + .../AwsWafClassificationSolution.ts | 4 ++++ .../FunCaptchaClassificationSolution.ts | 3 +++ .../HCaptchaClassificationSolution.ts | 3 +++ .../Classification/ImageToTextSolution.ts | 3 +++ .../ReCaptchaV2ClassificationSolution.ts | 7 +++++- .../Token/AntiAkamaiPowTaskSolution.ts | 3 +++ .../Token/AntiAkamaiSensorTaskSolution.ts | 3 +++ .../Token/AntiAkamaiWebTaskSolution.ts | 3 +++ .../Solution/Token/AntiAwsWafTaskSolution.ts | 3 +++ .../Token/AntiCloudflareTaskSolution.ts | 3 +++ .../Token/AntiCyberSiAraTaskSolution.ts | 3 +++ .../Solution/Token/AntiImpervaTaskSolution.ts | 3 +++ .../Token/DataDomeSliderTaskSolution.ts | 3 +++ .../Solution/Token/FunCaptchaTaskSolution.ts | 3 +++ .../Solution/Token/GeeTestV3TaskSolution.ts | 3 +++ .../Solution/Token/GeeTestV4TaskSolution.ts | 3 +++ .../Solution/Token/HCaptchaTaskSolution.ts | 3 +++ .../Solution/Token/MtCaptchaTaskSolution.ts | 3 +++ .../Solution/Token/ReCaptchaV2TaskSolution.ts | 3 +++ .../Solution/Token/ReCaptchaV3TaskSolution.ts | 3 +++ capsolver/src/lib/Solution/_BaseSolution.ts | 3 +++ .../Token/FunCaptchaTaskProxyLess.spec.ts | 3 --- .../tests/Requests/Token/HCaptchaTask.spec.ts | 4 ++++ 38 files changed, 101 insertions(+), 47 deletions(-) diff --git a/capsolver/README.md b/capsolver/README.md index 1b85734..fbbefdd 100644 --- a/capsolver/README.md +++ b/capsolver/README.md @@ -7,7 +7,7 @@ Docs: https://docs.capsolver.com ## Installation Via [npm](https://www.npmjs.com/package/@captcha-libs/capsolver) - ```npm i @captcha-libs/capsolver``` + ```$ npm i @captcha-libs/capsolver``` pnpm ```$ pnpm i @captcha-libs/capsolver``` yarn @@ -62,7 +62,7 @@ const reCaptchaV3Request = new ReCaptchaV3EnterpriseTask({ websiteKey: "6Le-wvkSAAAAAPBMRTvw0Q4Muexq9bi0DJwx_mJ-", websiteURL: "https://www.google.com/recaptcha/api2/demo", - //------> You can send the proxy information with one of these proxy format, please read carefully + //You can send the proxy information with one of these proxy format, please read carefully //pass proxy connection string proxy: "socks5:192.191.100.10:4780:user:pwd", @@ -79,10 +79,11 @@ const reCaptchaV3Request = new ReCaptchaV3EnterpriseTask({ ``` ### Features -* Supports all captcha types, solutions and methods from CapSolver docs (updated at Feb. 2024) +* Supports all captcha types, solutions and methods from CapSolver docs (updated at May 2024) * TypeScript-first design * Automatically waits for solution * Fully tested task payloads +* Only one dependency (ofetch) ### Currently supported task payloads What 'custom' does mean? Custom means that the parameters and solutions have been narrowed down from the official documentation from more general cases. However, you can still use classes strictly according to the official documentation. @@ -100,18 +101,16 @@ What 'custom' does mean? Custom means that the parameters and solutions have bee * Custom - [GeeTestV3Task | GeeTestV3TaskProxyLess](https://docs.capsolver.com/guide/captcha/Geetest.html) * Custom - [GeeTestV4Task | GeeTestV4TaskProxyLess](https://docs.capsolver.com/guide/captcha/Geetest.html) * [ReCaptchaV2Task | ReCaptchaV2EnterpriseTask | ReCaptchaV2TaskProxyLess | ReCaptchaV2EnterpriseTaskProxyLess](https://docs.capsolver.com/guide/captcha/ReCaptchaV2.html) - * [ReCaptchaV3Task | ReCaptchaV3EnterpriseTask | ReCaptchaV3TaskProxyLess | ReCaptchaV3EnterpriseTaskProxyLess | ReCaptchaV3M1TaskProxyLess](https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html) + * [ReCaptchaV3Task | ReCaptchaV3EnterpriseTask | ReCaptchaV3TaskProxyLess | ReCaptchaV3EnterpriseTaskProxyLess | ~~DEPRECATED (ReCaptchaV3M1TaskProxyLess)~~](https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html) * [DatadomeSliderTask](https://docs.capsolver.com/guide/antibots/datadome.html) * [AntiAwsWafTask | AntiAwsWafTaskProxyLess](https://docs.capsolver.com/guide/captcha/awsWaf.html) - * [AntiCyberSiAraTask | AntiCyberSiAraTaskProxyLess](https://docs.capsolver.com/guide/captcha/CyberSiara.html) + * DEPRECATED ~~[AntiCyberSiAraTask | AntiCyberSiAraTaskProxyLess](https://docs.capsolver.com/guide/captcha/CyberSiara.html)~~ * [AntiImpervaTask | AntiImpervaTaskProxyLess](https://docs.capsolver.com/guide/antibots/imperva.html) * [AntiCloudflareTurnstileTask](https://docs.capsolver.com/guide/antibots/cloudflare_turnstile.html) * [AntiCloudflareChallengeTask](https://docs.capsolver.com/guide/antibots/cloudflare_challenge.html) - * [AntiAkamaiBMPTask](https://docs.capsolver.com/guide/antibots/akamaibmp.html) - * Custom - [AntiAkamaiPowTask](https://docs.capsolver.com/guide/antibots/akamaibmp.html) - * Custom - [AntiAkamaiSensorTask](https://docs.capsolver.com/guide/antibots/akamaibmp.html) - * [AntiAkamaiWebTask](https://docs.capsolver.com/guide/antibots/akamaiweb.html) + * DEPRECATED. ~~[AntiAkamaiBMPTask](https://docs.capsolver.com/guide/antibots/akamaibmp.html)~~ + * DEPRECATED. ~~Custom - [AntiAkamaiPowTask](https://docs.capsolver.com/guide/antibots/akamaibmp.html)~~ + * DEPRECATED. ~~Custom - [AntiAkamaiSensorTask](https://docs.capsolver.com/guide/antibots/akamaibmp.html)~~ + * DEPRECATED ~~[AntiAkamaiWebTask](https://docs.capsolver.com/guide/antibots/akamaiweb.html)~~ - - - + ~~DEPRECATED~~ = task type removed from service support, but you can still try to send task \ No newline at end of file diff --git a/capsolver/src/lib/Requests/Classification/FunCaptchaClassification.ts b/capsolver/src/lib/Requests/Classification/FunCaptchaClassification.ts index 31b8ef4..20af82e 100644 --- a/capsolver/src/lib/Requests/Classification/FunCaptchaClassification.ts +++ b/capsolver/src/lib/Requests/Classification/FunCaptchaClassification.ts @@ -28,7 +28,7 @@ export class FunCaptchaClassification extends BaseTask implements FunCaptchaClas * @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 {@link https://docs.capsolver.com/guide/recognition/FunCaptchaClassification.html} + * @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 */ diff --git a/capsolver/src/lib/Requests/Classification/ImageToTextTask.ts b/capsolver/src/lib/Requests/Classification/ImageToTextTask.ts index 9533cf5..d308554 100644 --- a/capsolver/src/lib/Requests/Classification/ImageToTextTask.ts +++ b/capsolver/src/lib/Requests/Classification/ImageToTextTask.ts @@ -16,7 +16,8 @@ const _ImageToTextModules = [ "queue-it", "webde-imap", "webde-login", - "webde-register" + "webde-register", + "module001" ] as const; type ImageToTextModules = typeof _ImageToTextModules[number]; @@ -75,7 +76,7 @@ export class ImageToTextTask extends BaseTask implements ImageToTextParams, _IsT /** * @type {ImageToTextModules=} module - Specifies the module. Currently, the supported modules are common and queueit - * {@link https://docs.capsolver.com/guide/recognition/ImageToTextTask.html} + * {@see https://docs.capsolver.com/guide/recognition/ImageToTextTask.html} */ module?: ImageToTextModules; diff --git a/capsolver/src/lib/Requests/Token/AntiAkamaiBMPTask.ts b/capsolver/src/lib/Requests/Token/AntiAkamaiBMPTask.ts index a504369..343b2cd 100644 --- a/capsolver/src/lib/Requests/Token/AntiAkamaiBMPTask.ts +++ b/capsolver/src/lib/Requests/Token/AntiAkamaiBMPTask.ts @@ -17,6 +17,7 @@ export interface AntiAkamaiBMPTaskParams { * @class * @extends {AntiAkamaiBMPTaskBase} * {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} + * @deprecated deleted from service support */ export class AntiAkamaiBMPTask extends BaseTask implements AntiAkamaiBMPTaskParams, _IsTaskType { diff --git a/capsolver/src/lib/Requests/Token/AntiAkamaiPowTask.ts b/capsolver/src/lib/Requests/Token/AntiAkamaiPowTask.ts index bb7a149..1143a0c 100644 --- a/capsolver/src/lib/Requests/Token/AntiAkamaiPowTask.ts +++ b/capsolver/src/lib/Requests/Token/AntiAkamaiPowTask.ts @@ -9,6 +9,7 @@ type AntiAkamaiPowTaskParams = Required & Require * @class * @extends {BaseTask} * {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} + * @deprecated deleted from service support */ export class AntiAkamaiSensorTask extends BaseTask implements AntiAkamaiSensorTaskParams, _IsTaskType { diff --git a/capsolver/src/lib/Requests/Token/AntiAkamaiWebTask.ts b/capsolver/src/lib/Requests/Token/AntiAkamaiWebTask.ts index 58e9e4b..4cfb4b3 100644 --- a/capsolver/src/lib/Requests/Token/AntiAkamaiWebTask.ts +++ b/capsolver/src/lib/Requests/Token/AntiAkamaiWebTask.ts @@ -13,6 +13,7 @@ type AntiAkamaiWebTaskParams ={ * @class * @extends {AntiAkamaiWebTaskBase} * {@link https://docs.capsolver.com/guide/antibots/akamaibmp.html} + * @deprecated deleted from service support */ export class AntiAkamaiWebTask extends BaseTask implements AntiAkamaiWebTaskParams, _IsTaskType { diff --git a/capsolver/src/lib/Requests/Token/AntiAwsWafTask.ts b/capsolver/src/lib/Requests/Token/AntiAwsWafTask.ts index 9e3d41a..6570887 100644 --- a/capsolver/src/lib/Requests/Token/AntiAwsWafTask.ts +++ b/capsolver/src/lib/Requests/Token/AntiAwsWafTask.ts @@ -39,12 +39,4 @@ export class AntiAwsWafTask extends AntiAwsWafTaskBase implements _IsTaskType { constructor(params: AntiAwsWafTaskParams) { super(params, "AntiAwsWafTask"); } -} -new AntiAwsWafTask({ - - // proxy: "", - proxyAddress: "", - proxyPort: 14, - proxyType: "http", - websiteURL: "" -}); \ No newline at end of file +} \ No newline at end of file diff --git a/capsolver/src/lib/Requests/Token/AntiCyberSiAraTask.ts b/capsolver/src/lib/Requests/Token/AntiCyberSiAraTask.ts index 48cf166..df10d4b 100644 --- a/capsolver/src/lib/Requests/Token/AntiCyberSiAraTask.ts +++ b/capsolver/src/lib/Requests/Token/AntiCyberSiAraTask.ts @@ -12,6 +12,7 @@ type AntiCyberSiAraTaskParams = ProxyRequiredTaskParams & { data?: string; - funcaptchaApiJSSubdomain?: string; proxy?: string; websitePublicKey: string; websiteURL: string; @@ -26,7 +25,6 @@ export abstract class FunCaptchaTaskBase extends BaseTask implements FunCaptchaT * @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} [param.funcaptchaApiJSSubdomain] - 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.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress @@ -36,14 +34,13 @@ export abstract class FunCaptchaTaskBase extends BaseTask implements FunCaptchaT * @param {string} [params.proxyType] - proxyType */ constructor({ - websiteURL, proxy, websitePublicKey, data, funcaptchaApiJSSubdomain, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword + websiteURL, proxy, websitePublicKey, data, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword }: FunCaptchaTaskBaseParams, type: TaskTypes) { super({ type }); this.websiteURL = websiteURL; this.proxy = proxy; this.websitePublicKey = websitePublicKey; this.data = data; - this.funcaptchaApiJSSubdomain = funcaptchaApiJSSubdomain; this.proxyAddress = proxyAddress; this.proxyLogin = proxyLogin; this.proxyPort = proxyPort; @@ -56,11 +53,6 @@ export abstract class FunCaptchaTaskBase extends BaseTask implements FunCaptchaT */ websitePublicKey: string; - /** - * @type {string} funcaptchaApiJSSubdomain - A special subdomain of funcaptcha.com, from which the JS captcha widget should be loaded. Most FunCaptcha installations work from shared domains. - */ - funcaptchaApiJSSubdomain?: 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 */ diff --git a/capsolver/src/lib/Requests/Token/Base/_HCaptchaTaskBase.ts b/capsolver/src/lib/Requests/Token/Base/_HCaptchaTaskBase.ts index 75bbf17..fdcf608 100644 --- a/capsolver/src/lib/Requests/Token/Base/_HCaptchaTaskBase.ts +++ b/capsolver/src/lib/Requests/Token/Base/_HCaptchaTaskBase.ts @@ -5,6 +5,7 @@ import { BaseTask } from "../../_BaseTaskRequest"; export type HCaptchaTaskBaseParams = Partial & { enterprisePayload?: Record; + getCaptcha?: unknown; isInvisible?: boolean; proxy?: string; userAgent?: string; @@ -37,7 +38,7 @@ export abstract class HCaptchaTaskBase extends BaseTask implements HCaptchaTaskB * @param {string} [params.proxyType] - proxyType */ constructor({ - isInvisible = false, websiteKey, websiteURL, proxy, enterprisePayload, userAgent, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword + isInvisible = false, websiteKey, websiteURL, proxy, enterprisePayload, userAgent, proxyAddress, proxyPort, proxyType, proxyLogin, proxyPassword, getCaptcha }: HCaptchaTaskBaseParams, type: TaskTypes) { super({ type }); this.websiteKey = websiteKey; @@ -51,6 +52,7 @@ export abstract class HCaptchaTaskBase extends BaseTask implements HCaptchaTaskB this.proxyPort = proxyPort; this.proxyType = proxyType; this.proxyPassword = proxyPassword; + this.getCaptcha = getCaptcha; } /** @@ -87,4 +89,5 @@ export abstract class HCaptchaTaskBase extends BaseTask implements HCaptchaTaskB proxyPassword?: string; proxyPort?: number; proxyType?: ProxyCredentials["proxyType"]; + getCaptcha?: unknown; } \ No newline at end of file diff --git a/capsolver/src/lib/Requests/Token/FunCaptchaTaskProxyLess.ts b/capsolver/src/lib/Requests/Token/FunCaptchaTaskProxyLess.ts index 28a98ed..93e4fad 100644 --- a/capsolver/src/lib/Requests/Token/FunCaptchaTaskProxyLess.ts +++ b/capsolver/src/lib/Requests/Token/FunCaptchaTaskProxyLess.ts @@ -26,7 +26,6 @@ export class FunCaptchaTaskProxyLess extends FunCaptchaTaskBase implements _IsTa * @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} [param.funcaptchaApiJSSubdomain] - 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.proxy] - proxy * @param {string} [params.proxyAddress] - proxyAddress diff --git a/capsolver/src/lib/Requests/Token/GeeTestV4TaskProxyLess.ts b/capsolver/src/lib/Requests/Token/GeeTestV4TaskProxyLess.ts index eb05c85..9765bf6 100644 --- a/capsolver/src/lib/Requests/Token/GeeTestV4TaskProxyLess.ts +++ b/capsolver/src/lib/Requests/Token/GeeTestV4TaskProxyLess.ts @@ -7,7 +7,7 @@ import { GeeTestV4TaskBase } from "./Base/_GeeTestV4TaskBase"; type GeeTestV4TaskProxyLessParams = ProxylessTaskParams; /** - * @classdesc GeeTestTask V4 this task type require your own proxies. + * @classdesc GeeTestTask V4 this using the server's built-in proxy. * @class * @extends {GeeTestTaskBase} * @implements {GeeTestTaskBaseParams} @@ -22,16 +22,10 @@ export class GeeTestV4TaskProxyLess extends GeeTestV4TaskBase implements _IsTask readonly _isGeeTestTaskProxyLess: _IsTaskType["_isGeeTestTaskProxyLess"] = true; /** - * @classdesc GeeTestTask V4 this task type require your own proxies. + * @classdesc GeeTestTask V4 this using the server's built-in proxy. * {@link https://docs.capsolver.com/guide/captcha/Geetest.html} * @param {object} params - GeeTestTaskBaseParams * @param {string} [params.captchaId] - required. captchaId - * @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) * @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. */ diff --git a/capsolver/src/lib/Requests/Token/ReCaptchaV3M1TaskProxyLess.ts b/capsolver/src/lib/Requests/Token/ReCaptchaV3M1TaskProxyLess.ts index ebde4b4..bdaad12 100644 --- a/capsolver/src/lib/Requests/Token/ReCaptchaV3M1TaskProxyLess.ts +++ b/capsolver/src/lib/Requests/Token/ReCaptchaV3M1TaskProxyLess.ts @@ -11,6 +11,7 @@ type ReCaptchaV3M1TaskProxyLessParams = ProxylessTaskParams; } diff --git a/capsolver/src/lib/Solution/Classification/HCaptchaClassificationSolution.ts b/capsolver/src/lib/Solution/Classification/HCaptchaClassificationSolution.ts index 7efb810..62ef91f 100644 --- a/capsolver/src/lib/Solution/Classification/HCaptchaClassificationSolution.ts +++ b/capsolver/src/lib/Solution/Classification/HCaptchaClassificationSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/recognition/HCaptchaClassification.html#example-response} + */ export interface HCaptchaClassificationSolution { box: Array; imageSize: Array; diff --git a/capsolver/src/lib/Solution/Classification/ImageToTextSolution.ts b/capsolver/src/lib/Solution/Classification/ImageToTextSolution.ts index 1bb0de0..7b51cb1 100644 --- a/capsolver/src/lib/Solution/Classification/ImageToTextSolution.ts +++ b/capsolver/src/lib/Solution/Classification/ImageToTextSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/recognition/ImageToTextTask.html#example-response} + */ export interface ImageToTextSolution { text: string; } diff --git a/capsolver/src/lib/Solution/Classification/ReCaptchaV2ClassificationSolution.ts b/capsolver/src/lib/Solution/Classification/ReCaptchaV2ClassificationSolution.ts index a776af4..faa5fe5 100644 --- a/capsolver/src/lib/Solution/Classification/ReCaptchaV2ClassificationSolution.ts +++ b/capsolver/src/lib/Solution/Classification/ReCaptchaV2ClassificationSolution.ts @@ -1,10 +1,15 @@ - +/** + * {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html#response-example} + */ interface MultiSolution { objects: number[]; size: number; type: string; } +/** + * {@link https://docs.capsolver.com/guide/recognition/ReCaptchaClassification.html#response-example} + */ interface SingleSolution { hasObject: boolean; size: number; diff --git a/capsolver/src/lib/Solution/Token/AntiAkamaiPowTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiAkamaiPowTaskSolution.ts index 0199490..b35a753 100644 --- a/capsolver/src/lib/Solution/Token/AntiAkamaiPowTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiAkamaiPowTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * @deprecated removed from service support + */ export interface AntiAkamaiPowTaskSolution { pow: string; } diff --git a/capsolver/src/lib/Solution/Token/AntiAkamaiSensorTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiAkamaiSensorTaskSolution.ts index d47778f..b78580b 100644 --- a/capsolver/src/lib/Solution/Token/AntiAkamaiSensorTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiAkamaiSensorTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * @deprecated removed from service support + */ export interface AntiAkamaiSensorTaskSolution { deviceId: string; deviceName: string; diff --git a/capsolver/src/lib/Solution/Token/AntiAkamaiWebTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiAkamaiWebTaskSolution.ts index b002eae..87bc32a 100644 --- a/capsolver/src/lib/Solution/Token/AntiAkamaiWebTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiAkamaiWebTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * @deprecated removed from service support + */ export interface AntiAkamaiWebTaskSolution { sensorData: string; } diff --git a/capsolver/src/lib/Solution/Token/AntiAwsWafTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiAwsWafTaskSolution.ts index bd7cac8..24da772 100644 --- a/capsolver/src/lib/Solution/Token/AntiAwsWafTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiAwsWafTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * @deprecated removed from service support + */ export interface AntiAwsWafTaskSolution { cookie: string; } \ No newline at end of file diff --git a/capsolver/src/lib/Solution/Token/AntiCloudflareTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiCloudflareTaskSolution.ts index da9f116..48ccd3c 100644 --- a/capsolver/src/lib/Solution/Token/AntiCloudflareTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiCloudflareTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/antibots/cloudflare_turnstile.html#example-response-1} + */ export interface AntiCloudflareTaskSolution { token: string; type: string; diff --git a/capsolver/src/lib/Solution/Token/AntiCyberSiAraTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiCyberSiAraTaskSolution.ts index eda7561..f9f1c34 100644 --- a/capsolver/src/lib/Solution/Token/AntiCyberSiAraTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiCyberSiAraTaskSolution.ts @@ -1 +1,4 @@ +/** + * @deprecated removed from service support + */ export interface AntiCyberSiAraTaskSolution { token: string } \ No newline at end of file diff --git a/capsolver/src/lib/Solution/Token/AntiImpervaTaskSolution.ts b/capsolver/src/lib/Solution/Token/AntiImpervaTaskSolution.ts index f1e2692..ef36790 100644 --- a/capsolver/src/lib/Solution/Token/AntiImpervaTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/AntiImpervaTaskSolution.ts @@ -1 +1,4 @@ +/** + * {@link https://docs.capsolver.com/guide/antibots/imperva.html#example-response-1} + */ export interface AntiImpervaTaskSolution { token: string } \ No newline at end of file diff --git a/capsolver/src/lib/Solution/Token/DataDomeSliderTaskSolution.ts b/capsolver/src/lib/Solution/Token/DataDomeSliderTaskSolution.ts index 96b8a52..f912cc8 100644 --- a/capsolver/src/lib/Solution/Token/DataDomeSliderTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/DataDomeSliderTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/antibots/datadome.html#example-response-1} + */ export interface DataDomeSliderTaskSolution { cookie: string; userAgent: string; diff --git a/capsolver/src/lib/Solution/Token/FunCaptchaTaskSolution.ts b/capsolver/src/lib/Solution/Token/FunCaptchaTaskSolution.ts index 2eeeb9f..d3f44f8 100644 --- a/capsolver/src/lib/Solution/Token/FunCaptchaTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/FunCaptchaTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/FunCaptcha.html#example-response-1} + */ export interface FunCaptchaTaskSolution { token: string; userAgent: string; diff --git a/capsolver/src/lib/Solution/Token/GeeTestV3TaskSolution.ts b/capsolver/src/lib/Solution/Token/GeeTestV3TaskSolution.ts index cb62938..557a161 100644 --- a/capsolver/src/lib/Solution/Token/GeeTestV3TaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/GeeTestV3TaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/Geetest.html#example-response-1} + */ export interface GeeTestV3TaskSolution { challenge: string; validate: string; diff --git a/capsolver/src/lib/Solution/Token/GeeTestV4TaskSolution.ts b/capsolver/src/lib/Solution/Token/GeeTestV4TaskSolution.ts index 4f5fb72..da8bc76 100644 --- a/capsolver/src/lib/Solution/Token/GeeTestV4TaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/GeeTestV4TaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/Geetest.html#example-response-1} + */ export interface GeeTestV4TaskSolution { captcha_id: string; captcha_output: string; diff --git a/capsolver/src/lib/Solution/Token/HCaptchaTaskSolution.ts b/capsolver/src/lib/Solution/Token/HCaptchaTaskSolution.ts index baf1cb1..2503567 100644 --- a/capsolver/src/lib/Solution/Token/HCaptchaTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/HCaptchaTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/HCaptcha.html#example-response-1} + */ export interface HCaptchaTaskSolution { captchaKey: string; expireTime: number; diff --git a/capsolver/src/lib/Solution/Token/MtCaptchaTaskSolution.ts b/capsolver/src/lib/Solution/Token/MtCaptchaTaskSolution.ts index 4ea1e6c..e19638e 100644 --- a/capsolver/src/lib/Solution/Token/MtCaptchaTaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/MtCaptchaTaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/MtCaptcha.html#example-response-1} + */ export interface MtCaptchaTaskSolution { token: string; } \ No newline at end of file diff --git a/capsolver/src/lib/Solution/Token/ReCaptchaV2TaskSolution.ts b/capsolver/src/lib/Solution/Token/ReCaptchaV2TaskSolution.ts index 356c9c2..e9bb025 100644 --- a/capsolver/src/lib/Solution/Token/ReCaptchaV2TaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/ReCaptchaV2TaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV2.html#example-response-1} + */ export interface ReCaptchaV2TaskSolution { expireTime: number; gRecaptchaResponse: string; diff --git a/capsolver/src/lib/Solution/Token/ReCaptchaV3TaskSolution.ts b/capsolver/src/lib/Solution/Token/ReCaptchaV3TaskSolution.ts index 5376b6d..0dd8981 100644 --- a/capsolver/src/lib/Solution/Token/ReCaptchaV3TaskSolution.ts +++ b/capsolver/src/lib/Solution/Token/ReCaptchaV3TaskSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/captcha/ReCaptchaV3.html#example-response-1} + */ export interface ReCaptchaV3TaskSolution { expireTime: number; gRecaptchaResponse: string; diff --git a/capsolver/src/lib/Solution/_BaseSolution.ts b/capsolver/src/lib/Solution/_BaseSolution.ts index 8cbee3d..a465426 100644 --- a/capsolver/src/lib/Solution/_BaseSolution.ts +++ b/capsolver/src/lib/Solution/_BaseSolution.ts @@ -1,3 +1,6 @@ +/** + * {@link https://docs.capsolver.com/guide/api-gettaskresult.html#example-response} + */ export interface CapSolverSolution { errorCode?: string; errorDescription?: string; diff --git a/capsolver/src/tests/Requests/Token/FunCaptchaTaskProxyLess.spec.ts b/capsolver/src/tests/Requests/Token/FunCaptchaTaskProxyLess.spec.ts index 608367d..1808fc4 100644 --- a/capsolver/src/tests/Requests/Token/FunCaptchaTaskProxyLess.spec.ts +++ b/capsolver/src/tests/Requests/Token/FunCaptchaTaskProxyLess.spec.ts @@ -4,7 +4,6 @@ describe("FunCaptchaTaskProxyLess", () => { it("To be equal to object", () => { const task = new FunCaptchaTaskProxyLess({ data: "some-data", - funcaptchaApiJSSubdomain: "https://some-api-domain.com", proxyAddress: "some-proxyAddress", proxyLogin: "some-proxyLogin", proxyPassword: "some-proxyPassword", @@ -18,7 +17,6 @@ describe("FunCaptchaTaskProxyLess", () => { _endpoint: "createTask", _isFunCaptchaTaskProxyLess: true, data: "some-data", - funcaptchaApiJSSubdomain: "https://some-api-domain.com", proxy: undefined, proxyAddress: "some-proxyAddress", proxyLogin: "some-proxyLogin", @@ -40,7 +38,6 @@ describe("FunCaptchaTaskProxyLess", () => { _endpoint: "createTask", _isFunCaptchaTaskProxyLess: true, data: undefined, - funcaptchaApiJSSubdomain: undefined, proxy: undefined, type: "FunCaptchaTaskProxyLess", websitePublicKey: "some-websitePublicKey", diff --git a/capsolver/src/tests/Requests/Token/HCaptchaTask.spec.ts b/capsolver/src/tests/Requests/Token/HCaptchaTask.spec.ts index 24245ea..116b242 100644 --- a/capsolver/src/tests/Requests/Token/HCaptchaTask.spec.ts +++ b/capsolver/src/tests/Requests/Token/HCaptchaTask.spec.ts @@ -4,6 +4,7 @@ describe("HCaptchaTask test", () => { it("To be equal to object", () => { const task = new HCaptchaTask({ enterprisePayload: { s: "SOME_ADDITIONAL_TOKEN" }, + getCaptcha: "some-getCaptcha", isInvisible: false, proxyAddress: "some-proxyAddress", proxyLogin: "some-proxyLogin", @@ -19,6 +20,7 @@ describe("HCaptchaTask test", () => { _endpoint: "createTask", _isHCaptchaTask: true, enterprisePayload: { s: "SOME_ADDITIONAL_TOKEN" }, + getCaptcha: "some-getCaptcha", isInvisible: false, proxy: undefined, proxyAddress: "some-proxyAddress", @@ -34,6 +36,7 @@ describe("HCaptchaTask test", () => { }); it("To be equal to object without optional params", () => { const task = new HCaptchaTask({ + getCaptcha: "some-getCaptcha", proxyAddress: "some-proxyAddress", proxyLogin: "some-proxyLogin", proxyPassword: "some-proxyPassword", @@ -47,6 +50,7 @@ describe("HCaptchaTask test", () => { _endpoint: "createTask", _isHCaptchaTask: true, enterprisePayload: undefined, + getCaptcha: "some-getCaptcha", isInvisible: false, proxy: undefined, proxyAddress: "some-proxyAddress",