UNPKG

6.59 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<[ConversationReference, string]>;
46 /**
47 * Returns a list of channels in a Team. This only works in teams scoped conversations.
48 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
49 * @param teamId ID of the Teams team.
50 * @returns The list of [ChannelInfo](xref:botframework-schema.ChannelInfo) objects with the conversations.
51 */
52 static getTeamChannels(context: TurnContext, teamId?: string): Promise<ChannelInfo[]>;
53 /**
54 * Gets the conversation members of a one-on-one or group chat.
55 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
56 * @returns The list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount).
57 */
58 static getMembers(context: TurnContext): Promise<TeamsChannelAccount[]>;
59 /**
60 * Gets a pagined list of members of one-on-one, group, or team conversation.
61 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
62 * @param pageSize Suggested number of entries on a page.
63 * @param continuationToken A continuation token.
64 * @returns The [TeamsPagedMembersResult](xref:botframework-schema.TeamsPagedMembersResult) with the list of members.
65 */
66 static getPagedMembers(context: TurnContext, pageSize?: number, continuationToken?: string): Promise<TeamsPagedMembersResult>;
67 /**
68 * Gets the account of a single conversation member.
69 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
70 * @param userId ID of the user in question.
71 * @returns The [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the member.
72 */
73 static getMember(context: TurnContext, userId: string): Promise<TeamsChannelAccount>;
74 /**
75 * Gets the list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) within a team.
76 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
77 * @param teamId ID of the Teams team.
78 * @returns The list of [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the members.
79 */
80 static getTeamMembers(context: TurnContext, teamId?: string): Promise<TeamsChannelAccount[]>;
81 /**
82 * Gets a paginated list of members of a team.
83 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
84 * @param teamId ID of the Teams team.
85 * @param pageSize The number of entries on the page.
86 * @param continuationToken The continuationToken token.
87 * @returns A [TeamsPagedMembersResult](xref:botframework-schema.TeamsPagedMembersResult) with the list of members.
88 */
89 static getPagedTeamMembers(context: TurnContext, teamId?: string, pageSize?: number, continuationToken?: string): Promise<TeamsPagedMembersResult>;
90 /**
91 * Gets the account of a member in a teams scoped conversation.
92 * @param context The [TurnContext](xref:botbuilder-core.TurnContext) for this turn.
93 * @param teamId ID of the Teams team.
94 * @param userId ID of the Teams user.
95 * @returns The [TeamsChannelAccount](xref:botframework-schema.TeamsChannelAccount) of the member.
96 */
97 static getTeamMember(context: TurnContext, teamId?: string, userId?: string): Promise<TeamsChannelAccount>;
98 /**
99 * @private
100 */
101 private static getMembersInternal;
102 /**
103 * @private
104 */
105 private static getPagedMembersInternal;
106 /**
107 * @private
108 */
109 private static getMemberInternal;
110 /**
111 * @private
112 */
113 private static getTeamId;
114 /**
115 * @private
116 */
117 private static getConnectorClient;
118 /**
119 * @private
120 */
121 private static getTeamsConnectorClient;
122}
123//# sourceMappingURL=teamsInfo.d.ts.map
\No newline at end of file