mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 11:52:20 -06:00
Simplify events structure and fix minor issues
This commit is contained in:
53
src/api/integrations/event/event.dto.ts
Normal file
53
src/api/integrations/event/event.dto.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
import { Constructor } from '@api/integrations/integration.dto';
|
||||
|
||||
export class EventDto {
|
||||
webhook?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
url?: string;
|
||||
byEvents?: boolean;
|
||||
base64?: boolean;
|
||||
};
|
||||
|
||||
websocket?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
};
|
||||
|
||||
sqs?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
};
|
||||
|
||||
rabbitmq?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
};
|
||||
}
|
||||
|
||||
export function EventInstanceMixin<TBase extends Constructor>(Base: TBase) {
|
||||
return class extends Base {
|
||||
webhook?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
url?: string;
|
||||
byEvents?: boolean;
|
||||
base64?: boolean;
|
||||
};
|
||||
|
||||
websocket?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
};
|
||||
|
||||
sqs?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
};
|
||||
|
||||
rabbitmq?: {
|
||||
enabled: boolean;
|
||||
events?: string[];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user