export type CreateApiApiWebhooksIdRestoreArgs = {id: string}; export type CreateApiApiWebhooksIdRestoreOptions = {baseUrl?: string | undefined, fetch?: typeof fetch | undefined}; /** * Restore a soft-deleted webhook * * POST /api/webhooks/{id}/restore */ export const createApiApiWebhooksIdRestore = async (args: CreateApiApiWebhooksIdRestoreArgs, options?: CreateApiApiWebhooksIdRestoreOptions) => { const {baseUrl = "https://api.vambe.me", fetch: fetchFn = fetch} = options ?? {} const query = new URLSearchParams() const headers = new Headers() const url = `${baseUrl.replace(/\/+$/, '')}/api/webhooks/${encodeURIComponent(String(args.id))}/restore${query.size > 0 ? `?${query}` : ''}` const res = await fetchFn(url, {method: "POST", headers}) if (!res.ok) throw new Error(`Request failed with status ${res.status}`, {cause: {status: res.status, body: await res.text()}}) return undefined };