@microsoft/teamsfx 1.1.2-alpha.3113a0b87.0 → 1.1.2-alpha.79f6a1d84.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 +221 -18
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +732 -34
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +237 -18
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +767 -31
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +7 -5
- package/types/teamsfx.d.ts +384 -29
package/dist/index.esm5.js
CHANGED
|
@@ -32,6 +32,30 @@ var ErrorCode;
|
|
|
32
32
|
* Channel is not supported error.
|
|
33
33
|
*/
|
|
34
34
|
ErrorCode["ChannelNotSupported"] = "ChannelNotSupported";
|
|
35
|
+
/**
|
|
36
|
+
* Failed to retrieve sso token
|
|
37
|
+
*/
|
|
38
|
+
ErrorCode["FailedToRetrieveSsoToken"] = "FailedToRetrieveSsoToken";
|
|
39
|
+
/**
|
|
40
|
+
* Failed to process sso handler
|
|
41
|
+
*/
|
|
42
|
+
ErrorCode["FailedToProcessSsoHandler"] = "FailedToProcessSsoHandler";
|
|
43
|
+
/**
|
|
44
|
+
* Cannot find command
|
|
45
|
+
*/
|
|
46
|
+
ErrorCode["CannotFindCommand"] = "CannotFindCommand";
|
|
47
|
+
/**
|
|
48
|
+
* Failed to run sso step
|
|
49
|
+
*/
|
|
50
|
+
ErrorCode["FailedToRunSsoStep"] = "FailedToRunSsoStep";
|
|
51
|
+
/**
|
|
52
|
+
* Failed to run dedup step
|
|
53
|
+
*/
|
|
54
|
+
ErrorCode["FailedToRunDedupStep"] = "FailedToRunDedupStep";
|
|
55
|
+
/**
|
|
56
|
+
* Sso activity handler is undefined
|
|
57
|
+
*/
|
|
58
|
+
ErrorCode["SsoActivityHandlerIsUndefined"] = "SsoActivityHandlerIsUndefined";
|
|
35
59
|
/**
|
|
36
60
|
* Runtime is not supported error.
|
|
37
61
|
*/
|
|
@@ -87,6 +111,15 @@ ErrorMessage.NodejsRuntimeNotSupported = "{0} is not supported in Node.";
|
|
|
87
111
|
ErrorMessage.FailToAcquireTokenOnBehalfOfUser = "Failed to acquire access token on behalf of user: {0}";
|
|
88
112
|
// ChannelNotSupported Error
|
|
89
113
|
ErrorMessage.OnlyMSTeamsChannelSupported = "{0} is only supported in MS Teams Channel";
|
|
114
|
+
ErrorMessage.FailedToProcessSsoHandler = "Failed to process sso handler: {0}";
|
|
115
|
+
// FailedToRetrieveSsoToken Error
|
|
116
|
+
ErrorMessage.FailedToRetrieveSsoToken = "Failed to retrieve sso token, user failed to finish the AAD consent flow.";
|
|
117
|
+
// CannotFindCommand Error
|
|
118
|
+
ErrorMessage.CannotFindCommand = "Cannot find command: {0}";
|
|
119
|
+
ErrorMessage.FailedToRunSsoStep = "Failed to run dialog to retrieve sso token: {0}";
|
|
120
|
+
ErrorMessage.FailedToRunDedupStep = "Failed to run dialog to remove duplicated messages: {0}";
|
|
121
|
+
// SsoActivityHandlerIsUndefined Error
|
|
122
|
+
ErrorMessage.SsoActivityHandlerIsNull = "Sso command can only be used or added when sso activity handler is not undefined";
|
|
90
123
|
// IdentityTypeNotSupported Error
|
|
91
124
|
ErrorMessage.IdentityTypeNotSupported = "{0} identity is not supported in {1}";
|
|
92
125
|
// AuthorizationInfoError
|
|
@@ -97,6 +130,7 @@ ErrorMessage.EmptyParameter = "Parameter {0} is empty";
|
|
|
97
130
|
ErrorMessage.DuplicateHttpsOptionProperty = "Axios HTTPS agent already defined value for property {0}";
|
|
98
131
|
ErrorMessage.DuplicateApiKeyInHeader = "The request already defined api key in request header with name {0}.";
|
|
99
132
|
ErrorMessage.DuplicateApiKeyInQueryParam = "The request already defined api key in query parameter with name {0}.";
|
|
133
|
+
ErrorMessage.OnlySupportInQueryActivity = "The handleMessageExtensionQueryWithToken only support in handleTeamsMessagingExtensionQuery with composeExtension/query type.";
|
|
100
134
|
/**
|
|
101
135
|
* Error class with code and message thrown by the SDK.
|
|
102
136
|
*/
|
|
@@ -511,19 +545,20 @@ class TeamsUserCredential {
|
|
|
511
545
|
* await credential.login("https://graph.microsoft.com/User.Read Calendars.Read"); // multiple scopes using string
|
|
512
546
|
* ```
|
|
513
547
|
* @param scopes - The list of scopes for which the token will have access, before that, we will request user to consent.
|
|
548
|
+
* @param { string[] } resources - The optional list of resources for full trust Teams apps.
|
|
514
549
|
*
|
|
515
550
|
* @throws {@link ErrorCode|InternalError} when failed to login with unknown error.
|
|
516
551
|
* @throws {@link ErrorCode|ConsentFailed} when user canceled or failed to consent.
|
|
517
552
|
* @throws {@link ErrorCode|InvalidParameter} when scopes is not a valid string or string array.
|
|
518
553
|
* @throws {@link ErrorCode|RuntimeNotSupported} when runtime is nodeJS.
|
|
519
554
|
*/
|
|
520
|
-
login(scopes) {
|
|
555
|
+
login(scopes, resources) {
|
|
521
556
|
return __awaiter(this, void 0, void 0, function* () {
|
|
522
557
|
validateScopesType(scopes);
|
|
523
558
|
const scopesStr = typeof scopes === "string" ? scopes : scopes.join(" ");
|
|
524
559
|
internalLogger.info(`Popup login page to get user's access token with scopes: ${scopesStr}`);
|
|
525
560
|
if (!this.initialized) {
|
|
526
|
-
yield this.init();
|
|
561
|
+
yield this.init(resources);
|
|
527
562
|
}
|
|
528
563
|
return new Promise((resolve, reject) => {
|
|
529
564
|
microsoftTeams.initialize(() => {
|
|
@@ -576,6 +611,9 @@ class TeamsUserCredential {
|
|
|
576
611
|
* Get access token from credential.
|
|
577
612
|
*
|
|
578
613
|
* Important: Access tokens are stored in sessionStorage, read more here: https://aka.ms/teamsfx-session-storage-notice
|
|
614
|
+
* Important: Full trust applications do not read the resource information from the webApplicationInfo section of the app
|
|
615
|
+
* manifest. Instead, this resource (along with any additional resources from which to request tokens) must be provided
|
|
616
|
+
* as a list of resources to the getToken() method through a GetTeamsUserTokenOptions object.
|
|
579
617
|
*
|
|
580
618
|
* @example
|
|
581
619
|
* ```typescript
|
|
@@ -589,6 +627,9 @@ class TeamsUserCredential {
|
|
|
589
627
|
* await credential.getToken("User.Read Application.Read.All") // Get Graph access token for multiple scopes using space-separated string
|
|
590
628
|
* await credential.getToken("https://graph.microsoft.com/User.Read") // Get Graph access token with full resource URI
|
|
591
629
|
* await credential.getToken(["https://outlook.office.com/Mail.Read"]) // Get Outlook access token
|
|
630
|
+
*
|
|
631
|
+
* const options: GetTeamsUserTokenOptions = { resources: ["https://domain.example.com"] }; // set up resources for full trust apps.
|
|
632
|
+
* await credential.getToken([], options) // Get sso token from teams client - only use this approach for full trust apps.
|
|
592
633
|
* ```
|
|
593
634
|
*
|
|
594
635
|
* @param {string | string[]} scopes - The list of scopes for which the token will have access.
|
|
@@ -605,9 +646,11 @@ class TeamsUserCredential {
|
|
|
605
646
|
* Throw error if get access token failed.
|
|
606
647
|
*/
|
|
607
648
|
getToken(scopes, options) {
|
|
649
|
+
var _a;
|
|
608
650
|
return __awaiter(this, void 0, void 0, function* () {
|
|
609
651
|
validateScopesType(scopes);
|
|
610
|
-
const
|
|
652
|
+
const resources = (_a = options) === null || _a === void 0 ? void 0 : _a.resources;
|
|
653
|
+
const ssoToken = yield this.getSSOToken(resources);
|
|
611
654
|
const scopeStr = typeof scopes === "string" ? scopes : scopes.join(" ");
|
|
612
655
|
if (scopeStr === "") {
|
|
613
656
|
internalLogger.info("Get SSO token");
|
|
@@ -616,7 +659,7 @@ class TeamsUserCredential {
|
|
|
616
659
|
else {
|
|
617
660
|
internalLogger.info("Get access token with scopes: " + scopeStr);
|
|
618
661
|
if (!this.initialized) {
|
|
619
|
-
yield this.init();
|
|
662
|
+
yield this.init(resources);
|
|
620
663
|
}
|
|
621
664
|
let tokenResponse;
|
|
622
665
|
const scopesArray = typeof scopes === "string" ? scopes.split(" ") : scopes;
|
|
@@ -663,6 +706,8 @@ class TeamsUserCredential {
|
|
|
663
706
|
/**
|
|
664
707
|
* Get basic user info from SSO token
|
|
665
708
|
*
|
|
709
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
710
|
+
*
|
|
666
711
|
* @example
|
|
667
712
|
* ```typescript
|
|
668
713
|
* const currentUser = await credential.getUserInfo();
|
|
@@ -674,16 +719,16 @@ class TeamsUserCredential {
|
|
|
674
719
|
*
|
|
675
720
|
* @returns Basic user info with user displayName, objectId and preferredUserName.
|
|
676
721
|
*/
|
|
677
|
-
getUserInfo() {
|
|
722
|
+
getUserInfo(resources) {
|
|
678
723
|
return __awaiter(this, void 0, void 0, function* () {
|
|
679
724
|
internalLogger.info("Get basic user info from SSO token");
|
|
680
|
-
const ssoToken = yield this.getSSOToken();
|
|
725
|
+
const ssoToken = yield this.getSSOToken(resources);
|
|
681
726
|
return getUserInfoFromSsoToken(ssoToken.token);
|
|
682
727
|
});
|
|
683
728
|
}
|
|
684
|
-
init() {
|
|
729
|
+
init(resources) {
|
|
685
730
|
return __awaiter(this, void 0, void 0, function* () {
|
|
686
|
-
const ssoToken = yield this.getSSOToken();
|
|
731
|
+
const ssoToken = yield this.getSSOToken(resources);
|
|
687
732
|
const info = getTenantIdAndLoginHintFromSsoToken(ssoToken.token);
|
|
688
733
|
this.loginHint = info.loginHint;
|
|
689
734
|
this.tid = info.tid;
|
|
@@ -703,9 +748,12 @@ class TeamsUserCredential {
|
|
|
703
748
|
/**
|
|
704
749
|
* Get SSO token using teams SDK
|
|
705
750
|
* It will try to get SSO token from memory first, if SSO token doesn't exist or about to expired, then it will using teams SDK to get SSO token
|
|
751
|
+
*
|
|
752
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
753
|
+
*
|
|
706
754
|
* @returns SSO token
|
|
707
755
|
*/
|
|
708
|
-
getSSOToken() {
|
|
756
|
+
getSSOToken(resources) {
|
|
709
757
|
return new Promise((resolve, reject) => {
|
|
710
758
|
if (this.ssoToken) {
|
|
711
759
|
if (this.ssoToken.expiresOnTimestamp - Date.now() > tokenRefreshTimeSpanInMillisecond) {
|
|
@@ -743,7 +791,7 @@ class TeamsUserCredential {
|
|
|
743
791
|
internalLogger.error(errorMsg);
|
|
744
792
|
reject(new ErrorWithCode(errorMsg, ErrorCode.InternalError));
|
|
745
793
|
},
|
|
746
|
-
resources: [],
|
|
794
|
+
resources: resources !== null && resources !== void 0 ? resources : [],
|
|
747
795
|
});
|
|
748
796
|
});
|
|
749
797
|
}
|
|
@@ -1278,8 +1326,9 @@ class TeamsFx {
|
|
|
1278
1326
|
this.configuration = new Map();
|
|
1279
1327
|
this.loadFromEnv();
|
|
1280
1328
|
if (customConfig) {
|
|
1281
|
-
|
|
1282
|
-
|
|
1329
|
+
const myConfig = Object.assign({}, customConfig);
|
|
1330
|
+
for (const key of Object.keys(myConfig)) {
|
|
1331
|
+
const value = myConfig[key];
|
|
1283
1332
|
if (value) {
|
|
1284
1333
|
this.configuration.set(key, value);
|
|
1285
1334
|
}
|
|
@@ -1327,14 +1376,14 @@ class TeamsFx {
|
|
|
1327
1376
|
}
|
|
1328
1377
|
return this.teamsUserCredential;
|
|
1329
1378
|
}
|
|
1330
|
-
getUserInfo() {
|
|
1379
|
+
getUserInfo(resources) {
|
|
1331
1380
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1332
|
-
return yield this.getCredential().getUserInfo();
|
|
1381
|
+
return yield this.getCredential().getUserInfo(resources);
|
|
1333
1382
|
});
|
|
1334
1383
|
}
|
|
1335
|
-
login(scopes) {
|
|
1384
|
+
login(scopes, resources) {
|
|
1336
1385
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1337
|
-
yield this.getCredential().login(scopes);
|
|
1386
|
+
yield this.getCredential().login(scopes, resources);
|
|
1338
1387
|
});
|
|
1339
1388
|
}
|
|
1340
1389
|
setSsoToken(ssoToken) {
|
|
@@ -1460,6 +1509,51 @@ class ConversationBot {
|
|
|
1460
1509
|
}
|
|
1461
1510
|
}
|
|
1462
1511
|
|
|
1512
|
+
// Copyright (c) Microsoft Corporation.
|
|
1513
|
+
/*
|
|
1514
|
+
* Sso execution dialog, use to handle sso command
|
|
1515
|
+
*/
|
|
1516
|
+
class BotSsoExecutionDialog {
|
|
1517
|
+
/**
|
|
1518
|
+
* Creates a new instance of the BotSsoExecutionDialog.
|
|
1519
|
+
* @param dedupStorage Helper storage to remove duplicated messages
|
|
1520
|
+
* @param requiredScopes The list of scopes for which the token will have access
|
|
1521
|
+
* @param teamsfx {@link TeamsFx} instance for authentication
|
|
1522
|
+
*/
|
|
1523
|
+
constructor(dedupStorage, requiredScopes, teamsfx) {
|
|
1524
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "BotSsoExecutionDialog"), ErrorCode.RuntimeNotSupported);
|
|
1525
|
+
}
|
|
1526
|
+
/**
|
|
1527
|
+
* Add TeamsFxBotSsoCommandHandler instance
|
|
1528
|
+
* @param handler {@link BotSsoExecutionDialogHandler} callback function
|
|
1529
|
+
* @param triggerPatterns The trigger pattern
|
|
1530
|
+
*/
|
|
1531
|
+
addCommand(handler, triggerPatterns) {
|
|
1532
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "BotSsoExecutionDialog"), ErrorCode.RuntimeNotSupported);
|
|
1533
|
+
}
|
|
1534
|
+
/**
|
|
1535
|
+
* The run method handles the incoming activity (in the form of a DialogContext) and passes it through the dialog system.
|
|
1536
|
+
*
|
|
1537
|
+
* @param context The context object for the current turn.
|
|
1538
|
+
* @param accessor The instance of StatePropertyAccessor for dialog system.
|
|
1539
|
+
*/
|
|
1540
|
+
run(context, accessor) {
|
|
1541
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1542
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "BotSsoExecutionDialog"), ErrorCode.RuntimeNotSupported);
|
|
1543
|
+
});
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Called when the component is ending.
|
|
1547
|
+
*
|
|
1548
|
+
* @param context Context for the current turn of conversation.
|
|
1549
|
+
*/
|
|
1550
|
+
onEndDialog(context) {
|
|
1551
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1552
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "BotSsoExecutionDialog"), ErrorCode.RuntimeNotSupported);
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1463
1557
|
// Copyright (c) Microsoft Corporation.
|
|
1464
1558
|
/**
|
|
1465
1559
|
* Send a plain text message to a notification target.
|
|
@@ -1677,6 +1771,16 @@ class TeamsBotInstallation {
|
|
|
1677
1771
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
|
|
1678
1772
|
});
|
|
1679
1773
|
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Get team details from this bot installation
|
|
1776
|
+
*
|
|
1777
|
+
* @returns the team details if bot is installed into a team, otherwise returns undefined.
|
|
1778
|
+
*/
|
|
1779
|
+
getTeamDetails() {
|
|
1780
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1781
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "TeamsBotInstallation"), ErrorCode.RuntimeNotSupported);
|
|
1782
|
+
});
|
|
1783
|
+
}
|
|
1680
1784
|
}
|
|
1681
1785
|
/**
|
|
1682
1786
|
* Provide static utilities for bot notification.
|
|
@@ -1733,7 +1837,95 @@ class NotificationBot {
|
|
|
1733
1837
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
|
|
1734
1838
|
});
|
|
1735
1839
|
}
|
|
1736
|
-
|
|
1840
|
+
/**
|
|
1841
|
+
* Returns the first {@link Member} where predicate is true, and undefined otherwise.
|
|
1842
|
+
*
|
|
1843
|
+
* @remarks
|
|
1844
|
+
* Only work on server side.
|
|
1845
|
+
*
|
|
1846
|
+
* @param predicate find calls predicate once for each member of the installation,
|
|
1847
|
+
* until it finds one where predicate returns true. If such a member is found, find
|
|
1848
|
+
* immediately returns that member. Otherwise, find returns undefined.
|
|
1849
|
+
* @param scope the scope to find members from the installations
|
|
1850
|
+
* (personal chat, group chat, Teams channel).
|
|
1851
|
+
* @returns the first {@link Member} where predicate is true, and undefined otherwise.
|
|
1852
|
+
*/
|
|
1853
|
+
findMember(predicate, scope) {
|
|
1854
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1855
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* Returns the first {@link Channel} where predicate is true, and undefined otherwise.
|
|
1860
|
+
*
|
|
1861
|
+
* @remarks
|
|
1862
|
+
* Only work on server side.
|
|
1863
|
+
*
|
|
1864
|
+
* @param predicate find calls predicate once for each channel of the installation,
|
|
1865
|
+
* until it finds one where predicate returns true. If such a channel is found, find
|
|
1866
|
+
* immediately returns that channel. Otherwise, find returns undefined.
|
|
1867
|
+
* @returns the first {@link Channel} where predicate is true, and undefined otherwise.
|
|
1868
|
+
*/
|
|
1869
|
+
findChannel(predicate) {
|
|
1870
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1871
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
|
|
1872
|
+
});
|
|
1873
|
+
}
|
|
1874
|
+
/**
|
|
1875
|
+
* Returns all {@link Member} where predicate is true, and empty array otherwise.
|
|
1876
|
+
*
|
|
1877
|
+
* @remarks
|
|
1878
|
+
* Only work on server side.
|
|
1879
|
+
*
|
|
1880
|
+
* @param predicate find calls predicate for each member of the installation.
|
|
1881
|
+
* @param scope the scope to find members from the installations
|
|
1882
|
+
* (personal chat, group chat, Teams channel).
|
|
1883
|
+
* @returns an array of {@link Member} where predicate is true, and empty array otherwise.
|
|
1884
|
+
*/
|
|
1885
|
+
findAllMembers(predicate, scope) {
|
|
1886
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1887
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
/**
|
|
1891
|
+
* Returns all {@link Channel} where predicate is true, and empty array otherwise.
|
|
1892
|
+
*
|
|
1893
|
+
* @remarks
|
|
1894
|
+
* Only work on server side.
|
|
1895
|
+
*
|
|
1896
|
+
* @param predicate find calls predicate for each channel of the installation.
|
|
1897
|
+
* @returns an array of {@link Channel} where predicate is true, and empty array otherwise.
|
|
1898
|
+
*/
|
|
1899
|
+
findAllChannels(predicate) {
|
|
1900
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1901
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "NotificationBot"), ErrorCode.RuntimeNotSupported);
|
|
1902
|
+
});
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
* The search scope when calling {@link NotificationBot.findMember} and {@link NotificationBot.findAllMembers}.
|
|
1907
|
+
* The search scope is a flagged enum and it can be combined with `|`.
|
|
1908
|
+
* For example, to search from personal chat and group chat, use `SearchScope.Person | SearchScope.Group`.
|
|
1909
|
+
*/
|
|
1910
|
+
var SearchScope;
|
|
1911
|
+
(function (SearchScope) {
|
|
1912
|
+
/**
|
|
1913
|
+
* Search members from the installations in personal chat only.
|
|
1914
|
+
*/
|
|
1915
|
+
SearchScope[SearchScope["Person"] = 1] = "Person";
|
|
1916
|
+
/**
|
|
1917
|
+
* Search members from the installations in group chat only.
|
|
1918
|
+
*/
|
|
1919
|
+
SearchScope[SearchScope["Group"] = 2] = "Group";
|
|
1920
|
+
/**
|
|
1921
|
+
* Search members from the installations in Teams channel only.
|
|
1922
|
+
*/
|
|
1923
|
+
SearchScope[SearchScope["Channel"] = 4] = "Channel";
|
|
1924
|
+
/**
|
|
1925
|
+
* Search members from all installations including personal chat, group chat and Teams channel.
|
|
1926
|
+
*/
|
|
1927
|
+
SearchScope[SearchScope["All"] = 7] = "All";
|
|
1928
|
+
})(SearchScope || (SearchScope = {}));
|
|
1737
1929
|
|
|
1738
1930
|
// Copyright (c) Microsoft Corporation.
|
|
1739
1931
|
/**
|
|
@@ -1774,6 +1966,22 @@ class CommandBot {
|
|
|
1774
1966
|
registerCommands(commands) {
|
|
1775
1967
|
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
|
|
1776
1968
|
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Registers a sso command into the command bot.
|
|
1971
|
+
*
|
|
1972
|
+
* @param command The command to register.
|
|
1973
|
+
*/
|
|
1974
|
+
registerSsoCommand(ssoCommand) {
|
|
1975
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Registers commands into the command bot.
|
|
1979
|
+
*
|
|
1980
|
+
* @param commands The commands to register.
|
|
1981
|
+
*/
|
|
1982
|
+
registerSsoCommands(ssoCommands) {
|
|
1983
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "CommandBot"), ErrorCode.RuntimeNotSupported);
|
|
1984
|
+
}
|
|
1777
1985
|
}
|
|
1778
1986
|
|
|
1779
1987
|
/**
|
|
@@ -1814,5 +2022,16 @@ class CardActionBot {
|
|
|
1814
2022
|
}
|
|
1815
2023
|
}
|
|
1816
2024
|
|
|
1817
|
-
|
|
2025
|
+
/**
|
|
2026
|
+
* Users execute query with SSO or Access Token.
|
|
2027
|
+
* @remarks
|
|
2028
|
+
* Only works in in server side.
|
|
2029
|
+
*/
|
|
2030
|
+
function handleMessageExtensionQueryWithToken(context, config, scopes, logic) {
|
|
2031
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
2032
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "queryWithToken in message extension"), ErrorCode.RuntimeNotSupported);
|
|
2033
|
+
});
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
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, createPemCertOption, createPfxCertOption, getLogLevel, getTediousConnectionConfig, handleMessageExtensionQueryWithToken, sendAdaptiveCard, sendMessage, setLogFunction, setLogLevel, setLogger };
|
|
1818
2037
|
//# sourceMappingURL=index.esm5.js.map
|