import type { Dialect } from '@enbox/dwn-sql-store'; import type { AdminWebhook, AdminWebhookInput } from './types.js'; /** * Payload delivered to webhook endpoints. */ export type WebhookPayload = { /** Unique delivery ID. */ id: string; /** ISO-8601 timestamp. */ timestamp: string; /** Event type (e.g. `tenant.suspend`, `quota.warning`). */ event: string; /** Optional target (e.g. tenant DID). */ target?: string; /** Additional event data. */ data?: Record; }; /** * Manages webhook registrations and event delivery. * * Webhooks are stored in a SQL table and fire asynchronously when matching * events occur. Delivery includes retry logic and optional HMAC-SHA256 signatures. * * @see https://github.com/enboxorg/enbox/issues/395 */ export declare class WebhookManager { #private; private constructor(); /** * Creates and initializes a `WebhookManager` instance. */ static create(dialect: Dialect): Promise; /** * Registers a new webhook. Returns the created webhook (without secret echoed). */ register(input: AdminWebhookInput): Promise; /** * Lists all registered webhooks. Secrets are redacted. */ list(): Promise; /** * Deletes a webhook by ID. Returns `true` if found and deleted. */ delete(id: string): Promise; /** * Fires matching webhooks for a given event. Non-blocking — delivery happens * asynchronously and errors are logged but never propagated. */ fire(event: string, target?: string, data?: Record): void; /** * Closes the underlying database connection. */ close(): Promise; } //# sourceMappingURL=webhook-manager.d.ts.map