@microsoft/teamsfx 2.1.1-alpha.f4104c62b.0 → 2.2.0-alpha.034f24ebd.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1452,7 +1452,10 @@ var InvokeResponseErrorCode;
1452
1452
  * @remarks
1453
1453
  * Only work on server side.
1454
1454
  */
1455
- class ConversationBot {
1455
+ /**
1456
+ * @deprecated Use `BotBuilderCloudAdapter.ConversationBot` instead.
1457
+ */
1458
+ class ConversationBot$1 {
1456
1459
  /**
1457
1460
  * Creates new instance of the `ConversationBot`.
1458
1461
  *
@@ -1526,7 +1529,7 @@ class BotSsoExecutionDialog {
1526
1529
  * @param onError - an optional error handler that can catch exceptions during message sending.
1527
1530
  * @returns A `Promise` representing the asynchronous operation.
1528
1531
  */
1529
- function sendMessage(target, text, onError) {
1532
+ function sendMessage$1(target, text, onError) {
1530
1533
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendMessage"), ErrorCode.RuntimeNotSupported);
1531
1534
  }
1532
1535
  /**
@@ -1540,7 +1543,7 @@ function sendMessage(target, text, onError) {
1540
1543
  * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
1541
1544
  * @returns A `Promise` representing the asynchronous operation.
1542
1545
  */
1543
- function sendAdaptiveCard(target, card, onError) {
1546
+ function sendAdaptiveCard$1(target, card, onError) {
1544
1547
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendAdaptiveCard"), ErrorCode.RuntimeNotSupported);
1545
1548
  }
1546
1549
  /**
@@ -1551,7 +1554,7 @@ function sendAdaptiveCard(target, card, onError) {
1551
1554
  *
1552
1555
  * It's recommended to get channels from {@link TeamsBotInstallation.channels()}.
1553
1556
  */
1554
- class Channel {
1557
+ class Channel$1 {
1555
1558
  /**
1556
1559
  * Constructor.
1557
1560
  *
@@ -1608,7 +1611,7 @@ class Channel {
1608
1611
  *
1609
1612
  * It's recommended to get members from {@link TeamsBotInstallation.members()}.
1610
1613
  */
1611
- class Member {
1614
+ class Member$1 {
1612
1615
  /**
1613
1616
  * Constructor.
1614
1617
  *
@@ -1668,7 +1671,10 @@ class Member {
1668
1671
  *
1669
1672
  * It's recommended to get bot installations from {@link ConversationBot.installations()}.
1670
1673
  */
1671
- class TeamsBotInstallation {
1674
+ /**
1675
+ * @deprecated Use `BotBuilderCloudAdapter.TeamsBotInstallation` instead.
1676
+ */
1677
+ class TeamsBotInstallation$1 {
1672
1678
  /**
1673
1679
  * Constructor
1674
1680
  *
@@ -1765,7 +1771,10 @@ class TeamsBotInstallation {
1765
1771
  * }
1766
1772
  * ```
1767
1773
  */
1768
- class NotificationBot {
1774
+ /**
1775
+ * @deprecated Use `BotBuilderCloudAdapter.NotificationBot` instead.
1776
+ */
1777
+ class NotificationBot$1 {
1769
1778
  /**
1770
1779
  * constructor of the notification bot.
1771
1780
  *
@@ -1857,7 +1866,7 @@ class NotificationBot {
1857
1866
  * The search scope is a flagged enum and it can be combined with `|`.
1858
1867
  * For example, to search from personal chat and group chat, use `SearchScope.Person | SearchScope.Group`.
1859
1868
  */
1860
- var SearchScope;
1869
+ var SearchScope$1;
1861
1870
  (function (SearchScope) {
1862
1871
  /**
1863
1872
  * Search members from the installations in personal chat only.
@@ -1875,7 +1884,7 @@ var SearchScope;
1875
1884
  * Search members from all installations including personal chat, group chat and Teams channel.
1876
1885
  */
1877
1886
  SearchScope[SearchScope["All"] = 7] = "All";
1878
- })(SearchScope || (SearchScope = {}));
1887
+ })(SearchScope$1 || (SearchScope$1 = {}));
1879
1888
 
1880
1889
  // Copyright (c) Microsoft Corporation.
1881
1890
  /**
@@ -1884,7 +1893,10 @@ var SearchScope;
1884
1893
  * @remarks
1885
1894
  * Only work on server side.
1886
1895
  */
1887
- class CommandBot {
1896
+ /**
1897
+ * @deprecated Use `BotBuilderCloudAdapter.CommandBot` instead.
1898
+ */
1899
+ class CommandBot$1 {
1888
1900
  /**
1889
1901
  * Creates a new instance of the `CommandBot`.
1890
1902
  *
@@ -1940,7 +1952,10 @@ class CommandBot {
1940
1952
  * @remarks
1941
1953
  * Only work on server side.
1942
1954
  */
1943
- class CardActionBot {
1955
+ /**
1956
+ * @deprecated Use `BotBuilderCloudAdapter.CardActionBot` instead.
1957
+ */
1958
+ class CardActionBot$1 {
1944
1959
  /**
1945
1960
  * Creates a new instance of the `CardActionBot`.
1946
1961
  *
@@ -1989,5 +2004,526 @@ async function handleMessageExtensionQueryWithSSO(context, config, initiateLogin
1989
2004
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "queryWithToken in message extension"), ErrorCode.RuntimeNotSupported);
1990
2005
  }
1991
2006
 
1992
- export { AdaptiveCardResponse, ApiKeyLocation, ApiKeyProvider, AppCredential, BasicAuthProvider, BearerTokenAuthProvider, BotSsoExecutionDialog, CardActionBot, CertificateAuthProvider, Channel, CommandBot, ConversationBot, ErrorCode, ErrorWithCode, IdentityType, InvokeResponseErrorCode, LogLevel, Member, MsGraphAuthProvider, NotificationBot, NotificationTargetType, OnBehalfOfUserCredential, TeamsBotInstallation, TeamsBotSsoPrompt, TeamsFx, TeamsUserCredential, createApiClient, createMicrosoftGraphClient, createMicrosoftGraphClientWithCredential, createPemCertOption, createPfxCertOption, getLogLevel, getTediousConnectionConfig, handleMessageExtensionQueryWithSSO, handleMessageExtensionQueryWithToken, sendAdaptiveCard, sendMessage, setLogFunction, setLogLevel, setLogger };
2007
+ // Copyright (c) Microsoft Corporation.
2008
+ /**
2009
+ * Provide utilities for bot conversation, including:
2010
+ * - handle command and response.
2011
+ * - send notification to varies targets (e.g., member, group, channel).
2012
+ *
2013
+ * @remarks
2014
+ * Only work on server side.
2015
+ */
2016
+ class ConversationBot {
2017
+ /**
2018
+ * Create new instance of the `ConversationBot`.
2019
+ *
2020
+ * @param options - The initialize options.
2021
+ *
2022
+ * @remarks
2023
+ * Only work on server side.
2024
+ */
2025
+ constructor(options) {
2026
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "ConversationBot"), ErrorCode.RuntimeNotSupported);
2027
+ }
2028
+ /**
2029
+ * The request handler to integrate with web request.
2030
+ *
2031
+ * @param req - An incoming HTTP [Request](xref:botbuilder.Request).
2032
+ * @param res - The corresponding HTTP [Response](xref:botbuilder.Response).
2033
+ * @param logic - The additional function to handle bot context.
2034
+ *
2035
+ * @remarks
2036
+ * Only work on server side.
2037
+ */
2038
+ async requestHandler(req, res, logic) {
2039
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "ConversationBot"), ErrorCode.RuntimeNotSupported);
2040
+ }
2041
+ }
2042
+
2043
+ // Copyright (c) Microsoft Corporation.
2044
+ /**
2045
+ * Send a plain text message to a notification target.
2046
+ *
2047
+ * @remarks
2048
+ * Only work on server side.
2049
+ *
2050
+ * @param target - The notification target.
2051
+ * @param text - The plain text message.
2052
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2053
+ *
2054
+ * @returns A `Promise` representing the asynchronous operation.
2055
+ */
2056
+ function sendMessage(target, text, onError) {
2057
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendMessage"), ErrorCode.RuntimeNotSupported);
2058
+ }
2059
+ /**
2060
+ * Send an adaptive card message to a notification target.
2061
+ *
2062
+ * @remarks
2063
+ * Only work on server side.
2064
+ *
2065
+ * @param target - The notification target.
2066
+ * @param card - The adaptive card raw JSON.
2067
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2068
+ *
2069
+ * @returns A `Promise` representing the asynchronous operation.
2070
+ */
2071
+ function sendAdaptiveCard(target, card, onError) {
2072
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendAdaptiveCard"), ErrorCode.RuntimeNotSupported);
2073
+ }
2074
+ /**
2075
+ * A {@link NotificationTarget} that represents a team channel.
2076
+ *
2077
+ * @remarks
2078
+ * Only work on server side.
2079
+ *
2080
+ * It's recommended to get channels from {@link TeamsBotInstallation.channels()}.
2081
+ */
2082
+ class Channel {
2083
+ /**
2084
+ * Constructor.
2085
+ *
2086
+ * @remarks
2087
+ * Only work on server side.
2088
+ *
2089
+ * It's recommended to get channels from {@link TeamsBotInstallation.channels()}, instead of using this constructor.
2090
+ *
2091
+ * @param parent - The parent {@link TeamsBotInstallation} where this channel is created from.
2092
+ * @param info - Detailed channel information.
2093
+ */
2094
+ constructor(parent, info) {
2095
+ /**
2096
+ * Notification target type. For channel it's always "Channel".
2097
+ *
2098
+ * @remarks
2099
+ * Only work on server side.
2100
+ */
2101
+ this.type = NotificationTargetType.Channel;
2102
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
2103
+ }
2104
+ /**
2105
+ * Send a plain text message.
2106
+ *
2107
+ * @remarks
2108
+ * Only work on server side.
2109
+ *
2110
+ * @param text - The plain text message.
2111
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2112
+ *
2113
+ * @returns The response of sending message.
2114
+ */
2115
+ sendMessage(text, onError) {
2116
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
2117
+ }
2118
+ /**
2119
+ * Send an adaptive card message.
2120
+ *
2121
+ * @remarks
2122
+ * Only work on server side.
2123
+ *
2124
+ * @param card - The adaptive card raw JSON.
2125
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2126
+ *
2127
+ * @returns The response of sending adaptive card message.
2128
+ */
2129
+ async sendAdaptiveCard(card, onError) {
2130
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
2131
+ }
2132
+ }
2133
+ /**
2134
+ * A {@link NotificationTarget} that represents a team member.
2135
+ *
2136
+ * @remarks
2137
+ * Only work on server side.
2138
+ *
2139
+ * It's recommended to get members from {@link TeamsBotInstallation.members()}.
2140
+ */
2141
+ class Member {
2142
+ /**
2143
+ * Constructor.
2144
+ *
2145
+ * @remarks
2146
+ * Only work on server side.
2147
+ *
2148
+ * It's recommended to get members from {@link TeamsBotInstallation.members()}, instead of using this constructor.
2149
+ *
2150
+ * @param parent - The parent {@link TeamsBotInstallation} where this member is created from.
2151
+ * @param account - Detailed member account information.
2152
+ */
2153
+ constructor(parent, account) {
2154
+ /**
2155
+ * Notification target type. For member it's always "Person".
2156
+ *
2157
+ * @remarks
2158
+ * Only work on server side.
2159
+ */
2160
+ this.type = NotificationTargetType.Person;
2161
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
2162
+ }
2163
+ /**
2164
+ * Send a plain text message.
2165
+ *
2166
+ * @remarks
2167
+ * Only work on server side.
2168
+ *
2169
+ * @param text - The plain text message.
2170
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2171
+ *
2172
+ * @returns The response of sending message.
2173
+ */
2174
+ sendMessage(text, onError) {
2175
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
2176
+ }
2177
+ /**
2178
+ * Send an adaptive card message.
2179
+ *
2180
+ * @remarks
2181
+ * Only work on server side.
2182
+ *
2183
+ * @param card - The adaptive card raw JSON.
2184
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2185
+ *
2186
+ * @returns The response of sending adaptive card message.
2187
+ */
2188
+ async sendAdaptiveCard(card, onError) {
2189
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
2190
+ }
2191
+ }
2192
+ /**
2193
+ * A {@link NotificationTarget} that represents a bot installation. Teams Bot could be installed into
2194
+ * - Personal chat
2195
+ * - Group chat
2196
+ * - Team (by default the `General` channel)
2197
+ *
2198
+ * @remarks
2199
+ * Only work on server side.
2200
+ *
2201
+ * It's recommended to get bot installations from {@link ConversationBot.installations()}.
2202
+ */
2203
+ class TeamsBotInstallation {
2204
+ /**
2205
+ * Constructor
2206
+ *
2207
+ * @remarks
2208
+ * Only work on server side.
2209
+ *
2210
+ * It's recommended to get bot installations from {@link ConversationBot.installations()}, instead of using this constructor.
2211
+ *
2212
+ * @param adapter - The bound `CloudAdapter`.
2213
+ * @param conversationReference - The bound `ConversationReference`.
2214
+ */
2215
+ constructor(adapter, conversationReference) {
2216
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2217
+ }
2218
+ /**
2219
+ * Send a plain text message.
2220
+ *
2221
+ * @remarks
2222
+ * Only work on server side.
2223
+ *
2224
+ * @param text - The plain text message.
2225
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2226
+ *
2227
+ * @returns The response of sending message.
2228
+ */
2229
+ sendMessage(text, onError) {
2230
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2231
+ }
2232
+ /**
2233
+ * Send an adaptive card message.
2234
+ *
2235
+ * @remarks
2236
+ * Only work on server side.
2237
+ *
2238
+ * @param card - The adaptive card raw JSON.
2239
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2240
+ *
2241
+ * @returns The response of sending adaptive card message.
2242
+ */
2243
+ sendAdaptiveCard(card, onError) {
2244
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2245
+ }
2246
+ /**
2247
+ * Get channels from this bot installation.
2248
+ *
2249
+ * @remarks
2250
+ * Only work on server side.
2251
+ *
2252
+ * @returns An array of channels if bot is installed into a team, otherwise returns an empty array.
2253
+ */
2254
+ async channels() {
2255
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2256
+ }
2257
+ /**
2258
+ * Get members from this bot installation.
2259
+ *
2260
+ * @remarks
2261
+ * Only work on server side.
2262
+ *
2263
+ * @returns An array of members from where the bot is installed.
2264
+ */
2265
+ async members() {
2266
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2267
+ }
2268
+ /**
2269
+ * Get team details from this bot installation
2270
+ *
2271
+ * @returns The team details if bot is installed into a team, otherwise returns undefined.
2272
+ */
2273
+ async getTeamDetails() {
2274
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2275
+ }
2276
+ }
2277
+ /**
2278
+ * Provide static utilities for bot notification.
2279
+ *
2280
+ * @remarks
2281
+ * Only work on server side.
2282
+ *
2283
+ * @example
2284
+ * Here's an example on how to send notification via Teams Bot.
2285
+ * ```typescript
2286
+ * // initialize (it's recommended to be called before handling any bot message)
2287
+ * const notificationBot = new NotificationBot(adapter);
2288
+ *
2289
+ * // get all bot installations and send message
2290
+ * for (const target of await notificationBot.installations()) {
2291
+ * await target.sendMessage("Hello Notification");
2292
+ * }
2293
+ *
2294
+ * // alternative - send message to all members
2295
+ * for (const target of await notificationBot.installations()) {
2296
+ * for (const member of await target.members()) {
2297
+ * await member.sendMessage("Hello Notification");
2298
+ * }
2299
+ * }
2300
+ * ```
2301
+ */
2302
+ class NotificationBot {
2303
+ /**
2304
+ * Constructor of the notification bot.
2305
+ *
2306
+ * @remarks
2307
+ * Only work on server side.
2308
+ *
2309
+ * To ensure accuracy, it's recommended to initialize before handling any message.
2310
+ *
2311
+ * @param adapter - The bound `CloudAdapter`
2312
+ * @param options - The initialize options
2313
+ */
2314
+ constructor(adapter, options) {
2315
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2316
+ }
2317
+ /**
2318
+ * Get all targets where the bot is installed.
2319
+ *
2320
+ * @remarks
2321
+ * Only work on server side.
2322
+ *
2323
+ * The result is retrieving from the persisted storage.
2324
+ *
2325
+ * @returns An array of {@link TeamsBotInstallation}.
2326
+ */
2327
+ static async installations() {
2328
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2329
+ }
2330
+ /**
2331
+ * Return the first {@link Member} where predicate is true, and undefined otherwise.
2332
+ *
2333
+ * @remarks
2334
+ * Only work on server side.
2335
+ *
2336
+ * @param predicate find calls predicate once for each member of the installation,
2337
+ * until it finds one where predicate returns true. If such a member is found,
2338
+ * find immediately returns that member. Otherwise, find returns undefined.
2339
+ * @param scope the scope to find members from the installations (personal chat, group chat, Teams channel).
2340
+ *
2341
+ * @returns The first {@link Member} where predicate is true, and undefined otherwise.
2342
+ */
2343
+ async findMember(predicate, scope) {
2344
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2345
+ }
2346
+ /**
2347
+ * Return the first {@link Channel} where predicate is true, and undefined otherwise.
2348
+ * (Ensure the bot app is installed into the `General` channel, otherwise undefined will be returned.)
2349
+ *
2350
+ * @remarks
2351
+ * Only work on server side.
2352
+ *
2353
+ * @param predicate - Find calls predicate once for each channel of the installation,
2354
+ * until it finds one where predicate returns true. If such a channel is found, find
2355
+ * immediately returns that channel. Otherwise, find returns undefined.
2356
+ *
2357
+ * @returns The first {@link Channel} where predicate is true, and `undefined` otherwise.
2358
+ */
2359
+ async findChannel(predicate) {
2360
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2361
+ }
2362
+ /**
2363
+ * Return all {@link Member} where predicate is true, and empty array otherwise.
2364
+ *
2365
+ * @remarks
2366
+ * Only work on server side.
2367
+ *
2368
+ * @param predicate - Find calls predicate for each member of the installation.
2369
+ * @param scope - The scope to find members from the installations.
2370
+ * (personal chat, group chat, Teams channel).
2371
+ *
2372
+ * @returns An array of {@link Member} where predicate is true, and empty array otherwise.
2373
+ */
2374
+ async findAllMembers(predicate, scope) {
2375
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2376
+ }
2377
+ /**
2378
+ * Return all {@link Channel} where predicate is true, and empty array otherwise.
2379
+ * (Ensure the bot app is installed into the `General` channel, otherwise empty array will be returned.)
2380
+ *
2381
+ * @remarks
2382
+ * Only work on server side.
2383
+ *
2384
+ * @param predicate - Find calls predicate for each channel of the installation.
2385
+ *
2386
+ * @returns An array of {@link Channel} where predicate is true, and empty array otherwise.
2387
+ */
2388
+ async findAllChannels(predicate) {
2389
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2390
+ }
2391
+ }
2392
+ /**
2393
+ * The search scope when calling {@link NotificationBot.findMember} and {@link NotificationBot.findAllMembers}.
2394
+ * The search scope is a flagged enum and it can be combined with `|`.
2395
+ * For example, to search from personal chat and group chat, use `SearchScope.Person | SearchScope.Group`.
2396
+ */
2397
+ var SearchScope;
2398
+ (function (SearchScope) {
2399
+ /**
2400
+ * Search members from the installations in personal chat only.
2401
+ */
2402
+ SearchScope[SearchScope["Person"] = 1] = "Person";
2403
+ /**
2404
+ * Search members from the installations in group chat only.
2405
+ */
2406
+ SearchScope[SearchScope["Group"] = 2] = "Group";
2407
+ /**
2408
+ * Search members from the installations in Teams channel only.
2409
+ */
2410
+ SearchScope[SearchScope["Channel"] = 4] = "Channel";
2411
+ /**
2412
+ * Search members from all installations including personal chat, group chat and Teams channel.
2413
+ */
2414
+ SearchScope[SearchScope["All"] = 7] = "All";
2415
+ })(SearchScope || (SearchScope = {}));
2416
+
2417
+ // Copyright (c) Microsoft Corporation.
2418
+ /**
2419
+ * A command bot for receiving commands and sending responses in Teams.
2420
+ *
2421
+ * @remarks
2422
+ * Only work on server side.
2423
+ */
2424
+ class CommandBot {
2425
+ /**
2426
+ * Create a new instance of the `CommandBot`.
2427
+ *
2428
+ * @param adapter - The bound `CloudAdapter`.
2429
+ * @param commands - The commands to be registered with the command bot. Each command should implement the interface {@link TeamsFxBotCommandHandler} so that it can be correctly handled by this command bot.
2430
+ */
2431
+ constructor(adapter, commands) {
2432
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2433
+ }
2434
+ /**
2435
+ * Register a command into the command bot.
2436
+ *
2437
+ * @param command - The command to be registered.
2438
+ *
2439
+ * @remarks
2440
+ * Only work on server side.
2441
+ */
2442
+ registerCommand(command) {
2443
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2444
+ }
2445
+ /**
2446
+ * Register commands into the command bot.
2447
+ *
2448
+ * @param commands - The commands to be registered.
2449
+ *
2450
+ * @remarks
2451
+ * Only work on server side.
2452
+ */
2453
+ registerCommands(commands) {
2454
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2455
+ }
2456
+ /**
2457
+ * Register a sso command into the command bot.
2458
+ *
2459
+ * @param ssoCommand - The sso command to be registered.
2460
+ */
2461
+ registerSsoCommand(ssoCommand) {
2462
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2463
+ }
2464
+ /**
2465
+ * Register sso commands into the command bot.
2466
+ *
2467
+ * @param ssoCommands - The sso commands to be registered.
2468
+ */
2469
+ registerSsoCommands(ssoCommands) {
2470
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2471
+ }
2472
+ }
2473
+
2474
+ /**
2475
+ * A card action bot to respond to adaptive card universal actions.
2476
+ *
2477
+ * @remarks
2478
+ * Only work on server side.
2479
+ */
2480
+ class CardActionBot {
2481
+ /**
2482
+ * Create a new instance of the `CardActionBot`.
2483
+ *
2484
+ * @param adapter - The bound `CloudAdapter`.
2485
+ * @param options - The initialize options.
2486
+ */
2487
+ constructor(adapter, options) {
2488
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CardActionBot"), ErrorCode.RuntimeNotSupported);
2489
+ }
2490
+ /**
2491
+ * Register a card action handler to the bot.
2492
+ *
2493
+ * @param actionHandler - A card action handler to be registered.
2494
+ *
2495
+ * @remarks
2496
+ * Only work on server side.
2497
+ */
2498
+ registerHandler(actionHandler) {
2499
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CardActionBot"), ErrorCode.RuntimeNotSupported);
2500
+ }
2501
+ /**
2502
+ * Register card action handlers to the bot.
2503
+ *
2504
+ * @param actionHandlers - A set of card action handlers to be registered.
2505
+ *
2506
+ * @remarks
2507
+ * Only work on server side.
2508
+ */
2509
+ registerHandlers(actionHandlers) {
2510
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CardActionBot"), ErrorCode.RuntimeNotSupported);
2511
+ }
2512
+ }
2513
+
2514
+ var conversationWithCloudAdapter_browser = /*#__PURE__*/Object.freeze({
2515
+ __proto__: null,
2516
+ ConversationBot: ConversationBot,
2517
+ BotSsoExecutionDialog: BotSsoExecutionDialog,
2518
+ Channel: Channel,
2519
+ Member: Member,
2520
+ NotificationBot: NotificationBot,
2521
+ sendAdaptiveCard: sendAdaptiveCard,
2522
+ sendMessage: sendMessage,
2523
+ TeamsBotInstallation: TeamsBotInstallation,
2524
+ CommandBot: CommandBot,
2525
+ CardActionBot: CardActionBot
2526
+ });
2527
+
2528
+ export { AdaptiveCardResponse, ApiKeyLocation, ApiKeyProvider, AppCredential, BasicAuthProvider, BearerTokenAuthProvider, conversationWithCloudAdapter_browser as BotBuilderCloudAdapter, BotSsoExecutionDialog, CardActionBot$1 as CardActionBot, CertificateAuthProvider, Channel$1 as Channel, CommandBot$1 as CommandBot, ConversationBot$1 as ConversationBot, ErrorCode, ErrorWithCode, IdentityType, InvokeResponseErrorCode, LogLevel, Member$1 as Member, MsGraphAuthProvider, NotificationBot$1 as NotificationBot, NotificationTargetType, OnBehalfOfUserCredential, TeamsBotInstallation$1 as TeamsBotInstallation, TeamsBotSsoPrompt, TeamsFx, TeamsUserCredential, createApiClient, createMicrosoftGraphClient, createMicrosoftGraphClientWithCredential, createPemCertOption, createPfxCertOption, getLogLevel, getTediousConnectionConfig, handleMessageExtensionQueryWithSSO, handleMessageExtensionQueryWithToken, sendAdaptiveCard$1 as sendAdaptiveCard, sendMessage$1 as sendMessage, setLogFunction, setLogLevel, setLogger };
1993
2529
  //# sourceMappingURL=index.esm2017.js.map