Düzenle

Aracılığıyla paylaş


ChannelServiceHandlerBase class

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

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.

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.

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>

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>

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.