mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-20 12:22:21 -06:00
refactor: integration folders
This commit is contained in:
@@ -2,7 +2,6 @@ import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { PrismaRepository } from '@api/repository/repository.service';
|
||||
import {
|
||||
difyController,
|
||||
eventManager,
|
||||
flowiseController,
|
||||
genericController,
|
||||
openaiController,
|
||||
@@ -90,32 +89,17 @@ export class ChatbotController {
|
||||
pushName,
|
||||
isIntegration,
|
||||
};
|
||||
// generic
|
||||
await genericController.emit(emitData);
|
||||
|
||||
// typebot
|
||||
await typebotController.emit(emitData);
|
||||
|
||||
// openai
|
||||
await openaiController.emit(emitData);
|
||||
|
||||
// dify
|
||||
await difyController.emit(emitData);
|
||||
|
||||
// flowise
|
||||
await flowiseController.emit(emitData);
|
||||
}
|
||||
|
||||
public async setInstance(instanceName: string, data: InstanceDto): Promise<any> {
|
||||
if (data.websocket.enabled)
|
||||
await eventManager.websocket.set(instanceName, {
|
||||
websocket: {
|
||||
enabled: true,
|
||||
events: data.websocket.events,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
public processDebounce(
|
||||
userMessageDebounce: any,
|
||||
content: string,
|
||||
|
||||
@@ -8,11 +8,11 @@ import { Events } from '@api/types/wa.types';
|
||||
import { Auth, configService, HttpServer, Typebot } from '@config/env.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { BadRequestException } from '@exceptions';
|
||||
import { Typebot as TypebotModel } from '@prisma/client';
|
||||
import { getConversationMessage } from '@utils/getConversationMessage';
|
||||
import axios from 'axios';
|
||||
|
||||
import { ChatbotController, ChatbotControllerInterface } from '../../chatbot.controller';
|
||||
import { Typebot as TypebotModel } from '@prisma/client';
|
||||
|
||||
export class TypebotController extends ChatbotController implements ChatbotControllerInterface {
|
||||
constructor(
|
||||
|
||||
Reference in New Issue
Block a user