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