Enable webhooks from dashboard page

This commit is contained in:
Shannon Sands
2026-06-10 22:55:06 -07:00
committed by Teknium
parent 13f1efdd15
commit fa7f24e898
4 changed files with 291 additions and 17 deletions
+13
View File
@@ -866,6 +866,8 @@ export const api = {
// ── Admin: Webhooks ─────────────────────────────────────────────────
getWebhooks: () => fetchJSON<WebhooksResponse>("/api/webhooks"),
enableWebhooks: () =>
fetchJSON<WebhookEnableResponse>("/api/webhooks/enable", { method: "POST" }),
createWebhook: (body: WebhookCreate) =>
fetchJSON<WebhookRoute & { secret: string }>("/api/webhooks", {
method: "POST",
@@ -1288,6 +1290,17 @@ export interface WebhooksResponse {
subscriptions: WebhookRoute[];
}
export interface WebhookEnableResponse {
ok: boolean;
platform: "webhook";
enabled: true;
needs_restart: boolean;
restart_started?: boolean;
restart_action?: string;
restart_pid?: number | null;
restart_error?: string;
}
export interface WebhookCreate {
name: string;
description?: string;