mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-19 20:02:20 -06:00
Path mapping & deps fix & bundler changed to tsup
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
import { Contact, Message, MessageUpdate } from '@prisma/client';
|
||||
|
||||
import {
|
||||
ArchiveChatDto,
|
||||
BlockUserDto,
|
||||
@@ -15,10 +13,11 @@ import {
|
||||
SendPresenceDto,
|
||||
UpdateMessageDto,
|
||||
WhatsAppNumberDto,
|
||||
} from '../dto/chat.dto';
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { Query } from '../repository/repository.service';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
} from '@api/dto/chat.dto';
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { Query } from '@api/repository/repository.service';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { Contact, Message, MessageUpdate } from '@prisma/client';
|
||||
|
||||
export class ChatController {
|
||||
constructor(private readonly waMonitor: WAMonitoringService) {}
|
||||
|
||||
@@ -11,9 +11,9 @@ import {
|
||||
GroupToggleEphemeralDto,
|
||||
GroupUpdateParticipantDto,
|
||||
GroupUpdateSettingDto,
|
||||
} from '../dto/group.dto';
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
} from '@api/dto/group.dto';
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
|
||||
export class GroupController {
|
||||
constructor(private readonly waMonitor: WAMonitoringService) {}
|
||||
|
||||
@@ -1,27 +1,27 @@
|
||||
import { InstanceDto, SetPresenceDto } from '@api/dto/instance.dto';
|
||||
import { ChatwootService } from '@api/integrations/chatwoot/services/chatwoot.service';
|
||||
import { RabbitmqService } from '@api/integrations/rabbitmq/services/rabbitmq.service';
|
||||
import { SqsService } from '@api/integrations/sqs/services/sqs.service';
|
||||
import { WebsocketService } from '@api/integrations/websocket/services/websocket.service';
|
||||
import { ProviderFiles } from '@api/provider/sessions';
|
||||
import { PrismaRepository } from '@api/repository/repository.service';
|
||||
import { AuthService } from '@api/services/auth.service';
|
||||
import { CacheService } from '@api/services/cache.service';
|
||||
import { BaileysStartupService } from '@api/services/channels/whatsapp.baileys.service';
|
||||
import { BusinessStartupService } from '@api/services/channels/whatsapp.business.service';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { SettingsService } from '@api/services/settings.service';
|
||||
import { WebhookService } from '@api/services/webhook.service';
|
||||
import { Events, Integration, wa } from '@api/types/wa.types';
|
||||
import { Auth, Chatwoot, ConfigService, HttpServer, WaBusiness } from '@config/env.config';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { BadRequestException, InternalServerErrorException, UnauthorizedException } from '@exceptions';
|
||||
import { JsonValue } from '@prisma/client/runtime/library';
|
||||
import { delay } from 'baileys';
|
||||
import { isArray, isURL } from 'class-validator';
|
||||
import EventEmitter2 from 'eventemitter2';
|
||||
import { v4 } from 'uuid';
|
||||
|
||||
import { Auth, Chatwoot, ConfigService, HttpServer, WaBusiness } from '../../config/env.config';
|
||||
import { Logger } from '../../config/logger.config';
|
||||
import { BadRequestException, InternalServerErrorException, UnauthorizedException } from '../../exceptions';
|
||||
import { InstanceDto, SetPresenceDto } from '../dto/instance.dto';
|
||||
import { ChatwootService } from '../integrations/chatwoot/services/chatwoot.service';
|
||||
import { RabbitmqService } from '../integrations/rabbitmq/services/rabbitmq.service';
|
||||
import { SqsService } from '../integrations/sqs/services/sqs.service';
|
||||
import { WebsocketService } from '../integrations/websocket/services/websocket.service';
|
||||
import { ProviderFiles } from '../provider/sessions';
|
||||
import { PrismaRepository } from '../repository/repository.service';
|
||||
import { AuthService } from '../services/auth.service';
|
||||
import { CacheService } from '../services/cache.service';
|
||||
import { BaileysStartupService } from '../services/channels/whatsapp.baileys.service';
|
||||
import { BusinessStartupService } from '../services/channels/whatsapp.business.service';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
import { SettingsService } from '../services/settings.service';
|
||||
import { WebhookService } from '../services/webhook.service';
|
||||
import { Events, Integration, wa } from '../types/wa.types';
|
||||
import { ProxyController } from './proxy.controller';
|
||||
|
||||
export class InstanceController {
|
||||
@@ -44,7 +44,7 @@ export class InstanceController {
|
||||
private readonly providerFiles: ProviderFiles,
|
||||
) {}
|
||||
|
||||
private readonly logger = new Logger(InstanceController.name);
|
||||
private readonly logger = new Logger('InstanceController');
|
||||
|
||||
public async createInstance({
|
||||
instanceName,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { HandleLabelDto } from '../dto/label.dto';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { HandleLabelDto } from '@api/dto/label.dto';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
|
||||
export class LabelController {
|
||||
constructor(private readonly waMonitor: WAMonitoringService) {}
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { ProxyDto } from '@api/dto/proxy.dto';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { ProxyService } from '@api/services/proxy.service';
|
||||
import { Logger } from '@config/logger.config';
|
||||
import { BadRequestException, NotFoundException } from '@exceptions';
|
||||
import { makeProxyAgent } from '@utils/makeProxyAgent';
|
||||
import axios from 'axios';
|
||||
|
||||
import { Logger } from '../../config/logger.config';
|
||||
import { BadRequestException, NotFoundException } from '../../exceptions';
|
||||
import { makeProxyAgent } from '../../utils/makeProxyAgent';
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { ProxyDto } from '../dto/proxy.dto';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
import { ProxyService } from '../services/proxy.service';
|
||||
|
||||
const logger = new Logger('ProxyController');
|
||||
|
||||
export class ProxyController {
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
import { isBase64, isURL } from 'class-validator';
|
||||
|
||||
import { BadRequestException } from '../../exceptions';
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import {
|
||||
SendAudioDto,
|
||||
SendButtonDto,
|
||||
@@ -15,8 +12,10 @@ import {
|
||||
SendStickerDto,
|
||||
SendTemplateDto,
|
||||
SendTextDto,
|
||||
} from '../dto/sendMessage.dto';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
} from '@api/dto/sendMessage.dto';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { BadRequestException } from '@exceptions';
|
||||
import { isBase64, isURL } from 'class-validator';
|
||||
|
||||
export class SendMessageController {
|
||||
constructor(private readonly waMonitor: WAMonitoringService) {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { SettingsDto } from '../dto/settings.dto';
|
||||
import { SettingsService } from '../services/settings.service';
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { SettingsDto } from '@api/dto/settings.dto';
|
||||
import { SettingsService } from '@api/services/settings.service';
|
||||
|
||||
export class SettingsController {
|
||||
constructor(private readonly settingsService: SettingsService) {}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { TemplateDto } from '../dto/template.dto';
|
||||
import { TemplateService } from '../services/template.service';
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { TemplateDto } from '@api/dto/template.dto';
|
||||
import { TemplateService } from '@api/services/template.service';
|
||||
|
||||
export class TemplateController {
|
||||
constructor(private readonly templateService: TemplateService) {}
|
||||
|
||||
@@ -1,11 +1,10 @@
|
||||
import { InstanceDto } from '@api/dto/instance.dto';
|
||||
import { WebhookDto } from '@api/dto/webhook.dto';
|
||||
import { WAMonitoringService } from '@api/services/monitor.service';
|
||||
import { WebhookService } from '@api/services/webhook.service';
|
||||
import { BadRequestException } from '@exceptions';
|
||||
import { isURL } from 'class-validator';
|
||||
|
||||
import { BadRequestException } from '../../exceptions';
|
||||
import { InstanceDto } from '../dto/instance.dto';
|
||||
import { WebhookDto } from '../dto/webhook.dto';
|
||||
import { WAMonitoringService } from '../services/monitor.service';
|
||||
import { WebhookService } from '../services/webhook.service';
|
||||
|
||||
export class WebhookController {
|
||||
constructor(private readonly webhookService: WebhookService, private readonly waMonitor: WAMonitoringService) {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user