@microsoft/teamsfx 1.1.2-alpha.385906a8c.0 → 1.1.2-alpha.7eddd6cf4.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 +31 -16
- package/dist/index.esm2017.js.map +1 -1
- package/dist/index.esm2017.mjs +15 -6
- package/dist/index.esm2017.mjs.map +1 -1
- package/dist/index.esm5.js +31 -16
- package/dist/index.esm5.js.map +1 -1
- package/dist/index.node.cjs.js +15 -6
- package/dist/index.node.cjs.js.map +1 -1
- package/package.json +3 -3
- package/types/teamsfx.d.ts +21 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@microsoft/teamsfx",
|
|
3
|
-
"version": "1.1.2-alpha.
|
|
3
|
+
"version": "1.1.2-alpha.7eddd6cf4.0",
|
|
4
4
|
"description": "Microsoft Teams Framework for Node.js and browser.",
|
|
5
5
|
"main": "dist/index.node.cjs.js",
|
|
6
6
|
"browser": "dist/index.esm2017.js",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@azure/identity": "^2.0.1",
|
|
50
50
|
"@azure/msal-browser": "^2.21.0",
|
|
51
51
|
"@azure/msal-node": "~1.1.0",
|
|
52
|
-
"@microsoft/adaptivecards-tools": "1.0.2-alpha.
|
|
52
|
+
"@microsoft/adaptivecards-tools": "1.0.2-alpha.7eddd6cf4.0",
|
|
53
53
|
"@microsoft/microsoft-graph-client": "^3.0.1",
|
|
54
54
|
"adaptivecards": "^2.10.0",
|
|
55
55
|
"axios": "^0.27.2",
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
"webpack": "^5.62.1",
|
|
130
130
|
"yargs": "^17.2.1"
|
|
131
131
|
},
|
|
132
|
-
"gitHead": "
|
|
132
|
+
"gitHead": "da6cb4205966b5bd0ab17122f498f2bdd52f33f4",
|
|
133
133
|
"publishConfig": {
|
|
134
134
|
"access": "public"
|
|
135
135
|
},
|
package/types/teamsfx.d.ts
CHANGED
|
@@ -772,6 +772,10 @@ export declare class ErrorWithCode extends Error {
|
|
|
772
772
|
*/
|
|
773
773
|
export declare function getLogLevel(): LogLevel | undefined;
|
|
774
774
|
|
|
775
|
+
export declare interface GetTeamsUserTokenOptions extends GetTokenOptions {
|
|
776
|
+
resources?: string[];
|
|
777
|
+
}
|
|
778
|
+
|
|
775
779
|
/**
|
|
776
780
|
* Generate connection configuration consumed by tedious.
|
|
777
781
|
*
|
|
@@ -1671,7 +1675,7 @@ export declare class TeamsFx implements TeamsFxConfiguration {
|
|
|
1671
1675
|
*
|
|
1672
1676
|
* @throws {@link ErrorCode|IdentityTypeNotSupported} when setting app identity in browser.
|
|
1673
1677
|
*/
|
|
1674
|
-
constructor(identityType?: IdentityType, customConfig?: Record<string, string>);
|
|
1678
|
+
constructor(identityType?: IdentityType, customConfig?: Record<string, string> | AuthenticationConfiguration);
|
|
1675
1679
|
/**
|
|
1676
1680
|
* Identity type set by user.
|
|
1677
1681
|
*
|
|
@@ -1690,9 +1694,10 @@ export declare class TeamsFx implements TeamsFxConfiguration {
|
|
|
1690
1694
|
getCredential(): TokenCredential;
|
|
1691
1695
|
/**
|
|
1692
1696
|
* Get user information.
|
|
1697
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
1693
1698
|
* @returns UserInfo object.
|
|
1694
1699
|
*/
|
|
1695
|
-
getUserInfo(): Promise<UserInfo>;
|
|
1700
|
+
getUserInfo(resources?: string[]): Promise<UserInfo>;
|
|
1696
1701
|
/**
|
|
1697
1702
|
* Popup login page to get user's access token with specific scopes.
|
|
1698
1703
|
*
|
|
@@ -1707,13 +1712,14 @@ export declare class TeamsFx implements TeamsFxConfiguration {
|
|
|
1707
1712
|
* await teamsfx.login("https://graph.microsoft.com/User.Read Calendars.Read"); // multiple scopes using string
|
|
1708
1713
|
* ```
|
|
1709
1714
|
* @param scopes - The list of scopes for which the token will have access, before that, we will request user to consent.
|
|
1715
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
1710
1716
|
*
|
|
1711
1717
|
* @throws {@link ErrorCode|InternalError} when failed to login with unknown error.
|
|
1712
1718
|
* @throws {@link ErrorCode|ConsentFailed} when user canceled or failed to consent.
|
|
1713
1719
|
* @throws {@link ErrorCode|InvalidParameter} when scopes is not a valid string or string array.
|
|
1714
1720
|
* @throws {@link ErrorCode|RuntimeNotSupported} when runtime is nodeJS.
|
|
1715
1721
|
*/
|
|
1716
|
-
login(scopes: string | string[]): Promise<void>;
|
|
1722
|
+
login(scopes: string | string[], resources?: string[]): Promise<void>;
|
|
1717
1723
|
/**
|
|
1718
1724
|
* Set SSO token when using user identity in NodeJS.
|
|
1719
1725
|
* @param {string} ssoToken - used for on behalf of user flow.
|
|
@@ -1825,9 +1831,10 @@ declare interface TeamsFxConfiguration {
|
|
|
1825
1831
|
getCredential(): TokenCredential;
|
|
1826
1832
|
/**
|
|
1827
1833
|
* Get user information.
|
|
1834
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
1828
1835
|
* @returns UserInfo object.
|
|
1829
1836
|
*/
|
|
1830
|
-
getUserInfo(): Promise<UserInfo>;
|
|
1837
|
+
getUserInfo(resources?: string[]): Promise<UserInfo>;
|
|
1831
1838
|
/**
|
|
1832
1839
|
* Popup login page to get user's access token with specific scopes.
|
|
1833
1840
|
*
|
|
@@ -1842,13 +1849,14 @@ declare interface TeamsFxConfiguration {
|
|
|
1842
1849
|
* await teamsfx.login("https://graph.microsoft.com/User.Read Calendars.Read"); // multiple scopes using string
|
|
1843
1850
|
* ```
|
|
1844
1851
|
* @param scopes - The list of scopes for which the token will have access, before that, we will request user to consent.
|
|
1852
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
1845
1853
|
*
|
|
1846
1854
|
* @throws {@link ErrorCode|InternalError} when failed to login with unknown error.
|
|
1847
1855
|
* @throws {@link ErrorCode|ConsentFailed} when user canceled or failed to consent.
|
|
1848
1856
|
* @throws {@link ErrorCode|InvalidParameter} when scopes is not a valid string or string array.
|
|
1849
1857
|
* @throws {@link ErrorCode|RuntimeNotSupported} when runtime is nodeJS.
|
|
1850
1858
|
*/
|
|
1851
|
-
login(scopes: string | string[]): Promise<void>;
|
|
1859
|
+
login(scopes: string | string[], resources?: string[]): Promise<void>;
|
|
1852
1860
|
/**
|
|
1853
1861
|
* Set SSO token when using user identity in NodeJS.
|
|
1854
1862
|
* @param {string} ssoToken - used for on behalf of user flow.
|
|
@@ -1889,10 +1897,13 @@ export declare class TeamsUserCredential implements TokenCredential {
|
|
|
1889
1897
|
constructor(authConfig: AuthenticationConfiguration);
|
|
1890
1898
|
/**
|
|
1891
1899
|
* Popup login page to get user's access token with specific scopes.
|
|
1900
|
+
*
|
|
1901
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
1902
|
+
*
|
|
1892
1903
|
* @remarks
|
|
1893
1904
|
* Can only be used within Teams.
|
|
1894
1905
|
*/
|
|
1895
|
-
login(scopes: string | string[]): Promise<void>;
|
|
1906
|
+
login(scopes: string | string[], resources?: string[]): Promise<void>;
|
|
1896
1907
|
/**
|
|
1897
1908
|
* Get access token from credential.
|
|
1898
1909
|
* @remarks
|
|
@@ -1901,10 +1912,13 @@ export declare class TeamsUserCredential implements TokenCredential {
|
|
|
1901
1912
|
getToken(scopes: string | string[], options?: GetTokenOptions): Promise<AccessToken | null>;
|
|
1902
1913
|
/**
|
|
1903
1914
|
* Get basic user info from SSO token
|
|
1915
|
+
*
|
|
1916
|
+
* @param {string[]} resources - The optional list of resources for full trust Teams apps.
|
|
1917
|
+
*
|
|
1904
1918
|
* @remarks
|
|
1905
1919
|
* Can only be used within Teams.
|
|
1906
1920
|
*/
|
|
1907
|
-
getUserInfo(): Promise<UserInfo>;
|
|
1921
|
+
getUserInfo(resources?: string[]): Promise<UserInfo>;
|
|
1908
1922
|
}
|
|
1909
1923
|
|
|
1910
1924
|
/**
|