evolution-api/src/api/integrations/chatbot/n8n/dto/n8n.dto.ts
Guilherme Gomes 64fc7a05ac refactor: improve session handling and validation in N8n integration
This commit enhances the N8n integration by refining session management and validation logic. Key changes include:
- Added error handling for session creation failures in the BaseChatbotService.
- Removed unused methods and properties in N8nService and N8nDto to streamline the codebase.
- Updated N8n schema to enforce required fields and improve validation checks.
- Simplified message processing logic to utilize base class methods, enhancing maintainability.

These improvements contribute to a more robust and efficient N8n integration.
2025-05-27 15:10:47 -03:00

18 lines
396 B
TypeScript

import { BaseChatbotDto, BaseChatbotSettingDto } from '../../base-chatbot.dto';
export class N8nDto extends BaseChatbotDto {
// N8n specific fields
webhookUrl?: string;
basicAuthUser?: string;
basicAuthPass?: string;
}
export class N8nSettingDto extends BaseChatbotSettingDto {
// N8n has no specific fields
}
export class N8nMessageDto {
chatInput: string;
sessionId: string;
}