Comparing version 1.0.0 to 1.0.1
export { default as Solver } from "./structs/Solver.js"; | ||
//# sourceMappingURL=index.d.ts.map |
// Re-exports for ES5 ES6 interpolation. | ||
export { default as Solver } from "./structs/Solver.js"; |
@@ -0,0 +0,0 @@ import { ErrorResponse, GenericObject } from "../types.js"; |
@@ -0,0 +0,0 @@ export class APIError extends Error { |
@@ -9,2 +9,3 @@ /// <reference types="node" /> | ||
private _pollInterval; | ||
private _defaultPayload; | ||
constructor(token: string, pollInterval?: number); | ||
@@ -11,0 +12,0 @@ private createTask; |
@@ -10,2 +10,3 @@ import { TaskType } from "../types.js"; | ||
_pollInterval; | ||
_defaultPayload = { AppID: "5C6C5249-DEB0-471C-B8A8-EAA50F5206E0" }; | ||
constructor(token, pollInterval = 1000) { | ||
@@ -18,5 +19,6 @@ this.token = token; | ||
clientKey: this.token, | ||
...this._defaultPayload, | ||
task: { | ||
type: taskType, | ||
...taskParams | ||
...taskParams, | ||
} | ||
@@ -69,4 +71,3 @@ }; | ||
case "processing": | ||
default: | ||
// Pass | ||
default: // Pass | ||
} | ||
@@ -73,0 +74,0 @@ } |
import { APIError } from "./structs/CapSolverError.js"; | ||
export declare type SolveResult = { | ||
export type SolveResult = { | ||
id: string; | ||
value: string; | ||
}; | ||
export declare type GenericObject = { | ||
export type GenericObject = { | ||
[key: string]: any; | ||
@@ -35,3 +35,3 @@ }; | ||
} | ||
export declare type Status = "idle" | "processing" | "ready" | "failed"; | ||
export type Status = "idle" | "processing" | "ready" | "failed"; | ||
export interface SuccessResponse { | ||
@@ -42,3 +42,3 @@ errorId: 0; | ||
} | ||
export declare type Response = ErrorResponse | SuccessResponse | ReadyResponse; | ||
export type Response = ErrorResponse | SuccessResponse | ReadyResponse; | ||
export interface CaptchaResult { | ||
@@ -45,0 +45,0 @@ data: string; |
@@ -0,0 +0,0 @@ export var TaskType; |
@@ -0,0 +0,0 @@ import nodeFetch from "node-fetch"; |
import nodeFetch from "node-fetch"; | ||
export default typeof window === "undefined" ? nodeFetch : window.fetch.bind(window); |
{ | ||
"name": "capsolver", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"main": "dist/index.js", | ||
@@ -13,3 +13,3 @@ "repository": "https://github.com/furry/capsolver", | ||
"mocha": "mocha", | ||
"test": "yarn tsc && yarn mocha ./test/**/*.test.js --parallel --timeout 900000", | ||
"test": "yarn tsc && yarn mocha ./test/**/*.test.js --parallel --timeout 60000", | ||
"go": "tsc && node ./dist/index.js" | ||
@@ -16,0 +16,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
26181
17
479