@capbypass/sdk 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -3
- package/dist/index.d.mts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +17 -7
- package/dist/index.mjs +17 -7
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
|
5
5
|
[](https://www.typescriptlang.org/)
|
|
6
6
|
|
|
7
|
-
Official TypeScript/JavaScript SDK for the CapBypass CAPTCHA solving service. Supports reCAPTCHA v2, reCAPTCHA v3, and AWS WAF challenges.
|
|
7
|
+
Official TypeScript/JavaScript SDK for the [CapBypass](https://capbypass.pro) CAPTCHA solving service. Supports reCAPTCHA v2, reCAPTCHA v3, and AWS WAF challenges.
|
|
8
8
|
|
|
9
9
|
Works in both Node.js and browser environments.
|
|
10
10
|
|
|
@@ -235,7 +235,7 @@ TaskType.RECAPTCHA_V3_ENTERPRISE_PROXYLESS // ReCaptchaV3EnterpriseTaskProxyLes
|
|
|
235
235
|
### 📚 Core Documentation
|
|
236
236
|
- [Quick Start Guide](https://github.com/CapBypass-Development/capbypass-sdks/blob/main/docs/quickstart/typescript.md)
|
|
237
237
|
- [Complete API Reference](https://github.com/CapBypass-Development/capbypass-sdks/blob/main/docs/api-reference/typescript-sdk.md)
|
|
238
|
-
- [Full SDK Documentation](https://capbypass.
|
|
238
|
+
- [Full SDK Documentation](https://capbypass.pro/docs/sdks/typescript)
|
|
239
239
|
|
|
240
240
|
### 🔧 Advanced Guides
|
|
241
241
|
- [Proxy Configuration](https://github.com/CapBypass-Development/capbypass-sdks/blob/main/docs/guides/proxy-configuration.md) — HTTP, HTTPS, SOCKS5 proxy support with rotation strategies
|
|
@@ -292,7 +292,10 @@ MIT License - see [LICENSE](LICENSE) file for details.
|
|
|
292
292
|
|
|
293
293
|
## Links
|
|
294
294
|
|
|
295
|
-
- [
|
|
295
|
+
- [Website](https://capbypass.pro)
|
|
296
|
+
- [Documentation](https://capbypass.pro/docs/sdks/typescript)
|
|
297
|
+
- [Dashboard / Sign up](https://capbypass.pro/signup)
|
|
298
|
+
- [Pricing](https://capbypass.pro/pricing)
|
|
296
299
|
- [npm Package](https://www.npmjs.com/package/@capbypass/sdk)
|
|
297
300
|
- [GitHub Repository](https://github.com/CapBypass-Development/capbypass-sdk-typescript)
|
|
298
301
|
- [Bug Reports](https://github.com/CapBypass-Development/capbypass-sdk-typescript/issues)
|
package/dist/index.d.mts
CHANGED
|
@@ -10,6 +10,10 @@ declare const TaskType: {
|
|
|
10
10
|
readonly RECAPTCHA_V3_PROXYLESS: "ReCaptchaV3TaskProxyLess";
|
|
11
11
|
readonly RECAPTCHA_V3_ENTERPRISE: "ReCaptchaV3EnterpriseTask";
|
|
12
12
|
readonly RECAPTCHA_V3_ENTERPRISE_PROXYLESS: "ReCaptchaV3EnterpriseTaskProxyLess";
|
|
13
|
+
readonly GEETEST: "GeetestTask";
|
|
14
|
+
readonly GEETEST_PROXYLESS: "GeetestTaskProxyLess";
|
|
15
|
+
readonly HCAPTCHA: "HCaptchaTask";
|
|
16
|
+
readonly HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless";
|
|
13
17
|
};
|
|
14
18
|
type TaskTypeValue = typeof TaskType[keyof typeof TaskType];
|
|
15
19
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,10 @@ declare const TaskType: {
|
|
|
10
10
|
readonly RECAPTCHA_V3_PROXYLESS: "ReCaptchaV3TaskProxyLess";
|
|
11
11
|
readonly RECAPTCHA_V3_ENTERPRISE: "ReCaptchaV3EnterpriseTask";
|
|
12
12
|
readonly RECAPTCHA_V3_ENTERPRISE_PROXYLESS: "ReCaptchaV3EnterpriseTaskProxyLess";
|
|
13
|
+
readonly GEETEST: "GeetestTask";
|
|
14
|
+
readonly GEETEST_PROXYLESS: "GeetestTaskProxyLess";
|
|
15
|
+
readonly HCAPTCHA: "HCaptchaTask";
|
|
16
|
+
readonly HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless";
|
|
13
17
|
};
|
|
14
18
|
type TaskTypeValue = typeof TaskType[keyof typeof TaskType];
|
|
15
19
|
/**
|
package/dist/index.js
CHANGED
|
@@ -139,20 +139,24 @@ var ParseError = class _ParseError extends Error {
|
|
|
139
139
|
function parseError(errorCode, errorDescription) {
|
|
140
140
|
switch (errorCode) {
|
|
141
141
|
case "ERROR_KEY_DOES_NOT_EXIST":
|
|
142
|
-
case "ERROR_KEY_DENIED_ACCESS":
|
|
143
142
|
throw new AuthenticationError(errorCode, errorDescription);
|
|
144
143
|
case "ERROR_ZERO_BALANCE":
|
|
145
|
-
case "ERROR_NO_SLOT_AVAILABLE":
|
|
146
144
|
throw new InsufficientBalanceError(errorCode, errorDescription);
|
|
147
145
|
case "ERROR_INVALID_TASK_DATA":
|
|
148
|
-
case "ERROR_TASK_ABSENT":
|
|
149
|
-
case "ERROR_TASK_NOT_SUPPORTED":
|
|
150
|
-
case "TASK_TYPE_COMING_SOON":
|
|
151
|
-
case "TASK_TYPE_INACTIVE":
|
|
152
146
|
case "ERROR_INVALID_DEVELOPER_KEY":
|
|
147
|
+
case "ERROR_PROXY_NOT_DEFINED":
|
|
148
|
+
case "ERROR_WRONG_TASK_TYPE":
|
|
149
|
+
case "ERROR_TASK_TYPE_COMING_SOON":
|
|
150
|
+
case "ERROR_TASK_TYPE_INACTIVE":
|
|
153
151
|
throw new ValidationError(errorCode, errorDescription);
|
|
154
152
|
case "ERROR_TASK_NOT_FOUND":
|
|
155
153
|
throw new TaskNotFoundError(errorCode, errorDescription);
|
|
154
|
+
case "ERROR_CAPTCHA_UNSOLVABLE":
|
|
155
|
+
throw new SolverError(errorDescription);
|
|
156
|
+
case "ERROR_TIMEOUT":
|
|
157
|
+
throw new TimeoutError();
|
|
158
|
+
// ERROR_TASK_QUEUE_FULL, ERROR_WORKER_CRASHED, ERROR_INTERNAL, and any
|
|
159
|
+
// unknown code -> retryable internal failure.
|
|
156
160
|
default:
|
|
157
161
|
throw new InternalError(errorCode, errorDescription);
|
|
158
162
|
}
|
|
@@ -381,7 +385,13 @@ var TaskType = {
|
|
|
381
385
|
RECAPTCHA_V3_PROXYLESS: "ReCaptchaV3TaskProxyLess",
|
|
382
386
|
// reCAPTCHA v3 Enterprise
|
|
383
387
|
RECAPTCHA_V3_ENTERPRISE: "ReCaptchaV3EnterpriseTask",
|
|
384
|
-
RECAPTCHA_V3_ENTERPRISE_PROXYLESS: "ReCaptchaV3EnterpriseTaskProxyLess"
|
|
388
|
+
RECAPTCHA_V3_ENTERPRISE_PROXYLESS: "ReCaptchaV3EnterpriseTaskProxyLess",
|
|
389
|
+
// GeeTest v3 + v4
|
|
390
|
+
GEETEST: "GeetestTask",
|
|
391
|
+
GEETEST_PROXYLESS: "GeetestTaskProxyLess",
|
|
392
|
+
// hCaptcha
|
|
393
|
+
HCAPTCHA: "HCaptchaTask",
|
|
394
|
+
HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless"
|
|
385
395
|
};
|
|
386
396
|
// Annotate the CommonJS export names for ESM import in node:
|
|
387
397
|
0 && (module.exports = {
|
package/dist/index.mjs
CHANGED
|
@@ -89,20 +89,24 @@ var ParseError = class _ParseError extends Error {
|
|
|
89
89
|
function parseError(errorCode, errorDescription) {
|
|
90
90
|
switch (errorCode) {
|
|
91
91
|
case "ERROR_KEY_DOES_NOT_EXIST":
|
|
92
|
-
case "ERROR_KEY_DENIED_ACCESS":
|
|
93
92
|
throw new AuthenticationError(errorCode, errorDescription);
|
|
94
93
|
case "ERROR_ZERO_BALANCE":
|
|
95
|
-
case "ERROR_NO_SLOT_AVAILABLE":
|
|
96
94
|
throw new InsufficientBalanceError(errorCode, errorDescription);
|
|
97
95
|
case "ERROR_INVALID_TASK_DATA":
|
|
98
|
-
case "ERROR_TASK_ABSENT":
|
|
99
|
-
case "ERROR_TASK_NOT_SUPPORTED":
|
|
100
|
-
case "TASK_TYPE_COMING_SOON":
|
|
101
|
-
case "TASK_TYPE_INACTIVE":
|
|
102
96
|
case "ERROR_INVALID_DEVELOPER_KEY":
|
|
97
|
+
case "ERROR_PROXY_NOT_DEFINED":
|
|
98
|
+
case "ERROR_WRONG_TASK_TYPE":
|
|
99
|
+
case "ERROR_TASK_TYPE_COMING_SOON":
|
|
100
|
+
case "ERROR_TASK_TYPE_INACTIVE":
|
|
103
101
|
throw new ValidationError(errorCode, errorDescription);
|
|
104
102
|
case "ERROR_TASK_NOT_FOUND":
|
|
105
103
|
throw new TaskNotFoundError(errorCode, errorDescription);
|
|
104
|
+
case "ERROR_CAPTCHA_UNSOLVABLE":
|
|
105
|
+
throw new SolverError(errorDescription);
|
|
106
|
+
case "ERROR_TIMEOUT":
|
|
107
|
+
throw new TimeoutError();
|
|
108
|
+
// ERROR_TASK_QUEUE_FULL, ERROR_WORKER_CRASHED, ERROR_INTERNAL, and any
|
|
109
|
+
// unknown code -> retryable internal failure.
|
|
106
110
|
default:
|
|
107
111
|
throw new InternalError(errorCode, errorDescription);
|
|
108
112
|
}
|
|
@@ -331,7 +335,13 @@ var TaskType = {
|
|
|
331
335
|
RECAPTCHA_V3_PROXYLESS: "ReCaptchaV3TaskProxyLess",
|
|
332
336
|
// reCAPTCHA v3 Enterprise
|
|
333
337
|
RECAPTCHA_V3_ENTERPRISE: "ReCaptchaV3EnterpriseTask",
|
|
334
|
-
RECAPTCHA_V3_ENTERPRISE_PROXYLESS: "ReCaptchaV3EnterpriseTaskProxyLess"
|
|
338
|
+
RECAPTCHA_V3_ENTERPRISE_PROXYLESS: "ReCaptchaV3EnterpriseTaskProxyLess",
|
|
339
|
+
// GeeTest v3 + v4
|
|
340
|
+
GEETEST: "GeetestTask",
|
|
341
|
+
GEETEST_PROXYLESS: "GeetestTaskProxyLess",
|
|
342
|
+
// hCaptcha
|
|
343
|
+
HCAPTCHA: "HCaptchaTask",
|
|
344
|
+
HCAPTCHA_PROXYLESS: "HCaptchaTaskProxyless"
|
|
335
345
|
};
|
|
336
346
|
export {
|
|
337
347
|
AuthenticationError,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capbypass/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Official TypeScript/JavaScript SDK for CapBypass CAPTCHA solving service",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
},
|
|
48
48
|
"homepage": "https://capbypass.dev/docs/sdks/typescript",
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"axios": "^1.
|
|
50
|
+
"axios": "^1.13.5"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@types/jest": "^29.5.12",
|