CloudAdapterBase class
An adapter that implements the Bot Framework Protocol and can be hosted in different cloud environments both public and private.
- Extends
Constructors
Cloud |
Create a new CloudAdapterBase instance. |
Properties
Connector |
|
on |
Gets or sets an error handler that can catch exceptions in the middleware or application. Sets an error handler that can catch exceptions in the middleware or application. |
User |
Inherited Properties
Bot |
|
Connector |
|
OAuth |
Methods
Inherited Methods
use((context: Turn |
Adds middleware to the adapter's pipeline. |
Constructor Details
CloudAdapterBase(BotFrameworkAuthentication)
Create a new CloudAdapterBase instance.
new CloudAdapterBase(botFrameworkAuthentication: BotFrameworkAuthentication)
Parameters
- botFrameworkAuthentication
-
BotFrameworkAuthentication
A BotFrameworkAuthentication used for validating and creating tokens.
Property Details
ConnectorFactoryKey
ConnectorFactoryKey: symbol
Property Value
symbol
onTurnError
Gets or sets an error handler that can catch exceptions in the middleware or application. Sets an error handler that can catch exceptions in the middleware or application.
(context: TurnContext, error: Error) => Promise<void> onTurnError
Property Value
(context: TurnContext, error: Error) => Promise<void>
A promise representing the async operation.
Remarks
The error handler is called with these parameters:
Name | Type | Description |
---|---|---|
context |
TurnContext | The context object for the turn. |
error |
Error |
The Node.js error thrown. |
UserTokenClientKey
UserTokenClientKey: symbol
Property Value
symbol
Inherited Property Details
BotIdentityKey
ConnectorClientKey
OAuthScopeKey
Method Details
continueConversation(Partial<ConversationReference>, (context: TurnContext) => Promise<void>)
Warning
This API is now deprecated.
function continueConversation(_reference: Partial<ConversationReference>, _logic: (context: TurnContext) => Promise<void>): Promise<void>
Parameters
- _reference
-
Partial<ConversationReference>
- _logic
-
(context: TurnContext) => Promise<void>
Returns
Promise<void>
continueConversationAsync(string | ClaimsIdentity, Partial<ConversationReference>, (context: TurnContext) => Promise<void> | string, (context: TurnContext) => Promise<void>)
function continueConversationAsync(botAppIdOrClaimsIdentity: string | ClaimsIdentity, reference: Partial<ConversationReference>, logicOrAudience: (context: TurnContext) => Promise<void> | string, maybeLogic?: (context: TurnContext) => Promise<void>): Promise<void>
Parameters
- botAppIdOrClaimsIdentity
-
string | ClaimsIdentity
- reference
-
Partial<ConversationReference>
- logicOrAudience
-
(context: TurnContext) => Promise<void> | string
- maybeLogic
-
(context: TurnContext) => Promise<void>
Returns
Promise<void>
createConversationAsync(string, string, string, string, ConversationParameters, (context: TurnContext) => Promise<void>)
function createConversationAsync(botAppId: string, channelId: string, serviceUrl: string, audience: string, conversationParameters: ConversationParameters, logic: (context: TurnContext) => Promise<void>): Promise<void>
Parameters
- botAppId
-
string
- channelId
-
string
- serviceUrl
-
string
- audience
-
string
- conversationParameters
-
ConversationParameters
- logic
-
(context: TurnContext) => Promise<void>
Returns
Promise<void>
deleteActivity(TurnContext, Partial<ConversationReference>)
function deleteActivity(context: TurnContext, reference: Partial<ConversationReference>): Promise<void>
Parameters
- context
- TurnContext
- reference
-
Partial<ConversationReference>
Returns
Promise<void>
sendActivities(TurnContext, Partial<Activity>[])
function sendActivities(context: TurnContext, activities: Partial<Activity>[]): Promise<ResourceResponse[]>
Parameters
- context
- TurnContext
- activities
-
Partial<Activity>[]
Returns
Promise<ResourceResponse[]>
updateActivity(TurnContext, Partial<Activity>)
function updateActivity(context: TurnContext, activity: Partial<Activity>): Promise<ResourceResponse | void>
Parameters
- context
- TurnContext
- activity
-
Partial<Activity>
Returns
Promise<ResourceResponse | void>
Inherited Method Details
use((context: TurnContext, next: () => Promise<void>) => Promise<void> | Middleware[])
Adds middleware to the adapter's pipeline.
function use(middlewares: (context: TurnContext, next: () => Promise<void>) => Promise<void> | Middleware[]): this
Parameters
- middlewares
-
(context: TurnContext, next: () => Promise<void>) => Promise<void> | Middleware[]
The middleware or middleware handlers to add.
Returns
this
The updated adapter object.
Remarks
Middleware is added to the adapter at initialization time. Each turn, the adapter calls its middleware in the order in which you added it.
Inherited From BotAdapter.use