replicate-api
Version:
A typed client library for the replicate.com API
11 lines (10 loc) • 602 B
TypeScript
import { ReplicateRequestOptions } from "./helpers/makeApiRequest";
export type ProcessWebhookOptions = {
/** The webhook body as an object */
body: unknown;
} & ReplicateRequestOptions;
/** Convert the body of a replicate callback to a `PredictionState`.
*
* When creating a prediction you can set a URL that will be called by replicate once the prediction is completed. This function can take the body of that request and converts it to a `PredictionState`.
*/
export declare const processWebhook: (options: ProcessWebhookOptions) => import("./helpers/convertPrediction").PredictionState;