diff --git a/README.md b/README.md index bf80625..ad364f8 100644 --- a/README.md +++ b/README.md @@ -95,3 +95,6 @@ DEBUG=cmc-* node app.js - [TurnstileRequest](https://zenno.link/doc-turnstile-proxy-en) - [Yidun](https://zenno.link/doc-yidun-en) - [Altcha](https://zenno.link/doc-altcha-en) +- [Castle](https://zenno.link/castle-en) +- [TSPD](https://zenno.link/tspd-en) +- [Hunt](https://zenno.link/hunt-en) diff --git a/package.json b/package.json index 39a0cda..aa662bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zennolab_com/capmonstercloud-client", - "version": "2.5.0", + "version": "2.6.1", "description": "Official JS client library for https://capmonster.cloud/ captcha recognition service", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/CapMonsterCloudClient.ts b/src/CapMonsterCloudClient.ts index 5a999d3..566296e 100644 --- a/src/CapMonsterCloudClient.ts +++ b/src/CapMonsterCloudClient.ts @@ -57,16 +57,12 @@ import { AltchaRequest } from './Requests/AltchaRequest'; import { AltchaResponse } from './Responses/AltchaResponse'; import { RecaptchaV3EnterpriseRequest } from './Requests/RecaptchaV3EnterpriseRequest'; import { RecaptchaV3EnterpriseResponse } from './Responses/RecaptchaV3EnterpriseResponse'; - -type CustomTaskUnion = TemuRequest | BasiliskRequest | ImpervaRequest; - -type ResponseForCustomTask = T extends TemuRequest - ? TemuResponse - : T extends BasiliskRequest - ? BasiliskResponse - : T extends ImpervaRequest - ? ImpervaResponse - : never; +import { CastleRequest } from './Requests/CastleRequest'; +import { CastleResponse } from './Responses/CastleResponse'; +import { TSPDRequest } from './Requests/TSPDRequest'; +import { TSPDResponse } from './Responses/TSPDResponse'; +import { HuntRequest } from './Requests/HuntRequest'; +import { HuntResponse } from './Responses/HuntResponse'; /** * Base type for capmonster.cloud Client exceptions @@ -263,6 +259,42 @@ export class CapMonsterCloudClient { resultTimeouts?: GetResultTimeouts, cancellationController?: AbortController, ): Promise>; + /** + * Solve Basilisk task + * You will get response within 10 - 180 secs period depending on service workload. + */ + public async Solve( + task: BasiliskRequest, + resultTimeouts?: GetResultTimeouts, + cancellationController?: AbortController, + ): Promise>; + /** + * Solve Imperva task + * You will get response within 10 - 180 secs period depending on service workload. + */ + public async Solve( + task: ImpervaRequest, + resultTimeouts?: GetResultTimeouts, + cancellationController?: AbortController, + ): Promise>; + /** + * Solve Temu task + * You will get response within 10 - 180 secs period depending on service workload. + */ + public async Solve( + task: TemuRequest, + resultTimeouts?: GetResultTimeouts, + cancellationController?: AbortController, + ): Promise>; + /** + * Solve Castle task + * You will get response within 10 - 180 secs period depending on service workload. + */ + public async Solve( + task: CastleRequest, + resultTimeouts?: GetResultTimeouts, + cancellationController?: AbortController, + ): Promise>; /** * Solve TenDI task * You will get response within 10 - 180 secs period depending on service workload. @@ -273,14 +305,23 @@ export class CapMonsterCloudClient { cancellationController?: AbortController, ): Promise>; /** - * Solve CustomTask task + * Solve Hunt task + * You will get response within 10 - 180 secs period depending on service workload. + */ + public async Solve( + task: HuntRequest, + resultTimeouts?: GetResultTimeouts, + cancellationController?: AbortController, + ): Promise>; + /** + * Solve TSPD task * You will get response within 10 - 180 secs period depending on service workload. */ - public async Solve( - task: T, + public async Solve( + task: TSPDRequest, resultTimeouts?: GetResultTimeouts, cancellationController?: AbortController, - ): Promise>>; + ): Promise>; /** * Solve Binance task * You will get response within 10 - 180 secs period depending on service workload. diff --git a/src/CapMonsterCloudClientFactory.i.spec.ts b/src/CapMonsterCloudClientFactory.i.spec.ts index 0c2ac67..bdb7a56 100644 --- a/src/CapMonsterCloudClientFactory.i.spec.ts +++ b/src/CapMonsterCloudClientFactory.i.spec.ts @@ -19,6 +19,9 @@ import { ProsopoRequest } from './Requests/ProsopoRequest'; import { TemuRequest } from './Requests/TemuRequest'; import { YidunRequest } from './Requests/YidunRequest'; import { MTCaptchaRequest } from './Requests/MTCaptchaRequest'; +import { CastleRequest } from './Requests/CastleRequest'; +import { TSPDRequest } from './Requests/TSPDRequest'; +import { HuntRequest } from './Requests/HuntRequest'; const { version } = require('../package.json'); // eslint-disable-line @typescript-eslint/no-var-requires @@ -1133,4 +1136,171 @@ describe('Check integration tests for CapMonsterCloudClientFactory()', () => { expect(await srv.destroy()).toBeUndefined(); }); + + it('should solve Castle Task', async () => { + expect.assertions(5); + + const srv = await createServerMock({ + responses: [ + { responseBody: '{"errorId":0,"taskId":1234567}' }, + { responseBody: '{"errorId":0,"status":"ready","solution":{"token":"castle-token"}}' }, + ], + }); + + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: '', serviceUrl: `http://localhost:${srv.address.port}` }), + ); + + const castleRequest = new CastleRequest({ + websiteURL: 'https://example.com/castle', + websiteKey: 'pk_test_123', + metadata: { + wUrl: 'https://s.rsg.sc/auth/js/20251234bgef/build/cw.js', + swUrl: 'https://s.rsg.sc/auth/js/20251213bgef/build/csw.js', + count: 1, + }, + }); + + const task = await cmcClient.Solve(castleRequest); + + expect(srv.caughtRequests[0]).toHaveProperty( + 'body', + '{"clientKey":"","task":{"type":"CustomTask","websiteURL":"https://example.com/castle","websiteKey":"pk_test_123","metadata":{"wUrl":"https://s.rsg.sc/auth/js/20251234bgef/build/cw.js","swUrl":"https://s.rsg.sc/auth/js/20251213bgef/build/csw.js","count":1},"class":"Castle"},"softId":54}', + ); + expect(srv.caughtRequests[1]).toHaveProperty('body', '{"clientKey":"","taskId":1234567}'); + expect(task).toHaveProperty('solution'); + expect(task).toHaveProperty('solution.token', 'castle-token'); + + expect(await srv.destroy()).toBeUndefined(); + }); + + it('should solve Castle Task with Proxy', async () => { + expect.assertions(5); + + const srv = await createServerMock({ + responses: [ + { responseBody: '{"errorId":0,"taskId":1234567}' }, + { responseBody: '{"errorId":0,"status":"ready","solution":{"token":"castle-token"}}' }, + ], + }); + + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: '', serviceUrl: `http://localhost:${srv.address.port}` }), + ); + + const castleRequest = new CastleRequest({ + websiteURL: 'https://example.com/castle', + websiteKey: 'pk_test_123', + metadata: { + wUrl: 'https://s.rsg.sc/auth/js/20251234bgef/build/cw.js', + swUrl: 'https://s.rsg.sc/auth/js/20251213bgef/build/csw.js', + count: 1, + }, + proxy: { + proxyType: 'http', + proxyAddress: '8.8.8.8', + proxyPort: 8080, + proxyLogin: 'proxyLoginHere', + proxyPassword: 'proxyPasswordHere', + }, + }); + + const task = await cmcClient.Solve(castleRequest); + + expect(srv.caughtRequests[0]).toHaveProperty( + 'body', + '{"clientKey":"","task":{"type":"CustomTask","websiteURL":"https://example.com/castle","websiteKey":"pk_test_123","metadata":{"wUrl":"https://s.rsg.sc/auth/js/20251234bgef/build/cw.js","swUrl":"https://s.rsg.sc/auth/js/20251213bgef/build/csw.js","count":1},"class":"Castle","proxyType":"http","proxyAddress":"8.8.8.8","proxyPort":8080,"proxyLogin":"proxyLoginHere","proxyPassword":"proxyPasswordHere"},"softId":54}', + ); + expect(srv.caughtRequests[1]).toHaveProperty('body', '{"clientKey":"","taskId":1234567}'); + expect(task).toHaveProperty('solution'); + expect(task).toHaveProperty('solution.token', 'castle-token'); + + expect(await srv.destroy()).toBeUndefined(); + }); + + it('should solve TSPD Task', async () => { + expect.assertions(5); + + const srv = await createServerMock({ + responses: [ + { responseBody: '{"errorId":0,"taskId":1234567}' }, + { responseBody: '{"errorId":0,"status":"ready","solution":{"token":"tspd-token"}}' }, + ], + }); + + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: '', serviceUrl: `http://localhost:${srv.address.port}` }), + ); + + const tspdRequest = new TSPDRequest({ + websiteURL: 'https://example.com/tspd', + userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', + metadata: { + tspdCookie: 'TS386a400d029=example', + htmlPageBase64: 'html-base64', + }, + proxy: { + proxyType: 'http', + proxyAddress: '8.8.8.8', + proxyPort: 8080, + proxyLogin: 'proxyLoginHere', + proxyPassword: 'proxyPasswordHere', + }, + }); + + const task = await cmcClient.Solve(tspdRequest); + + expect(srv.caughtRequests[0]).toHaveProperty( + 'body', + '{"clientKey":"","task":{"type":"CustomTask","websiteURL":"https://example.com/tspd","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36","metadata":{"tspdCookie":"TS386a400d029=example","htmlPageBase64":"html-base64"},"class":"tspd","proxyType":"http","proxyAddress":"8.8.8.8","proxyPort":8080,"proxyLogin":"proxyLoginHere","proxyPassword":"proxyPasswordHere"},"softId":54}', + ); + expect(srv.caughtRequests[1]).toHaveProperty('body', '{"clientKey":"","taskId":1234567}'); + expect(task).toHaveProperty('solution'); + expect(task).toHaveProperty('solution.token', 'tspd-token'); + + expect(await srv.destroy()).toBeUndefined(); + }); + + it('should solve Hunt Task', async () => { + expect.assertions(5); + + const srv = await createServerMock({ + responses: [ + { responseBody: '{"errorId":0,"taskId":1234567}' }, + { responseBody: '{"errorId":0,"status":"ready","solution":{"token":"hunt-token"}}' }, + ], + }); + + const cmcClient = CapMonsterCloudClientFactory.Create( + new ClientOptions({ clientKey: '', serviceUrl: `http://localhost:${srv.address.port}` }), + ); + + const huntRequest = new HuntRequest({ + websiteURL: 'https://example.com/hunt', + userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', + metadata: { + apiGetLib: 'https://www.example.com/hd-api/external/apps/a2157wab1045d68672a63557e0n2a77edbfd15ea/api.js', + data: 'some-data', + }, + proxy: { + proxyType: 'http', + proxyAddress: '8.8.8.8', + proxyPort: 8080, + proxyLogin: 'proxyLoginHere', + proxyPassword: 'proxyPasswordHere', + }, + }); + + const task = await cmcClient.Solve(huntRequest); + + expect(srv.caughtRequests[0]).toHaveProperty( + 'body', + '{"clientKey":"","task":{"type":"CustomTask","websiteURL":"https://example.com/hunt","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36","metadata":{"apiGetLib":"https://www.example.com/hd-api/external/apps/a2157wab1045d68672a63557e0n2a77edbfd15ea/api.js","data":"some-data"},"class":"HUNT","proxyType":"http","proxyAddress":"8.8.8.8","proxyPort":8080,"proxyLogin":"proxyLoginHere","proxyPassword":"proxyPasswordHere"},"softId":54}', + ); + expect(srv.caughtRequests[1]).toHaveProperty('body', '{"clientKey":"","taskId":1234567}'); + expect(task).toHaveProperty('solution'); + expect(task).toHaveProperty('solution.token', 'hunt-token'); + + expect(await srv.destroy()).toBeUndefined(); + }); }); diff --git a/src/GetResultTimeouts.ts b/src/GetResultTimeouts.ts index fe170b4..d794736 100644 --- a/src/GetResultTimeouts.ts +++ b/src/GetResultTimeouts.ts @@ -29,6 +29,13 @@ export const RecaptchaV3Timeouts = { timeout: 1000 * 180, } as GetResultTimeouts; +export const RecaptchaV3EnterpriseTimeouts = { + firstRequestDelay: 1000 * 1, + firstRequestNoCacheDelay: 1000 * 10, + requestsInterval: 1000 * 3, + timeout: 1000 * 180, +} as GetResultTimeouts; + export const ImageToTextTimeouts = { firstRequestDelay: 350, requestsInterval: 200, @@ -128,6 +135,8 @@ export function detectResultTimeouts(task: Task): GetResultTimeouts { return RecaptchaV2Timeouts; case TaskType.RecaptchaV3TaskProxyless: return RecaptchaV3Timeouts; + case TaskType.RecaptchaV3EnterpriseTask: + return RecaptchaV3EnterpriseTimeouts; case TaskType.TurnstileTask: return TurnstileTimeouts; case TaskType.ComplexImageTask: diff --git a/src/GetTaskResult.ts b/src/GetTaskResult.ts index f8adc6c..c955cc5 100644 --- a/src/GetTaskResult.ts +++ b/src/GetTaskResult.ts @@ -15,6 +15,9 @@ import { ImpervaResponse } from './Responses/ImpervaResponse'; import { BinanceResponse } from './Responses/BinanceResponse'; import { ComplexImageRecognitionResponse } from './Responses/ComplexImageRecognitionResponse'; import { AltchaResponse } from './Responses/AltchaResponse'; +import { CastleResponse } from './Responses/CastleResponse'; +import { TSPDResponse } from './Responses/TSPDResponse'; +import { HuntResponse } from './Responses/HuntResponse'; export enum TaskResultType { Failed = 'Failed', @@ -47,7 +50,10 @@ export type TaskCompletedSolution = | ImpervaResponse | BinanceResponse | ComplexImageRecognitionResponse - | AltchaResponse; + | AltchaResponse + | CastleResponse + | TSPDResponse + | HuntResponse; export type TaskCompleted = { type: TaskResultType.Completed; diff --git a/src/Requests/AltchaRequest/AltchaRequest.ts b/src/Requests/AltchaRequest/AltchaRequest.ts index 459745b..d3e9d66 100644 --- a/src/Requests/AltchaRequest/AltchaRequest.ts +++ b/src/Requests/AltchaRequest/AltchaRequest.ts @@ -10,6 +10,8 @@ export type AltchaRequestIn = Pick> & { proxy?: ProxyInfoIn }; + +/** + * Castle recognition request. + */ +export class CastleRequest extends CastleRequestBase { + public declare class: 'Castle'; + + constructor({ proxy, ...argsObj }: CastleRequestIn) { + super({ type: TaskType.CustomTask, _class: 'Castle', ...argsObj }); + + if (proxy) { + Object.assign(this, new ProxyInfo(proxy)); + } + } +} diff --git a/src/Requests/CastleRequest/CastleRequestBase.ts b/src/Requests/CastleRequest/CastleRequestBase.ts new file mode 100644 index 0000000..a5a5ec2 --- /dev/null +++ b/src/Requests/CastleRequest/CastleRequestBase.ts @@ -0,0 +1,78 @@ +import { CaptchaRequestBase, CaptchaRequestBaseIn } from '../CaptchaRequestBase'; + +export type CastleMetadata = { + /** + * Link to cw.js + * @example "https://s.rsg.sc/auth/js/20251234bgef/build/cw.js" + */ + wUrl: string; + /** + * Link to csw.js + * @example "https://s.rsg.sc/auth/js/20251213bgef/build/csw.js" + */ + swUrl: string; + /** + * Number of tokens (1..49). Default is 1. + */ + count?: number; +}; + +export type CastleRequestBaseIn = { + /** + * The URL of the page where Castle is located. + */ + websiteURL: string; + /** + * Publishable Key, the Castle identifier. + * @example "pk_1Tk5Yzr1WFzxrJCh7WzMZzY1rHpaOtdK" + */ + websiteKey: string; + /** + * Browser User-Agent. Pass only the actual UA from Windows OS + */ + userAgent?: string; + /** + * Additional metadata required to solve Castle. + */ + metadata: CastleMetadata; + _class: string; +} & CaptchaRequestBaseIn; + +/** + * Base Castle recognition request + */ +export abstract class CastleRequestBase extends CaptchaRequestBase { + /** + * Address of a webpage with Castle. + */ + public websiteURL!: string; + + /** + * Castle website key (Publishable Key). + */ + public websiteKey!: string; + + /** + * Browser User-Agent. Pass only the actual UA from Windows OS + */ + public userAgent?: string; + + /** + * The object that contains additional data about the captcha (wUrl, swUrl, count). + */ + public metadata!: CastleMetadata; + + /** + * Class of captcha object + */ + public class: string; + + constructor({ type, nocache, websiteURL, websiteKey, userAgent, metadata, _class }: CastleRequestBaseIn) { + super({ type, nocache }); + this.websiteURL = websiteURL; + this.websiteKey = websiteKey; + this.userAgent = userAgent; + this.metadata = metadata; + this.class = _class; + } +} diff --git a/src/Requests/CastleRequest/index.ts b/src/Requests/CastleRequest/index.ts new file mode 100644 index 0000000..74d28a3 --- /dev/null +++ b/src/Requests/CastleRequest/index.ts @@ -0,0 +1 @@ +export * from './CastleRequest'; diff --git a/src/Requests/DataDomeRequest/DataDomeRequest.ts b/src/Requests/DataDomeRequest/DataDomeRequest.ts index e34b9ee..382b7ee 100644 --- a/src/Requests/DataDomeRequest/DataDomeRequest.ts +++ b/src/Requests/DataDomeRequest/DataDomeRequest.ts @@ -10,6 +10,8 @@ export type DataDomeRequestIn = Pick> & { + proxy: ProxyInfoIn; +}; + +export class HuntRequest extends HuntRequestBase { + public declare class: 'HUNT'; + + constructor({ proxy, ...argsObj }: HuntRequestIn) { + super({ type: TaskType.CustomTask, _class: 'HUNT', ...argsObj }); + Object.assign(this, new ProxyInfo(proxy)); + } +} diff --git a/src/Requests/HuntRequest/HuntRequestBase.ts b/src/Requests/HuntRequest/HuntRequestBase.ts new file mode 100644 index 0000000..2948aea --- /dev/null +++ b/src/Requests/HuntRequest/HuntRequestBase.ts @@ -0,0 +1,63 @@ +import { CaptchaRequestBase, CaptchaRequestBaseIn } from '../CaptchaRequestBase'; + +export type HuntMetadata = { + /** + * The full link to the api.js file. + * Example: + * https://www.example.com/hd-api/external/apps//api.js + */ + apiGetLib: string; + /** + * The `data` parameter (required only in some solving modes). + */ + data?: string; +}; + +export type HuntRequestBaseIn = { + /** + * The URL of the page where the Hunt CAPTCHA is located. + */ + websiteURL: string; + /** + * Browser User-Agent. + */ + userAgent?: string; + /** + * Additional metadata required to solve Hunt. + */ + metadata: HuntMetadata; + _class: string; +} & CaptchaRequestBaseIn; + +/** + * Base Hunt recognition request + */ +export abstract class HuntRequestBase extends CaptchaRequestBase { + /** + * Address of a webpage with Hunt. + */ + public websiteURL!: string; + + /** + * Browser User-Agent. + */ + public userAgent?: string; + + /** + * Additional data about the captcha (apiGetLib, data). + */ + public metadata!: HuntMetadata; + + /** + * Class of captcha object + */ + public class!: string; + + constructor({ type, nocache, websiteURL, userAgent, metadata, _class }: HuntRequestBaseIn) { + super({ type, nocache }); + this.websiteURL = websiteURL; + this.userAgent = userAgent; + this.metadata = metadata; + this.class = _class; + } +} diff --git a/src/Requests/HuntRequest/index.ts b/src/Requests/HuntRequest/index.ts new file mode 100644 index 0000000..c07ec5d --- /dev/null +++ b/src/Requests/HuntRequest/index.ts @@ -0,0 +1 @@ +export * from './HuntRequest'; diff --git a/src/Requests/ImpervaRequest/ImpervaRequest.ts b/src/Requests/ImpervaRequest/ImpervaRequest.ts index ff8ced7..03ee77d 100644 --- a/src/Requests/ImpervaRequest/ImpervaRequest.ts +++ b/src/Requests/ImpervaRequest/ImpervaRequest.ts @@ -8,6 +8,8 @@ export type ImpervaRequestIn = Pick> & { proxy: ProxyInfoIn }; + +/** + * TSPD recognition request. + */ +export class TSPDRequest extends TSPDRequestBase { + public declare class: 'tspd'; + + constructor({ proxy, ...argsObj }: TSPDRequestIn) { + super({ type: TaskType.CustomTask, _class: 'tspd', ...argsObj }); + Object.assign(this, new ProxyInfo(proxy)); + } +} diff --git a/src/Requests/TSPDRequest/TSPDRequestBase.ts b/src/Requests/TSPDRequest/TSPDRequestBase.ts new file mode 100644 index 0000000..f732941 --- /dev/null +++ b/src/Requests/TSPDRequest/TSPDRequestBase.ts @@ -0,0 +1,62 @@ +import { CaptchaRequestBase, CaptchaRequestBaseIn } from '../CaptchaRequestBase'; + +export type TSPDMetadata = { + /** + * Cookies obtained on the TSPD challenge page. + */ + tspdCookie: string; + /** + * The entire TSPD page encoded in base64. + */ + htmlPageBase64: string; +}; + +export type TSPDRequestBaseIn = { + /** + * The URL of the page where the TSPD challenge is located. + */ + websiteURL: string; + /** + * Browser User-Agent. + * Provide only the current Windows UA. + */ + userAgent: string; + /** + * Additional metadata required to solve TSPD. + */ + metadata: TSPDMetadata; + _class: string; +} & CaptchaRequestBaseIn; + +/** + * Base TSPD recognition request + */ +export abstract class TSPDRequestBase extends CaptchaRequestBase { + /** + * Address of a webpage with TSPD. + */ + public websiteURL!: string; + + /** + * Browser User-Agent. + */ + public userAgent!: string; + + /** + * Additional data about the captcha challenge (tspdCookie, htmlPageBase64). + */ + public metadata!: TSPDMetadata; + + /** + * Class of captcha object + */ + public class!: string; + + constructor({ type, nocache, websiteURL, userAgent, metadata, _class }: TSPDRequestBaseIn) { + super({ type, nocache }); + this.websiteURL = websiteURL; + this.userAgent = userAgent; + this.metadata = metadata; + this.class = _class; + } +} diff --git a/src/Requests/TSPDRequest/index.ts b/src/Requests/TSPDRequest/index.ts new file mode 100644 index 0000000..b4972fc --- /dev/null +++ b/src/Requests/TSPDRequest/index.ts @@ -0,0 +1 @@ +export * from './TSPDRequest'; diff --git a/src/Requests/Task.ts b/src/Requests/Task.ts index f3be41b..741de75 100644 --- a/src/Requests/Task.ts +++ b/src/Requests/Task.ts @@ -9,9 +9,21 @@ import { ComplexImageHCaptchaRequest } from './ComplexImageHCaptchaRequest'; import { ComplexImageRecaptchaRequest } from './ComplexImageRecaptchaRequest'; import { ComplexImageFunCaptchaRequest } from './ComplexImageFunCaptchaRequest'; import { DataDomeRequest } from './DataDomeRequest'; +import { AltchaRequest } from './AltchaRequest'; +import { TenDIRequest } from './TenDIRequest'; import { BasiliskRequest } from './BasiliskRequest'; import { ImpervaRequest } from './ImpervaRequest'; import { BinanceRequest } from './BinanceRequest'; +import { ComplexImageTaskRecognitionRequest } from './ComplexImageTaskRecognitionRequest'; +import { AmazonRequest } from './AmazonRequest'; +import { TurnstileRequest } from './TurnstileRequest'; +import { ProsopoRequest } from './ProsopoRequest'; +import { TemuRequest } from './TemuRequest'; +import { YidunRequest } from './YidunRequest'; +import { MTCaptchaRequest } from './MTCaptchaRequest'; +import { CastleRequest } from './CastleRequest'; +import { HuntRequest } from './HuntRequest'; +import { TSPDRequest } from './TSPDRequest'; /** * Universal type for recognition request @@ -27,7 +39,19 @@ export type Task = | ComplexImageHCaptchaRequest | ComplexImageRecaptchaRequest | ComplexImageFunCaptchaRequest + | TurnstileRequest | DataDomeRequest + | AltchaRequest + | TenDIRequest | BasiliskRequest | ImpervaRequest - | BinanceRequest; + | BinanceRequest + | ComplexImageTaskRecognitionRequest + | AmazonRequest + | ProsopoRequest + | TemuRequest + | YidunRequest + | MTCaptchaRequest + | CastleRequest + | TSPDRequest + | HuntRequest; diff --git a/src/Requests/TemuRequest/TemuRequest.ts b/src/Requests/TemuRequest/TemuRequest.ts index 17bedcc..c2440a7 100644 --- a/src/Requests/TemuRequest/TemuRequest.ts +++ b/src/Requests/TemuRequest/TemuRequest.ts @@ -10,6 +10,8 @@ export type TemuRequestIn = Pick; + } + >; +}; diff --git a/src/index.ts b/src/index.ts index bf631ff..8619b8d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -27,6 +27,9 @@ import { ProsopoRequest, ProsopoRequestIn } from './Requests/ProsopoRequest'; import { TemuRequest, TemuRequestIn } from './Requests/TemuRequest'; import { YidunRequest, YidunRequestIn } from './Requests/YidunRequest'; import { MTCaptchaRequest, MTCaptchaRequestIn } from './Requests/MTCaptchaRequest'; +import { CastleRequest, CastleRequestIn } from './Requests/CastleRequest'; +import { TSPDRequest, TSPDRequestIn } from './Requests/TSPDRequest'; +import { HuntRequest, HuntRequestIn } from './Requests/HuntRequest'; import { AltchaRequest, AltchaRequestIn } from './Requests/AltchaRequest'; export default { @@ -54,6 +57,9 @@ export default { TemuRequest, YidunRequest, MTCaptchaRequest, + CastleRequest, + TSPDRequest, + HuntRequest, AltchaRequest, RecaptchaV3EnterpriseRequest, }; @@ -109,6 +115,12 @@ export { YidunRequestIn, MTCaptchaRequest, MTCaptchaRequestIn, + CastleRequest, + CastleRequestIn, + TSPDRequest, + TSPDRequestIn, + HuntRequest, + HuntRequestIn, AltchaRequest, AltchaRequestIn, RecaptchaV3EnterpriseRequest,