1 | /**
|
2 | * @module botbuilder
|
3 | */
|
4 | /**
|
5 | * Copyright (c) Microsoft Corporation. All rights reserved.
|
6 | * Licensed under the MIT License.
|
7 | */
|
8 | import { ActivityHandler, AppBasedLinkQuery, ChannelInfo, FileConsentCardResponse, InvokeResponse, MessagingExtensionAction, MessagingExtensionActionResponse, MessagingExtensionQuery, MessagingExtensionResponse, O365ConnectorCardActionQuery, SigninStateVerificationQuery, TaskModuleRequest, TaskModuleResponse, TeamsChannelAccount, TeamInfo, TurnContext } from 'botbuilder-core';
|
9 | export declare class TeamsActivityHandler extends ActivityHandler {
|
10 | /**
|
11 | *
|
12 | * @param context
|
13 | */
|
14 | protected onInvokeActivity(context: TurnContext): Promise<InvokeResponse>;
|
15 | /**
|
16 | *
|
17 | * @param context
|
18 | */
|
19 | protected handleTeamsCardActionInvoke(context: TurnContext): Promise<InvokeResponse>;
|
20 | /**
|
21 | * Receives invoke activities with Activity name of 'fileConsent/invoke'. Handlers registered here run before
|
22 | * `handleTeamsFileConsentAccept` and `handleTeamsFileConsentDecline`.
|
23 | * Developers are not passed a pointer to the next `handleTeamsFileConsent` handler because the _wrapper_ around
|
24 | * the handler will call `onDialogs` handlers after delegating to `handleTeamsFileConsentAccept` or `handleTeamsFileConsentDecline`.
|
25 | * @param context
|
26 | * @param fileConsentCardResponse
|
27 | */
|
28 | protected handleTeamsFileConsent(context: TurnContext, fileConsentCardResponse: FileConsentCardResponse): Promise<void>;
|
29 | /**
|
30 | * Receives invoke activities with Activity name of 'fileConsent/invoke' with confirmation from user
|
31 | * @remarks
|
32 | * This type of invoke activity occur during the File Consent flow.
|
33 | * @param context
|
34 | * @param fileConsentCardResponse
|
35 | */
|
36 | protected handleTeamsFileConsentAccept(context: TurnContext, fileConsentCardResponse: FileConsentCardResponse): Promise<void>;
|
37 | /**
|
38 | * Receives invoke activities with Activity name of 'fileConsent/invoke' with decline from user
|
39 | * @remarks
|
40 | * This type of invoke activity occur during the File Consent flow.
|
41 | * @param context
|
42 | * @param fileConsentCardResponse
|
43 | */
|
44 | protected handleTeamsFileConsentDecline(context: TurnContext, fileConsentCardResponse: FileConsentCardResponse): Promise<void>;
|
45 | /**
|
46 | * Receives invoke activities with Activity name of 'actionableMessage/executeAction'
|
47 | */
|
48 | protected handleTeamsO365ConnectorCardAction(context: TurnContext, query: O365ConnectorCardActionQuery): Promise<void>;
|
49 | protected onSignInInvoke(context: TurnContext): Promise<void>;
|
50 | /**
|
51 | * Receives invoke activities with Activity name of 'signin/verifyState'
|
52 | * @param context
|
53 | * @param action
|
54 | */
|
55 | protected handleTeamsSigninVerifyState(context: TurnContext, query: SigninStateVerificationQuery): Promise<void>;
|
56 | /**
|
57 | * Receives invoke activities with Activity name of 'signin/tokenExchange'
|
58 | * @param context
|
59 | * @param action
|
60 | */
|
61 | protected handleTeamsSigninTokenExchange(context: TurnContext, query: SigninStateVerificationQuery): Promise<void>;
|
62 | /**
|
63 | * Receives invoke activities with Activity name of 'composeExtension/onCardButtonClicked'
|
64 | * @param context
|
65 | * @param cardData
|
66 | */
|
67 | protected handleTeamsMessagingExtensionCardButtonClicked(context: TurnContext, cardData: any): Promise<void>;
|
68 | /**
|
69 | * Receives invoke activities with Activity name of 'task/fetch'
|
70 | * @param context
|
71 | * @param taskModuleRequest
|
72 | */
|
73 | protected handleTeamsTaskModuleFetch(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse>;
|
74 | /**
|
75 | * Receives invoke activities with Activity name of 'task/submit'
|
76 | * @param context
|
77 | * @param taskModuleRequest
|
78 | */
|
79 | protected handleTeamsTaskModuleSubmit(context: TurnContext, taskModuleRequest: TaskModuleRequest): Promise<TaskModuleResponse>;
|
80 | /**
|
81 | * Receives invoke activities with Activity name of 'composeExtension/queryLink'
|
82 | * @remarks
|
83 | * Used in creating a Search-based Message Extension.
|
84 | * @param context
|
85 | * @param query
|
86 | */
|
87 | protected handleTeamsAppBasedLinkQuery(context: TurnContext, query: AppBasedLinkQuery): Promise<MessagingExtensionResponse>;
|
88 | /**
|
89 | * Receives invoke activities with the name 'composeExtension/query'.
|
90 | * @remarks
|
91 | * Used in creating a Search-based Message Extension.
|
92 | * @param context
|
93 | * @param action
|
94 | */
|
95 | protected handleTeamsMessagingExtensionQuery(context: TurnContext, query: MessagingExtensionQuery): Promise<MessagingExtensionResponse>;
|
96 | /**
|
97 | * Receives invoke activities with the name 'composeExtension/selectItem'.
|
98 | * @remarks
|
99 | * Used in creating a Search-based Message Extension.
|
100 | * @param context
|
101 | * @param action
|
102 | */
|
103 | protected handleTeamsMessagingExtensionSelectItem(context: TurnContext, query: any): Promise<MessagingExtensionResponse>;
|
104 | /**
|
105 | * Receives invoke activities with the name 'composeExtension/submitAction' and dispatches to botMessagePreview-flows as applicable.
|
106 | * @remarks
|
107 | * A handler registered through this method does not dispatch to the next handler (either `handleTeamsMessagingExtensionSubmitAction`, `handleTeamsMessagingExtensionBotMessagePreviewEdit`, or `handleTeamsMessagingExtensionBotMessagePreviewSend`).
|
108 | * This method exists for developers to optionally add more logic before the TeamsActivityHandler routes the activity to one of the
|
109 | * previously mentioned handlers.
|
110 | * @param context
|
111 | * @param action
|
112 | */
|
113 | protected handleTeamsMessagingExtensionSubmitActionDispatch(context: TurnContext, action: MessagingExtensionAction): Promise<MessagingExtensionActionResponse>;
|
114 | /**
|
115 | * Receives invoke activities with the name 'composeExtension/submitAction'.
|
116 | * @remarks
|
117 | * This invoke activity is received when a user
|
118 | * @param context
|
119 | * @param action
|
120 | */
|
121 | protected handleTeamsMessagingExtensionSubmitAction(context: TurnContext, action: MessagingExtensionAction): Promise<MessagingExtensionActionResponse>;
|
122 | /**
|
123 | * Receives invoke activities with the name 'composeExtension/submitAction' with the 'botMessagePreview' property present on activity.value.
|
124 | * The value for 'botMessagePreview' is 'edit'.
|
125 | * @remarks
|
126 | * This invoke activity is received when a user
|
127 | * @param context
|
128 | * @param action
|
129 | */
|
130 | protected handleTeamsMessagingExtensionBotMessagePreviewEdit(context: TurnContext, action: MessagingExtensionAction): Promise<MessagingExtensionActionResponse>;
|
131 | /**
|
132 | * Receives invoke activities with the name 'composeExtension/submitAction' with the 'botMessagePreview' property present on activity.value.
|
133 | * The value for 'botMessagePreview' is 'send'.
|
134 | * @remarks
|
135 | * This invoke activity is received when a user
|
136 | * @param context
|
137 | * @param action
|
138 | */
|
139 | protected handleTeamsMessagingExtensionBotMessagePreviewSend(context: TurnContext, action: MessagingExtensionAction): Promise<MessagingExtensionActionResponse>;
|
140 | /**
|
141 | * Receives invoke activities with the name 'composeExtension/fetchTask'
|
142 | * @param context
|
143 | * @param action
|
144 | */
|
145 | protected handleTeamsMessagingExtensionFetchTask(context: TurnContext, action: MessagingExtensionAction): Promise<MessagingExtensionActionResponse>;
|
146 | /**
|
147 | * Receives invoke activities with the name 'composeExtension/querySettingUrl'
|
148 | * @param context
|
149 | * @param query
|
150 | */
|
151 | protected handleTeamsMessagingExtensionConfigurationQuerySettingUrl(context: TurnContext, query: MessagingExtensionQuery): Promise<MessagingExtensionResponse>;
|
152 | /**
|
153 | * Receives invoke activities with the name 'composeExtension/setting'
|
154 | * @param context
|
155 | * @param query
|
156 | */
|
157 | protected handleTeamsMessagingExtensionConfigurationSetting(context: TurnContext, settings: any): Promise<void>;
|
158 | /**
|
159 | * Override this method to change the dispatching of ConversationUpdate activities.
|
160 | * @remarks
|
161 | *
|
162 | * @param context
|
163 | */
|
164 | protected dispatchConversationUpdateActivity(context: TurnContext): Promise<void>;
|
165 | /**
|
166 | * Called in `dispatchConversationUpdateActivity()` to trigger the `'TeamsMembersAdded'` handlers.
|
167 | * @remarks
|
168 | * If no handlers are registered for the `'TeamsMembersAdded'` event, the `'MembersAdded'` handlers will run instead.
|
169 | * @param context
|
170 | */
|
171 | protected onTeamsMembersAdded(context: TurnContext): Promise<void>;
|
172 | /**
|
173 | * Called in `dispatchConversationUpdateActivity()` to trigger the `'TeamsMembersRemoved'` handlers.
|
174 | * @remarks
|
175 | * If no handlers are registered for the `'TeamsMembersRemoved'` event, the `'MembersRemoved'` handlers will run instead.
|
176 | * @param context
|
177 | */
|
178 | protected onTeamsMembersRemoved(context: TurnContext): Promise<void>;
|
179 | /**
|
180 | *
|
181 | * @param context
|
182 | */
|
183 | protected onTeamsChannelCreated(context: any): Promise<void>;
|
184 | /**
|
185 | *
|
186 | * @param context
|
187 | */
|
188 | protected onTeamsChannelDeleted(context: any): Promise<void>;
|
189 | /**
|
190 | *
|
191 | * @param context
|
192 | */
|
193 | protected onTeamsChannelRenamed(context: any): Promise<void>;
|
194 | /**
|
195 | *
|
196 | * @param context
|
197 | */
|
198 | protected onTeamsTeamRenamed(context: any): Promise<void>;
|
199 | /**
|
200 | *
|
201 | * @param handler
|
202 | */
|
203 | onTeamsMembersAddedEvent(handler: (membersAdded: TeamsChannelAccount[], teamInfo: TeamInfo, context: TurnContext, next: () => Promise<void>) => Promise<void>): this;
|
204 | /**
|
205 | *
|
206 | * @param handler
|
207 | */
|
208 | onTeamsMembersRemovedEvent(handler: (membersRemoved: TeamsChannelAccount[], teamInfo: TeamInfo, context: TurnContext, next: () => Promise<void>) => Promise<void>): this;
|
209 | /**
|
210 | *
|
211 | * @param handler
|
212 | */
|
213 | onTeamsChannelCreatedEvent(handler: (channelInfo: ChannelInfo, teamInfo: TeamInfo, context: TurnContext, next: () => Promise<void>) => Promise<void>): this;
|
214 | /**
|
215 | *
|
216 | * @param handler
|
217 | */
|
218 | onTeamsChannelDeletedEvent(handler: (channelInfo: ChannelInfo, teamInfo: TeamInfo, context: TurnContext, next: () => Promise<void>) => Promise<void>): this;
|
219 | /**
|
220 | *
|
221 | * @param handler
|
222 | */
|
223 | onTeamsChannelRenamedEvent(handler: (channelInfo: ChannelInfo, teamInfo: TeamInfo, context: TurnContext, next: () => Promise<void>) => Promise<void>): this;
|
224 | /**
|
225 | *
|
226 | * @param handler
|
227 | */
|
228 | onTeamsTeamRenamedEvent(handler: (teamInfo: TeamInfo, context: TurnContext, next: () => Promise<void>) => Promise<void>): this;
|
229 | }
|
230 | //# sourceMappingURL=teamsActivityHandler.d.ts.map |
\ | No newline at end of file |