Simplify events structure and fix minor issues

This commit is contained in:
Stênio Aníbal
2024-08-23 10:53:31 -03:00
parent beb7942d7c
commit 05ee65f422
28 changed files with 475 additions and 698 deletions

View 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[];
};
};
}