@microsoft/teamsfx 1.0.3-alpha.c580d88b2.0 → 1.0.3-alpha.dad1471c2.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.
@@ -288,6 +288,7 @@ function getUserInfoFromSsoToken(ssoToken) {
288
288
  const userInfo = {
289
289
  displayName: tokenObject.name,
290
290
  objectId: tokenObject.oid,
291
+ tenantId: tokenObject.tid,
291
292
  preferredUserName: "",
292
293
  };
293
294
  if (tokenObject.ver === "2.0") {
@@ -1362,6 +1363,33 @@ class TeamsFx {
1362
1363
  }
1363
1364
  }
1364
1365
 
1366
+ // Copyright (c) Microsoft Corporation.
1367
+ // Licensed under the MIT license.
1368
+ /**
1369
+ * The target type where the notification will be sent to.
1370
+ *
1371
+ * @remarks
1372
+ * - "Channel" means to a team channel. (By default, notification to a team will be sent to its "General" channel.)
1373
+ * - "Group" means to a group chat.
1374
+ * - "Person" means to a personal chat.
1375
+ */
1376
+ var NotificationTargetType;
1377
+ (function (NotificationTargetType) {
1378
+ /**
1379
+ * The notification will be sent to a team channel.
1380
+ * (By default, notification to a team will be sent to its "General" channel.)
1381
+ */
1382
+ NotificationTargetType["Channel"] = "Channel";
1383
+ /**
1384
+ * The notification will be sent to a group chat.
1385
+ */
1386
+ NotificationTargetType["Group"] = "Group";
1387
+ /**
1388
+ * The notification will be sent to a personal chat.
1389
+ */
1390
+ NotificationTargetType["Person"] = "Person";
1391
+ })(NotificationTargetType || (NotificationTargetType = {}));
1392
+
1365
1393
  // Copyright (c) Microsoft Corporation.
1366
1394
  /**
1367
1395
  * Provide utilities for bot conversation, including:
@@ -1454,7 +1482,7 @@ class Channel {
1454
1482
  * @remarks
1455
1483
  * Only work on server side.
1456
1484
  */
1457
- this.type = "Channel";
1485
+ this.type = NotificationTargetType.Channel;
1458
1486
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
1459
1487
  }
1460
1488
  /**
@@ -1464,7 +1492,7 @@ class Channel {
1464
1492
  * Only work on server side.
1465
1493
  *
1466
1494
  * @param text - the plain text message.
1467
- * @returns A `Promise` representing the asynchronous operation.
1495
+ * @returns the response of sending message.
1468
1496
  */
1469
1497
  sendMessage(text) {
1470
1498
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
@@ -1476,7 +1504,7 @@ class Channel {
1476
1504
  * Only work on server side.
1477
1505
  *
1478
1506
  * @param card - the adaptive card raw JSON.
1479
- * @returns A `Promise` representing the asynchronous operation.
1507
+ * @returns the response of sending adaptive card message.
1480
1508
  */
1481
1509
  sendAdaptiveCard(card) {
1482
1510
  return __awaiter(this, void 0, void 0, function* () {
@@ -1511,7 +1539,7 @@ class Member {
1511
1539
  * @remarks
1512
1540
  * Only work on server side.
1513
1541
  */
1514
- this.type = "Person";
1542
+ this.type = NotificationTargetType.Person;
1515
1543
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
1516
1544
  }
1517
1545
  /**
@@ -1521,7 +1549,7 @@ class Member {
1521
1549
  * Only work on server side.
1522
1550
  *
1523
1551
  * @param text - the plain text message.
1524
- * @returns A `Promise` representing the asynchronous operation.
1552
+ * @returns the response of sending message.
1525
1553
  */
1526
1554
  sendMessage(text) {
1527
1555
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
@@ -1533,7 +1561,7 @@ class Member {
1533
1561
  * Only work on server side.
1534
1562
  *
1535
1563
  * @param card - the adaptive card raw JSON.
1536
- * @returns A `Promise` representing the asynchronous operation.
1564
+ * @returns the response of sending adaptive card message.
1537
1565
  */
1538
1566
  sendAdaptiveCard(card) {
1539
1567
  return __awaiter(this, void 0, void 0, function* () {
@@ -1574,7 +1602,7 @@ class TeamsBotInstallation {
1574
1602
  * Only work on server side.
1575
1603
  *
1576
1604
  * @param text - the plain text message.
1577
- * @returns A `Promise` representing the asynchronous operation.
1605
+ * @returns the response of sending message.
1578
1606
  */
1579
1607
  sendMessage(text) {
1580
1608
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
@@ -1586,7 +1614,7 @@ class TeamsBotInstallation {
1586
1614
  * Only work on server side.
1587
1615
  *
1588
1616
  * @param card - the adaptive card raw JSON.
1589
- * @returns A `Promise` representing the asynchronous operation.
1617
+ * @returns the response of sending adaptive card message.
1590
1618
  */
1591
1619
  sendAdaptiveCard(card) {
1592
1620
  throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
@@ -1716,5 +1744,5 @@ class CommandBot {
1716
1744
  }
1717
1745
  }
1718
1746
 
1719
- export { ApiKeyLocation, ApiKeyProvider, AppCredential, BasicAuthProvider, BearerTokenAuthProvider, CertificateAuthProvider, Channel, CommandBot, ConversationBot, ErrorCode, ErrorWithCode, IdentityType, LogLevel, Member, MsGraphAuthProvider, NotificationBot, OnBehalfOfUserCredential, TeamsBotInstallation, TeamsBotSsoPrompt, TeamsFx, TeamsUserCredential, createApiClient, createMicrosoftGraphClient, createPemCertOption, createPfxCertOption, getLogLevel, getTediousConnectionConfig, sendAdaptiveCard, sendMessage, setLogFunction, setLogLevel, setLogger };
1747
+ export { ApiKeyLocation, ApiKeyProvider, AppCredential, BasicAuthProvider, BearerTokenAuthProvider, CertificateAuthProvider, Channel, CommandBot, ConversationBot, ErrorCode, ErrorWithCode, IdentityType, LogLevel, Member, MsGraphAuthProvider, NotificationBot, NotificationTargetType, OnBehalfOfUserCredential, TeamsBotInstallation, TeamsBotSsoPrompt, TeamsFx, TeamsUserCredential, createApiClient, createMicrosoftGraphClient, createPemCertOption, createPfxCertOption, getLogLevel, getTediousConnectionConfig, sendAdaptiveCard, sendMessage, setLogFunction, setLogLevel, setLogger };
1720
1748
  //# sourceMappingURL=index.esm5.js.map