Initialize the adapter with authentication credentials. Called once when the extension is activated. Must be idempotent — calling initialize on an already-initialized adapter should reconnect.
Get the current connection status and metadata.
Send a message to a conversation on the external platform.
Platform-native conversation/chat ID.
Message content to send.
The platform-assigned message ID.
Register a handler for channel events. Multiple handlers can be
registered. Use eventTypes to filter which events to receive.
Callback invoked when an event occurs.
Optional eventTypes: ChannelEventType[]Optional filter. If omitted, handler receives all events.
Unsubscribe function.
Optional editEdit a previously sent message. Only available if adapter declares
the 'editing' capability.
Optional deleteOptional addOptional getGet conversation metadata (name, members, etc.). Useful for group chats.
Readonly platformPlatform this adapter serves.
Readonly displayHuman-readable display name (e.g., "WhatsApp Business").
Readonly capabilitiesDeclared capabilities of this adapter.
Core adapter interface for external messaging channels.
Implementors wrap a platform SDK (e.g., grammY for Telegram, discord.js for Discord) and normalize all interactions to this common contract.
Example