ConnectorClient class
ConnectorClient is a client for interacting with the Microsoft Connector API.
Properties
axios |
Methods
create |
Creates a new instance of ConnectorClient with authentication. |
create |
Creates a new conversation. |
delete |
Deletes an activity from a conversation. |
get |
Retrieves an attachment by attachment ID and view ID. |
get |
Retrieves attachment information by attachment ID. |
get |
|
get |
Retrieves a list of conversations. |
reply |
Replies to an activity in a conversation. |
send |
Sends an activity to a conversation. |
update |
Updates an activity in a conversation. |
upload |
Uploads an attachment to a conversation. |
Property Details
axiosInstance
AxiosInstance axiosInstance
Property Value
AxiosInstance
Method Details
createClientWithAuth(string, AuthConfiguration, AuthProvider, string, HeaderPropagationCollection)
Creates a new instance of ConnectorClient with authentication.
static function createClientWithAuth(baseURL: string, authConfig: AuthConfiguration, authProvider: AuthProvider, scope: string, headers?: HeaderPropagationCollection): Promise<ConnectorClient>
Parameters
- baseURL
-
string
The base URL for the API.
- authConfig
- AuthConfiguration
The authentication configuration.
- authProvider
- AuthProvider
The authentication provider.
- scope
-
string
The scope for the authentication token.
- headers
-
HeaderPropagationCollection
Optional headers to propagate in the request.
Returns
Promise<ConnectorClient>
A new instance of ConnectorClient.
createConversation(ConversationParameters)
Creates a new conversation.
function createConversation(body: ConversationParameters): Promise<ConversationResourceResponse>
Parameters
The conversation parameters.
Returns
Promise<ConversationResourceResponse>
The conversation resource response.
deleteActivity(string, string)
Deletes an activity from a conversation.
function deleteActivity(conversationId: string, activityId: string): Promise<void>
Parameters
- conversationId
-
string
The ID of the conversation.
- activityId
-
string
The ID of the activity.
Returns
Promise<void>
A promise that resolves when the activity is deleted.
getAttachment(string, string)
Retrieves an attachment by attachment ID and view ID.
function getAttachment(attachmentId: string, viewId: string): Promise<ReadableStream>
Parameters
- attachmentId
-
string
The ID of the attachment.
- viewId
-
string
The ID of the view.
Returns
Promise<ReadableStream>
The attachment as a readable stream.
getAttachmentInfo(string)
Retrieves attachment information by attachment ID.
function getAttachmentInfo(attachmentId: string): Promise<AttachmentInfo>
Parameters
- attachmentId
-
string
The ID of the attachment.
Returns
Promise<AttachmentInfo>
The attachment information.
getConversationMember(string, string)
function getConversationMember(userId: string, conversationId: string): Promise<ChannelAccount>
Parameters
- userId
-
string
- conversationId
-
string
Returns
Promise<ChannelAccount>
getConversations(string)
Retrieves a list of conversations.
function getConversations(continuationToken?: string): Promise<ConversationsResult>
Parameters
- continuationToken
-
string
The continuation token for pagination.
Returns
Promise<ConversationsResult>
A list of conversations.
replyToActivity(string, string, Activity)
Replies to an activity in a conversation.
function replyToActivity(conversationId: string, activityId: string, body: Activity): Promise<ResourceResponse>
Parameters
- conversationId
-
string
The ID of the conversation.
- activityId
-
string
The ID of the activity.
- body
- Activity
The activity object.
Returns
Promise<ResourceResponse>
The resource response.
sendToConversation(string, Activity)
Sends an activity to a conversation.
function sendToConversation(conversationId: string, body: Activity): Promise<ResourceResponse>
Parameters
- conversationId
-
string
The ID of the conversation.
- body
- Activity
The activity object.
Returns
Promise<ResourceResponse>
The resource response.
updateActivity(string, string, Activity)
Updates an activity in a conversation.
function updateActivity(conversationId: string, activityId: string, body: Activity): Promise<ResourceResponse>
Parameters
- conversationId
-
string
The ID of the conversation.
- activityId
-
string
The ID of the activity.
- body
- Activity
The activity object.
Returns
Promise<ResourceResponse>
The resource response.
uploadAttachment(string, AttachmentData)
Uploads an attachment to a conversation.
function uploadAttachment(conversationId: string, body: AttachmentData): Promise<ResourceResponse>
Parameters
- conversationId
-
string
The ID of the conversation.
- body
- AttachmentData
The attachment data.
Returns
Promise<ResourceResponse>
The resource response.