//#region extensions/crypto/src/services/webhook-routes.d.ts /** * Webhook Routes — registry that maps URL paths to event triggers. * * Each route defines: * - A URL path (e.g. "/github", "/stripe", "/monitor") * - A source label for display * - An optional HMAC secret for signature verification * - An optional plan name to trigger when the webhook fires * - Enable/disable lifecycle * * Routes persist to ~/.openclawnch/webhooks/routes.json. */ interface WebhookRoute { /** Unique ID. */ id: string; /** Route name (alphanumeric + hyphens, unique). */ name: string; /** URL path this route matches (e.g. "/github"). */ path: string; /** Human-readable source label (e.g. "GitHub", "Stripe Payments"). */ source: string; /** HMAC secret for signature verification. Empty = no verification (not recommended). */ secret: string; /** Plan name to trigger when webhook fires. Empty = just emit event. */ triggerPlan: string; /** Whether this route is active. */ enabled: boolean; /** Who created this route. */ createdBy: string; /** Number of times this webhook has been received. */ hitCount: number; createdAt: number; updatedAt: number; } declare class WebhookRouteRegistry { private routes; private stateDir; constructor(opts?: { stateDir?: string; }); /** Create a new webhook route. */ create(params: { name: string; path: string; source: string; secret?: string; triggerPlan?: string; createdBy: string; }): WebhookRoute; update(id: string, updates: Partial>): WebhookRoute | null; delete(id: string): boolean; get(id: string): WebhookRoute | null; getByName(name: string): WebhookRoute | null; getByPath(path: string): WebhookRoute | null; list(opts?: { enabled?: boolean; }): WebhookRoute[]; recordHit(id: string): void; clear(): void; private loadState; private saveState; } declare class WebhookRouteError extends Error { constructor(message: string); } declare function getWebhookRoutes(opts?: { stateDir?: string; }): WebhookRouteRegistry; declare function resetWebhookRoutes(): void; //#endregion export { WebhookRoute, WebhookRouteError, WebhookRouteRegistry, getWebhookRoutes, resetWebhookRoutes }; //# sourceMappingURL=webhook-routes.d.mts.map