Class BaseChannelAdapter<TAuthParams>Abstract

Abstract base class that implements common IChannelAdapter behaviour. Concrete adapters (Telegram, Discord, IRC, ...) extend this class and implement the three abstract hooks:

  • doConnect(auth) -- establish the platform connection.
  • doSendMessage(conversationId, content) -- deliver a message.
  • doShutdown() -- tear down the platform connection.

Type Parameters

  • TAuthParams extends Record<string, string | undefined> = Record<string, string>

    Shape of the platform-specific params object inside ChannelAuthConfig. Defaults to Record<string, string>.

Hierarchy (view full)

Implements

Constructors

Methods

Properties

platform: ChannelPlatform

Platform this adapter serves.

displayName: string

Human-readable display name (e.g., "WhatsApp Business").

capabilities: readonly ChannelCapability[]

Declared capabilities of this adapter.

status: ChannelConnectionStatus = 'disconnected'
connectedSince: undefined | string
errorMessage: undefined | string
platformInfo: Record<string, unknown> = {}
auth: undefined | ChannelAuthConfig & {
    params?: TAuthParams;
}

Stored auth config so reconnect() can re-use it.

retryConfig: RetryConfig