@microsoft/teamsfx 2.1.1-alpha.f8e51b9d8.0 → 2.2.0-alpha.1774dac59.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.
@@ -1489,7 +1489,10 @@ var InvokeResponseErrorCode;
1489
1489
  * @remarks
1490
1490
  * Only work on server side.
1491
1491
  */
1492
- class ConversationBot {
1492
+ /**
1493
+ * @deprecated Use `BotBuilderCloudAdapter.ConversationBot` instead.
1494
+ */
1495
+ class ConversationBot$1 {
1493
1496
  /**
1494
1497
  * Creates new instance of the `ConversationBot`.
1495
1498
  *
@@ -1569,7 +1572,7 @@ class BotSsoExecutionDialog {
1569
1572
  * @param onError - an optional error handler that can catch exceptions during message sending.
1570
1573
  * @returns A `Promise` representing the asynchronous operation.
1571
1574
  */
1572
- function sendMessage(target, text, onError) {
1575
+ function sendMessage$1(target, text, onError) {
1573
1576
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendMessage"), ErrorCode.RuntimeNotSupported);
1574
1577
  }
1575
1578
  /**
@@ -1583,7 +1586,7 @@ function sendMessage(target, text, onError) {
1583
1586
  * @param onError - an optional error handler that can catch exceptions during adaptive card sending.
1584
1587
  * @returns A `Promise` representing the asynchronous operation.
1585
1588
  */
1586
- function sendAdaptiveCard(target, card, onError) {
1589
+ function sendAdaptiveCard$1(target, card, onError) {
1587
1590
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendAdaptiveCard"), ErrorCode.RuntimeNotSupported);
1588
1591
  }
1589
1592
  /**
@@ -1594,7 +1597,7 @@ function sendAdaptiveCard(target, card, onError) {
1594
1597
  *
1595
1598
  * It's recommended to get channels from {@link TeamsBotInstallation.channels()}.
1596
1599
  */
1597
- class Channel {
1600
+ class Channel$1 {
1598
1601
  /**
1599
1602
  * Constructor.
1600
1603
  *
@@ -1653,7 +1656,7 @@ class Channel {
1653
1656
  *
1654
1657
  * It's recommended to get members from {@link TeamsBotInstallation.members()}.
1655
1658
  */
1656
- class Member {
1659
+ class Member$1 {
1657
1660
  /**
1658
1661
  * Constructor.
1659
1662
  *
@@ -1715,7 +1718,10 @@ class Member {
1715
1718
  *
1716
1719
  * It's recommended to get bot installations from {@link ConversationBot.installations()}.
1717
1720
  */
1718
- class TeamsBotInstallation {
1721
+ /**
1722
+ * @deprecated Use `BotBuilderCloudAdapter.TeamsBotInstallation` instead.
1723
+ */
1724
+ class TeamsBotInstallation$1 {
1719
1725
  /**
1720
1726
  * Constructor
1721
1727
  *
@@ -1818,7 +1824,10 @@ class TeamsBotInstallation {
1818
1824
  * }
1819
1825
  * ```
1820
1826
  */
1821
- class NotificationBot {
1827
+ /**
1828
+ * @deprecated Use `BotBuilderCloudAdapter.NotificationBot` instead.
1829
+ */
1830
+ class NotificationBot$1 {
1822
1831
  /**
1823
1832
  * constructor of the notification bot.
1824
1833
  *
@@ -1920,7 +1929,7 @@ class NotificationBot {
1920
1929
  * The search scope is a flagged enum and it can be combined with `|`.
1921
1930
  * For example, to search from personal chat and group chat, use `SearchScope.Person | SearchScope.Group`.
1922
1931
  */
1923
- var SearchScope;
1932
+ var SearchScope$1;
1924
1933
  (function (SearchScope) {
1925
1934
  /**
1926
1935
  * Search members from the installations in personal chat only.
@@ -1938,7 +1947,7 @@ var SearchScope;
1938
1947
  * Search members from all installations including personal chat, group chat and Teams channel.
1939
1948
  */
1940
1949
  SearchScope[SearchScope["All"] = 7] = "All";
1941
- })(SearchScope || (SearchScope = {}));
1950
+ })(SearchScope$1 || (SearchScope$1 = {}));
1942
1951
 
1943
1952
  // Copyright (c) Microsoft Corporation.
1944
1953
  /**
@@ -1947,7 +1956,10 @@ var SearchScope;
1947
1956
  * @remarks
1948
1957
  * Only work on server side.
1949
1958
  */
1950
- class CommandBot {
1959
+ /**
1960
+ * @deprecated Use `BotBuilderCloudAdapter.CommandBot` instead.
1961
+ */
1962
+ class CommandBot$1 {
1951
1963
  /**
1952
1964
  * Creates a new instance of the `CommandBot`.
1953
1965
  *
@@ -2003,7 +2015,10 @@ class CommandBot {
2003
2015
  * @remarks
2004
2016
  * Only work on server side.
2005
2017
  */
2006
- class CardActionBot {
2018
+ /**
2019
+ * @deprecated Use `BotBuilderCloudAdapter.CardActionBot` instead.
2020
+ */
2021
+ class CardActionBot$1 {
2007
2022
  /**
2008
2023
  * Creates a new instance of the `CardActionBot`.
2009
2024
  *
@@ -2056,5 +2071,548 @@ function handleMessageExtensionQueryWithSSO(context, config, initiateLoginEndpoi
2056
2071
  });
2057
2072
  }
2058
2073
 
2059
- 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 };
2074
+ // Copyright (c) Microsoft Corporation.
2075
+ /**
2076
+ * Provide utilities for bot conversation, including:
2077
+ * - handle command and response.
2078
+ * - send notification to varies targets (e.g., member, group, channel).
2079
+ *
2080
+ * @remarks
2081
+ * Only work on server side.
2082
+ */
2083
+ class ConversationBot {
2084
+ /**
2085
+ * Create new instance of the `ConversationBot`.
2086
+ *
2087
+ * @param options - The initialize options.
2088
+ *
2089
+ * @remarks
2090
+ * Only work on server side.
2091
+ */
2092
+ constructor(options) {
2093
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "ConversationBot"), ErrorCode.RuntimeNotSupported);
2094
+ }
2095
+ /**
2096
+ * The request handler to integrate with web request.
2097
+ *
2098
+ * @param req - An incoming HTTP [Request](xref:botbuilder.Request).
2099
+ * @param res - The corresponding HTTP [Response](xref:botbuilder.Response).
2100
+ * @param logic - The additional function to handle bot context.
2101
+ *
2102
+ * @remarks
2103
+ * Only work on server side.
2104
+ */
2105
+ requestHandler(req, res, logic) {
2106
+ return __awaiter(this, void 0, void 0, function* () {
2107
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "ConversationBot"), ErrorCode.RuntimeNotSupported);
2108
+ });
2109
+ }
2110
+ }
2111
+
2112
+ // Copyright (c) Microsoft Corporation.
2113
+ /**
2114
+ * Send a plain text message to a notification target.
2115
+ *
2116
+ * @remarks
2117
+ * Only work on server side.
2118
+ *
2119
+ * @param target - The notification target.
2120
+ * @param text - The plain text message.
2121
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2122
+ *
2123
+ * @returns A `Promise` representing the asynchronous operation.
2124
+ */
2125
+ function sendMessage(target, text, onError) {
2126
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendMessage"), ErrorCode.RuntimeNotSupported);
2127
+ }
2128
+ /**
2129
+ * Send an adaptive card message to a notification target.
2130
+ *
2131
+ * @remarks
2132
+ * Only work on server side.
2133
+ *
2134
+ * @param target - The notification target.
2135
+ * @param card - The adaptive card raw JSON.
2136
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2137
+ *
2138
+ * @returns A `Promise` representing the asynchronous operation.
2139
+ */
2140
+ function sendAdaptiveCard(target, card, onError) {
2141
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "sendAdaptiveCard"), ErrorCode.RuntimeNotSupported);
2142
+ }
2143
+ /**
2144
+ * A {@link NotificationTarget} that represents a team channel.
2145
+ *
2146
+ * @remarks
2147
+ * Only work on server side.
2148
+ *
2149
+ * It's recommended to get channels from {@link TeamsBotInstallation.channels()}.
2150
+ */
2151
+ class Channel {
2152
+ /**
2153
+ * Constructor.
2154
+ *
2155
+ * @remarks
2156
+ * Only work on server side.
2157
+ *
2158
+ * It's recommended to get channels from {@link TeamsBotInstallation.channels()}, instead of using this constructor.
2159
+ *
2160
+ * @param parent - The parent {@link TeamsBotInstallation} where this channel is created from.
2161
+ * @param info - Detailed channel information.
2162
+ */
2163
+ constructor(parent, info) {
2164
+ /**
2165
+ * Notification target type. For channel it's always "Channel".
2166
+ *
2167
+ * @remarks
2168
+ * Only work on server side.
2169
+ */
2170
+ this.type = NotificationTargetType.Channel;
2171
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
2172
+ }
2173
+ /**
2174
+ * Send a plain text message.
2175
+ *
2176
+ * @remarks
2177
+ * Only work on server side.
2178
+ *
2179
+ * @param text - The plain text message.
2180
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2181
+ *
2182
+ * @returns The response of sending message.
2183
+ */
2184
+ sendMessage(text, onError) {
2185
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
2186
+ }
2187
+ /**
2188
+ * Send an adaptive card message.
2189
+ *
2190
+ * @remarks
2191
+ * Only work on server side.
2192
+ *
2193
+ * @param card - The adaptive card raw JSON.
2194
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2195
+ *
2196
+ * @returns The response of sending adaptive card message.
2197
+ */
2198
+ sendAdaptiveCard(card, onError) {
2199
+ return __awaiter(this, void 0, void 0, function* () {
2200
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
2201
+ });
2202
+ }
2203
+ }
2204
+ /**
2205
+ * A {@link NotificationTarget} that represents a team member.
2206
+ *
2207
+ * @remarks
2208
+ * Only work on server side.
2209
+ *
2210
+ * It's recommended to get members from {@link TeamsBotInstallation.members()}.
2211
+ */
2212
+ class Member {
2213
+ /**
2214
+ * Constructor.
2215
+ *
2216
+ * @remarks
2217
+ * Only work on server side.
2218
+ *
2219
+ * It's recommended to get members from {@link TeamsBotInstallation.members()}, instead of using this constructor.
2220
+ *
2221
+ * @param parent - The parent {@link TeamsBotInstallation} where this member is created from.
2222
+ * @param account - Detailed member account information.
2223
+ */
2224
+ constructor(parent, account) {
2225
+ /**
2226
+ * Notification target type. For member it's always "Person".
2227
+ *
2228
+ * @remarks
2229
+ * Only work on server side.
2230
+ */
2231
+ this.type = NotificationTargetType.Person;
2232
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
2233
+ }
2234
+ /**
2235
+ * Send a plain text message.
2236
+ *
2237
+ * @remarks
2238
+ * Only work on server side.
2239
+ *
2240
+ * @param text - The plain text message.
2241
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2242
+ *
2243
+ * @returns The response of sending message.
2244
+ */
2245
+ sendMessage(text, onError) {
2246
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
2247
+ }
2248
+ /**
2249
+ * Send an adaptive card message.
2250
+ *
2251
+ * @remarks
2252
+ * Only work on server side.
2253
+ *
2254
+ * @param card - The adaptive card raw JSON.
2255
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2256
+ *
2257
+ * @returns The response of sending adaptive card message.
2258
+ */
2259
+ sendAdaptiveCard(card, onError) {
2260
+ return __awaiter(this, void 0, void 0, function* () {
2261
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
2262
+ });
2263
+ }
2264
+ }
2265
+ /**
2266
+ * A {@link NotificationTarget} that represents a bot installation. Teams Bot could be installed into
2267
+ * - Personal chat
2268
+ * - Group chat
2269
+ * - Team (by default the `General` channel)
2270
+ *
2271
+ * @remarks
2272
+ * Only work on server side.
2273
+ *
2274
+ * It's recommended to get bot installations from {@link ConversationBot.installations()}.
2275
+ */
2276
+ class TeamsBotInstallation {
2277
+ /**
2278
+ * Constructor
2279
+ *
2280
+ * @remarks
2281
+ * Only work on server side.
2282
+ *
2283
+ * It's recommended to get bot installations from {@link ConversationBot.installations()}, instead of using this constructor.
2284
+ *
2285
+ * @param adapter - The bound `CloudAdapter`.
2286
+ * @param conversationReference - The bound `ConversationReference`.
2287
+ */
2288
+ constructor(adapter, conversationReference) {
2289
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2290
+ }
2291
+ /**
2292
+ * Send a plain text message.
2293
+ *
2294
+ * @remarks
2295
+ * Only work on server side.
2296
+ *
2297
+ * @param text - The plain text message.
2298
+ * @param onError - An optional error handler that can catch exceptions during message sending.
2299
+ *
2300
+ * @returns The response of sending message.
2301
+ */
2302
+ sendMessage(text, onError) {
2303
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2304
+ }
2305
+ /**
2306
+ * Send an adaptive card message.
2307
+ *
2308
+ * @remarks
2309
+ * Only work on server side.
2310
+ *
2311
+ * @param card - The adaptive card raw JSON.
2312
+ * @param onError - An optional error handler that can catch exceptions during adaptive card sending.
2313
+ *
2314
+ * @returns The response of sending adaptive card message.
2315
+ */
2316
+ sendAdaptiveCard(card, onError) {
2317
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2318
+ }
2319
+ /**
2320
+ * Get channels from this bot installation.
2321
+ *
2322
+ * @remarks
2323
+ * Only work on server side.
2324
+ *
2325
+ * @returns An array of channels if bot is installed into a team, otherwise returns an empty array.
2326
+ */
2327
+ channels() {
2328
+ return __awaiter(this, void 0, void 0, function* () {
2329
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2330
+ });
2331
+ }
2332
+ /**
2333
+ * Get members from this bot installation.
2334
+ *
2335
+ * @remarks
2336
+ * Only work on server side.
2337
+ *
2338
+ * @returns An array of members from where the bot is installed.
2339
+ */
2340
+ members() {
2341
+ return __awaiter(this, void 0, void 0, function* () {
2342
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2343
+ });
2344
+ }
2345
+ /**
2346
+ * Get team details from this bot installation
2347
+ *
2348
+ * @returns The team details if bot is installed into a team, otherwise returns undefined.
2349
+ */
2350
+ getTeamDetails() {
2351
+ return __awaiter(this, void 0, void 0, function* () {
2352
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
2353
+ });
2354
+ }
2355
+ }
2356
+ /**
2357
+ * Provide static utilities for bot notification.
2358
+ *
2359
+ * @remarks
2360
+ * Only work on server side.
2361
+ *
2362
+ * @example
2363
+ * Here's an example on how to send notification via Teams Bot.
2364
+ * ```typescript
2365
+ * // initialize (it's recommended to be called before handling any bot message)
2366
+ * const notificationBot = new NotificationBot(adapter);
2367
+ *
2368
+ * // get all bot installations and send message
2369
+ * for (const target of await notificationBot.installations()) {
2370
+ * await target.sendMessage("Hello Notification");
2371
+ * }
2372
+ *
2373
+ * // alternative - send message to all members
2374
+ * for (const target of await notificationBot.installations()) {
2375
+ * for (const member of await target.members()) {
2376
+ * await member.sendMessage("Hello Notification");
2377
+ * }
2378
+ * }
2379
+ * ```
2380
+ */
2381
+ class NotificationBot {
2382
+ /**
2383
+ * Constructor of the notification bot.
2384
+ *
2385
+ * @remarks
2386
+ * Only work on server side.
2387
+ *
2388
+ * To ensure accuracy, it's recommended to initialize before handling any message.
2389
+ *
2390
+ * @param adapter - The bound `CloudAdapter`
2391
+ * @param options - The initialize options
2392
+ */
2393
+ constructor(adapter, options) {
2394
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2395
+ }
2396
+ /**
2397
+ * Get all targets where the bot is installed.
2398
+ *
2399
+ * @remarks
2400
+ * Only work on server side.
2401
+ *
2402
+ * The result is retrieving from the persisted storage.
2403
+ *
2404
+ * @returns An array of {@link TeamsBotInstallation}.
2405
+ */
2406
+ static installations() {
2407
+ return __awaiter(this, void 0, void 0, function* () {
2408
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2409
+ });
2410
+ }
2411
+ /**
2412
+ * Return the first {@link Member} where predicate is true, and undefined otherwise.
2413
+ *
2414
+ * @remarks
2415
+ * Only work on server side.
2416
+ *
2417
+ * @param predicate find calls predicate once for each member of the installation,
2418
+ * until it finds one where predicate returns true. If such a member is found,
2419
+ * find immediately returns that member. Otherwise, find returns undefined.
2420
+ * @param scope the scope to find members from the installations (personal chat, group chat, Teams channel).
2421
+ *
2422
+ * @returns The first {@link Member} where predicate is true, and undefined otherwise.
2423
+ */
2424
+ findMember(predicate, scope) {
2425
+ return __awaiter(this, void 0, void 0, function* () {
2426
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2427
+ });
2428
+ }
2429
+ /**
2430
+ * Return the first {@link Channel} where predicate is true, and undefined otherwise.
2431
+ * (Ensure the bot app is installed into the `General` channel, otherwise undefined will be returned.)
2432
+ *
2433
+ * @remarks
2434
+ * Only work on server side.
2435
+ *
2436
+ * @param predicate - Find calls predicate once for each channel of the installation,
2437
+ * until it finds one where predicate returns true. If such a channel is found, find
2438
+ * immediately returns that channel. Otherwise, find returns undefined.
2439
+ *
2440
+ * @returns The first {@link Channel} where predicate is true, and `undefined` otherwise.
2441
+ */
2442
+ findChannel(predicate) {
2443
+ return __awaiter(this, void 0, void 0, function* () {
2444
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2445
+ });
2446
+ }
2447
+ /**
2448
+ * Return all {@link Member} where predicate is true, and empty array otherwise.
2449
+ *
2450
+ * @remarks
2451
+ * Only work on server side.
2452
+ *
2453
+ * @param predicate - Find calls predicate for each member of the installation.
2454
+ * @param scope - The scope to find members from the installations.
2455
+ * (personal chat, group chat, Teams channel).
2456
+ *
2457
+ * @returns An array of {@link Member} where predicate is true, and empty array otherwise.
2458
+ */
2459
+ findAllMembers(predicate, scope) {
2460
+ return __awaiter(this, void 0, void 0, function* () {
2461
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2462
+ });
2463
+ }
2464
+ /**
2465
+ * Return all {@link Channel} where predicate is true, and empty array otherwise.
2466
+ * (Ensure the bot app is installed into the `General` channel, otherwise empty array will be returned.)
2467
+ *
2468
+ * @remarks
2469
+ * Only work on server side.
2470
+ *
2471
+ * @param predicate - Find calls predicate for each channel of the installation.
2472
+ *
2473
+ * @returns An array of {@link Channel} where predicate is true, and empty array otherwise.
2474
+ */
2475
+ findAllChannels(predicate) {
2476
+ return __awaiter(this, void 0, void 0, function* () {
2477
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
2478
+ });
2479
+ }
2480
+ }
2481
+ /**
2482
+ * The search scope when calling {@link NotificationBot.findMember} and {@link NotificationBot.findAllMembers}.
2483
+ * The search scope is a flagged enum and it can be combined with `|`.
2484
+ * For example, to search from personal chat and group chat, use `SearchScope.Person | SearchScope.Group`.
2485
+ */
2486
+ var SearchScope;
2487
+ (function (SearchScope) {
2488
+ /**
2489
+ * Search members from the installations in personal chat only.
2490
+ */
2491
+ SearchScope[SearchScope["Person"] = 1] = "Person";
2492
+ /**
2493
+ * Search members from the installations in group chat only.
2494
+ */
2495
+ SearchScope[SearchScope["Group"] = 2] = "Group";
2496
+ /**
2497
+ * Search members from the installations in Teams channel only.
2498
+ */
2499
+ SearchScope[SearchScope["Channel"] = 4] = "Channel";
2500
+ /**
2501
+ * Search members from all installations including personal chat, group chat and Teams channel.
2502
+ */
2503
+ SearchScope[SearchScope["All"] = 7] = "All";
2504
+ })(SearchScope || (SearchScope = {}));
2505
+
2506
+ // Copyright (c) Microsoft Corporation.
2507
+ /**
2508
+ * A command bot for receiving commands and sending responses in Teams.
2509
+ *
2510
+ * @remarks
2511
+ * Only work on server side.
2512
+ */
2513
+ class CommandBot {
2514
+ /**
2515
+ * Create a new instance of the `CommandBot`.
2516
+ *
2517
+ * @param adapter - The bound `CloudAdapter`.
2518
+ * @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.
2519
+ */
2520
+ constructor(adapter, commands) {
2521
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2522
+ }
2523
+ /**
2524
+ * Register a command into the command bot.
2525
+ *
2526
+ * @param command - The command to be registered.
2527
+ *
2528
+ * @remarks
2529
+ * Only work on server side.
2530
+ */
2531
+ registerCommand(command) {
2532
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2533
+ }
2534
+ /**
2535
+ * Register commands into the command bot.
2536
+ *
2537
+ * @param commands - The commands to be registered.
2538
+ *
2539
+ * @remarks
2540
+ * Only work on server side.
2541
+ */
2542
+ registerCommands(commands) {
2543
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2544
+ }
2545
+ /**
2546
+ * Register a sso command into the command bot.
2547
+ *
2548
+ * @param ssoCommand - The sso command to be registered.
2549
+ */
2550
+ registerSsoCommand(ssoCommand) {
2551
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2552
+ }
2553
+ /**
2554
+ * Register sso commands into the command bot.
2555
+ *
2556
+ * @param ssoCommands - The sso commands to be registered.
2557
+ */
2558
+ registerSsoCommands(ssoCommands) {
2559
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
2560
+ }
2561
+ }
2562
+
2563
+ /**
2564
+ * A card action bot to respond to adaptive card universal actions.
2565
+ *
2566
+ * @remarks
2567
+ * Only work on server side.
2568
+ */
2569
+ class CardActionBot {
2570
+ /**
2571
+ * Create a new instance of the `CardActionBot`.
2572
+ *
2573
+ * @param adapter - The bound `CloudAdapter`.
2574
+ * @param options - The initialize options.
2575
+ */
2576
+ constructor(adapter, options) {
2577
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CardActionBot"), ErrorCode.RuntimeNotSupported);
2578
+ }
2579
+ /**
2580
+ * Register a card action handler to the bot.
2581
+ *
2582
+ * @param actionHandler - A card action handler to be registered.
2583
+ *
2584
+ * @remarks
2585
+ * Only work on server side.
2586
+ */
2587
+ registerHandler(actionHandler) {
2588
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CardActionBot"), ErrorCode.RuntimeNotSupported);
2589
+ }
2590
+ /**
2591
+ * Register card action handlers to the bot.
2592
+ *
2593
+ * @param actionHandlers - A set of card action handlers to be registered.
2594
+ *
2595
+ * @remarks
2596
+ * Only work on server side.
2597
+ */
2598
+ registerHandlers(actionHandlers) {
2599
+ throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CardActionBot"), ErrorCode.RuntimeNotSupported);
2600
+ }
2601
+ }
2602
+
2603
+ var conversationWithCloudAdapter_browser = /*#__PURE__*/Object.freeze({
2604
+ __proto__: null,
2605
+ ConversationBot: ConversationBot,
2606
+ BotSsoExecutionDialog: BotSsoExecutionDialog,
2607
+ Channel: Channel,
2608
+ Member: Member,
2609
+ NotificationBot: NotificationBot,
2610
+ sendAdaptiveCard: sendAdaptiveCard,
2611
+ sendMessage: sendMessage,
2612
+ TeamsBotInstallation: TeamsBotInstallation,
2613
+ CommandBot: CommandBot,
2614
+ CardActionBot: CardActionBot
2615
+ });
2616
+
2617
+ 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 };
2060
2618
  //# sourceMappingURL=index.esm5.js.map