Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(architecture): list every engine event callback
Yudhi Armyndharis1dbde9287a9c
diff --git a/docs/03-system-architecture.md b/docs/03-system-architecture.mdindex 97f3a9e4f..6eb527e6e 100644--- a/docs/03-system-architecture.md+++ b/docs/03-system-architecture.md@@ -923,9 +923,15 @@ export interface EngineEventCallbacks {onCall?: (event: IncomingCallEvent) => void; // incoming call ringing; Baileys can rejectCall() while it ringsonHistoryMessages?: (messages: IncomingMessage[]) => void; // bulk initial sync; persist, don't dispatchonDisconnected?: (reason: string) => void; // recoverable -> reconnect+ onReconnecting?: (attempt: number, nextDelayMs: number) => void; // engines that retry internally (Baileys)onStateChanged?: (state: EngineStatus) => void;onActionRequired?: (reason: string) => void; // engine alive, but an operator must act+ onAccountRestriction?: (restriction: AccountRestriction | null) => void; // null = restriction lifted+ onPresenceUpdate?: (event: PresenceUpdateEvent) => void; // chats this session subscribed to+ onCallOutcome?: (event: CallOutcomeEvent) => void; // a ringing call was answered, declined or missedonError?: (reason: string) => void; // terminal init/auth failure+ onCredentialTeardownStarted?: (operation: Promise<void>) => void; // auth-dir removal began; host fences on it+ claimStuckAuthRecovery?: () => boolean; // one credential reset per reconnect episode}export interface IWhatsAppEngine {@@ -1384,7 +1390,7 @@ Database wiring lives inline in `AppModule` (`src/app.module.ts`) as two named// shape of the 'data' connection useFactory in src/app.module.tsconst dbType = configService.get<'sqlite' | 'postgres'>('dataDatabase.type', 'sqlite');const baseConfig = {- entities: [/* session, webhook, message, template, engine, integration, status-store globs */],+ entities: [/* session, webhook, message, template, engine, integration, status-store, automation globs */],migrations: [__dirname + '/database/migrations/*{.ts,.js}'],logging: configService.get<boolean>('dataDatabase.logging', false),};