intento arreglar server.ts y webhook-manager.ts

pull/1/head
borja 7 months ago
parent f472d8cba4
commit a86beb81b7

@ -1,18 +1,20 @@
/// <reference types="bun-types" />
import { CommandService } from './services/command';
import { ResponseQueue } from './services/response-queue';
import { WebhookManager } from './services/webhook-manager';
// Bun is available globally when running under Bun runtime
declare global {
var Bun: typeof import('bun');
}
const REQUIRED_ENV = [
export const REQUIRED_ENV = [
'EVOLUTION_API_URL',
'EVOLUTION_API_KEY',
'EVOLUTION_API_INSTANCE',
'WHATSAPP_COMMUNITY_ID',
'CHATBOT_PHONE_NUMBER'
'CHATBOT_PHONE_NUMBER',
'WEBHOOK_URL'
];
type WebhookPayload = {

@ -21,10 +21,9 @@ type WebhookResponse = {
export class WebhookManager {
private static readonly REQUIRED_EVENTS = [
'APPLICATION_STARTUP',
'messages.upsert',
'messages.update',
'messages.delete',
'groups.update',
'MESSAGES.UPSERT',
'MESSAGES.DELETE',
'GROUPS.UPDATE',
];
private static validateConfig() {

Loading…
Cancel
Save