import { SanityDocument } from "@sanity/types";
import { NextRequest } from "next/server";

//#region src/webhook/index.d.ts
/** @public */
type ParsedBody<T> = {
  /**
  * If a secret is given then it returns a boolean. If no secret is provided then no validation is done on the signature, and it'll return `null`
  */
  isValidSignature: boolean | null;
  body: T | null;
};
/**
* Handles parsing the body JSON, and validating its signature. Also waits for Content Lake eventual consistency so you can run your queries
* without worrying about getting stale data.
* @public
*/
declare function parseBody<Body = SanityDocument>(req: NextRequest, secret?: string, waitForContentLakeEventualConsistency?: boolean): Promise<ParsedBody<Body>>;
//#endregion
export { ParsedBody, parseBody };
//# sourceMappingURL=index.d.ts.map