CloudSkillHandler class

A Bot Framework Handler for skills.

Extends

Constructors

CloudSkillHandler(BotAdapter, (context: TurnContext) => Promise<void>, SkillConversationIdFactoryBase, BotFrameworkAuthentication)

Initializes a new instance of the CloudSkillHandler class.

Properties

SkillConversationReferenceKey

Used to access the CovnersationReference sent from the Skill to the Parent.

Inherited Methods

handleCreateConversation(string, ConversationParameters)

Creates a new Conversation.

handleDeleteActivity(string, string, string)

Deletes an existing Activity.

handleDeleteConversationMember(string, string, string)

Deletes a member from a conversation.

handleGetActivityMembers(string, string, string)

Enumerates the members of an Activity.

handleGetConversationMember(string, string, string)

Gets the account of a single conversation member.

handleGetConversationMembers(string, string)

Enumerates the members of a conversation.

handleGetConversationPagedMembers(string, string, number, string)

Enumerates the members of a conversation one page at a time.

handleGetConversations(string, string, string)

Lists the Conversations in which the bot has participated.

handleReplyToActivity(string, string, string, Activity)

Sends a reply to an Activity.

handleSendConversationHistory(string, string, Transcript)

Uploads the historic activities of the conversation.

handleSendToConversation(string, string, Activity)

Sends an Activity to the end of a conversation.

handleUpdateActivity(string, string, string, Activity)

Edits a previously sent existing Activity.

handleUploadAttachment(string, string, AttachmentData)

Stores data in a compliant store when dealing with enterprises.

Constructor Details

CloudSkillHandler(BotAdapter, (context: TurnContext) => Promise<void>, SkillConversationIdFactoryBase, BotFrameworkAuthentication)

Initializes a new instance of the CloudSkillHandler class.

new CloudSkillHandler(adapter: BotAdapter, logic: (context: TurnContext) => Promise<void>, conversationIdFactory: SkillConversationIdFactoryBase, auth: BotFrameworkAuthentication)

Parameters

adapter

BotAdapter

An instance of the BotAdapter that will handle the request.

logic

(context: TurnContext) => Promise<void>

The Bot logic function

conversationIdFactory

SkillConversationIdFactoryBase

A SkillConversationIdFactoryBase to unpack the conversation ID and map it to the calling bot.

auth

BotFrameworkAuthentication

Bot Framework Authentication to use

Property Details

SkillConversationReferenceKey

Used to access the CovnersationReference sent from the Skill to the Parent.

SkillConversationReferenceKey: symbol

Property Value

symbol

Inherited Method Details

handleCreateConversation(string, ConversationParameters)

Creates a new Conversation.

function handleCreateConversation(authHeader: string, parameters: ConversationParameters): Promise<ConversationResourceResponse>

Parameters

authHeader

string

The authentication header.

parameters

ConversationParameters

(xref:botbuilder-core.ConversationParameters) to create the conversation from.

Returns

Promise<ConversationResourceResponse>

A Promise representation for the operation.

Inherited From ChannelServiceHandlerBase.handleCreateConversation

handleDeleteActivity(string, string, string)

Deletes an existing Activity.

function handleDeleteActivity(authHeader: string, conversationId: string, activityId: string): Promise<void>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

activityId

string

The activity Id to delete.

Returns

Promise<void>

Inherited From ChannelServiceHandlerBase.handleDeleteActivity

handleDeleteConversationMember(string, string, string)

Deletes a member from a conversation.

function handleDeleteConversationMember(authHeader: string, conversationId: string, memberId: string): Promise<void>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

memberId

string

Id of the member to delete from this conversation.

Returns

Promise<void>

Inherited From ChannelServiceHandlerBase.handleDeleteConversationMember

handleGetActivityMembers(string, string, string)

Enumerates the members of an Activity.

function handleGetActivityMembers(authHeader: string, conversationId: string, activityId: string): Promise<ChannelAccount[]>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

activityId

string

The activity Id.

Returns

Promise<ChannelAccount[]>

The enumerated ChannelAccount list.

Inherited From ChannelServiceHandlerBase.handleGetActivityMembers

