@microsoft/teamsfx 2.2.3-alpha.952007dba.0 → 2.2.3-alpha.a99162fe0.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/README.md +162 -113
- package/dist/index.esm2017.js +24 -2
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +23 -3
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +24 -6
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +23 -3
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -4
- package/types/teamsfx.d.ts +24 -1
package/dist/index.esm5.js
CHANGED
@@ -799,8 +799,10 @@ class TeamsUserCredential {
|
|
799
799
|
|
800
800
|
// Copyright (c) Microsoft Corporation.
|
801
801
|
const defaultScope = "https://graph.microsoft.com/.default";
|
802
|
+
// eslint-disable-next-line no-secrets/no-secrets
|
802
803
|
/**
|
803
804
|
* Microsoft Graph auth provider for Teams Framework
|
805
|
+
* @deprecated Use `TokenCredentialAuthenticationProvider` from `@microsoft/microsoft-graph-client/authProviders/azureTokenCredentials` instead.
|
804
806
|
*/
|
805
807
|
class MsGraphAuthProvider {
|
806
808
|
constructor(credentialOrTeamsFx, scopes) {
|
@@ -857,6 +859,14 @@ class MsGraphAuthProvider {
|
|
857
859
|
// Copyright (c) Microsoft Corporation.
|
858
860
|
/**
|
859
861
|
* Get Microsoft graph client.
|
862
|
+
* @deprecated Use `TokenCredentialAuthenticationProvider` and `Client.initWithMiddleware` instead.
|
863
|
+
* ```typescript
|
864
|
+
* const authProvider = new TokenCredentialAuthenticationProvider(credential, { scopes: scope });
|
865
|
+
* const graph = Client.initWithMiddleware({
|
866
|
+
* authProvider: authProvider,
|
867
|
+
* });
|
868
|
+
* ```
|
869
|
+
*
|
860
870
|
* @example
|
861
871
|
* Get Microsoft graph client by TokenCredential
|
862
872
|
* ```typescript
|
@@ -914,6 +924,14 @@ function createMicrosoftGraphClient(teamsfx, scopes) {
|
|
914
924
|
// eslint-disable-next-line no-secrets/no-secrets
|
915
925
|
/**
|
916
926
|
* Get Microsoft graph client.
|
927
|
+
* @deprecated Use `TokenCredentialAuthenticationProvider` and `Client.initWithMiddleware` instead.
|
928
|
+
* ```typescript
|
929
|
+
* const authProvider = new TokenCredentialAuthenticationProvider(credential, { scopes: scope });
|
930
|
+
* const graph = Client.initWithMiddleware({
|
931
|
+
* authProvider: authProvider,
|
932
|
+
* });
|
933
|
+
* ```
|
934
|
+
*
|
917
935
|
* @example
|
918
936
|
* Get Microsoft graph client by TokenCredential
|
919
937
|
* ```typescript
|
@@ -1307,6 +1325,8 @@ var IdentityType;
|
|
1307
1325
|
// Copyright (c) Microsoft Corporation.
|
1308
1326
|
/**
|
1309
1327
|
* A class providing credential and configuration.
|
1328
|
+
* @deprecated Please use {@link TeamsUserCredential}
|
1329
|
+
* in browser environment and {@link OnBehalfOfUserCredential} or {@link AppCredential} in NodeJS.
|
1310
1330
|
*/
|
1311
1331
|
class TeamsFx {
|
1312
1332
|
constructor(identityType, customConfig) {
|
@@ -2012,15 +2032,15 @@ class CardActionBot$1 {
|
|
2012
2032
|
}
|
2013
2033
|
}
|
2014
2034
|
|
2035
|
+
// eslint-disable-next-line no-secrets/no-secrets
|
2015
2036
|
/**
|
2016
2037
|
* Users execute query with SSO or Access Token.
|
2038
|
+
* @deprecated
|
2017
2039
|
* @remarks
|
2018
2040
|
* Only works in in server side.
|
2019
2041
|
*/
|
2020
2042
|
function handleMessageExtensionQueryWithToken(context, config, scopes, logic) {
|
2021
|
-
|
2022
|
-
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "queryWithToken in message extension"), ErrorCode.RuntimeNotSupported);
|
2023
|
-
});
|
2043
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "queryWithToken in message extension"), ErrorCode.RuntimeNotSupported);
|
2024
2044
|
}
|
2025
2045
|
/**
|
2026
2046
|
* Users execute query with SSO or Access Token.
|
@@ -2028,9 +2048,7 @@ function handleMessageExtensionQueryWithToken(context, config, scopes, logic) {
|
|
2028
2048
|
* Only works in in server side.
|
2029
2049
|
*/
|
2030
2050
|
function handleMessageExtensionQueryWithSSO(context, config, initiateLoginEndpoint, scopes, logic) {
|
2031
|
-
|
2032
|
-
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "queryWithToken in message extension"), ErrorCode.RuntimeNotSupported);
|
2033
|
-
});
|
2051
|
+
throw new ErrorWithCode(formatString(ErrorMessage.BrowserRuntimeNotSupported, "queryWithToken in message extension"), ErrorCode.RuntimeNotSupported);
|
2034
2052
|
}
|
2035
2053
|
|
2036
2054
|
// Copyright (c) Microsoft Corporation.
|