/** * Webhook Types * * Type definitions for the Webhooks API. */ /** Supported data types for webhook filter values */ export type FilterType = 'string' | 'number' | 'boolean'; /** Supported filter comparison operations */ export type FilterOperation = 'eq' | 'neq' | 'gt' | 'gte' | 'lt' | 'lte' | 'contains' | 'notContains' | 'in' | 'notIn' | 'startsWith' | 'endsWith' | 'regexp'; /** A registered webhook */ export interface Webhook { /** Unique webhook identifier (UUID) */ id: string; /** Associated sensor identifier, null if not scoped to a sensor */ sensor: string | null; /** Human-readable webhook name */ name: string; /** Optional webhook description */ description: string | null; /** Destination URL that receives event payloads */ targetUrl: string; /** Shared secret used to sign webhook payloads */ secret: string; /** Whether the webhook is currently active */ active: boolean; /** ISO 8601 creation timestamp */ created_at: string | null; /** ISO 8601 last update timestamp */ updated_at: string | null; /** ISO 8601 soft-delete timestamp, null if not deleted */ deleted_at: string | null; } /** A filter attached to a webhook that controls which events trigger delivery */ export interface WebhookFilter { /** Unique filter identifier (UUID) */ id: string; /** UUID of the parent webhook */ webhookId: string; /** Event field to filter on (e.g., 'type', 'action') */ filterKey: string; /** Value to compare against */ filterValue: string; /** Data type of the filter value */ filterType: FilterType; /** Comparison operator */ filterOperator: FilterOperation; /** Whether the filter is currently active */ active: boolean; /** ISO 8601 creation timestamp */ created_at: string | null; /** ISO 8601 last update timestamp */ updated_at: string | null; /** ISO 8601 soft-delete timestamp, null if not deleted */ deleted_at: string | null; } /** Response for GET /webhooks/ */ export interface WebhookListResponse { webhooks: Webhook[]; } /** Response for POST/GET/PUT /webhooks/:id and activate/deactivate */ export interface WebhookResponse { webhook: Webhook; } /** Response for DELETE /webhooks/:id */ export interface WebhookDeleteResponse { message: string; } /** Response for GET /webhook-filters/ and GET /webhook-filters/webhook/:webhookId */ export interface WebhookFilterListResponse { filters: WebhookFilter[]; } /** Response for POST/GET/PUT /webhook-filters/:id */ export interface WebhookFilterResponse { filter: WebhookFilter; } /** Response for DELETE /webhook-filters/:id */ export interface WebhookFilterDeleteResponse { message: string; } //# sourceMappingURL=webhooks.d.ts.map