mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 03:42:23 -06:00
- Introduced Kafka support in the Evolution API, allowing for real-time event streaming and processing. - Updated environment configuration to include Kafka-related variables. - Added KafkaController and KafkaRouter for managing Kafka events. - Enhanced event management to support Kafka alongside existing integrations. - Updated database schemas and migrations for Kafka integration in both MySQL and PostgreSQL. - Documented Kafka integration in the README file.
47 lines
953 B
TypeScript
47 lines
953 B
TypeScript
import { JSONSchema7 } from 'json-schema';
|
|
import { v4 } from 'uuid';
|
|
|
|
import { EventController } from './event.controller';
|
|
|
|
export * from '@api/integrations/event/pusher/pusher.schema';
|
|
export * from '@api/integrations/event/webhook/webhook.schema';
|
|
|
|
export const eventSchema: JSONSchema7 = {
|
|
$id: v4(),
|
|
type: 'object',
|
|
properties: {
|
|
websocket: {
|
|
$ref: '#/$defs/event',
|
|
},
|
|
rabbitmq: {
|
|
$ref: '#/$defs/event',
|
|
},
|
|
nats: {
|
|
$ref: '#/$defs/event',
|
|
},
|
|
sqs: {
|
|
$ref: '#/$defs/event',
|
|
},
|
|
kafka: {
|
|
$ref: '#/$defs/event',
|
|
},
|
|
},
|
|
$defs: {
|
|
event: {
|
|
type: 'object',
|
|
properties: {
|
|
enabled: { type: 'boolean', enum: [true, false] },
|
|
events: {
|
|
type: 'array',
|
|
minItems: 0,
|
|
items: {
|
|
type: 'string',
|
|
enum: EventController.events,
|
|
},
|
|
},
|
|
},
|
|
required: ['enabled'],
|
|
},
|
|
},
|
|
};
|