@microsoft/teams-js 2.25.0 → 2.26.0-beta.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/MicrosoftTeams.d.ts
CHANGED
@@ -3027,6 +3027,9 @@ export namespace authentication {
|
|
3027
3027
|
*
|
3028
3028
|
* @returns Promise that resolves with the {@link UserProfile}.
|
3029
3029
|
*
|
3030
|
+
* @throws `Error` object in case of any problems, the most likely of which is that the calling app does not have appropriate permissions
|
3031
|
+
* to call this method.
|
3032
|
+
*
|
3030
3033
|
* @internal
|
3031
3034
|
* Limited to Microsoft-internal use
|
3032
3035
|
*/
|
@@ -3039,6 +3042,10 @@ export namespace authentication {
|
|
3039
3042
|
* Requests the decoded Microsoft Entra user identity on behalf of the app.
|
3040
3043
|
*
|
3041
3044
|
* @param userRequest - It passes success/failure callbacks in the userRequest object(deprecated)
|
3045
|
+
*
|
3046
|
+
* @throws `Error` object in case of any problems, the most likely of which is that the calling app does not have appropriate permissions
|
3047
|
+
* to call this method.
|
3048
|
+
*
|
3042
3049
|
* @internal
|
3043
3050
|
* Limited to Microsoft-internal use
|
3044
3051
|
*/
|
@@ -5791,11 +5798,11 @@ export namespace pages {
|
|
5791
5798
|
*/
|
5792
5799
|
function getConfig(): Promise<InstanceConfig>;
|
5793
5800
|
/**
|
5794
|
-
*
|
5795
|
-
*
|
5796
|
-
*
|
5797
|
-
*
|
5798
|
-
*
|
5801
|
+
* @deprecated
|
5802
|
+
* As of 2.0.0, this API is deprecated and can be replaced by the standard JavaScript
|
5803
|
+
* API, window.location.href, when navigating the app to a new cross-domain URL. Any URL
|
5804
|
+
* that is redirected to must be listed in the validDomains block of the manifest. Please
|
5805
|
+
* remove any calls to this API.
|
5799
5806
|
* @param url - The URL to navigate the frame to.
|
5800
5807
|
* @returns Promise that resolves when the navigation has completed.
|
5801
5808
|
*/
|
@@ -5856,6 +5863,11 @@ export namespace pages {
|
|
5856
5863
|
* For apps installed as a channel tab, this ID can be supplied to indicate in which Teams channel the app should be opened
|
5857
5864
|
*/
|
5858
5865
|
channelId?: string;
|
5866
|
+
/**
|
5867
|
+
* Optional ID of the chat or meeting where the app should be opened
|
5868
|
+
|
5869
|
+
*/
|
5870
|
+
chatId?: string;
|
5859
5871
|
}
|
5860
5872
|
/**
|
5861
5873
|
* Provides APIs for querying and navigating between contextual tabs of an application. Unlike personal tabs,
|
@@ -9526,14 +9538,10 @@ export function returnFocus(navigateForward?: boolean): void;
|
|
9526
9538
|
export function navigateToTab(tabInstance: TabInstance, onComplete?: onCompleteHandlerFunctionType): void;
|
9527
9539
|
/**
|
9528
9540
|
* @deprecated
|
9529
|
-
* As of
|
9530
|
-
*
|
9531
|
-
*
|
9532
|
-
*
|
9533
|
-
* thrown. This function needs to be used only when navigating the frame to a URL in a different domain
|
9534
|
-
* than the current one in a way that keeps the app informed of the change and allows the SDK to
|
9535
|
-
* continue working.
|
9536
|
-
*
|
9541
|
+
* As of 2.0.0, this API is deprecated and can be replaced by the standard JavaScript
|
9542
|
+
* API, window.location.href, when navigating the app to a new cross-domain URL. Any URL
|
9543
|
+
* that is redirected to must be listed in the validDomains block of the manifest. Please
|
9544
|
+
* remove any calls to this API.
|
9537
9545
|
* @param url - The URL to navigate the frame to.
|
9538
9546
|
* @param onComplete - The callback to invoke when the action is complete.
|
9539
9547
|
*/
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -169,7 +169,7 @@ function fromByteArray (uint8) {
|
|
169
169
|
|
170
170
|
/***/ }),
|
171
171
|
|
172
|
-
/***/
|
172
|
+
/***/ 815:
|
173
173
|
/***/ ((module, exports, __webpack_require__) => {
|
174
174
|
|
175
175
|
/* eslint-env browser */
|
@@ -426,7 +426,7 @@ function localstorage() {
|
|
426
426
|
}
|
427
427
|
}
|
428
428
|
|
429
|
-
module.exports = __webpack_require__(
|
429
|
+
module.exports = __webpack_require__(530)(exports);
|
430
430
|
|
431
431
|
const {formatters} = module.exports;
|
432
432
|
|
@@ -445,7 +445,7 @@ formatters.j = function (v) {
|
|
445
445
|
|
446
446
|
/***/ }),
|
447
447
|
|
448
|
-
/***/
|
448
|
+
/***/ 530:
|
449
449
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
450
450
|
|
451
451
|
|
@@ -1090,8 +1090,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1090
1090
|
webStorage: () => (/* reexport */ webStorage)
|
1091
1091
|
});
|
1092
1092
|
|
1093
|
-
// EXTERNAL MODULE: ../../node_modules/.pnpm/debug@4.3.
|
1094
|
-
var browser = __webpack_require__(
|
1093
|
+
// EXTERNAL MODULE: ../../node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/browser.js
|
1094
|
+
var browser = __webpack_require__(815);
|
1095
1095
|
;// CONCATENATED MODULE: ./src/internal/telemetry.ts
|
1096
1096
|
|
1097
1097
|
const topLevelLogger = (0,browser.debug)('teamsJs');
|
@@ -2810,8 +2810,8 @@ function createTeamsAppLink(params) {
|
|
2810
2810
|
if (params.webUrl) {
|
2811
2811
|
url.searchParams.append('webUrl', params.webUrl);
|
2812
2812
|
}
|
2813
|
-
if (params.channelId || params.subPageId) {
|
2814
|
-
url.searchParams.append('context', JSON.stringify({ channelId: params.channelId, subEntityId: params.subPageId }));
|
2813
|
+
if (params.chatId || params.channelId || params.subPageId) {
|
2814
|
+
url.searchParams.append('context', JSON.stringify({ chatId: params.chatId, channelId: params.channelId, subEntityId: params.subPageId }));
|
2815
2815
|
}
|
2816
2816
|
return url.toString();
|
2817
2817
|
}
|
@@ -3395,7 +3395,7 @@ const _minRuntimeConfigToUninitialize = {
|
|
3395
3395
|
* @hidden
|
3396
3396
|
* Package version.
|
3397
3397
|
*/
|
3398
|
-
const version = "2.
|
3398
|
+
const version = "2.26.0-beta.0";
|
3399
3399
|
|
3400
3400
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
3401
3401
|
|
@@ -4014,11 +4014,12 @@ var authentication;
|
|
4014
4014
|
return value;
|
4015
4015
|
})
|
4016
4016
|
.catch((err) => {
|
4017
|
+
const errorMessage = `Error returned, code = ${err.errorCode}, message = ${err.message}`;
|
4017
4018
|
if (userRequest && userRequest.failureCallback) {
|
4018
|
-
userRequest.failureCallback(
|
4019
|
+
userRequest.failureCallback(errorMessage);
|
4019
4020
|
return null;
|
4020
4021
|
}
|
4021
|
-
throw
|
4022
|
+
throw new Error(errorMessage);
|
4022
4023
|
});
|
4023
4024
|
}
|
4024
4025
|
authentication.getUser = getUser;
|
@@ -4030,7 +4031,7 @@ var authentication;
|
|
4030
4031
|
return result;
|
4031
4032
|
}
|
4032
4033
|
else {
|
4033
|
-
throw
|
4034
|
+
throw result;
|
4034
4035
|
}
|
4035
4036
|
});
|
4036
4037
|
}
|
@@ -5596,11 +5597,11 @@ var pages;
|
|
5596
5597
|
}
|
5597
5598
|
pages.getConfig = getConfig;
|
5598
5599
|
/**
|
5599
|
-
*
|
5600
|
-
*
|
5601
|
-
*
|
5602
|
-
*
|
5603
|
-
*
|
5600
|
+
* @deprecated
|
5601
|
+
* As of 2.0.0, this API is deprecated and can be replaced by the standard JavaScript
|
5602
|
+
* API, window.location.href, when navigating the app to a new cross-domain URL. Any URL
|
5603
|
+
* that is redirected to must be listed in the validDomains block of the manifest. Please
|
5604
|
+
* remove any calls to this API.
|
5604
5605
|
* @param url - The URL to navigate the frame to.
|
5605
5606
|
* @returns Promise that resolves when the navigation has completed.
|
5606
5607
|
*/
|
@@ -7039,7 +7040,15 @@ function shouldProcessMessage(messageSource, messageOrigin) {
|
|
7039
7040
|
return true;
|
7040
7041
|
}
|
7041
7042
|
else {
|
7042
|
-
|
7043
|
+
let messageOriginURL;
|
7044
|
+
try {
|
7045
|
+
messageOriginURL = new URL(messageOrigin);
|
7046
|
+
}
|
7047
|
+
catch (_) {
|
7048
|
+
shouldProcessMessageLogger('Message has an invalid origin of %s', messageOrigin);
|
7049
|
+
return false;
|
7050
|
+
}
|
7051
|
+
const isOriginValid = yield validateOrigin(messageOriginURL);
|
7043
7052
|
if (!isOriginValid) {
|
7044
7053
|
shouldProcessMessageLogger('Message has an invalid origin of %s', messageOrigin);
|
7045
7054
|
}
|
@@ -14836,14 +14845,10 @@ function navigateToTab(tabInstance, onComplete) {
|
|
14836
14845
|
}
|
14837
14846
|
/**
|
14838
14847
|
* @deprecated
|
14839
|
-
* As of
|
14840
|
-
*
|
14841
|
-
*
|
14842
|
-
*
|
14843
|
-
* thrown. This function needs to be used only when navigating the frame to a URL in a different domain
|
14844
|
-
* than the current one in a way that keeps the app informed of the change and allows the SDK to
|
14845
|
-
* continue working.
|
14846
|
-
*
|
14848
|
+
* As of 2.0.0, this API is deprecated and can be replaced by the standard JavaScript
|
14849
|
+
* API, window.location.href, when navigating the app to a new cross-domain URL. Any URL
|
14850
|
+
* that is redirected to must be listed in the validDomains block of the manifest. Please
|
14851
|
+
* remove any calls to this API.
|
14847
14852
|
* @param url - The URL to navigate the frame to.
|
14848
14853
|
* @param onComplete - The callback to invoke when the action is complete.
|
14849
14854
|
*/
|