handleGetConversationMember(string, string, string)

Gets the account of a single conversation member.

function handleGetConversationMember(authHeader: string, userId: string, conversationId: string): Promise<ChannelAccount>

Parameters

authHeader

string

The authentication header.

userId

string

The user Id.

conversationId

string

The conversation Id.

Returns

Promise<ChannelAccount>

The ChannelAccount for the provided user id.

Inherited From ChannelServiceHandlerBase.handleGetConversationMember

handleGetConversationMembers(string, string)

Enumerates the members of a conversation.

function handleGetConversationMembers(authHeader: string, conversationId: string): Promise<ChannelAccount[]>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

Returns

Promise<ChannelAccount[]>

The enumerated ChannelAccount list.

Inherited From ChannelServiceHandlerBase.handleGetConversationMembers

handleGetConversationPagedMembers(string, string, number, string)

Enumerates the members of a conversation one page at a time.

function handleGetConversationPagedMembers(authHeader: string, conversationId: string, pageSize?: number, continuationToken?: string): Promise<PagedMembersResult>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

pageSize

number

Suggested page size.

continuationToken

string

A continuation token.

Returns

Promise<PagedMembersResult>

A Promise representing the PagedMembersResult for the operation.

Inherited From ChannelServiceHandlerBase.handleGetConversationPagedMembers

handleGetConversations(string, string, string)

Lists the Conversations in which the bot has participated.

function handleGetConversations(authHeader: string, conversationId: string, continuationToken?: string): Promise<ConversationsResult>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

continuationToken

string

A skip or continuation token.

Returns

Promise<ConversationsResult>

A Promise representation for the operation.

Inherited From ChannelServiceHandlerBase.handleGetConversations

handleReplyToActivity(string, string, string, Activity)

Sends a reply to an Activity.

function handleReplyToActivity(authHeader: string, conversationId: string, activityId: string, activity: Activity): Promise<ResourceResponse>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

activityId

string

The activity Id the reply is to.

activity

Activity

The Activity to send.

Returns

Promise<ResourceResponse>

A Promise representing the ResourceResponse for the operation.

Inherited From ChannelServiceHandlerBase.handleReplyToActivity

handleSendConversationHistory(string, string, Transcript)

Uploads the historic activities of the conversation.

function handleSendConversationHistory(authHeader: string, conversationId: string, transcript: Transcript): Promise<ResourceResponse>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

transcript

Transcript

(xref:botframework-schema.Transcript) of activities.

Returns

Promise<ResourceResponse>

A Promise representing the ResourceResponse for the operation.

Inherited From ChannelServiceHandlerBase.handleSendConversationHistory

handleSendToConversation(string, string, Activity)

Sends an Activity to the end of a conversation.

function handleSendToConversation(authHeader: string, conversationId: string, activity: Activity): Promise<ResourceResponse>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

activity

Activity

The Activity to send.

Returns

Promise<ResourceResponse>

A Promise representing the ResourceResponse for the operation.

Inherited From ChannelServiceHandlerBase.handleSendToConversation

handleUpdateActivity(string, string, string, Activity)

Edits a previously sent existing Activity.

function handleUpdateActivity(authHeader: string, conversationId: string, activityId: string, activity: Activity): Promise<ResourceResponse>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

activityId

string

The activity Id to update.

activity

Activity

The replacement Activity.

Returns

Promise<ResourceResponse>

A Promise representing the ResourceResponse for the operation.

Inherited From ChannelServiceHandlerBase.handleUpdateActivity

handleUploadAttachment(string, string, AttachmentData)

Stores data in a compliant store when dealing with enterprises.

function handleUploadAttachment(authHeader: string, conversationId: string, attachmentUpload: AttachmentData): Promise<ResourceResponse>

Parameters

authHeader

string

The authentication header.

conversationId

string

The conversation Id.

attachmentUpload

AttachmentData

(xref:botframework-schema.AttachmentData).

Returns

Promise<ResourceResponse>

A Promise representing the ResourceResponse for the operation.

Inherited From ChannelServiceHandlerBase.handleUploadAttachment