import { PredictionState } from "./helpers/convertPrediction"; import { ReplicateRequestOptions } from "./helpers/makeApiRequest"; export type PollPredictionOptions = { /** The id of a prediction */ id: string; /** Timeout in milliseconds * @default 3600000 */ timeout?: number; } & ReplicateRequestOptions; /** Poll a prediction by ID. * * ```typescript * const result = await pollPrediction({ * id: "ID of your prediction", * token: "Get your token at https://replicate.com/account" * }) * ``` * If you have a `PredictionState`, you don't have to use this function, just call `.poll()` on that object. * * If the timeout occurs an error is thrown. * * @returns A new `PredictionState`. It has a status of either "succeeded", "failed" or "canceled". */ export declare const pollPrediction: (options: PollPredictionOptions, initialResult?: PredictionState) => Promise;