@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.
- package/dist/index.esm2017.js +37 -9
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +75 -30
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +37 -9
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +88 -35
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -3
- package/types/teamsfx.d.ts +53 -19
package/dist/index.esm2017.js
CHANGED
|
@@ -287,6 +287,7 @@ function getUserInfoFromSsoToken(ssoToken) {
|
|
|
287
287
|
const userInfo = {
|
|
288
288
|
displayName: tokenObject.name,
|
|
289
289
|
objectId: tokenObject.oid,
|
|
290
|
+
tenantId: tokenObject.tid,
|
|
290
291
|
preferredUserName: "",
|
|
291
292
|
};
|
|
292
293
|
if (tokenObject.ver === "2.0") {
|
|
@@ -1327,6 +1328,33 @@ class TeamsFx {
|
|
|
1327
1328
|
}
|
|
1328
1329
|
}
|
|
1329
1330
|
|
|
1331
|
+
// Copyright (c) Microsoft Corporation.
|
|
1332
|
+
// Licensed under the MIT license.
|
|
1333
|
+
/**
|
|
1334
|
+
* The target type where the notification will be sent to.
|
|
1335
|
+
*
|
|
1336
|
+
* @remarks
|
|
1337
|
+
* - "Channel" means to a team channel. (By default, notification to a team will be sent to its "General" channel.)
|
|
1338
|
+
* - "Group" means to a group chat.
|
|
1339
|
+
* - "Person" means to a personal chat.
|
|
1340
|
+
*/
|
|
1341
|
+
var NotificationTargetType;
|
|
1342
|
+
(function (NotificationTargetType) {
|
|
1343
|
+
/**
|
|
1344
|
+
* The notification will be sent to a team channel.
|
|
1345
|
+
* (By default, notification to a team will be sent to its "General" channel.)
|
|
1346
|
+
*/
|
|
1347
|
+
NotificationTargetType["Channel"] = "Channel";
|
|
1348
|
+
/**
|
|
1349
|
+
* The notification will be sent to a group chat.
|
|
1350
|
+
*/
|
|
1351
|
+
NotificationTargetType["Group"] = "Group";
|
|
1352
|
+
/**
|
|
1353
|
+
* The notification will be sent to a personal chat.
|
|
1354
|
+
*/
|
|
1355
|
+
NotificationTargetType["Person"] = "Person";
|
|
1356
|
+
})(NotificationTargetType || (NotificationTargetType = {}));
|
|
1357
|
+
|
|
1330
1358
|
// Copyright (c) Microsoft Corporation.
|
|
1331
1359
|
/**
|
|
1332
1360
|
* Provide utilities for bot conversation, including:
|
|
@@ -1417,7 +1445,7 @@ class Channel {
|
|
|
1417
1445
|
* @remarks
|
|
1418
1446
|
* Only work on server side.
|
|
1419
1447
|
*/
|
|
1420
|
-
this.type =
|
|
1448
|
+
this.type = NotificationTargetType.Channel;
|
|
1421
1449
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
|
|
1422
1450
|
}
|
|
1423
1451
|
/**
|
|
@@ -1427,7 +1455,7 @@ class Channel {
|
|
|
1427
1455
|
* Only work on server side.
|
|
1428
1456
|
*
|
|
1429
1457
|
* @param text - the plain text message.
|
|
1430
|
-
* @returns
|
|
1458
|
+
* @returns the response of sending message.
|
|
1431
1459
|
*/
|
|
1432
1460
|
sendMessage(text) {
|
|
1433
1461
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
|
|
@@ -1439,7 +1467,7 @@ class Channel {
|
|
|
1439
1467
|
* Only work on server side.
|
|
1440
1468
|
*
|
|
1441
1469
|
* @param card - the adaptive card raw JSON.
|
|
1442
|
-
* @returns
|
|
1470
|
+
* @returns the response of sending adaptive card message.
|
|
1443
1471
|
*/
|
|
1444
1472
|
async sendAdaptiveCard(card) {
|
|
1445
1473
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Channel"), ErrorCode.RuntimeNotSupported);
|
|
@@ -1472,7 +1500,7 @@ class Member {
|
|
|
1472
1500
|
* @remarks
|
|
1473
1501
|
* Only work on server side.
|
|
1474
1502
|
*/
|
|
1475
|
-
this.type =
|
|
1503
|
+
this.type = NotificationTargetType.Person;
|
|
1476
1504
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
|
|
1477
1505
|
}
|
|
1478
1506
|
/**
|
|
@@ -1482,7 +1510,7 @@ class Member {
|
|
|
1482
1510
|
* Only work on server side.
|
|
1483
1511
|
*
|
|
1484
1512
|
* @param text - the plain text message.
|
|
1485
|
-
* @returns
|
|
1513
|
+
* @returns the response of sending message.
|
|
1486
1514
|
*/
|
|
1487
1515
|
sendMessage(text) {
|
|
1488
1516
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
|
|
@@ -1494,7 +1522,7 @@ class Member {
|
|
|
1494
1522
|
* Only work on server side.
|
|
1495
1523
|
*
|
|
1496
1524
|
* @param card - the adaptive card raw JSON.
|
|
1497
|
-
* @returns
|
|
1525
|
+
* @returns the response of sending adaptive card message.
|
|
1498
1526
|
*/
|
|
1499
1527
|
async sendAdaptiveCard(card) {
|
|
1500
1528
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "Member"), ErrorCode.RuntimeNotSupported);
|
|
@@ -1533,7 +1561,7 @@ class TeamsBotInstallation {
|
|
|
1533
1561
|
* Only work on server side.
|
|
1534
1562
|
*
|
|
1535
1563
|
* @param text - the plain text message.
|
|
1536
|
-
* @returns
|
|
1564
|
+
* @returns the response of sending message.
|
|
1537
1565
|
*/
|
|
1538
1566
|
sendMessage(text) {
|
|
1539
1567
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
|
|
@@ -1545,7 +1573,7 @@ class TeamsBotInstallation {
|
|
|
1545
1573
|
* Only work on server side.
|
|
1546
1574
|
*
|
|
1547
1575
|
* @param card - the adaptive card raw JSON.
|
|
1548
|
-
* @returns
|
|
1576
|
+
* @returns the response of sending adaptive card message.
|
|
1549
1577
|
*/
|
|
1550
1578
|
sendAdaptiveCard(card) {
|
|
1551
1579
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
|
|
@@ -1669,5 +1697,5 @@ class CommandBot {
|
|
|
1669
1697
|
}
|
|
1670
1698
|
}
|
|
1671
1699
|
|
|
1672
|
-
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 };
|
|
1700
|
+
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 };
|
|
1673
1701
|
//# sourceMappingURL=index.esm2017.js.map
|