Import
import {
discoverWebhooks,
isWebhookDefinition,
isWebhookId,
prepareWebhookInvocation,
webhook,
} from "veryfront/webhook";
Examples
Run a workflow for urgent customer events
import { webhook } from "veryfront/webhook";
export default webhook({
id: "customer-escalation",
target: { kind: "workflow", id: "escalate-ticket" },
eventFilter: {
mode: "any",
conditions: [
{ path: "severity", operator: "equals", value: "high" },
{ path: "priority", operator: "equals", value: "urgent" },
],
},
});
Exports
Functions
| Name | Description | Source |
|---|---|---|
discoverWebhooks | Discover and validate source-defined webhooks across configured directories. | source |
isWebhookDefinition | Return true only when every webhook field and nested invariant is valid. | source |
isWebhookId | Return true for source webhook identifiers accepted by hosted reconciliation. | source |
prepareWebhookInvocation | Revalidate and own a definition and payload before local webhook execution. | source |
webhook | Validate and normalize a source-defined webhook configuration. | source |
Types
| Name | Description | Source |
|---|---|---|
PreparedWebhookInvocation | Owned, cloud-compatible inputs for one local webhook target run. | source |
WebhookAgentConversationMode | Hosted conversation behavior for an agent-target webhook. | source |
WebhookAgentMessageMapping | Prompt and optional hosted conversation mapping for an agent target. | source |
WebhookConfig | Author-facing webhook configuration accepted by webhook. | source |
WebhookDefinition | Validated source definition for one webhook trigger. | source |
WebhookDiscoveryOptions | Inputs for deterministic source webhook discovery. | source |
WebhookDiscoveryResult | Valid webhooks and bounded per-file discovery diagnostics. | source |
WebhookEventFilter | Optional gate evaluated before a webhook target starts. | source |
WebhookEventFilterCondition | One dot-path comparison against the webhook JSON payload. | source |
WebhookEventFilterMode | Whether every filter condition or at least one condition must match. | source |
WebhookEventFilterOperator | Comparisons supported by hosted and local webhook filtering. | source |