import { ErrorType } from './ErrorType'; import { FunCaptchaResponse } from './Responses/FunCaptchaResponse'; import { GeeTestResponse } from './Responses/GeeTestResponse'; import { HCaptchaResponse } from './Responses/HCaptchaResponse'; import { ImageToTextResponse } from './Responses/ImageToTextResponse'; import { RecaptchaV2EnterpriseResponse } from './Responses/RecaptchaV2EnterpriseResponse'; import { RecaptchaV2Response } from './Responses/RecaptchaV2Response'; import { RecaptchaV3Response } from './Responses/RecaptchaV3Response'; import { ComplexImageResponse } from './Responses/ComplexImageResponse'; export declare enum TaskResultType { Failed = "Failed", Completed = "Completed", InProgress = "InProgress" } export declare type TaskInProgress = { type: TaskResultType.InProgress; }; export declare type TaskFailed = { type: TaskResultType.Failed; error: ErrorType; }; export declare type TaskCompletedSolution = FunCaptchaResponse | GeeTestResponse | HCaptchaResponse | ImageToTextResponse | RecaptchaV2EnterpriseResponse | RecaptchaV2Response | RecaptchaV3Response | ComplexImageResponse; export declare type TaskCompleted = { type: TaskResultType.Completed; solution: S; }; export declare type TaskResult = TaskInProgress | TaskFailed | TaskCompleted; export declare enum TaskResultStatus { processing = "processing", ready = "ready" } export declare type GetTaskResultResponse = { errorId: number; errorCode: string; errorDescription: string | null; status: TaskResultStatus; solution: S | null; }; export declare class GetTaskResultError extends Error { errorType: ErrorType; constructor(errorType: ErrorType); }