From b9ae40145de9235cf11694c13937e20600f8ee34 Mon Sep 17 00:00:00 2001 From: Josias Maceda Date: Tue, 9 Sep 2025 14:15:16 -0300 Subject: [PATCH] fix: the lint with npm run lint --- .../chatbot/base-chatbot.controller.ts | 12 +++---- .../typebot/services/typebot.service.ts | 35 +++++++++---------- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/src/api/integrations/chatbot/base-chatbot.controller.ts b/src/api/integrations/chatbot/base-chatbot.controller.ts index d6abfd8d..80a9a588 100644 --- a/src/api/integrations/chatbot/base-chatbot.controller.ts +++ b/src/api/integrations/chatbot/base-chatbot.controller.ts @@ -2,6 +2,7 @@ import { IgnoreJidDto } from '@api/dto/chatbot.dto'; import { InstanceDto } from '@api/dto/instance.dto'; import { PrismaRepository } from '@api/repository/repository.service'; import { WAMonitoringService } from '@api/services/monitor.service'; +import { Events } from '@api/types/wa.types'; import { Logger } from '@config/logger.config'; import { BadRequestException } from '@exceptions'; import { TriggerOperator, TriggerType } from '@prisma/client'; @@ -9,7 +10,6 @@ import { getConversationMessage } from '@utils/getConversationMessage'; import { BaseChatbotDto } from './base-chatbot.dto'; import { ChatbotController, ChatbotControllerInterface, EmitData } from './chatbot.controller'; -import { Events } from '@api/types/wa.types'; // Common settings interface for all chatbot integrations export interface ChatbotSettings { @@ -59,7 +59,7 @@ export abstract class BaseChatbotController { - private openaiService: OpenaiService; - + private openaiService: OpenaiService; + constructor( waMonitor: WAMonitoringService, configService: ConfigService, @@ -20,7 +20,7 @@ export class TypebotService extends BaseChatbotService { openaiService: OpenaiService, ) { super(waMonitor, prismaRepository, 'TypebotService', configService); - this.openaiService = openaiService; + this.openaiService = openaiService; } /** @@ -154,11 +154,11 @@ export class TypebotService extends BaseChatbotService { } const typebotData = { - remoteJid: data.remoteJid, - status: 'opened', - session, + remoteJid: data.remoteJid, + status: 'opened', + session, }; - this.waMonitor.waInstances[instance.name].sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); + this.waMonitor.waInstances[instance.name].sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); return { ...request.data, session }; } catch (error) { @@ -433,7 +433,6 @@ export class TypebotService extends BaseChatbotService { session, }; instance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); - } } @@ -677,13 +676,13 @@ export class TypebotService extends BaseChatbotService { }, }); } - + const typebotData = { remoteJid: remoteJid, status: statusChange, session, }; - waInstance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); + waInstance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); return; } @@ -836,13 +835,13 @@ export class TypebotService extends BaseChatbotService { }, }); } - + const typebotData = { - remoteJid: remoteJid, - status: statusChange, - session, - }; - waInstance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); + remoteJid: remoteJid, + status: statusChange, + session, + }; + waInstance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); return; } @@ -945,7 +944,7 @@ export class TypebotService extends BaseChatbotService { session, }; - waInstance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); + waInstance.sendDataWebhook(Events.TYPEBOT_CHANGE_STATUS, typebotData); return; }