1/** 2 * @factory/shared — the PUBLIC webhook subscription catalog. 3 * 4 * Lives in its own dependency-free module (and NOT in `events.ts`) because 5 * it is imported by `dto/webhook.dto.ts`, which is part of the 6 * `@factory/shared/dto` barrel — the browser-safe DTO surface that the web 7 * bundle imports. `events.ts` imports `node:crypto` (for `generateId`), so a 8 * dependency on it would pull `node:crypto` into the browser bundle and 9 * fail the Next.js build with `UnhandledSchemeError`. Keep this module free 10 * of Node builtins. 11 * 12 * `events.ts` re-exports both names, so existing import sites 13 * (`import { WEBHOOK_EVENTS } from "../events.js"`) keep working unchanged. 14 */ 15 16/** 17 * Events a webhook can subscribe to (PRODUCT-SPEC §22 catalog). A subset of 18 * the full domain catalog — webhook-safe, tenant-scoped content events only. 19 */ 20export const WEBHOOK_EVENTS = [ 21 "page.created", 22 "page.updated", 23 "page.deleted", 24 "database.created", 25 "database.updated", 26 "record.created", 27 "record.updated", 28 "comment.created", 29 "form.submitted", 30 "automation.executed", 31] as const; 32export type WebhookEventName = (typeof WEBHOOK_EVENTS)[number]; 33