ObjectStackObjectStack

Events Integrations

Events Integrations protocol schemas

Event Webhook Configuration Schema

Configuration for sending events to webhooks

@example

{

"eventPattern": "order.*",

"url": "https://api.example.com/webhooks/orders",

"method": "POST",

"headers": { "Authorization": "Bearer token" }

}

Source: packages/spec/src/kernel/events/integrations.zod.ts

TypeScript Usage

import { EventMessageQueueConfigSchema, EventWebhookConfigSchema, RealTimeNotificationConfigSchema } from '@objectstack/spec/kernel';
import type { EventMessageQueueConfig, EventWebhookConfig, RealTimeNotificationConfig } from '@objectstack/spec/kernel';

// Validate data
const result = EventMessageQueueConfigSchema.parse(data);

EventMessageQueueConfig

Properties

PropertyTypeRequiredDescription
providerEnum<'kafka' | 'rabbitmq' | 'aws-sqs' | 'redis-pubsub' | 'google-pubsub' | 'azure-service-bus'>Message queue provider
topicstringTopic or queue name
eventPatternstringEvent name pattern to publish (supports wildcards)
partitionKeystringoptionalJSON path for partition key (e.g., "metadata.tenantId")
formatEnum<'json' | 'avro' | 'protobuf'>Message serialization format
includeMetadatabooleanInclude event metadata in message
compressionEnum<'none' | 'gzip' | 'snappy' | 'lz4'>Message compression
batchSizeintegerBatch size for publishing
flushIntervalMsintegerFlush interval for batching

EventWebhookConfig

Properties

PropertyTypeRequiredDescription
idstringoptionalUnique webhook identifier
eventPatternstringEvent name pattern (supports wildcards)
urlstringWebhook endpoint URL
methodEnum<'GET' | 'POST' | 'PUT' | 'PATCH'>HTTP method
headersRecord<string, string>optionalHTTP headers
authentication{ type: Enum<'none' | 'bearer' | 'basic' | 'api-key'>; credentials?: Record<string, string> }optionalAuthentication configuration
retryPolicy{ maxRetries: integer; backoffStrategy: Enum<'fixed' | 'linear' | 'exponential'>; initialDelayMs: integer; maxDelayMs: integer }optionalRetry policy
timeoutMsintegerRequest timeout in milliseconds
transformanyoptionalTransform event before sending
enabledbooleanWhether webhook is enabled

RealTimeNotificationConfig

Properties

PropertyTypeRequiredDescription
enabledbooleanEnable real-time notifications
protocolEnum<'websocket' | 'sse' | 'long-polling'>Real-time protocol
eventPatternstringEvent pattern to broadcast
userFilterbooleanFilter events by user
tenantFilterbooleanFilter events by tenant
channels{ name: string; eventPattern: string; filter?: any }[]optionalNamed channels for event broadcasting
rateLimit{ maxEventsPerSecond: integer; windowMs: integer }optionalRate limiting configuration

On this page