TeamsConnectorClient class
A client for interacting with Microsoft Teams APIs. Extends the ConnectorClient class to provide Teams-specific functionalities.
Constructors
| Teams |
Methods
| cancel |
Cancels a batch operation. |
| fetch |
Fetches the list of channels in a team. |
| fetch |
Fetches information about a meeting. |
| fetch |
Fetches information about a meeting participant. |
| fetch |
Fetches the details of a team. |
| get |
Retrieves a member from a conversation. |
| get |
Retrieves paged members of a conversation. |
| get |
Retrieves the failed entries of a batch operation. |
| get |
Retrieves a member from a conversation or team. |
| get |
Retrieves a member from a conversation or team internally. |
| get |
Retrieves the state of a batch operation. |
| get |
Retrieves a member from a team. |
| send |
Sends a notification to a meeting. |
| send |
Sends a message to all users in a team. |
| send |
Sends a message to all users in a tenant. |
| send |
Sends a message to a list of channels. |
| send |
Sends a message to a list of users. |
Constructor Details
TeamsConnectorClient(ConnectorClient)
Method Details
cancelOperation(string)
Cancels a batch operation.
function cancelOperation(operationId: string): Promise<CancelOperationResponse>
Parameters
- operationId
-
string
The ID of the operation.
Returns
Promise<CancelOperationResponse>
A CancelOperationResponse object containing the response.
fetchChannelList(string)
Fetches the list of channels in a team.
function fetchChannelList(teamId: string): Promise<ChannelInfo[]>
Parameters
- teamId
-
string
The ID of the team.
Returns
Promise<ChannelInfo[]>
An array of ChannelInfo objects representing the channels.
fetchMeetingInfo(string)
Fetches information about a meeting.
function fetchMeetingInfo(meetingId: string): Promise<MeetingInfo>
Parameters
- meetingId
-
string
The ID of the meeting.
Returns
Promise<MeetingInfo>
A MeetingInfo object containing the meeting information.
fetchMeetingParticipant(string, string, string)
Fetches information about a meeting participant.
function fetchMeetingParticipant(meetingId: string, participantId: string, tenantId: string): Promise<string>
Parameters
- meetingId
-
string
The ID of the meeting.
- participantId
-
string
The ID of the participant.
- tenantId
-
string
The tenant ID.
Returns
Promise<string>
A string containing participant information.
fetchTeamDetails(string)
Fetches the details of a team.
function fetchTeamDetails(teamId: string): Promise<TeamDetails>
Parameters
- teamId
-
string
The ID of the team.
Returns
Promise<TeamDetails>
A TeamDetails object containing the team details.
getConversationMember(string, string)
Retrieves a member from a conversation.
function getConversationMember(conversationId: string, userId: string): Promise<ChannelAccount>
Parameters
- conversationId
-
string
The ID of the conversation.
- userId
-
string
The ID of the user to retrieve.
Returns
Promise<ChannelAccount>
A ChannelAccount representing the conversation member.
getConversationPagedMember(string, number, string)
Retrieves paged members of a conversation.
function getConversationPagedMember(conversationId: string, pageSize: number, continuationToken: string): Promise<TeamsPagedMembersResult>
Parameters
- conversationId
-
string
The ID of the conversation.
- pageSize
-
number
The number of members per page.
- continuationToken
-
string
The token for pagination.
Returns
Promise<TeamsPagedMembersResult>
A TeamsPagedMembersResult containing the paged members.
getFailedEntries(string)
Retrieves the failed entries of a batch operation.
function getFailedEntries(operationId: string): Promise<BatchFailedEntriesResponse>
Parameters
- operationId
-
string
The ID of the operation.
Returns
Promise<BatchFailedEntriesResponse>
A BatchFailedEntriesResponse object containing the failed entries.
getMember(Activity, string)
Retrieves a member from a conversation or team.
static function getMember(activity: Activity, userId: string): Promise<TeamsChannelAccount>
Parameters
- activity
- Activity
The activity containing the context.
- userId
-
string
The ID of the user to retrieve.
Returns
Promise<TeamsChannelAccount>
A TeamsChannelAccount representing the member.
getMemberInternal(any, undefined | string, string)
Retrieves a member from a conversation or team internally.
static function getMemberInternal(activity: any, conversationId: undefined | string, userId: string): Promise<ChannelAccount>
Parameters
- activity
-
any
The activity containing the context.
- conversationId
-
undefined | string
The ID of the conversation.
- userId
-
string
The ID of the user to retrieve.
Returns
Promise<ChannelAccount>
A ChannelAccount representing the member.
getOperationState(string)
Retrieves the state of a batch operation.
function getOperationState(operationId: string): Promise<BatchOperationStateResponse>
Parameters
- operationId
-
string
The ID of the operation.
Returns
Promise<BatchOperationStateResponse>
A BatchOperationStateResponse object containing the operation state.
getTeamMember(any, string, string)
Retrieves a member from a team.
static function getTeamMember(activity: any, teamId?: string, userId?: string): Promise<ChannelAccount>
Parameters
- activity
-
any
The activity containing the context.
- teamId
-
string
The ID of the team.
- userId
-
string
The ID of the user to retrieve.
Returns
Promise<ChannelAccount>
A TeamsChannelAccount representing the team member.
sendMeetingNotification(string, TargetedMeetingNotification)
Sends a notification to a meeting.
function sendMeetingNotification(meetingId: string, notification: TargetedMeetingNotification): Promise<MeetingNotificationResponse>
Parameters
- meetingId
-
string
The ID of the meeting.
- notification
- TargetedMeetingNotification
The notification to send.
Returns
Promise<MeetingNotificationResponse>
A MeetingNotificationResponse object containing the response.
sendMessageToAllUsersInTeam(Activity, string, string)
Sends a message to all users in a team.
function sendMessageToAllUsersInTeam(activity: Activity, tenantId: string, teamId: string): Promise<TeamsBatchOperationResponse>
Parameters
- activity
- Activity
The activity to send.
- tenantId
-
string
The tenant ID.
- teamId
-
string
The team ID.
Returns
Promise<TeamsBatchOperationResponse>
A TeamsBatchOperationResponse object containing the response.
sendMessageToAllUsersInTenant(Activity, string)
Sends a message to all users in a tenant.
function sendMessageToAllUsersInTenant(activity: Activity, tenantId: string): Promise<TeamsBatchOperationResponse>
Parameters
- activity
- Activity
The activity to send.
- tenantId
-
string
The tenant ID.
Returns
Promise<TeamsBatchOperationResponse>
A TeamsBatchOperationResponse object containing the response.
sendMessageToListOfChannels(Activity, string, TeamsMember[])
Sends a message to a list of channels.
function sendMessageToListOfChannels(activity: Activity, tenantId: string, members: TeamsMember[]): Promise<TeamsBatchOperationResponse>
Parameters
- activity
- Activity
The activity to send.
- tenantId
-
string
The tenant ID.
- members
The list of members to send the message to.
Returns
Promise<TeamsBatchOperationResponse>
A TeamsBatchOperationResponse object containing the response.
sendMessageToListOfUsers(Activity, string, TeamsMember[])
Sends a message to a list of users.
function sendMessageToListOfUsers(activity: Activity, tenantId: string, members: TeamsMember[]): Promise<TeamsBatchOperationResponse>
Parameters
- activity
- Activity
The activity to send.
- tenantId
-
string
The tenant ID.
- members
The list of members to send the message to.
Returns
Promise<TeamsBatchOperationResponse>
A TeamsBatchOperationResponse object containing the response.