Szerkesztés

Megosztás a következőn keresztül:


botbuilder package

Classes

BotFrameworkAdapter
BotFrameworkHttpClient
ChannelServiceHandler
ChannelServiceHandlerBase

The ChannelServiceHandlerBase implements API to forward activity to a skill and implements routing ChannelAPI calls from the Skill up through the bot/adapter.

ChannelServiceRoutes

Routes the API calls with the ChannelServiceHandler methods.

CloudAdapter

An adapter that implements the Bot Framework Protocol and can be hosted in different cloud environmens both public and private.

CloudChannelServiceHandler

A class to help with the implementation of the Bot Framework protocol using BotFrameworkAuthentication.

EventFactory

Contains utility methods for creating various event types.

FileTranscriptStore

The file transcript store stores transcripts in file system with each activity as a file.

HandoffEventNames

Defines values for handoff event names.

InspectionMiddleware

InspectionMiddleware for emulator inspection of runtime Activities and BotState.

InspectionState

InspectionState for use by the InspectionMiddleware for emulator inspection of runtime Activities and BotState.

RouteConstants

Constants representing the API path that immediately follows the basePath. These are currently internal but we will re-evaluate making them public, in the future.

Example

RouteConstants.Activities = '/v3/conversations/:conversationId/activities'.

SetSpeakMiddleware

Support the DirectLine speech and telephony channels to ensure the appropriate SSML tags are set on the Activity Speak property.

CloudSkillHandler

A Bot Framework Handler for skills.

SkillHandler
SkillHandlerImpl
SkillHttpClient

A BotFrameworkHttpClient specialized for Skills that encapsulates Conversation ID generation.

StatusCodeError

Extends Error to provide specialized error messages.

StreamingHttpClient

An implementation of HttpClient that adds compatibility with streaming connections.

TokenResolver

Looks for OAuthCards in Activity attachments and takes action on them

TeamsSSOTokenExchangeMiddleware

If the activity name is signin/tokenExchange, this middleware will attempt to exchange the token, and deduplicate the incoming call, ensuring only one exchange request is processed. If a user is signed into multiple Teams clients, the Bot could receive a "signin/tokenExchange" from each client. Each token exchange request for a specific user login will have an identical activity.value.id.

Only one of these token exchange requests should be processed by the bot. The others return StatusCodes.PRECONDITION_FAILED. For a distributed bot in production, this requires distributed storage ensuring only one token exchange is processed. This middleware supports CosmosDb storage found in botbuilder-azure, or MemoryStorage for local development.

TeamsActivityHandler

Adds support for Microsoft Teams specific events and interactions.

TeamsInfo

Provides utility methods for the events and interactions that occur within Microsoft Teams.

Interfaces

BotFrameworkAdapterSettings
BotFrameworkHttpAdapter
WebServer

Interface representing an Express Application or a Restify Server.

ConnectorClientBuilder

Abstraction to build connector clients.

Request

Represents a Node.js HTTP Request, including the minimal set of use properties. Compatible with Restify, Express, and Node.js core http.

Response
WebRequest

Represents an Express or Restify request object. This interface supports the framework and is not intended to be called directly for your code.

WebResponse

Represents an Express or Restify response object. This interface supports the framework and is not intended to be called directly for your code.

Type Aliases

RouteHandler

Functions

validateAndFixActivity(Activity)

Validates an Activity and formats the timestamp fields.

teamsGetChannelId(Activity)

Activity helper methods for Teams.

teamsGetSelectedChannelId(Activity)

Gets the Team's selected channel id from the current activity.

teamsGetTeamId(Activity)

Gets the Team Id from the current Activity.

teamsGetTeamInfo(Activity)

Gets the TeamsInfo object from the current Activity.

teamsGetTeamMeetingInfo(Activity)

Gets the TeamsMeetingInfo object from the current Activity.

teamsGetTenant(Activity)

Gets the TenantInfo object from the current Activity.

teamsNotifyUser(Partial<Activity>, boolean, string)

Configures the current Activity to generate a notification within Teams.

Function Details

validateAndFixActivity(Activity)

Validates an Activity and formats the timestamp fields.

function validateAndFixActivity(activity: Activity): Activity

Parameters

activity

Activity

(xref:botbuilder-core.Activity) to be validated.

Returns

Activity

The Activity.

teamsGetChannelId(Activity)

Activity helper methods for Teams.

function teamsGetChannelId(activity: Activity): string | null

Parameters

activity

Activity

The current Activity.

Returns

string | null

The current Activity's team's channel id, or null.

teamsGetSelectedChannelId(Activity)

Gets the Team's selected channel id from the current activity.

function teamsGetSelectedChannelId(activity: Activity): string

Parameters

activity

Activity

The current Activity.

Returns

string

The current activity's team's selected channel, or empty string.

teamsGetTeamId(Activity)

Gets the Team Id from the current Activity.

function teamsGetTeamId(activity: Activity): string | null

Parameters

activity

Activity

The current Activity.

Returns

string | null

The current Activity's team's Id, or null.

teamsGetTeamInfo(Activity)

Gets the TeamsInfo object from the current Activity.

function teamsGetTeamInfo(activity: Activity): TeamInfo | null

Parameters

activity

Activity

The current Activity.

Returns

TeamInfo | null

The current Activity's team's info, or null.

teamsGetTeamMeetingInfo(Activity)

Gets the TeamsMeetingInfo object from the current Activity.

function teamsGetTeamMeetingInfo(activity: Activity): TeamsMeetingInfo | null

Parameters

activity

Activity

The current Activity.

Returns

TeamsMeetingInfo | null

The current Activity's team meeting info, or null.

teamsGetTenant(Activity)

Gets the TenantInfo object from the current Activity.

function teamsGetTenant(activity: Activity): TenantInfo | null

Parameters

activity

Activity

The current Activity.

Returns

TenantInfo | null

The current Activity's tenant info, or null.

teamsNotifyUser(Partial<Activity>, boolean, string)

Configures the current Activity to generate a notification within Teams.

function teamsNotifyUser(activity: Partial<Activity>, alertInMeeting?: boolean, externalResourceUrl?: string)

Parameters

activity

Partial<Activity>

The current Activity.

alertInMeeting

boolean

Sent to a meeting chat, this will cause the Teams client to render it in a notification popup as well as in the chat thread.

externalResourceUrl

string

Url to external resource. Must be included in manifest's valid domains.