From 13d2a823cbb5a83d714a0a89404253c95e7aec3e Mon Sep 17 00:00:00 2001 From: Kirill Bushmin Date: Tue, 24 Mar 2026 16:27:13 +0300 Subject: [PATCH 1/2] Release 0.0.7 --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 331321a..3c09028 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "n8n-nodes-capmonstercloud", - "version": "0.0.6", + "version": "0.0.7", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "n8n-nodes-capmonstercloud", - "version": "0.0.6", + "version": "0.0.7", "license": "MIT", "devDependencies": { "@n8n/node-cli": "*", diff --git a/package.json b/package.json index 2cd9f39..a493d32 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@zennolab_com/n8n-nodes-capmonstercloud", - "version": "0.0.6", + "version": "0.0.7", "publishConfig": { "access": "public" }, From f4668c99bde1c6b9a81d5dc281631745f7454d52 Mon Sep 17 00:00:00 2001 From: Kirill Bushmin Date: Mon, 20 Apr 2026 13:15:27 +0300 Subject: [PATCH 2/2] CCL-7649 fixed after n8n review --- .../CapmonsterCloud/CapmonsterCloud.node.json | 1 - nodes/CapmonsterCloud/CapmonsterCloud.node.ts | 18 ++++--- nodes/CapmonsterCloud/captchas/geeTestV4.ts | 6 +-- nodes/CapmonsterCloud/fields.ts | 48 +++++++++---------- nodes/CapmonsterCloud/transport/request.ts | 6 +-- 5 files changed, 36 insertions(+), 43 deletions(-) diff --git a/nodes/CapmonsterCloud/CapmonsterCloud.node.json b/nodes/CapmonsterCloud/CapmonsterCloud.node.json index c0c6fcb..e1e2b16 100644 --- a/nodes/CapmonsterCloud/CapmonsterCloud.node.json +++ b/nodes/CapmonsterCloud/CapmonsterCloud.node.json @@ -3,7 +3,6 @@ "nodeVersion": "1.0", "codexVersion": "1.0", "categories": ["Development", "Automation"], - "details": "Solve various CAPTCHA types using CapMonster Cloud.\n\nSupported CAPTCHA types:\n\n• reCAPTCHA V2 / V2 Enterprise\n• reCAPTCHA V3 / V3 Enterprise\n• Cloudflare Turnstile\n• GeeTest (V3 / V4)\n• FunCaptcha (Arkose Labs)\n• DataDome\n• Imperva\n• Amazon WAF\n• Binance\n• Basilisk\n• TenDI\n• Altcha\n• Yidun\n• Prosopo\n• MTCaptcha\n• Castle\n• TSPD\n• Hunt\n\nYou can also provide custom JSON tasks for advanced use cases.", "resources": { "primaryDocumentation": [ { diff --git a/nodes/CapmonsterCloud/CapmonsterCloud.node.ts b/nodes/CapmonsterCloud/CapmonsterCloud.node.ts index 7cb5b32..cd1f25d 100644 --- a/nodes/CapmonsterCloud/CapmonsterCloud.node.ts +++ b/nodes/CapmonsterCloud/CapmonsterCloud.node.ts @@ -5,11 +5,13 @@ import { INodeTypeDescription, NodeOperationError, IDataObject, + NodeApiError, + JsonObject, + NodeConnectionTypes, } from 'n8n-workflow'; import { request, waitForResult } from './transport/request'; import { TaskType } from './types'; -import { softId } from './const'; import { taskBuilders } from './taskBuilder'; import { allFields } from './fields'; @@ -31,9 +33,10 @@ export class CapmonsterCloud implements INodeType { group: ['transform'], version: 1, description: 'Node for solving CAPTCHAs via CapMonsterCloud service.', + subtitle: '={{$parameter["operation"]}}', defaults: { name: 'CapMonster Cloud' }, - inputs: ['main'], - outputs: ['main'], + inputs: [NodeConnectionTypes.Main], + outputs: [NodeConnectionTypes.Main], credentials: [ { name: 'capmonsterCloudApi', @@ -50,9 +53,6 @@ export class CapmonsterCloud implements INodeType { for (let i = 0; i < items.length; i++) { try { - const credentials = await this.getCredentials('capmonsterCloudApi'); - const apiKey = credentials.apiKey as string; - const operation = this.getNodeParameter('operation', i) as TaskType; let task: IDataObject; @@ -90,9 +90,7 @@ export class CapmonsterCloud implements INodeType { ); const createTask = (await request(this, 'https://api.capmonster.cloud/createTask', { - clientKey: apiKey, task, - softId, })) as CreateTaskResponse; if (createTask.errorId !== 0) { @@ -103,7 +101,7 @@ export class CapmonsterCloud implements INodeType { ); } - const solution = await waitForResult(this, apiKey, createTask.taskId); + const solution = await waitForResult(this, createTask.taskId); returnData.push({ json: solution, @@ -118,7 +116,7 @@ export class CapmonsterCloud implements INodeType { continue; } - throw new NodeOperationError(this.getNode(), error as Error, { + throw new NodeApiError(this.getNode(), error as JsonObject, { itemIndex: i, }); } diff --git a/nodes/CapmonsterCloud/captchas/geeTestV4.ts b/nodes/CapmonsterCloud/captchas/geeTestV4.ts index 7adccdf..498ac46 100644 --- a/nodes/CapmonsterCloud/captchas/geeTestV4.ts +++ b/nodes/CapmonsterCloud/captchas/geeTestV4.ts @@ -10,7 +10,7 @@ export const geeTestV4Fields: INodeProperties[] = [ required: true, displayOptions: { show: { operation: ['geeTestV4'] } }, default: '', - description: 'Whether Address of the page on which the captcha is solved', + description: 'Address of the page on which the captcha is solved', }, { displayName: 'GT', @@ -19,7 +19,7 @@ export const geeTestV4Fields: INodeProperties[] = [ required: true, displayOptions: { show: { operation: ['geeTestV4'] } }, default: '', - description: 'Whether The GeeTest identifier key for the domain - the captcha_id parameter', + description: 'GeeTest identifier key for the domain (captcha_id parameter)', }, { displayName: 'Geetest API Subdomain', @@ -54,7 +54,7 @@ export const geeTestV4Fields: INodeProperties[] = [ type: 'string', displayOptions: { show: { operation: ['geeTestV4'] } }, default: defaultUserAgent, - description: 'Whether Browser User-Agent used to recognize captcha', + description: 'Browser User-Agent used to recognize captcha', }, ]; diff --git a/nodes/CapmonsterCloud/fields.ts b/nodes/CapmonsterCloud/fields.ts index db3d315..d661858 100644 --- a/nodes/CapmonsterCloud/fields.ts +++ b/nodes/CapmonsterCloud/fields.ts @@ -2,7 +2,7 @@ import { recaptchaV2Fields } from './captchas/recaptchaV2'; import { jsonTaskFields } from './captchas/json'; import { recaptchaV3 } from './captchas/recaptchaV3'; import { imageToText } from './captchas/imageToText'; -import { INodeProperties } from 'n8n-workflow/dist/esm/interfaces'; +import { INodeProperties } from 'n8n-workflow'; import { proxyFields } from './proxy'; import { recaptchaV3Enterprise } from './captchas/recaptchaV3Enterprise'; import { recaptchaV2Enterprise } from './captchas/recaptchaV2Enterprise'; @@ -35,37 +35,37 @@ import { TaskType } from './types'; const options: Array<{ name: string; value: TaskType }> = [ - { name: 'JSON (Custom Task)', value: 'json' }, - { name: 'Recaptcha V2 Enterprise', value: 'recaptchaV2Enterprise' }, - { name: 'Recaptcha V3 Enterprise', value: 'recaptchaV3Enterprise' }, - { name: 'Recaptcha V2', value: 'recaptchaV2' }, - { name: 'Recaptcha V3', value: 'recaptchaV3' }, - { name: 'Image To Text', value: 'imageToText' }, - { name: 'Recaptcha (Click)', value: 'recaptchaClick' }, - { name: 'Gee Test V3', value: 'geeTestV3' }, - { name: 'Gee Test V4', value: 'geeTestV4' }, - { name: 'Cloudflare Turnstile', value: 'turnstile' }, - { name: 'Cloudflare Challenge (Token)', value: 'turnstileChallengeToken' }, + { name: 'Altcha', value: 'altcha' }, + { name: 'Amazon Full Challenge', value: 'amazonFullChallenge' }, + { name: 'Amazon Invisible Challenge', value: 'amazonInvisibleChallenge' }, + { name: 'Amazon JS API', value: 'amazonJsApi' }, + { name: 'Basilisk', value: 'basilisk' }, + { name: 'Binance', value: 'binance' }, + { name: 'Castle', value: 'castle' }, { name: 'Cloudflare Challenge (CfClearance)', value: 'turnstileChallengeCfClearance' }, + { name: 'Cloudflare Challenge (Token)', value: 'turnstileChallengeToken' }, + { name: 'Cloudflare Turnstile', value: 'turnstile' }, { name: 'Cloudflare Waiting Room', value: 'turnstileWaitRoom' }, { name: 'Complex Image Recognition', value: 'complexImageRecognition' }, { name: 'DataDome', value: 'datadome' }, - { name: 'Basilisk', value: 'basilisk' }, - { name: 'Tendi', value: 'tendi' }, - { name: 'Binance', value: 'binance' }, + { name: 'FunCaptcha', value: 'funcaptcha' }, + { name: 'Gee Test V3', value: 'geeTestV3' }, + { name: 'Gee Test V4', value: 'geeTestV4' }, + { name: 'Hunt', value: 'hunt' }, + { name: 'Image To Text', value: 'imageToText' }, { name: 'Imperva', value: 'imperva' }, - { name: 'Amazon JS API', value: 'amazonJsApi' }, - { name: 'Amazon Invisible Challenge', value: 'amazonInvisibleChallenge' }, - { name: 'Amazon Full Challenge', value: 'amazonFullChallenge' }, + { name: 'JSON (Custom Task)', value: 'json' }, + { name: 'Mtcaptcha', value: 'mtcaptcha' }, { name: 'Prosopo', value: 'prosopo' }, + { name: 'Recaptcha (Click)', value: 'recaptchaClick' }, + { name: 'Recaptcha V2', value: 'recaptchaV2' }, + { name: 'Recaptcha V2 Enterprise', value: 'recaptchaV2Enterprise' }, + { name: 'Recaptcha V3', value: 'recaptchaV3' }, + { name: 'Recaptcha V3 Enterprise', value: 'recaptchaV3Enterprise' }, { name: 'Temu', value: 'temu' }, - { name: 'Yidun', value: 'yidun' }, - { name: 'Mtcaptcha', value: 'mtcaptcha' }, - { name: 'Altcha', value: 'altcha' }, - { name: 'FunCaptcha', value: 'funcaptcha' }, - { name: 'Castle', value: 'castle' }, + { name: 'Tendi', value: 'tendi' }, { name: 'Tspd', value: 'tspd' }, - { name: 'Hunt', value: 'hunt' }, + { name: 'Yidun', value: 'yidun' }, ]; export const allFields: INodeProperties[] = [ diff --git a/nodes/CapmonsterCloud/transport/request.ts b/nodes/CapmonsterCloud/transport/request.ts index 46ab10f..ba721e0 100644 --- a/nodes/CapmonsterCloud/transport/request.ts +++ b/nodes/CapmonsterCloud/transport/request.ts @@ -1,12 +1,11 @@ import { IExecuteFunctions, IDataObject, NodeOperationError, sleep } from 'n8n-workflow'; -import { softId } from '../const'; export const request = async ( context: IExecuteFunctions, url: string, body: Record, ) => { - return context.helpers.httpRequest({ + return context.helpers.httpRequestWithAuthentication.call(context, 'capmonsterCloudApi', { method: 'POST', url, body, @@ -16,16 +15,13 @@ export const request = async ( export const waitForResult = async ( context: IExecuteFunctions, - apiKey: string, taskId: number, maxAttempts = 180, delay = 1000, ): Promise => { for (let attempt = 1; attempt <= maxAttempts; attempt++) { const result = await request(context, 'https://api.capmonster.cloud/getTaskResult', { - clientKey: apiKey, taskId, - softId, }); if (result.errorId !== 0) {