mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-26 07:07:45 -06:00
Add N8n integration with models, services, and routes
- Introduced N8n and N8nSetting models in both MySQL and PostgreSQL schemas. - Implemented N8nController and N8nService for managing N8n bots. - Created N8nRouter for handling API requests related to N8n. - Added DTOs and validation schemas for N8n integration. - Updated server module and chatbot controller to include N8n functionality. - Configured environment settings for N8n integration.
This commit is contained in:
34
src/api/integrations/chatbot/n8n/dto/n8n.dto.ts
Normal file
34
src/api/integrations/chatbot/n8n/dto/n8n.dto.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { TriggerType, TriggerOperator } from '@prisma/client';
|
||||
|
||||
export class N8nDto {
|
||||
enabled?: boolean;
|
||||
description?: string;
|
||||
webhookUrl?: string;
|
||||
basicAuthUser?: string;
|
||||
basicAuthPass?: string;
|
||||
|
||||
// Advanced bot properties (copied from DifyDto style)
|
||||
triggerType?: TriggerType;
|
||||
triggerOperator?: TriggerOperator;
|
||||
triggerValue?: string;
|
||||
expire?: number;
|
||||
keywordFinish?: string;
|
||||
delayMessage?: number;
|
||||
unknownMessage?: string;
|
||||
listeningFromMe?: boolean;
|
||||
stopBotFromMe?: boolean;
|
||||
keepOpen?: boolean;
|
||||
debounceTime?: number;
|
||||
ignoreJids?: string[];
|
||||
splitMessages?: boolean;
|
||||
timePerChar?: number;
|
||||
}
|
||||
|
||||
export class N8nSettingDto {
|
||||
// Add settings fields here if needed for compatibility
|
||||
}
|
||||
|
||||
export class N8nMessageDto {
|
||||
chatInput: string;
|
||||
sessionId: string;
|
||||
}
|
||||
Reference in New Issue
Block a user