import { type MutationOperation, type SanityDocument } from "@sanity/client";
type SanityWebhookHandler<T extends SanityDocument = SanityDocument> = {
    documentType: string;
    operations?: MutationOperation | Array<MutationOperation>;
} & ({
    handler: (doc: T, operation?: MutationOperation) => Promise<void>;
    revalidatePath?: string | Array<string>;
    revalidateTag?: string | Array<string>;
} | {
    handler?: (doc: T, operation?: MutationOperation) => Promise<void>;
    revalidatePath: string | Array<string>;
    revalidateTag?: string | Array<string>;
} | {
    handler?: (doc: T, operation?: MutationOperation) => Promise<void>;
    revalidatePath?: string | Array<string>;
    revalidateTag: string | Array<string>;
});
export declare function createSanityWebhook<T extends SanityDocument>({ handlers, secret, }: {
    handlers: Array<SanityWebhookHandler<T>>;
    secret: string;
}): {
    POST: (req: Request) => Promise<Response>;
};
export {};
//# sourceMappingURL=create-sanity-webhook.d.ts.map