UNPKG

6.74 kBTypeScriptView Raw
1/**
2 * @module botbuilder
3 */
4/**
5 * Copyright (c) Microsoft Corporation. All rights reserved.
6 * Licensed under the MIT License.
7 */
8import { Activity, ChannelInfo, TeamsChannelAccount, TeamDetails, TurnContext, TeamsPagedMembersResult, ConversationReference, TeamsMeetingParticipant, TeamsMeetingInfo } from 'botbuilder-core';
9/**
10 * Provides utility methods for the events and interactions that occur within Microsoft Teams.
11 */
12export declare class TeamsInfo {
13 /**
14 * Gets the meeting participant for the given meeting id and participant id. This only works in
15 * teams scoped meeting conversations.
16 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
17 * @param meetingId The meeting ID to fetch
18 * @param participantId The participant ID to fetch
19 * @param tenantId The tenant ID to use when scoping the request
20 * @returns The [TeamsMeetingParticipant](xref:botbuilder-core.TeamsMeetingParticipant) fetched
21 */
22 static getMeetingParticipant(context: TurnContext, meetingId?: string, participantId?: string, tenantId?: string): Promise<TeamsMeetingParticipant>;
23 /**
24 * Gets the information for the given meeting id.
25 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
26 * @param meetingId The BASE64-encoded id of the Teams meeting.
27 * @returns The [TeamsMeetingInfo](xref:botbuilder-core.TeamsMeetingInfo) fetched
28 */
29 static getMeetingInfo(context: TurnContext, meetingId?: string): Promise<TeamsMeetingInfo>;
30 /**
31 * Gets the details for the given team id. This only works in teams scoped conversations.
32 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
33 * @param teamId The id of the Teams team.
34 * @returns The [TeamDetails](xref:botbuilder-core.TeamDetails) fetched
35 */
36 static getTeamDetails(context: TurnContext, teamId?: string): Promise<TeamDetails>;
37 /**
38 * Creates a new thread in a Teams chat and sends an [Activity](xref:botframework-schema.Activity) to that new thread.
39 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
40 * @param activity The [Activity](xref:botframework-schema.Activity) to send.
41 * @param teamsChannelId The Team's Channel ID, note this is distinct from the Bot Framework activity property with same name.
42 * @param botAppId The bot's appId. This is only used when context.adapter is an instance of CloudAdapter.
43 * @returns The [ConversationReference](xref:botframework-schema.ConversationReference) and the id of the [Activity](xref:botframework-schema.Activity) (if sent).
44 */
45 static sendMessageToTeamsChannel(context: TurnContext, activity: Activity, teamsChannelId: string, botAppId?: string): Promise<[
46 ConversationReference,
47 string
48 ]>;
49 /**
50 * Returns a list of channels in a Team. This only works in teams scoped conversations.
51 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
52 * @param teamId ID of the Teams team.
53 * @returns The list of [ChannelInfo](xref:botframework-schema.ChannelInfo) objects with the conversations.
54 */
55 static getTeamChannels(context: TurnContext, teamId?: string): Promise<ChannelInfo[]>;
56 /**
57 * Gets the conversation members of a one-on-one or group chat.
58 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
59 * @returns The list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount).
60 */
61 static getMembers(context: TurnContext): Promise<TeamsChannelAccount[]>;
62 /**
63 * Gets a pagined list of members of one-on-one, group, or team conversation.
64 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
65 * @param pageSize Suggested number of entries on a page.
66 * @param continuationToken A continuation token.
67 * @returns The [TeamsPagedMembersResult](xref:botframework-schema.TeamsPagedMembersResult) with the list of members.
68 */
69 static getPagedMembers(context: TurnContext, pageSize?: number, continuationToken?: string): Promise<TeamsPagedMembersResult>;
70 /**
71 * Gets the account of a single conversation member.
72 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
73 * @param userId ID of the user in question.
74 * @returns The [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the member.
75 */
76 static getMember(context: TurnContext, userId: string): Promise<TeamsChannelAccount>;
77 /**
78 * Gets the list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) within a team.
79 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
80 * @param teamId ID of the Teams team.
81 * @returns The list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the members.
82 */
83 static getTeamMembers(context: TurnContext, teamId?: string): Promise<TeamsChannelAccount[]>;
84 /**
85 * Gets a paginated list of members of a team.
86 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
87 * @param teamId ID of the Teams team.
88 * @param pageSize The number of entries on the page.
89 * @param continuationToken The continuationToken token.
90 * @returns A [TeamsPagedMembersResult](xref:botframework-schema.TeamsPagedMembersResult) with the list of members.
91 */
92 static getPagedTeamMembers(context: TurnContext, teamId?: string, pageSize?: number, continuationToken?: string): Promise<TeamsPagedMembersResult>;
93 /**
94 * Gets the account of a member in a teams scoped conversation.
95 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
96 * @param teamId ID of the Teams team.
97 * @param userId ID of the Teams user.
98 * @returns The [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the member.
99 */
100 static getTeamMember(context: TurnContext, teamId?: string, userId?: string): Promise<TeamsChannelAccount>;
101 /**
102 * @private
103 */
104 private static getMembersInternal;
105 /**
106 * @private
107 */
108 private static getPagedMembersInternal;
109 /**
110 * @private
111 */
112 private static getMemberInternal;
113 /**
114 * @private
115 */
116 private static getTeamId;
117 /**
118 * @private
119 */
120 private static getConnectorClient;
121 /**
122 * @private
123 */
124 private static getTeamsConnectorClient;
125}
126//# sourceMappingURL=teamsInfo.d.ts.map