Documentation - v1.2.0-alpha.3
    Preparing search index...

    Class BaseAdapterAbstract

    Abstract base class for all adapters in the Agents framework.

    This class provides core functionality for handling conversations, managing middleware, authentication, and error handling. Adapters are responsible for translating between the Agents framework and specific communication channels (like Teams, Web Chat, etc.).

    Key features:

    • Middleware pipeline for processing incoming and outgoing activities
    • Error handling and recovery mechanisms
    • Authentication provider integration
    • Abstract methods for channel-specific operations
    • Context management with revocable proxies for security

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    ConnectorClientKey: symbol = ...

    Symbol key used to store connector client instances in the TurnContext.

    middleware: MiddlewareSet = ...

    The middleware set used to process the pipeline of middleware handlers.

    UserTokenClientKey: symbol = ...

    Symbol key used to store User Token Client instances in the TurnContext.

    Accessors

    Methods

    • Continues a conversation.

      Parameters

      • botAppIdOrIdentity: string | JwtPayload
      • reference: Partial<ConversationReference>

        The conversation reference to continue.

      • logic: (revocableContext: TurnContext) => Promise<void>

        The logic to execute.

      Returns Promise<void>

      A promise representing the completion of the continue operation.

    • Parameters

      • context: TurnContext
      • attachmentId: string

        The attachment ID.

      • viewId: string

        The view ID.

      Returns Promise<ReadableStream>

      A promise representing the NodeJS.ReadableStream for the requested attachment.

      This function will not be supported in future versions. Use TurnContext.turnState.get(CloudAdapter.ConnectorClientKey). Gets an attachment.

    • Parameters

      • context: TurnContext
      • attachmentId: string

        The attachment ID.

      Returns Promise<AttachmentInfo>

      A promise representing the AttachmentInfo for the requested attachment.

      This function will not be supported in future versions. Use TurnContext.turnState.get(CloudAdapter.ConnectorClientKey). Gets attachment information.

    • Runs the middleware pipeline in sequence.

      Parameters

      • context: TurnContext

        The TurnContext for the current turn.

      • next: (revocableContext: TurnContext) => Promise<void>

        The next function to call in the pipeline.

      Returns Promise<void>

      A promise representing the completion of the middleware pipeline.