import { ApiResponse } from "./apiResponse.js"; import { StringDict } from "../../../parsing/stringDict.js"; import { Inference } from "./inference.js"; import { Document } from "./document.js"; /** Wrapper for asynchronous request queues. Holds information regarding a job (queue). * * @category API Response * @category Asynchronous */ export declare class Job { /** * Timestamp noting the enqueueing of a document. */ issuedAt: Date; /** * Timestamp noting the availability of a prediction for an enqueued document. */ availableAt?: Date; /** * Information about an error that occurred during the job processing. */ error?: StringDict; /** * ID of the job. */ id: string; /** * Status of the job. */ status?: "waiting" | "processing" | "completed" | "failed"; /** * The time taken to process the job, in milliseconds. */ milliSecsTaken?: number; constructor(jsonResponse: StringDict); } /** * Parse a date string into UTC. * @param date Date string. */ export declare function datetimeWithTimezone(date: string): Date; /** Wrapper for asynchronous jobs and parsing results. * * @category API Response * @category Asynchronous */ export declare class AsyncPredictResponse extends ApiResponse { /** * Job for a queue. */ job: Job; /** Prediction for an asynchronous request. Will not be available so long as the job is not * `completed`. */ document?: Document; /** * * @param inferenceClass constructor signature for an inference. * @param serverResponse raw http response. */ constructor(inferenceClass: new (httpResponse: StringDict) => T, serverResponse: StringDict); }