SkillHandler class

警告

现已弃用此 API。

Use CloudSkillHandler instead. A Bot Framework Handler for skills.

扩展

属性

SkillConversationReferenceKey

用于访问从技能发送到父级的 CovnersationReference。

构造函数详细信息

SkillHandler(BotAdapter, ActivityHandlerBase, SkillConversationIdFactoryBase, ICredentialProvider, AuthenticationConfiguration, string)

初始化 SkillHandler 类的新实例。

new SkillHandler(adapter: BotAdapter, bot: ActivityHandlerBase, conversationIdFactory: SkillConversationIdFactoryBase, credentialProvider: ICredentialProvider, authConfig: AuthenticationConfiguration, channelService?: string)

参数

adapter

BotAdapter

将处理请求的 BotAdapter 实例。

bot

ActivityHandlerBase

ActivityHandlerBase 实例。

conversationIdFactory

SkillConversationIdFactoryBase

一个 SkillConversationIdFactoryBase,用于解压缩聊天 ID 并将其映射到调用机器人。

credentialProvider

ICredentialProvider

凭据提供程序。

authConfig

AuthenticationConfiguration

身份验证配置。

channelService

string

指示机器人是否在公共 Azure 或 Azure 政府版(https://aka.ms/AzureGovDocs)中工作的字符串。

属性详细信息

SkillConversationReferenceKey

用于访问从技能发送到父级的 CovnersationReference。

SkillConversationReferenceKey: symbol

属性值

symbol

注解

该值与从 botbuilder-core 导出的 SkillConversationReferenceKey 相同。

继承的方法详细信息

handleCreateConversation(string, ConversationParameters)

创建新的对话。

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

参数

authHeader

string

身份验证标头。

parameters

ConversationParameters

(xref:botbuilder-core。用于创建对话的 ConversationParameters。

返回

Promise<ConversationResourceResponse>

操作的 Promise 表示形式。

继承自channelServiceHandlerBase.handleCreateConversation

handleDeleteActivity(string, string, string)

删除现有 活动

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

activityId

string

要删除的活动 ID。

返回

Promise<void>

继承自channelServiceHandlerBase.handleDeleteActivity

handleDeleteConversationMember(string, string, string)

从对话中删除成员。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

memberId

string

要从此对话中删除的成员的 ID。

返回

Promise<void>

继承自channelServiceHandlerBase.handleDeleteConversationMember

handleGetActivityMembers(string, string, string)

枚举 活动的成员。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

activityId

string

活动 ID。

返回

Promise<ChannelAccount[]>

枚举的 channelAccount 列表

继承自ChannelServiceHandlerBase.handleGetActivityMembers

handleGetConversationMember(string, string, string)

获取单个对话成员的帐户。

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

参数

authHeader

string

身份验证标头。

userId

string

用户 ID。

conversationId

string

对话 ID。

返回

Promise<ChannelAccount>

提供的用户 ID 的 ChannelAccount

继承自channelServiceHandlerBase.handleGetConversationMember

handleGetConversationMembers(string, string)

枚举会话的成员。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

返回

Promise<ChannelAccount[]>

枚举的 channelAccount 列表

继承自channelServiceHandlerBase.handleGetConversationMembers

handleGetConversationPagedMembers(string, string, number, string)

枚举对话的成员一次一页。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

pageSize

number

建议的页面大小。

continuationToken

string

延续标记。

返回

Promise<PagedMembersResult>

表示操作的 Promise

继承自channelServiceHandlerBase.handleGetConversationPagedMembers

handleGetConversations(string, string, string)

列出机器人参与的对话。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

continuationToken

string

跳过或继续标记。

返回

Promise<ConversationsResult>

操作的 Promise 表示形式。

继承自channelServiceHandlerBase.handleGetConversations

handleReplyToActivity(string, string, string, Activity)

发送对 活动的答复。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

activityId

string

答复的活动 ID。

activity

Activity

要发送 活动

返回

Promise<ResourceResponse>

表示操作的 Promise

继承自 channelServiceHandlerBase.handleReplyToActivity

handleSendConversationHistory(string, string, Transcript)

上传对话的历史活动。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

transcript

Transcript

(xref:botframework-schema。活动的脚本。

返回

Promise<ResourceResponse>

表示操作的 Promise

继承自channelServiceHandlerBase.handleSendConversationHistory

handleSendToConversation(string, string, Activity)

活动 发送到会话的末尾。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

activity

Activity

要发送 活动

返回

Promise<ResourceResponse>

表示操作的 Promise

继承自ChannelServiceHandlerBase.handleSendToConversation

handleUpdateActivity(string, string, string, Activity)

编辑以前发送的现有 活动

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

activityId

string

要更新的活动 ID。

activity

Activity

替换 活动

返回

Promise<ResourceResponse>

表示操作的 Promise

继承自channelServiceHandlerBase.handleUpdateActivity

handleUploadAttachment(string, string, AttachmentData)

处理企业时,将数据存储在合规的存储中。

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

参数

authHeader

string

身份验证标头。

conversationId

string

对话 ID。

attachmentUpload

AttachmentData

(xref:botframework-schema。AttachmentData)。

返回

Promise<ResourceResponse>

表示操作的 Promise

继承自channelServiceHandlerBase.handleUploadAttachment