Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(engine): show the real engines response and drop "minimal slice"
Yudhi Armyndharis12b5360f2ca3
diff --git a/docs/06-api-specification.md b/docs/06-api-specification.mdindex b55a15d78..2c05c5acd 100644--- a/docs/06-api-specification.md+++ b/docs/06-api-specification.md@@ -5334,15 +5334,17 @@ List available WhatsApp engine plugins.[{"id": "whatsapp-web.js",- "name": "WhatsApp Web.js",+ "name": "WhatsApp Web.js Engine","enabled": true,- "features": ["send", "receive", "media", "groups"],+ "features": ["text-messages", "media-messages", "group-management", "labels", "channels", "status-updates"],"library": { "name": "whatsapp-web.js", "version": "1.34.7" }}]```-`library` is optional and may be omitted per engine.+`features` is shortened here. It is the engine plugin's own `getFeatures()` list, so it differs per engine:+Baileys adds `catalog` and omits `labels`, while whatsapp-web.js omits `catalog`. `library` is optional and may be+omitted per engine.**Errors:** `401` · `403`diff --git a/src/common/errors/engine-not-supported.error.ts b/src/common/errors/engine-not-supported.error.tsindex e2a904689..cdb1e5adb 100644--- a/src/common/errors/engine-not-supported.error.ts+++ b/src/common/errors/engine-not-supported.error.ts@@ -2,8 +2,8 @@ import { NotImplementedException } from '@nestjs/common';/*** Thrown by an engine adapter when a method is part of the {@link IWhatsAppEngine}- * contract but the active engine cannot implement it (e.g. the Baileys engine has no- * self-maintained store, so history/contacts/groups are unavailable in its minimal slice).+ * contract but the active engine cannot implement it (e.g. the Baileys engine has no live+ * per-chat history read, so getChatHistory is unavailable there).** Extends NestJS `NotImplementedException` so it maps to **HTTP 501** through NestJS's* built-in exception handler — no custom global filter required. Mirrors howdiff --git a/src/engine/adapters/baileys.adapter.ts b/src/engine/adapters/baileys.adapter.tsindex 151175c8c..719e19c14 100644--- a/src/engine/adapters/baileys.adapter.ts+++ b/src/engine/adapters/baileys.adapter.ts@@ -548,7 +548,7 @@ export class BaileysAdapter implements IWhatsAppEngine {return this.contacts.clearChatMessages(chatId);}- // ----- Gated: not supported by this minimal slice (no store) -----+ // ----- Gated: unsupported on Baileys (reasons inline) -----/* eslint-disable @typescript-eslint/no-unused-vars */getMessageReactions(_chatId: string, _messageId: string): Promise<MessageReaction[]> {diff --git a/src/engine/builtin/baileys/index.ts b/src/engine/builtin/baileys/index.tsindex 4f1af2ac3..580f470ea 100644--- a/src/engine/builtin/baileys/index.ts+++ b/src/engine/builtin/baileys/index.ts@@ -1,6 +1,6 @@/*** Baileys Engine Plugin- * Built-in engine plugin that wraps the @whiskeysockets/baileys library (minimal slice).+ * Built-in engine plugin that wraps the @whiskeysockets/baileys library.*/import { PluginContext, PluginType, IEnginePlugin } from '../../../core/plugins';diff --git a/src/engine/builtin/baileys/manifest.json b/src/engine/builtin/baileys/manifest.jsonindex 14adc10d1..c59f4bf1f 100644--- a/src/engine/builtin/baileys/manifest.json+++ b/src/engine/builtin/baileys/manifest.json@@ -3,7 +3,7 @@"name": "Baileys Engine","version": "1.0.0","type": "engine",- "description": "Baileys (WebSocket, no-browser) engine adapter for OpenWA — minimal slice: text send/receive",+ "description": "Baileys (WebSocket, no-browser) engine adapter for OpenWA","author": "OpenWA Team","main": "index.ts","provides": ["whatsapp-engine", "text-messages"],