veryfront/webhook

Import

TypeScript
import {  discoverWebhooks,  isWebhookDefinition,  isWebhookId,  prepareWebhookInvocation,  webhook,} from "veryfront/webhook";

Examples

Run a workflow for urgent customer events

TypeScript
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

NameDescriptionSource
discoverWebhooksDiscover and validate source-defined webhooks across configured directories.source
isWebhookDefinitionReturn true only when every webhook field and nested invariant is valid.source
isWebhookIdReturn true for source webhook identifiers accepted by hosted reconciliation.source
prepareWebhookInvocationRevalidate and own a definition and payload before local webhook execution.source
webhookValidate and normalize a source-defined webhook configuration.source

Types

NameDescriptionSource
PreparedWebhookInvocationOwned, cloud-compatible inputs for one local webhook target run.source
WebhookAgentConversationModeHosted conversation behavior for an agent-target webhook.source
WebhookAgentMessageMappingPrompt and optional hosted conversation mapping for an agent target.source
WebhookConfigAuthor-facing webhook configuration accepted by webhook.source
WebhookDefinitionValidated source definition for one webhook trigger.source
WebhookDiscoveryOptionsInputs for deterministic source webhook discovery.source
WebhookDiscoveryResultValid webhooks and bounded per-file discovery diagnostics.source
WebhookEventFilterOptional gate evaluated before a webhook target starts.source
WebhookEventFilterConditionOne dot-path comparison against the webhook JSON payload.source
WebhookEventFilterModeWhether every filter condition or at least one condition must match.source
WebhookEventFilterOperatorComparisons supported by hosted and local webhook filtering.source