@microsoft/teams-js 2.2.0 → 2.3.0-beta.1
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/LICENSE +11 -11
- package/README.md +74 -74
- package/dist/MicrosoftTeams.d.ts +812 -162
- package/dist/MicrosoftTeams.js +709 -252
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -34
package/dist/MicrosoftTeams.js
CHANGED
@@ -1111,6 +1111,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1111
1111
|
"registerUserSettingsChangeHandler": () => (/* reexport */ registerUserSettingsChangeHandler),
|
1112
1112
|
"remoteCamera": () => (/* reexport */ remoteCamera),
|
1113
1113
|
"returnFocus": () => (/* reexport */ returnFocus),
|
1114
|
+
"search": () => (/* reexport */ search),
|
1114
1115
|
"sendCustomEvent": () => (/* reexport */ sendCustomEvent),
|
1115
1116
|
"sendCustomMessage": () => (/* reexport */ sendCustomMessage),
|
1116
1117
|
"setFrameContext": () => (/* reexport */ setFrameContext),
|
@@ -1127,7 +1128,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1127
1128
|
});
|
1128
1129
|
|
1129
1130
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1130
|
-
var version = "2.
|
1131
|
+
var version = "2.3.0-beta.1";
|
1131
1132
|
/**
|
1132
1133
|
* @hidden
|
1133
1134
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
@@ -1135,6 +1136,7 @@ var version = "2.2.0";
|
|
1135
1136
|
* Mobile clients are passing versions, hence will be applicable to web and desktop clients only.
|
1136
1137
|
*
|
1137
1138
|
* @internal
|
1139
|
+
* Limited to Microsoft-internal use
|
1138
1140
|
*/
|
1139
1141
|
var defaultSDKVersionForCompatCheck = '2.0.1';
|
1140
1142
|
/**
|
@@ -1142,14 +1144,23 @@ var defaultSDKVersionForCompatCheck = '2.0.1';
|
|
1142
1144
|
* This is the client version when selectMedia API - VideoAndImage is supported on mobile.
|
1143
1145
|
*
|
1144
1146
|
* @internal
|
1147
|
+
* Limited to Microsoft-internal use
|
1145
1148
|
*/
|
1146
1149
|
var videoAndImageMediaAPISupportVersion = '2.0.2';
|
1147
1150
|
/**
|
1151
|
+
* @hidden
|
1148
1152
|
* This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.
|
1153
|
+
*
|
1154
|
+
* @internal
|
1155
|
+
* Limited to Microsoft-internal use
|
1149
1156
|
*/
|
1150
1157
|
var nonFullScreenVideoModeAPISupportVersion = '2.0.3';
|
1151
1158
|
/**
|
1159
|
+
* @hidden
|
1152
1160
|
* This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.
|
1161
|
+
*
|
1162
|
+
* @internal
|
1163
|
+
* Limited to Microsoft-internal use
|
1153
1164
|
*/
|
1154
1165
|
var imageOutputFormatsAPISupportVersion = '2.0.4';
|
1155
1166
|
/**
|
@@ -1157,6 +1168,7 @@ var imageOutputFormatsAPISupportVersion = '2.0.4';
|
|
1157
1168
|
* Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
|
1158
1169
|
*
|
1159
1170
|
* @internal
|
1171
|
+
* Limited to Microsoft-internal use
|
1160
1172
|
*/
|
1161
1173
|
var getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
|
1162
1174
|
/**
|
@@ -1164,6 +1176,7 @@ var getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
|
|
1164
1176
|
* This is the client version when location APIs (getLocation and showLocation) are supported.
|
1165
1177
|
*
|
1166
1178
|
* @internal
|
1179
|
+
* Limited to Microsoft-internal use
|
1167
1180
|
*/
|
1168
1181
|
var locationAPIsRequiredVersion = '1.9.0';
|
1169
1182
|
/**
|
@@ -1171,6 +1184,7 @@ var locationAPIsRequiredVersion = '1.9.0';
|
|
1171
1184
|
* This is the client version when permisisons are supported
|
1172
1185
|
*
|
1173
1186
|
* @internal
|
1187
|
+
* Limited to Microsoft-internal use
|
1174
1188
|
*/
|
1175
1189
|
var permissionsAPIsRequiredVersion = '2.0.1';
|
1176
1190
|
/**
|
@@ -1178,6 +1192,7 @@ var permissionsAPIsRequiredVersion = '2.0.1';
|
|
1178
1192
|
* This is the client version when people picker API is supported on mobile.
|
1179
1193
|
*
|
1180
1194
|
* @internal
|
1195
|
+
* Limited to Microsoft-internal use
|
1181
1196
|
*/
|
1182
1197
|
var peoplePickerRequiredVersion = '2.0.0';
|
1183
1198
|
/**
|
@@ -1185,6 +1200,7 @@ var peoplePickerRequiredVersion = '2.0.0';
|
|
1185
1200
|
* This is the client version when captureImage API is supported on mobile.
|
1186
1201
|
*
|
1187
1202
|
* @internal
|
1203
|
+
* Limited to Microsoft-internal use
|
1188
1204
|
*/
|
1189
1205
|
var captureImageMobileSupportVersion = '1.7.0';
|
1190
1206
|
/**
|
@@ -1192,6 +1208,7 @@ var captureImageMobileSupportVersion = '1.7.0';
|
|
1192
1208
|
* This is the client version when media APIs are supported on all three platforms ios, android and web.
|
1193
1209
|
*
|
1194
1210
|
* @internal
|
1211
|
+
* Limited to Microsoft-internal use
|
1195
1212
|
*/
|
1196
1213
|
var mediaAPISupportVersion = '1.8.0';
|
1197
1214
|
/**
|
@@ -1199,6 +1216,7 @@ var mediaAPISupportVersion = '1.8.0';
|
|
1199
1216
|
* This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
|
1200
1217
|
*
|
1201
1218
|
* @internal
|
1219
|
+
* Limited to Microsoft-internal use
|
1202
1220
|
*/
|
1203
1221
|
var getMediaCallbackSupportVersion = '2.0.0';
|
1204
1222
|
/**
|
@@ -1206,6 +1224,7 @@ var getMediaCallbackSupportVersion = '2.0.0';
|
|
1206
1224
|
* This is the client version when scanBarCode API is supported on mobile.
|
1207
1225
|
*
|
1208
1226
|
* @internal
|
1227
|
+
* Limited to Microsoft-internal use
|
1209
1228
|
*/
|
1210
1229
|
var scanBarCodeAPIMobileSupportVersion = '1.9.0';
|
1211
1230
|
/**
|
@@ -1213,6 +1232,7 @@ var scanBarCodeAPIMobileSupportVersion = '1.9.0';
|
|
1213
1232
|
* List of supported Host origins
|
1214
1233
|
*
|
1215
1234
|
* @internal
|
1235
|
+
* Limited to Microsoft-internal use
|
1216
1236
|
*/
|
1217
1237
|
var validOrigins = [
|
1218
1238
|
'teams.microsoft.com',
|
@@ -1248,6 +1268,7 @@ var validOrigins = [
|
|
1248
1268
|
* USer specified message origins should satisfy this test
|
1249
1269
|
*
|
1250
1270
|
* @internal
|
1271
|
+
* Limited to Microsoft-internal use
|
1251
1272
|
*/
|
1252
1273
|
var userOriginUrlValidationRegExp = /^https:\/\//;
|
1253
1274
|
/**
|
@@ -1255,6 +1276,7 @@ var userOriginUrlValidationRegExp = /^https:\/\//;
|
|
1255
1276
|
* The protocol used for deep links into Teams
|
1256
1277
|
*
|
1257
1278
|
* @internal
|
1279
|
+
* Limited to Microsoft-internal use
|
1258
1280
|
*/
|
1259
1281
|
var teamsDeepLinkProtocol = 'https';
|
1260
1282
|
/**
|
@@ -1262,6 +1284,7 @@ var teamsDeepLinkProtocol = 'https';
|
|
1262
1284
|
* The host used for deep links into Teams
|
1263
1285
|
*
|
1264
1286
|
* @internal
|
1287
|
+
* Limited to Microsoft-internal use
|
1265
1288
|
*/
|
1266
1289
|
var teamsDeepLinkHost = 'teams.microsoft.com';
|
1267
1290
|
|
@@ -1484,6 +1507,7 @@ var uuid = __webpack_require__(22);
|
|
1484
1507
|
* validateHostAgainstPattern('teams.microsoft.com', 'team.microsoft.com') returns false
|
1485
1508
|
*
|
1486
1509
|
* @internal
|
1510
|
+
* Limited to Microsoft-internal use
|
1487
1511
|
*/
|
1488
1512
|
function validateHostAgainstPattern(pattern, host) {
|
1489
1513
|
if (pattern.substring(0, 2) === '*.') {
|
@@ -1499,7 +1523,10 @@ function validateHostAgainstPattern(pattern, host) {
|
|
1499
1523
|
}
|
1500
1524
|
return false;
|
1501
1525
|
}
|
1502
|
-
|
1526
|
+
/**
|
1527
|
+
* @internal
|
1528
|
+
* Limited to Microsoft-internal use
|
1529
|
+
*/
|
1503
1530
|
function validateOrigin(messageOrigin) {
|
1504
1531
|
// Check whether the url is in the pre-known allowlist or supplied by user
|
1505
1532
|
if (messageOrigin.protocol !== 'https:') {
|
@@ -1518,7 +1545,10 @@ function validateOrigin(messageOrigin) {
|
|
1518
1545
|
}
|
1519
1546
|
return false;
|
1520
1547
|
}
|
1521
|
-
|
1548
|
+
/**
|
1549
|
+
* @internal
|
1550
|
+
* Limited to Microsoft-internal use
|
1551
|
+
*/
|
1522
1552
|
function getGenericOnCompleteHandler(errorMessage) {
|
1523
1553
|
return function (success, reason) {
|
1524
1554
|
if (!success) {
|
@@ -1544,6 +1574,7 @@ function getGenericOnCompleteHandler(errorMessage) {
|
|
1544
1574
|
* compareSDKVersions('2.0', 2.0) returns NaN
|
1545
1575
|
*
|
1546
1576
|
* @internal
|
1577
|
+
* Limited to Microsoft-internal use
|
1547
1578
|
*/
|
1548
1579
|
function compareSDKVersions(v1, v2) {
|
1549
1580
|
if (typeof v1 !== 'string' || typeof v2 !== 'string') {
|
@@ -1584,10 +1615,15 @@ function compareSDKVersions(v1, v2) {
|
|
1584
1615
|
* Generates a GUID
|
1585
1616
|
*
|
1586
1617
|
* @internal
|
1618
|
+
* Limited to Microsoft-internal use
|
1587
1619
|
*/
|
1588
1620
|
function generateGUID() {
|
1589
1621
|
return uuid.v4();
|
1590
1622
|
}
|
1623
|
+
/**
|
1624
|
+
* @internal
|
1625
|
+
* Limited to Microsoft-internal use
|
1626
|
+
*/
|
1591
1627
|
function deepFreeze(obj) {
|
1592
1628
|
Object.keys(obj).forEach(function (prop) {
|
1593
1629
|
if (typeof obj[prop] === 'object') {
|
@@ -1604,6 +1640,7 @@ function deepFreeze(obj) {
|
|
1604
1640
|
* @returns
|
1605
1641
|
*
|
1606
1642
|
* @internal
|
1643
|
+
* Limited to Microsoft-internal use
|
1607
1644
|
*/
|
1608
1645
|
function callCallbackWithErrorOrResultFromPromiseAndReturnPromise(funcHelper, callback) {
|
1609
1646
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -1638,6 +1675,7 @@ function callCallbackWithErrorOrResultFromPromiseAndReturnPromise(funcHelper, ca
|
|
1638
1675
|
* @param args
|
1639
1676
|
* @returns
|
1640
1677
|
* @internal
|
1678
|
+
* Limited to Microsoft-internal use
|
1641
1679
|
*/
|
1642
1680
|
function callCallbackWithErrorOrBooleanFromPromiseAndReturnPromise(funcHelper, callback) {
|
1643
1681
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -1670,7 +1708,9 @@ function callCallbackWithErrorOrBooleanFromPromiseAndReturnPromise(funcHelper, c
|
|
1670
1708
|
* @param callback
|
1671
1709
|
* @param args
|
1672
1710
|
* @returns
|
1711
|
+
*
|
1673
1712
|
* @internal
|
1713
|
+
* Limited to Microsoft-internal use
|
1674
1714
|
*/
|
1675
1715
|
function callCallbackWithSdkErrorFromPromiseAndReturnPromise(funcHelper, callback) {
|
1676
1716
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -1705,6 +1745,7 @@ function callCallbackWithSdkErrorFromPromiseAndReturnPromise(funcHelper, callbac
|
|
1705
1745
|
* @returns
|
1706
1746
|
*
|
1707
1747
|
* @internal
|
1748
|
+
* Limited to Microsoft-internal use
|
1708
1749
|
*/
|
1709
1750
|
function callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(funcHelper, callback) {
|
1710
1751
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
@@ -1741,6 +1782,7 @@ function callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(funcHelp
|
|
1741
1782
|
* if the initial action didn't complete within provided timeout.
|
1742
1783
|
*
|
1743
1784
|
* @internal
|
1785
|
+
* Limited to Microsoft-internal use
|
1744
1786
|
*/
|
1745
1787
|
function runWithTimeout(action, timeoutInMs, timeoutError) {
|
1746
1788
|
return new Promise(function (resolve, reject) {
|
@@ -1756,6 +1798,10 @@ function runWithTimeout(action, timeoutInMs, timeoutError) {
|
|
1756
1798
|
});
|
1757
1799
|
});
|
1758
1800
|
}
|
1801
|
+
/**
|
1802
|
+
* @internal
|
1803
|
+
* Limited to Microsoft-internal use
|
1804
|
+
*/
|
1759
1805
|
function createTeamsAppLink(params) {
|
1760
1806
|
var url = new URL('https://teams.microsoft.com/l/entity/' +
|
1761
1807
|
encodeURIComponent(params.appId) +
|
@@ -1776,7 +1822,10 @@ function createTeamsAppLink(params) {
|
|
1776
1822
|
|
1777
1823
|
|
1778
1824
|
|
1779
|
-
/**
|
1825
|
+
/**
|
1826
|
+
* @internal
|
1827
|
+
* Limited to Microsoft-internal use
|
1828
|
+
*/
|
1780
1829
|
function ensureInitialized() {
|
1781
1830
|
var expectedFrameContexts = [];
|
1782
1831
|
for (var _i = 0; _i < arguments.length; _i++) {
|
@@ -1807,6 +1856,7 @@ function ensureInitialized() {
|
|
1807
1856
|
* @param requiredVersion - SDK version required by the API
|
1808
1857
|
*
|
1809
1858
|
* @internal
|
1859
|
+
* Limited to Microsoft-internal use
|
1810
1860
|
*/
|
1811
1861
|
function isCurrentSDKVersionAtLeast(requiredVersion) {
|
1812
1862
|
if (requiredVersion === void 0) { requiredVersion = defaultSDKVersionForCompatCheck; }
|
@@ -1821,6 +1871,7 @@ function isCurrentSDKVersionAtLeast(requiredVersion) {
|
|
1821
1871
|
* Helper function to identify if host client is either android or ios
|
1822
1872
|
*
|
1823
1873
|
* @internal
|
1874
|
+
* Limited to Microsoft-internal use
|
1824
1875
|
*/
|
1825
1876
|
function isHostClientMobile() {
|
1826
1877
|
return GlobalVars.hostClientType == HostClientType.android || GlobalVars.hostClientType == HostClientType.ios;
|
@@ -1832,6 +1883,7 @@ function isHostClientMobile() {
|
|
1832
1883
|
* supported by platform or not. Null is returned in case of success.
|
1833
1884
|
*
|
1834
1885
|
* @internal
|
1886
|
+
* Limited to Microsoft-internal use
|
1835
1887
|
*/
|
1836
1888
|
function throwExceptionIfMobileApiIsNotSupported(requiredVersion) {
|
1837
1889
|
if (requiredVersion === void 0) { requiredVersion = defaultSDKVersionForCompatCheck; }
|
@@ -1850,6 +1902,7 @@ function throwExceptionIfMobileApiIsNotSupported(requiredVersion) {
|
|
1850
1902
|
* which is used later for message source/origin validation
|
1851
1903
|
*
|
1852
1904
|
* @internal
|
1905
|
+
* Limited to Microsoft-internal use
|
1853
1906
|
*/
|
1854
1907
|
function processAdditionalValidOrigins(validMessageOrigins) {
|
1855
1908
|
var combinedOriginUrls = GlobalVars.additionalValidOrigins.concat(validMessageOrigins.filter(function (_origin) {
|
@@ -1866,137 +1919,6 @@ function processAdditionalValidOrigins(validMessageOrigins) {
|
|
1866
1919
|
GlobalVars.additionalValidOrigins = combinedOriginUrls;
|
1867
1920
|
}
|
1868
1921
|
|
1869
|
-
;// CONCATENATED MODULE: ./src/private/privateAPIs.ts
|
1870
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
1871
|
-
|
1872
|
-
|
1873
|
-
|
1874
|
-
|
1875
|
-
|
1876
|
-
/**
|
1877
|
-
* @internal
|
1878
|
-
*/
|
1879
|
-
function initializePrivateApis() {
|
1880
|
-
// To maintain backwards compatability, this function cannot be deleted as it is callable
|
1881
|
-
}
|
1882
|
-
/**
|
1883
|
-
* @hidden
|
1884
|
-
* Hide from docs.
|
1885
|
-
* ------
|
1886
|
-
* Upload a custom App manifest directly to both team and personal scopes.
|
1887
|
-
* This method works just for the first party Apps.
|
1888
|
-
*
|
1889
|
-
* @internal
|
1890
|
-
*/
|
1891
|
-
function uploadCustomApp(manifestBlob, onComplete) {
|
1892
|
-
ensureInitialized();
|
1893
|
-
sendMessageToParent('uploadCustomApp', [manifestBlob], onComplete ? onComplete : getGenericOnCompleteHandler());
|
1894
|
-
}
|
1895
|
-
/**
|
1896
|
-
* @hidden
|
1897
|
-
* Internal use only
|
1898
|
-
* Sends a custom action MessageRequest to host or parent window
|
1899
|
-
*
|
1900
|
-
* @param actionName - Specifies name of the custom action to be sent
|
1901
|
-
* @param args - Specifies additional arguments passed to the action
|
1902
|
-
* @param callback - Optionally specify a callback to receive response parameters from the parent
|
1903
|
-
* @returns id of sent message
|
1904
|
-
*
|
1905
|
-
* @internal
|
1906
|
-
*/
|
1907
|
-
function sendCustomMessage(actionName,
|
1908
|
-
// tslint:disable-next-line:no-any
|
1909
|
-
args,
|
1910
|
-
// tslint:disable-next-line:no-any
|
1911
|
-
callback) {
|
1912
|
-
ensureInitialized();
|
1913
|
-
sendMessageToParent(actionName, args, callback);
|
1914
|
-
}
|
1915
|
-
/**
|
1916
|
-
* @hidden
|
1917
|
-
* Internal use only
|
1918
|
-
* Sends a custom action MessageEvent to a child iframe/window, only if you are not using auth popup.
|
1919
|
-
* Otherwise it will go to the auth popup (which becomes the child)
|
1920
|
-
*
|
1921
|
-
* @param actionName - Specifies name of the custom action to be sent
|
1922
|
-
* @param args - Specifies additional arguments passed to the action
|
1923
|
-
* @returns id of sent message
|
1924
|
-
*
|
1925
|
-
* @internal
|
1926
|
-
*/
|
1927
|
-
function sendCustomEvent(actionName,
|
1928
|
-
// tslint:disable-next-line:no-any
|
1929
|
-
args) {
|
1930
|
-
ensureInitialized();
|
1931
|
-
//validate childWindow
|
1932
|
-
if (!Communication.childWindow) {
|
1933
|
-
throw new Error('The child window has not yet been initialized or is not present');
|
1934
|
-
}
|
1935
|
-
sendMessageEventToChild(actionName, args);
|
1936
|
-
}
|
1937
|
-
/**
|
1938
|
-
* @hidden
|
1939
|
-
* Internal use only
|
1940
|
-
* Adds a handler for an action sent by a child window or parent window
|
1941
|
-
*
|
1942
|
-
* @param actionName - Specifies name of the action message to handle
|
1943
|
-
* @param customHandler - The callback to invoke when the action message is received. The return value is sent to the child
|
1944
|
-
*
|
1945
|
-
* @internal
|
1946
|
-
*/
|
1947
|
-
function registerCustomHandler(actionName, customHandler) {
|
1948
|
-
var _this = this;
|
1949
|
-
ensureInitialized();
|
1950
|
-
registerHandler(actionName, function () {
|
1951
|
-
var args = [];
|
1952
|
-
for (var _i = 0; _i < arguments.length; _i++) {
|
1953
|
-
args[_i] = arguments[_i];
|
1954
|
-
}
|
1955
|
-
return customHandler.apply(_this, args);
|
1956
|
-
});
|
1957
|
-
}
|
1958
|
-
/**
|
1959
|
-
* @hidden
|
1960
|
-
* register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback.
|
1961
|
-
*
|
1962
|
-
* @param settingTypes - List of user setting changes to subscribe
|
1963
|
-
* @param handler - When a subscribed setting is updated this handler is called
|
1964
|
-
*
|
1965
|
-
* @internal
|
1966
|
-
*/
|
1967
|
-
function registerUserSettingsChangeHandler(settingTypes, handler) {
|
1968
|
-
ensureInitialized();
|
1969
|
-
registerHandler('userSettingsChange', handler, true, [settingTypes]);
|
1970
|
-
}
|
1971
|
-
/**
|
1972
|
-
* @hidden
|
1973
|
-
* Hide from docs.
|
1974
|
-
* ------
|
1975
|
-
* Opens a client-friendly preview of the specified file.
|
1976
|
-
*
|
1977
|
-
* @param file - The file to preview.
|
1978
|
-
*/
|
1979
|
-
function openFilePreview(filePreviewParameters) {
|
1980
|
-
ensureInitialized(FrameContexts.content, FrameContexts.task);
|
1981
|
-
var params = [
|
1982
|
-
filePreviewParameters.entityId,
|
1983
|
-
filePreviewParameters.title,
|
1984
|
-
filePreviewParameters.description,
|
1985
|
-
filePreviewParameters.type,
|
1986
|
-
filePreviewParameters.objectUrl,
|
1987
|
-
filePreviewParameters.downloadUrl,
|
1988
|
-
filePreviewParameters.webPreviewUrl,
|
1989
|
-
filePreviewParameters.webEditUrl,
|
1990
|
-
filePreviewParameters.baseUrl,
|
1991
|
-
filePreviewParameters.editFile,
|
1992
|
-
filePreviewParameters.subEntityId,
|
1993
|
-
filePreviewParameters.viewerAction,
|
1994
|
-
filePreviewParameters.fileOpenPreference,
|
1995
|
-
filePreviewParameters.conversationId,
|
1996
|
-
];
|
1997
|
-
sendMessageToParent('openFilePreview', params);
|
1998
|
-
}
|
1999
|
-
|
2000
1922
|
;// CONCATENATED MODULE: ./src/public/authentication.ts
|
2001
1923
|
|
2002
1924
|
|
@@ -2425,6 +2347,7 @@ var runtime = {
|
|
2425
2347
|
permissions: undefined,
|
2426
2348
|
profile: undefined,
|
2427
2349
|
remoteCamera: undefined,
|
2350
|
+
search: undefined,
|
2428
2351
|
sharing: undefined,
|
2429
2352
|
stageView: undefined,
|
2430
2353
|
teams: {
|
@@ -2501,21 +2424,29 @@ var versionConstants = {
|
|
2501
2424
|
capability: { teams: { fullTrust: { joinedTeams: {} } } },
|
2502
2425
|
hostClientTypes: [
|
2503
2426
|
HostClientType.android,
|
2427
|
+
HostClientType.desktop,
|
2428
|
+
HostClientType.ios,
|
2504
2429
|
HostClientType.teamsRoomsAndroid,
|
2505
2430
|
HostClientType.teamsPhones,
|
2506
2431
|
HostClientType.teamsDisplays,
|
2432
|
+
HostClientType.web,
|
2507
2433
|
],
|
2508
2434
|
},
|
2435
|
+
{
|
2436
|
+
capability: { webStorage: {} },
|
2437
|
+
hostClientTypes: [HostClientType.desktop],
|
2438
|
+
},
|
2509
2439
|
],
|
2510
2440
|
'2.0.5': [
|
2511
2441
|
{
|
2512
2442
|
capability: { webStorage: {} },
|
2513
|
-
hostClientTypes: [HostClientType.android, HostClientType.ios],
|
2443
|
+
hostClientTypes: [HostClientType.android, HostClientType.desktop, HostClientType.ios],
|
2514
2444
|
},
|
2515
2445
|
],
|
2516
2446
|
};
|
2517
2447
|
/**
|
2518
2448
|
* @internal
|
2449
|
+
* Limited to Microsoft-internal use
|
2519
2450
|
*
|
2520
2451
|
* Generates and returns a runtime configuration for host clients which are not on the latest host SDK version
|
2521
2452
|
* and do not provide their own runtime config. Their supported capabilities are based on the highest
|
@@ -2547,12 +2478,11 @@ function applyRuntimeConfig(runtimeConfig) {
|
|
2547
2478
|
}
|
2548
2479
|
/**
|
2549
2480
|
* @hidden
|
2550
|
-
* Hide from docs.
|
2551
|
-
* ------
|
2552
2481
|
* Constant used to set minimum runtime configuration
|
2553
2482
|
* while un-initializing an app in unit test case.
|
2554
2483
|
*
|
2555
2484
|
* @internal
|
2485
|
+
* Limited to Microsoft-internal use
|
2556
2486
|
*/
|
2557
2487
|
var _minRuntimeConfigToUninitialize = {
|
2558
2488
|
apiVersion: 1,
|
@@ -2590,10 +2520,11 @@ var dialog;
|
|
2590
2520
|
/**
|
2591
2521
|
* @hidden
|
2592
2522
|
* Hide from docs because this function is only used during initialization
|
2593
|
-
*
|
2523
|
+
*
|
2594
2524
|
* Adds register handlers for messageForChild upon initialization and only in the tasks FrameContext. {@link FrameContexts.task}
|
2595
2525
|
* Function is called during app initialization
|
2596
2526
|
* @internal
|
2527
|
+
* Limited to Microsoft-internal use
|
2597
2528
|
*/
|
2598
2529
|
function initialize() {
|
2599
2530
|
registerHandler('messageForChild', handleDialogMessage, false);
|
@@ -2790,11 +2721,11 @@ var dialog;
|
|
2790
2721
|
})(bot = dialog.bot || (dialog.bot = {}));
|
2791
2722
|
/**
|
2792
2723
|
* @hidden
|
2793
|
-
*
|
2794
|
-
* --------
|
2724
|
+
*
|
2795
2725
|
* Convert UrlDialogInfo to DialogInfo to send the information to host in {@linkcode open} API.
|
2796
2726
|
*
|
2797
2727
|
* @internal
|
2728
|
+
* Limited to Microsoft-internal use
|
2798
2729
|
*/
|
2799
2730
|
function getDialogInfoFromUrlDialogInfo(urlDialogInfo) {
|
2800
2731
|
var dialogInfo = {
|
@@ -2809,11 +2740,11 @@ var dialog;
|
|
2809
2740
|
dialog.getDialogInfoFromUrlDialogInfo = getDialogInfoFromUrlDialogInfo;
|
2810
2741
|
/**
|
2811
2742
|
* @hidden
|
2812
|
-
*
|
2813
|
-
* --------
|
2743
|
+
*
|
2814
2744
|
* Convert BotUrlDialogInfo to DialogInfo to send the information to host in {@linkcode bot.open} API.
|
2815
2745
|
*
|
2816
2746
|
* @internal
|
2747
|
+
* Limited to Microsoft-internal use
|
2817
2748
|
*/
|
2818
2749
|
function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo) {
|
2819
2750
|
var dialogInfo = {
|
@@ -3070,7 +3001,6 @@ var teamsCore;
|
|
3070
3001
|
|
3071
3002
|
|
3072
3003
|
|
3073
|
-
|
3074
3004
|
/**
|
3075
3005
|
* Namespace to interact with app initialization and lifecycle.
|
3076
3006
|
*
|
@@ -3227,7 +3157,6 @@ var app_app;
|
|
3227
3157
|
menus.initialize();
|
3228
3158
|
pages.config.initialize();
|
3229
3159
|
dialog.initialize();
|
3230
|
-
initializePrivateApis();
|
3231
3160
|
}
|
3232
3161
|
// Handle additional valid message origins if specified
|
3233
3162
|
if (Array.isArray(validMessageOrigins)) {
|
@@ -3238,11 +3167,10 @@ var app_app;
|
|
3238
3167
|
}
|
3239
3168
|
/**
|
3240
3169
|
* @hidden
|
3241
|
-
* Hide from docs.
|
3242
|
-
* ------
|
3243
3170
|
* Undocumented function used to set a mock window for unit tests
|
3244
3171
|
*
|
3245
3172
|
* @internal
|
3173
|
+
* Limited to Microsoft-internal use
|
3246
3174
|
*/
|
3247
3175
|
function _initialize(hostWindow) {
|
3248
3176
|
Communication.currentWindow = hostWindow;
|
@@ -3250,11 +3178,10 @@ var app_app;
|
|
3250
3178
|
app._initialize = _initialize;
|
3251
3179
|
/**
|
3252
3180
|
* @hidden
|
3253
|
-
* Hide from docs.
|
3254
|
-
* ------
|
3255
3181
|
* Undocumented function used to clear state between unit tests
|
3256
3182
|
*
|
3257
3183
|
* @internal
|
3184
|
+
* Limited to Microsoft-internal use
|
3258
3185
|
*/
|
3259
3186
|
function _uninitialize() {
|
3260
3187
|
if (!GlobalVars.initializeCalled) {
|
@@ -3368,6 +3295,7 @@ var app_app;
|
|
3368
3295
|
* Transforms the Legacy Context object received from Messages to the structured app.Context object
|
3369
3296
|
*
|
3370
3297
|
* @internal
|
3298
|
+
* Limited to Microsoft-internal use
|
3371
3299
|
*/
|
3372
3300
|
function transformLegacyContextToAppContext(legacyContext) {
|
3373
3301
|
var context = {
|
@@ -3499,6 +3427,7 @@ var pages;
|
|
3499
3427
|
* @param handler - The handler for placing focus within the application.
|
3500
3428
|
*
|
3501
3429
|
* @internal
|
3430
|
+
* Limited to Microsoft-internal use
|
3502
3431
|
*/
|
3503
3432
|
function registerFocusEnterHandler(handler) {
|
3504
3433
|
ensureInitialized();
|
@@ -3707,9 +3636,10 @@ var pages;
|
|
3707
3636
|
/**
|
3708
3637
|
* @hidden
|
3709
3638
|
* Hide from docs because this function is only used during initialization
|
3710
|
-
*
|
3639
|
+
*
|
3711
3640
|
* Adds register handlers for settings.save and settings.remove upon initialization. Function is called in {@link app.initializeHelper}
|
3712
3641
|
* @internal
|
3642
|
+
* Limited to Microsoft-internal use
|
3713
3643
|
*/
|
3714
3644
|
function initialize() {
|
3715
3645
|
registerHandler('settings.save', handleSave, false);
|
@@ -4038,6 +3968,7 @@ var browser = __webpack_require__(227);
|
|
4038
3968
|
var topLevelLogger = (0,browser.debug)('teamsJs');
|
4039
3969
|
/**
|
4040
3970
|
* @internal
|
3971
|
+
* Limited to Microsoft-internal use
|
4041
3972
|
*
|
4042
3973
|
* Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
|
4043
3974
|
*/
|
@@ -4060,14 +3991,20 @@ var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from
|
|
4060
3991
|
|
4061
3992
|
|
4062
3993
|
var handlersLogger = getLogger('handlers');
|
4063
|
-
/**
|
3994
|
+
/**
|
3995
|
+
* @internal
|
3996
|
+
* Limited to Microsoft-internal use
|
3997
|
+
*/
|
4064
3998
|
var HandlersPrivate = /** @class */ (function () {
|
4065
3999
|
function HandlersPrivate() {
|
4066
4000
|
}
|
4067
4001
|
HandlersPrivate.handlers = {};
|
4068
4002
|
return HandlersPrivate;
|
4069
4003
|
}());
|
4070
|
-
/**
|
4004
|
+
/**
|
4005
|
+
* @internal
|
4006
|
+
* Limited to Microsoft-internal use
|
4007
|
+
*/
|
4071
4008
|
function initializeHandlers() {
|
4072
4009
|
// ::::::::::::::::::::MicrosoftTeams SDK Internal :::::::::::::::::
|
4073
4010
|
HandlersPrivate.handlers['themeChange'] = handleThemeChange;
|
@@ -4076,7 +4013,10 @@ function initializeHandlers() {
|
|
4076
4013
|
pages.backStack._initialize();
|
4077
4014
|
}
|
4078
4015
|
var callHandlerLogger = handlersLogger.extend('callHandler');
|
4079
|
-
/**
|
4016
|
+
/**
|
4017
|
+
* @internal
|
4018
|
+
* Limited to Microsoft-internal use
|
4019
|
+
*/
|
4080
4020
|
function callHandler(name, args) {
|
4081
4021
|
var handler = HandlersPrivate.handlers[name];
|
4082
4022
|
if (handler) {
|
@@ -4089,7 +4029,10 @@ function callHandler(name, args) {
|
|
4089
4029
|
return [false, undefined];
|
4090
4030
|
}
|
4091
4031
|
}
|
4092
|
-
/**
|
4032
|
+
/**
|
4033
|
+
* @internal
|
4034
|
+
* Limited to Microsoft-internal use
|
4035
|
+
*/
|
4093
4036
|
function registerHandler(name, handler, sendMessage, args) {
|
4094
4037
|
if (sendMessage === void 0) { sendMessage = true; }
|
4095
4038
|
if (args === void 0) { args = []; }
|
@@ -4101,7 +4044,10 @@ function registerHandler(name, handler, sendMessage, args) {
|
|
4101
4044
|
delete HandlersPrivate.handlers[name];
|
4102
4045
|
}
|
4103
4046
|
}
|
4104
|
-
/**
|
4047
|
+
/**
|
4048
|
+
* @internal
|
4049
|
+
* Limited to Microsoft-internal use
|
4050
|
+
*/
|
4105
4051
|
function removeHandler(name) {
|
4106
4052
|
delete HandlersPrivate.handlers[name];
|
4107
4053
|
}
|
@@ -4109,12 +4055,18 @@ function removeHandler(name) {
|
|
4109
4055
|
function doesHandlerExist(name) {
|
4110
4056
|
return HandlersPrivate.handlers[name] != null;
|
4111
4057
|
}
|
4112
|
-
/**
|
4058
|
+
/**
|
4059
|
+
* @internal
|
4060
|
+
* Limited to Microsoft-internal use
|
4061
|
+
*/
|
4113
4062
|
function handlers_registerOnThemeChangeHandler(handler) {
|
4114
4063
|
HandlersPrivate.themeChangeHandler = handler;
|
4115
4064
|
handler && sendMessageToParent('registerHandler', ['themeChange']);
|
4116
4065
|
}
|
4117
|
-
/**
|
4066
|
+
/**
|
4067
|
+
* @internal
|
4068
|
+
* Limited to Microsoft-internal use
|
4069
|
+
*/
|
4118
4070
|
function handleThemeChange(theme) {
|
4119
4071
|
if (HandlersPrivate.themeChangeHandler) {
|
4120
4072
|
HandlersPrivate.themeChangeHandler(theme);
|
@@ -4123,12 +4075,18 @@ function handleThemeChange(theme) {
|
|
4123
4075
|
sendMessageEventToChild('themeChange', [theme]);
|
4124
4076
|
}
|
4125
4077
|
}
|
4126
|
-
/**
|
4078
|
+
/**
|
4079
|
+
* @internal
|
4080
|
+
* Limited to Microsoft-internal use
|
4081
|
+
*/
|
4127
4082
|
function handlers_registerOnLoadHandler(handler) {
|
4128
4083
|
HandlersPrivate.loadHandler = handler;
|
4129
4084
|
handler && sendMessageToParent('registerHandler', ['load']);
|
4130
4085
|
}
|
4131
|
-
/**
|
4086
|
+
/**
|
4087
|
+
* @internal
|
4088
|
+
* Limited to Microsoft-internal use
|
4089
|
+
*/
|
4132
4090
|
function handleLoad(context) {
|
4133
4091
|
if (HandlersPrivate.loadHandler) {
|
4134
4092
|
HandlersPrivate.loadHandler(context);
|
@@ -4137,12 +4095,18 @@ function handleLoad(context) {
|
|
4137
4095
|
sendMessageEventToChild('load', [context]);
|
4138
4096
|
}
|
4139
4097
|
}
|
4140
|
-
/**
|
4098
|
+
/**
|
4099
|
+
* @internal
|
4100
|
+
* Limited to Microsoft-internal use
|
4101
|
+
*/
|
4141
4102
|
function handlers_registerBeforeUnloadHandler(handler) {
|
4142
4103
|
HandlersPrivate.beforeUnloadHandler = handler;
|
4143
4104
|
handler && sendMessageToParent('registerHandler', ['beforeUnload']);
|
4144
4105
|
}
|
4145
|
-
/**
|
4106
|
+
/**
|
4107
|
+
* @internal
|
4108
|
+
* Limited to Microsoft-internal use
|
4109
|
+
*/
|
4146
4110
|
function handleBeforeUnload() {
|
4147
4111
|
var readyToUnload = function () {
|
4148
4112
|
sendMessageToParent('readyToUnload', []);
|
@@ -4170,14 +4134,20 @@ var communication_spreadArray = (undefined && undefined.__spreadArray) || functi
|
|
4170
4134
|
|
4171
4135
|
|
4172
4136
|
var communicationLogger = getLogger('communication');
|
4173
|
-
|
4137
|
+
/**
|
4138
|
+
* @internal
|
4139
|
+
* Limited to Microsoft-internal use
|
4140
|
+
*/
|
4174
4141
|
var Communication = /** @class */ (function () {
|
4175
4142
|
function Communication() {
|
4176
4143
|
}
|
4177
4144
|
return Communication;
|
4178
4145
|
}());
|
4179
4146
|
|
4180
|
-
|
4147
|
+
/**
|
4148
|
+
* @internal
|
4149
|
+
* Limited to Microsoft-internal use
|
4150
|
+
*/
|
4181
4151
|
var CommunicationPrivate = /** @class */ (function () {
|
4182
4152
|
function CommunicationPrivate() {
|
4183
4153
|
}
|
@@ -4188,7 +4158,10 @@ var CommunicationPrivate = /** @class */ (function () {
|
|
4188
4158
|
CommunicationPrivate.promiseCallbacks = {};
|
4189
4159
|
return CommunicationPrivate;
|
4190
4160
|
}());
|
4191
|
-
|
4161
|
+
/**
|
4162
|
+
* @internal
|
4163
|
+
* Limited to Microsoft-internal use
|
4164
|
+
*/
|
4192
4165
|
function initializeCommunication(validMessageOrigins) {
|
4193
4166
|
// Listen for messages post to our window
|
4194
4167
|
CommunicationPrivate.messageListener = function (evt) { return processMessage(evt); };
|
@@ -4228,7 +4201,10 @@ function initializeCommunication(validMessageOrigins) {
|
|
4228
4201
|
Communication.parentOrigin = null;
|
4229
4202
|
}
|
4230
4203
|
}
|
4231
|
-
|
4204
|
+
/**
|
4205
|
+
* @internal
|
4206
|
+
* Limited to Microsoft-internal use
|
4207
|
+
*/
|
4232
4208
|
function uninitializeCommunication() {
|
4233
4209
|
Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);
|
4234
4210
|
Communication.parentWindow = null;
|
@@ -4240,7 +4216,10 @@ function uninitializeCommunication() {
|
|
4240
4216
|
CommunicationPrivate.nextMessageId = 0;
|
4241
4217
|
CommunicationPrivate.callbacks = {};
|
4242
4218
|
}
|
4243
|
-
|
4219
|
+
/**
|
4220
|
+
* @internal
|
4221
|
+
* Limited to Microsoft-internal use
|
4222
|
+
*/
|
4244
4223
|
function sendAndUnwrap(actionName) {
|
4245
4224
|
var args = [];
|
4246
4225
|
for (var _i = 1; _i < arguments.length; _i++) {
|
@@ -4263,7 +4242,10 @@ function sendAndHandleStatusAndReason(actionName) {
|
|
4263
4242
|
}
|
4264
4243
|
});
|
4265
4244
|
}
|
4266
|
-
|
4245
|
+
/**
|
4246
|
+
* @internal
|
4247
|
+
* Limited to Microsoft-internal use
|
4248
|
+
*/
|
4267
4249
|
function sendAndHandleStatusAndReasonWithDefaultError(actionName, defaultError) {
|
4268
4250
|
var args = [];
|
4269
4251
|
for (var _i = 2; _i < arguments.length; _i++) {
|
@@ -4276,7 +4258,10 @@ function sendAndHandleStatusAndReasonWithDefaultError(actionName, defaultError)
|
|
4276
4258
|
}
|
4277
4259
|
});
|
4278
4260
|
}
|
4279
|
-
|
4261
|
+
/**
|
4262
|
+
* @internal
|
4263
|
+
* Limited to Microsoft-internal use
|
4264
|
+
*/
|
4280
4265
|
function sendAndHandleSdkError(actionName) {
|
4281
4266
|
var args = [];
|
4282
4267
|
for (var _i = 1; _i < arguments.length; _i++) {
|
@@ -4295,6 +4280,7 @@ function sendAndHandleSdkError(actionName) {
|
|
4295
4280
|
* Send a message to parent. Uses nativeInterface on mobile to communicate with parent context
|
4296
4281
|
*
|
4297
4282
|
* @internal
|
4283
|
+
* Limited to Microsoft-internal use
|
4298
4284
|
*/
|
4299
4285
|
function sendMessageToParentAsync(actionName, args) {
|
4300
4286
|
if (args === void 0) { args = undefined; }
|
@@ -4303,13 +4289,19 @@ function sendMessageToParentAsync(actionName, args) {
|
|
4303
4289
|
resolve(waitForResponse(request.id));
|
4304
4290
|
});
|
4305
4291
|
}
|
4306
|
-
|
4292
|
+
/**
|
4293
|
+
* @internal
|
4294
|
+
* Limited to Microsoft-internal use
|
4295
|
+
*/
|
4307
4296
|
function waitForResponse(requestId) {
|
4308
4297
|
return new Promise(function (resolve) {
|
4309
4298
|
CommunicationPrivate.promiseCallbacks[requestId] = resolve;
|
4310
4299
|
});
|
4311
4300
|
}
|
4312
|
-
|
4301
|
+
/**
|
4302
|
+
* @internal
|
4303
|
+
* Limited to Microsoft-internal use
|
4304
|
+
*/
|
4313
4305
|
function sendMessageToParent(actionName, argsOrCallback, callback) {
|
4314
4306
|
var args;
|
4315
4307
|
if (argsOrCallback instanceof Function) {
|
@@ -4324,7 +4316,10 @@ function sendMessageToParent(actionName, argsOrCallback, callback) {
|
|
4324
4316
|
}
|
4325
4317
|
}
|
4326
4318
|
var sendMessageToParentHelperLogger = communicationLogger.extend('sendMessageToParentHelper');
|
4327
|
-
|
4319
|
+
/**
|
4320
|
+
* @internal
|
4321
|
+
* Limited to Microsoft-internal use
|
4322
|
+
*/
|
4328
4323
|
function sendMessageToParentHelper(actionName, args) {
|
4329
4324
|
var logger = sendMessageToParentHelperLogger;
|
4330
4325
|
var targetWindow = Communication.parentWindow;
|
@@ -4351,7 +4346,10 @@ function sendMessageToParentHelper(actionName, args) {
|
|
4351
4346
|
}
|
4352
4347
|
return request;
|
4353
4348
|
}
|
4354
|
-
|
4349
|
+
/**
|
4350
|
+
* @internal
|
4351
|
+
* Limited to Microsoft-internal use
|
4352
|
+
*/
|
4355
4353
|
function processMessage(evt) {
|
4356
4354
|
// Process only if we received a valid message
|
4357
4355
|
if (!evt || !evt.data || typeof evt.data !== 'object') {
|
@@ -4379,6 +4377,7 @@ function processMessage(evt) {
|
|
4379
4377
|
* Validates the message source and origin, if it should be processed
|
4380
4378
|
*
|
4381
4379
|
* @internal
|
4380
|
+
* Limited to Microsoft-internal use
|
4382
4381
|
*/
|
4383
4382
|
function shouldProcessMessage(messageSource, messageOrigin) {
|
4384
4383
|
// Process if message source is a different window and if origin is either in
|
@@ -4396,7 +4395,10 @@ function shouldProcessMessage(messageSource, messageOrigin) {
|
|
4396
4395
|
return validateOrigin(new URL(messageOrigin));
|
4397
4396
|
}
|
4398
4397
|
}
|
4399
|
-
|
4398
|
+
/**
|
4399
|
+
* @internal
|
4400
|
+
* Limited to Microsoft-internal use
|
4401
|
+
*/
|
4400
4402
|
function updateRelationships(messageSource, messageOrigin) {
|
4401
4403
|
// Determine whether the source of the message is our parent or child and update our
|
4402
4404
|
// window and origin pointer accordingly
|
@@ -4426,7 +4428,10 @@ function updateRelationships(messageSource, messageOrigin) {
|
|
4426
4428
|
flushMessageQueue(Communication.childWindow);
|
4427
4429
|
}
|
4428
4430
|
var handleParentMessageLogger = communicationLogger.extend('handleParentMessage');
|
4429
|
-
|
4431
|
+
/**
|
4432
|
+
* @internal
|
4433
|
+
* Limited to Microsoft-internal use
|
4434
|
+
*/
|
4430
4435
|
function handleParentMessage(evt) {
|
4431
4436
|
var logger = handleParentMessageLogger;
|
4432
4437
|
if ('id' in evt.data && typeof evt.data.id === 'number') {
|
@@ -4461,11 +4466,17 @@ function handleParentMessage(evt) {
|
|
4461
4466
|
logger('Received an unknown message: %O', evt);
|
4462
4467
|
}
|
4463
4468
|
}
|
4464
|
-
|
4469
|
+
/**
|
4470
|
+
* @internal
|
4471
|
+
* Limited to Microsoft-internal use
|
4472
|
+
*/
|
4465
4473
|
function isPartialResponse(evt) {
|
4466
4474
|
return evt.data.isPartialResponse === true;
|
4467
4475
|
}
|
4468
|
-
|
4476
|
+
/**
|
4477
|
+
* @internal
|
4478
|
+
* Limited to Microsoft-internal use
|
4479
|
+
*/
|
4469
4480
|
function handleChildMessage(evt) {
|
4470
4481
|
if ('id' in evt.data && 'func' in evt.data) {
|
4471
4482
|
// Try to delegate the request to the proper handler, if defined
|
@@ -4490,7 +4501,10 @@ function handleChildMessage(evt) {
|
|
4490
4501
|
}
|
4491
4502
|
}
|
4492
4503
|
}
|
4493
|
-
|
4504
|
+
/**
|
4505
|
+
* @internal
|
4506
|
+
* Limited to Microsoft-internal use
|
4507
|
+
*/
|
4494
4508
|
function getTargetMessageQueue(targetWindow) {
|
4495
4509
|
return targetWindow === Communication.parentWindow
|
4496
4510
|
? CommunicationPrivate.parentMessageQueue
|
@@ -4498,7 +4512,10 @@ function getTargetMessageQueue(targetWindow) {
|
|
4498
4512
|
? CommunicationPrivate.childMessageQueue
|
4499
4513
|
: [];
|
4500
4514
|
}
|
4501
|
-
|
4515
|
+
/**
|
4516
|
+
* @internal
|
4517
|
+
* Limited to Microsoft-internal use
|
4518
|
+
*/
|
4502
4519
|
function getTargetOrigin(targetWindow) {
|
4503
4520
|
return targetWindow === Communication.parentWindow
|
4504
4521
|
? Communication.parentOrigin
|
@@ -4507,7 +4524,10 @@ function getTargetOrigin(targetWindow) {
|
|
4507
4524
|
: null;
|
4508
4525
|
}
|
4509
4526
|
var flushMessageQueueLogger = communicationLogger.extend('flushMessageQueue');
|
4510
|
-
|
4527
|
+
/**
|
4528
|
+
* @internal
|
4529
|
+
* Limited to Microsoft-internal use
|
4530
|
+
*/
|
4511
4531
|
function flushMessageQueue(targetWindow) {
|
4512
4532
|
var targetOrigin = getTargetOrigin(targetWindow);
|
4513
4533
|
var targetMessageQueue = getTargetMessageQueue(targetWindow);
|
@@ -4518,7 +4538,10 @@ function flushMessageQueue(targetWindow) {
|
|
4518
4538
|
targetWindow.postMessage(request, targetOrigin);
|
4519
4539
|
}
|
4520
4540
|
}
|
4521
|
-
|
4541
|
+
/**
|
4542
|
+
* @internal
|
4543
|
+
* Limited to Microsoft-internal use
|
4544
|
+
*/
|
4522
4545
|
function waitForMessageQueue(targetWindow, callback) {
|
4523
4546
|
var messageQueueMonitor = Communication.currentWindow.setInterval(function () {
|
4524
4547
|
if (getTargetMessageQueue(targetWindow).length === 0) {
|
@@ -4532,6 +4555,7 @@ function waitForMessageQueue(targetWindow, callback) {
|
|
4532
4555
|
* Send a response to child for a message request that was from child
|
4533
4556
|
*
|
4534
4557
|
* @internal
|
4558
|
+
* Limited to Microsoft-internal use
|
4535
4559
|
*/
|
4536
4560
|
function sendMessageResponseToChild(id,
|
4537
4561
|
// tslint:disable-next-line:no-any
|
@@ -4549,6 +4573,7 @@ args, isPartialResponse) {
|
|
4549
4573
|
* instead of a response message to a child
|
4550
4574
|
*
|
4551
4575
|
* @internal
|
4576
|
+
* Limited to Microsoft-internal use
|
4552
4577
|
*/
|
4553
4578
|
function sendMessageEventToChild(actionName,
|
4554
4579
|
// tslint:disable-next-line: no-any
|
@@ -4565,7 +4590,10 @@ args) {
|
|
4565
4590
|
getTargetMessageQueue(targetWindow).push(customEvent);
|
4566
4591
|
}
|
4567
4592
|
}
|
4568
|
-
|
4593
|
+
/**
|
4594
|
+
* @internal
|
4595
|
+
* Limited to Microsoft-internal use
|
4596
|
+
*/
|
4569
4597
|
// tslint:disable-next-line:no-any
|
4570
4598
|
function createMessageRequest(func, args) {
|
4571
4599
|
return {
|
@@ -4575,7 +4603,10 @@ function createMessageRequest(func, args) {
|
|
4575
4603
|
args: args || [],
|
4576
4604
|
};
|
4577
4605
|
}
|
4578
|
-
|
4606
|
+
/**
|
4607
|
+
* @internal
|
4608
|
+
* Limited to Microsoft-internal use
|
4609
|
+
*/
|
4579
4610
|
// tslint:disable-next-line:no-any
|
4580
4611
|
function createMessageResponse(id, args, isPartialResponse) {
|
4581
4612
|
return {
|
@@ -4589,6 +4620,7 @@ function createMessageResponse(id, args, isPartialResponse) {
|
|
4589
4620
|
* Creates a message object without any id, used for custom actions being sent to child frame/window
|
4590
4621
|
*
|
4591
4622
|
* @internal
|
4623
|
+
* Limited to Microsoft-internal use
|
4592
4624
|
*/
|
4593
4625
|
// tslint:disable-next-line:no-any
|
4594
4626
|
function createMessageEvent(func, args) {
|
@@ -4609,19 +4641,20 @@ function createMessageEvent(func, args) {
|
|
4609
4641
|
* Namespace to interact with the logging part of the SDK.
|
4610
4642
|
* This object is used to send the app logs on demand to the host client
|
4611
4643
|
*
|
4612
|
-
* Hide from docs
|
4613
|
-
*
|
4614
4644
|
* @internal
|
4645
|
+
* Limited to Microsoft-internal use
|
4615
4646
|
*/
|
4616
4647
|
var logs;
|
4617
4648
|
(function (logs) {
|
4618
4649
|
/**
|
4619
4650
|
* @hidden
|
4620
|
-
*
|
4621
|
-
* ------
|
4651
|
+
*
|
4622
4652
|
* Registers a handler for getting app log
|
4623
4653
|
*
|
4624
4654
|
* @param handler - The handler to invoke to get the app log
|
4655
|
+
*
|
4656
|
+
* @internal
|
4657
|
+
* Limited to Microsoft-internal use
|
4625
4658
|
*/
|
4626
4659
|
function registerGetLogHandler(handler) {
|
4627
4660
|
ensureInitialized();
|
@@ -4639,6 +4672,14 @@ var logs;
|
|
4639
4672
|
}
|
4640
4673
|
}
|
4641
4674
|
logs.registerGetLogHandler = registerGetLogHandler;
|
4675
|
+
/**
|
4676
|
+
* @hidden
|
4677
|
+
*
|
4678
|
+
* @returns boolean to represent whether the logs capability is supported
|
4679
|
+
*
|
4680
|
+
* @internal
|
4681
|
+
* Limited to Microsoft-internal use
|
4682
|
+
*/
|
4642
4683
|
function isSupported() {
|
4643
4684
|
return runtime.supports.logs ? true : false;
|
4644
4685
|
}
|
@@ -4646,6 +4687,12 @@ var logs;
|
|
4646
4687
|
})(logs || (logs = {}));
|
4647
4688
|
|
4648
4689
|
;// CONCATENATED MODULE: ./src/private/interfaces.ts
|
4690
|
+
/**
|
4691
|
+
* @hidden
|
4692
|
+
*
|
4693
|
+
* @internal
|
4694
|
+
* Limited to Microsoft-internal use
|
4695
|
+
*/
|
4649
4696
|
var NotificationTypes;
|
4650
4697
|
(function (NotificationTypes) {
|
4651
4698
|
NotificationTypes["fileDownloadStart"] = "fileDownloadStart";
|
@@ -4653,7 +4700,9 @@ var NotificationTypes;
|
|
4653
4700
|
})(NotificationTypes || (NotificationTypes = {}));
|
4654
4701
|
/**
|
4655
4702
|
* @hidden
|
4656
|
-
*
|
4703
|
+
*
|
4704
|
+
* @internal
|
4705
|
+
* Limited to Microsoft-internal use
|
4657
4706
|
*/
|
4658
4707
|
var ViewerActionTypes;
|
4659
4708
|
(function (ViewerActionTypes) {
|
@@ -4663,8 +4712,7 @@ var ViewerActionTypes;
|
|
4663
4712
|
})(ViewerActionTypes || (ViewerActionTypes = {}));
|
4664
4713
|
/**
|
4665
4714
|
* @hidden
|
4666
|
-
*
|
4667
|
-
* ------
|
4715
|
+
*
|
4668
4716
|
* User setting changes that can be subscribed to
|
4669
4717
|
*/
|
4670
4718
|
var UserSettingTypes;
|
@@ -4672,15 +4720,147 @@ var UserSettingTypes;
|
|
4672
4720
|
/**
|
4673
4721
|
* @hidden
|
4674
4722
|
* Use this key to subscribe to changes in user's file open preference
|
4723
|
+
*
|
4724
|
+
* @internal
|
4725
|
+
* Limited to Microsoft-internal use
|
4675
4726
|
*/
|
4676
4727
|
UserSettingTypes["fileOpenPreference"] = "fileOpenPreference";
|
4677
4728
|
/**
|
4678
4729
|
* @hidden
|
4679
4730
|
* Use this key to subscribe to theme changes
|
4731
|
+
*
|
4732
|
+
* @internal
|
4733
|
+
* Limited to Microsoft-internal use
|
4680
4734
|
*/
|
4681
4735
|
UserSettingTypes["theme"] = "theme";
|
4682
4736
|
})(UserSettingTypes || (UserSettingTypes = {}));
|
4683
4737
|
|
4738
|
+
;// CONCATENATED MODULE: ./src/private/privateAPIs.ts
|
4739
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
4740
|
+
|
4741
|
+
|
4742
|
+
|
4743
|
+
|
4744
|
+
|
4745
|
+
/**
|
4746
|
+
* @hidden
|
4747
|
+
* Upload a custom App manifest directly to both team and personal scopes.
|
4748
|
+
* This method works just for the first party Apps.
|
4749
|
+
*
|
4750
|
+
* @internal
|
4751
|
+
* Limited to Microsoft-internal use
|
4752
|
+
*/
|
4753
|
+
function uploadCustomApp(manifestBlob, onComplete) {
|
4754
|
+
ensureInitialized();
|
4755
|
+
sendMessageToParent('uploadCustomApp', [manifestBlob], onComplete ? onComplete : getGenericOnCompleteHandler());
|
4756
|
+
}
|
4757
|
+
/**
|
4758
|
+
* @hidden
|
4759
|
+
* Sends a custom action MessageRequest to host or parent window
|
4760
|
+
*
|
4761
|
+
* @param actionName - Specifies name of the custom action to be sent
|
4762
|
+
* @param args - Specifies additional arguments passed to the action
|
4763
|
+
* @param callback - Optionally specify a callback to receive response parameters from the parent
|
4764
|
+
* @returns id of sent message
|
4765
|
+
*
|
4766
|
+
* @internal
|
4767
|
+
* Limited to Microsoft-internal use
|
4768
|
+
*/
|
4769
|
+
function sendCustomMessage(actionName,
|
4770
|
+
// tslint:disable-next-line:no-any
|
4771
|
+
args,
|
4772
|
+
// tslint:disable-next-line:no-any
|
4773
|
+
callback) {
|
4774
|
+
ensureInitialized();
|
4775
|
+
sendMessageToParent(actionName, args, callback);
|
4776
|
+
}
|
4777
|
+
/**
|
4778
|
+
* @hidden
|
4779
|
+
* Sends a custom action MessageEvent to a child iframe/window, only if you are not using auth popup.
|
4780
|
+
* Otherwise it will go to the auth popup (which becomes the child)
|
4781
|
+
*
|
4782
|
+
* @param actionName - Specifies name of the custom action to be sent
|
4783
|
+
* @param args - Specifies additional arguments passed to the action
|
4784
|
+
* @returns id of sent message
|
4785
|
+
*
|
4786
|
+
* @internal
|
4787
|
+
* Limited to Microsoft-internal use
|
4788
|
+
*/
|
4789
|
+
function sendCustomEvent(actionName,
|
4790
|
+
// tslint:disable-next-line:no-any
|
4791
|
+
args) {
|
4792
|
+
ensureInitialized();
|
4793
|
+
//validate childWindow
|
4794
|
+
if (!Communication.childWindow) {
|
4795
|
+
throw new Error('The child window has not yet been initialized or is not present');
|
4796
|
+
}
|
4797
|
+
sendMessageEventToChild(actionName, args);
|
4798
|
+
}
|
4799
|
+
/**
|
4800
|
+
* @hidden
|
4801
|
+
* Adds a handler for an action sent by a child window or parent window
|
4802
|
+
*
|
4803
|
+
* @param actionName - Specifies name of the action message to handle
|
4804
|
+
* @param customHandler - The callback to invoke when the action message is received. The return value is sent to the child
|
4805
|
+
*
|
4806
|
+
* @internal
|
4807
|
+
* Limited to Microsoft-internal use
|
4808
|
+
*/
|
4809
|
+
function registerCustomHandler(actionName, customHandler) {
|
4810
|
+
var _this = this;
|
4811
|
+
ensureInitialized();
|
4812
|
+
registerHandler(actionName, function () {
|
4813
|
+
var args = [];
|
4814
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
4815
|
+
args[_i] = arguments[_i];
|
4816
|
+
}
|
4817
|
+
return customHandler.apply(_this, args);
|
4818
|
+
});
|
4819
|
+
}
|
4820
|
+
/**
|
4821
|
+
* @hidden
|
4822
|
+
* register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback.
|
4823
|
+
*
|
4824
|
+
* @param settingTypes - List of user setting changes to subscribe
|
4825
|
+
* @param handler - When a subscribed setting is updated this handler is called
|
4826
|
+
*
|
4827
|
+
* @internal
|
4828
|
+
* Limited to Microsoft-internal use
|
4829
|
+
*/
|
4830
|
+
function registerUserSettingsChangeHandler(settingTypes, handler) {
|
4831
|
+
ensureInitialized();
|
4832
|
+
registerHandler('userSettingsChange', handler, true, [settingTypes]);
|
4833
|
+
}
|
4834
|
+
/**
|
4835
|
+
* @hidden
|
4836
|
+
* Opens a client-friendly preview of the specified file.
|
4837
|
+
*
|
4838
|
+
* @param file - The file to preview.
|
4839
|
+
*
|
4840
|
+
* @internal
|
4841
|
+
* Limited to Microsoft-internal use
|
4842
|
+
*/
|
4843
|
+
function openFilePreview(filePreviewParameters) {
|
4844
|
+
ensureInitialized(FrameContexts.content, FrameContexts.task);
|
4845
|
+
var params = [
|
4846
|
+
filePreviewParameters.entityId,
|
4847
|
+
filePreviewParameters.title,
|
4848
|
+
filePreviewParameters.description,
|
4849
|
+
filePreviewParameters.type,
|
4850
|
+
filePreviewParameters.objectUrl,
|
4851
|
+
filePreviewParameters.downloadUrl,
|
4852
|
+
filePreviewParameters.webPreviewUrl,
|
4853
|
+
filePreviewParameters.webEditUrl,
|
4854
|
+
filePreviewParameters.baseUrl,
|
4855
|
+
filePreviewParameters.editFile,
|
4856
|
+
filePreviewParameters.subEntityId,
|
4857
|
+
filePreviewParameters.viewerAction,
|
4858
|
+
filePreviewParameters.fileOpenPreference,
|
4859
|
+
filePreviewParameters.conversationId,
|
4860
|
+
];
|
4861
|
+
sendMessageToParent('openFilePreview', params);
|
4862
|
+
}
|
4863
|
+
|
4684
4864
|
;// CONCATENATED MODULE: ./src/private/conversations.ts
|
4685
4865
|
|
4686
4866
|
|
@@ -4690,6 +4870,9 @@ var UserSettingTypes;
|
|
4690
4870
|
/**
|
4691
4871
|
* @hidden
|
4692
4872
|
* Namespace to interact with the conversational subEntities inside the tab
|
4873
|
+
*
|
4874
|
+
* @internal
|
4875
|
+
* Limited to Microsoft-internal use
|
4693
4876
|
*/
|
4694
4877
|
var conversations;
|
4695
4878
|
(function (conversations) {
|
@@ -4700,6 +4883,9 @@ var conversations;
|
|
4700
4883
|
* Allows the user to start or continue a conversation with each subentity inside the tab
|
4701
4884
|
*
|
4702
4885
|
* @returns Promise resolved upon completion
|
4886
|
+
*
|
4887
|
+
* @internal
|
4888
|
+
* Limited to Microsoft-internal use
|
4703
4889
|
*/
|
4704
4890
|
function openConversation(openConversationRequest) {
|
4705
4891
|
return new Promise(function (resolve) {
|
@@ -4740,9 +4926,11 @@ var conversations;
|
|
4740
4926
|
conversations.openConversation = openConversation;
|
4741
4927
|
/**
|
4742
4928
|
* @hidden
|
4743
|
-
*
|
4744
|
-
* --------------
|
4929
|
+
*
|
4745
4930
|
* Allows the user to close the conversation in the right pane
|
4931
|
+
*
|
4932
|
+
* @internal
|
4933
|
+
* Limited to Microsoft-internal use
|
4746
4934
|
*/
|
4747
4935
|
function closeConversation() {
|
4748
4936
|
ensureInitialized(FrameContexts.content);
|
@@ -4765,6 +4953,7 @@ var conversations;
|
|
4765
4953
|
* @returns Promise resolved with information on all chat members
|
4766
4954
|
*
|
4767
4955
|
* @internal
|
4956
|
+
* Limited to Microsoft-internal use
|
4768
4957
|
*/
|
4769
4958
|
function getChatMembers() {
|
4770
4959
|
return new Promise(function (resolve) {
|
@@ -4776,6 +4965,12 @@ var conversations;
|
|
4776
4965
|
});
|
4777
4966
|
}
|
4778
4967
|
conversations.getChatMembers = getChatMembers;
|
4968
|
+
/**
|
4969
|
+
* @returns boolean to represent whether conversations capability is supported
|
4970
|
+
*
|
4971
|
+
* @internal
|
4972
|
+
* Limited to Microsoft-internal use
|
4973
|
+
*/
|
4779
4974
|
function isSupported() {
|
4780
4975
|
return runtime.supports.conversations ? true : false;
|
4781
4976
|
}
|
@@ -5328,6 +5523,7 @@ var media;
|
|
5328
5523
|
* Helper function to create a blob from media chunks based on their sequence
|
5329
5524
|
*
|
5330
5525
|
* @internal
|
5526
|
+
* Limited to Microsoft-internal use
|
5331
5527
|
*/
|
5332
5528
|
function createFile(assembleAttachment, mimeType) {
|
5333
5529
|
if (assembleAttachment == null || mimeType == null || assembleAttachment.length <= 0) {
|
@@ -5355,6 +5551,7 @@ function createFile(assembleAttachment, mimeType) {
|
|
5355
5551
|
* Converts base 64 encoded string to byte array and then into an array of blobs
|
5356
5552
|
*
|
5357
5553
|
* @internal
|
5554
|
+
* Limited to Microsoft-internal use
|
5358
5555
|
*/
|
5359
5556
|
function decodeAttachment(attachment, mimeType) {
|
5360
5557
|
if (attachment == null || mimeType == null) {
|
@@ -5376,8 +5573,11 @@ function decodeAttachment(attachment, mimeType) {
|
|
5376
5573
|
/**
|
5377
5574
|
* @hidden
|
5378
5575
|
* Function throws an SdkError if the media call is not supported on current mobile version, else undefined.
|
5576
|
+
*
|
5379
5577
|
* @throws an SdkError if the media call is not supported
|
5578
|
+
*
|
5380
5579
|
* @internal
|
5580
|
+
* Limited to Microsoft-internal use
|
5381
5581
|
*/
|
5382
5582
|
function throwExceptionIfMediaCallIsNotSupportedOnMobile(mediaInputs) {
|
5383
5583
|
if (isMediaCallForVideoAndImageInputs(mediaInputs)) {
|
@@ -5395,6 +5595,7 @@ function throwExceptionIfMediaCallIsNotSupportedOnMobile(mediaInputs) {
|
|
5395
5595
|
* Function returns true if the app has registered to listen to video controller events, else false.
|
5396
5596
|
*
|
5397
5597
|
* @internal
|
5598
|
+
* Limited to Microsoft-internal use
|
5398
5599
|
*/
|
5399
5600
|
function isVideoControllerRegistered(mediaInputs) {
|
5400
5601
|
if (mediaInputs.mediaType == media.MediaType.Video &&
|
@@ -5409,6 +5610,7 @@ function isVideoControllerRegistered(mediaInputs) {
|
|
5409
5610
|
* Returns true if the mediaInput params are valid and false otherwise
|
5410
5611
|
*
|
5411
5612
|
* @internal
|
5613
|
+
* Limited to Microsoft-internal use
|
5412
5614
|
*/
|
5413
5615
|
function validateSelectMediaInputs(mediaInputs) {
|
5414
5616
|
if (mediaInputs == null || mediaInputs.maxMediaCount > 10) {
|
@@ -5417,7 +5619,11 @@ function validateSelectMediaInputs(mediaInputs) {
|
|
5417
5619
|
return true;
|
5418
5620
|
}
|
5419
5621
|
/**
|
5622
|
+
* @hidden
|
5420
5623
|
* Returns true if the mediaInput params are called for mediatype Image and contains Image outputs formats, false otherwise
|
5624
|
+
*
|
5625
|
+
* @internal
|
5626
|
+
* Limited to Microsoft-internal use
|
5421
5627
|
*/
|
5422
5628
|
function isMediaCallForImageOutputFormats(mediaInputs) {
|
5423
5629
|
var _a;
|
@@ -6056,8 +6262,6 @@ var meeting;
|
|
6056
6262
|
meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
|
6057
6263
|
/**
|
6058
6264
|
* @hidden
|
6059
|
-
* Hide from docs
|
6060
|
-
*
|
6061
6265
|
* Allows an app to get the meeting details for the meeting
|
6062
6266
|
*
|
6063
6267
|
* @param callback - Callback contains 2 parameters, error and meetingDetailsResponse.
|
@@ -6065,6 +6269,7 @@ var meeting;
|
|
6065
6269
|
* result can either contain a IMeetingDetailsResponse value, in case of a successful get or null when the get fails
|
6066
6270
|
*
|
6067
6271
|
* @internal
|
6272
|
+
* Limited to Microsoft-internal use
|
6068
6273
|
*/
|
6069
6274
|
function getMeetingDetails(callback) {
|
6070
6275
|
if (!callback) {
|
@@ -6083,6 +6288,7 @@ var meeting;
|
|
6083
6288
|
* authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails
|
6084
6289
|
*
|
6085
6290
|
* @internal
|
6291
|
+
* Limited to Microsoft-internal use
|
6086
6292
|
*/
|
6087
6293
|
function getAuthenticationTokenForAnonymousUser(callback) {
|
6088
6294
|
if (!callback) {
|
@@ -6465,6 +6671,7 @@ var people;
|
|
6465
6671
|
* @returns true if the parameters are valid, false otherwise
|
6466
6672
|
*
|
6467
6673
|
* @internal
|
6674
|
+
* Limited to Microsoft-internal use
|
6468
6675
|
*/
|
6469
6676
|
function validateShowProfileRequest(showProfileRequest) {
|
6470
6677
|
if (!showProfileRequest) {
|
@@ -6492,6 +6699,7 @@ function validateShowProfileRequest(showProfileRequest) {
|
|
6492
6699
|
* @returns true if the persona is valid, false otherwise
|
6493
6700
|
*
|
6494
6701
|
* @internal
|
6702
|
+
* Limited to Microsoft-internal use
|
6495
6703
|
*/
|
6496
6704
|
function validatePersona(persona) {
|
6497
6705
|
if (!persona) {
|
@@ -6613,8 +6821,11 @@ var video;
|
|
6613
6821
|
throw errorNotSupportedOnPlatform;
|
6614
6822
|
}
|
6615
6823
|
registerHandler('video.newVideoFrame', function (videoFrame) {
|
6616
|
-
if (videoFrame
|
6617
|
-
|
6824
|
+
if (videoFrame) {
|
6825
|
+
var timestamp_1 = videoFrame.timestamp;
|
6826
|
+
frameCallback(videoFrame, function () {
|
6827
|
+
notifyVideoFrameProcessed(timestamp_1);
|
6828
|
+
}, notifyError);
|
6618
6829
|
}
|
6619
6830
|
});
|
6620
6831
|
sendMessageToParent('video.registerForVideoFrame', [config]);
|
@@ -6654,8 +6865,8 @@ var video;
|
|
6654
6865
|
* or pass the video frame to next one in video pipeline
|
6655
6866
|
* @beta
|
6656
6867
|
*/
|
6657
|
-
function notifyVideoFrameProcessed() {
|
6658
|
-
sendMessageToParent('video.videoFrameProcessed');
|
6868
|
+
function notifyVideoFrameProcessed(timestamp) {
|
6869
|
+
sendMessageToParent('video.videoFrameProcessed', [timestamp]);
|
6659
6870
|
}
|
6660
6871
|
/**
|
6661
6872
|
* Sending error notification to host client
|
@@ -6677,6 +6888,111 @@ var video;
|
|
6677
6888
|
video.isSupported = isSupported;
|
6678
6889
|
})(video || (video = {})); //end of video namespace
|
6679
6890
|
|
6891
|
+
;// CONCATENATED MODULE: ./src/public/search.ts
|
6892
|
+
|
6893
|
+
|
6894
|
+
|
6895
|
+
|
6896
|
+
|
6897
|
+
/**
|
6898
|
+
* Allows your application to interact with the host M365 application's search box.
|
6899
|
+
* By integrating your application with the host's search box, users can search
|
6900
|
+
* your app using the same search box they use elsewhere in Teams, Outlook, or Office.
|
6901
|
+
*
|
6902
|
+
* This functionality is in Beta.
|
6903
|
+
* @beta
|
6904
|
+
*/
|
6905
|
+
var search;
|
6906
|
+
(function (search) {
|
6907
|
+
var onChangeHandlerName = 'search.queryChange';
|
6908
|
+
var onClosedHandlerName = 'search.queryClose';
|
6909
|
+
var onExecutedHandlerName = 'search.queryExecute';
|
6910
|
+
/**
|
6911
|
+
* Allows the caller to register for various events fired by the host search experience.
|
6912
|
+
* Calling this function indicates that your application intends to plug into the host's search box and handle search events,
|
6913
|
+
* when the user is actively using your page/tab.
|
6914
|
+
*
|
6915
|
+
* The host may visually update its search box, e.g. with the name or icon of your application.
|
6916
|
+
*
|
6917
|
+
* Your application should *not* re-render inside of these callbacks, there may be a large number
|
6918
|
+
* of onChangeHandler calls if the user is typing rapidly in the search box.
|
6919
|
+
*
|
6920
|
+
* @param onChangeHandler - This optional handler will be called when the user first starts using the
|
6921
|
+
* host's search box and as the user types their query. Can be used to put your application into a
|
6922
|
+
* word-wheeling state or to display suggestions as the user is typing.
|
6923
|
+
*
|
6924
|
+
* This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
|
6925
|
+
* with the current contents of the search box.
|
6926
|
+
*
|
6927
|
+
* @param onClosedHandler - This handler will be called when the user exits or cancels their search.
|
6928
|
+
* Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
|
6929
|
+
* will be whatever the last query was before ending search.
|
6930
|
+
*
|
6931
|
+
* @param onExecuteHandler - The handler will be called when the user executes their
|
6932
|
+
* search (by pressing Enter for example). Should be used to display the full list of search results.
|
6933
|
+
* The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
|
6934
|
+
*
|
6935
|
+
* @example
|
6936
|
+
* ``` ts
|
6937
|
+
* search.registerHandlers(
|
6938
|
+
query => {
|
6939
|
+
console.log(`Update your application with the changed search query: ${query.searchTerm}`);
|
6940
|
+
},
|
6941
|
+
query => {
|
6942
|
+
console.log('Update your application to handle the search experience being closed. Last query: ${query.searchTerm}');
|
6943
|
+
},
|
6944
|
+
query => {
|
6945
|
+
console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
|
6946
|
+
},
|
6947
|
+
);
|
6948
|
+
* ```
|
6949
|
+
*
|
6950
|
+
* @beta
|
6951
|
+
*/
|
6952
|
+
function registerHandlers(onClosedHandler, onExecuteHandler, onChangeHandler) {
|
6953
|
+
ensureInitialized(FrameContexts.content);
|
6954
|
+
if (!isSupported()) {
|
6955
|
+
throw errorNotSupportedOnPlatform;
|
6956
|
+
}
|
6957
|
+
registerHandler(onClosedHandlerName, onClosedHandler);
|
6958
|
+
registerHandler(onExecutedHandlerName, onExecuteHandler);
|
6959
|
+
if (onChangeHandler) {
|
6960
|
+
registerHandler(onChangeHandlerName, onChangeHandler);
|
6961
|
+
}
|
6962
|
+
}
|
6963
|
+
search.registerHandlers = registerHandlers;
|
6964
|
+
/**
|
6965
|
+
* Allows the caller to unregister for all events fired by the host search experience. Calling
|
6966
|
+
* this function will cause your app to stop appearing in the set of search scopes in the hosts
|
6967
|
+
*
|
6968
|
+
* @beta
|
6969
|
+
*/
|
6970
|
+
function unregisterHandlers() {
|
6971
|
+
ensureInitialized(FrameContexts.content);
|
6972
|
+
if (!isSupported()) {
|
6973
|
+
throw errorNotSupportedOnPlatform;
|
6974
|
+
}
|
6975
|
+
// This should let the host know to stop making the app scope show up in the search experience
|
6976
|
+
// Can also be used to clean up handlers on the host if desired
|
6977
|
+
sendMessageToParent('search.unregister');
|
6978
|
+
removeHandler(onChangeHandlerName);
|
6979
|
+
removeHandler(onClosedHandlerName);
|
6980
|
+
removeHandler(onExecutedHandlerName);
|
6981
|
+
}
|
6982
|
+
search.unregisterHandlers = unregisterHandlers;
|
6983
|
+
/**
|
6984
|
+
* Checks if search capability is supported by the host
|
6985
|
+
* @returns true if the search capability is supported by the host and false otherwise
|
6986
|
+
* false if it is disabled
|
6987
|
+
*
|
6988
|
+
* @beta
|
6989
|
+
*/
|
6990
|
+
function isSupported() {
|
6991
|
+
return runtime.supports.search ? true : false;
|
6992
|
+
}
|
6993
|
+
search.isSupported = isSupported;
|
6994
|
+
})(search || (search = {}));
|
6995
|
+
|
6680
6996
|
;// CONCATENATED MODULE: ./src/public/sharing.ts
|
6681
6997
|
|
6682
6998
|
|
@@ -6816,8 +7132,6 @@ var stageView;
|
|
6816
7132
|
;// CONCATENATED MODULE: ./src/public/webStorage.ts
|
6817
7133
|
|
6818
7134
|
|
6819
|
-
|
6820
|
-
|
6821
7135
|
/**
|
6822
7136
|
* Contains functionality to allow web apps to store data in webview cache
|
6823
7137
|
*
|
@@ -6834,10 +7148,6 @@ var webStorage;
|
|
6834
7148
|
*/
|
6835
7149
|
function isWebStorageClearedOnUserLogOut() {
|
6836
7150
|
ensureInitialized();
|
6837
|
-
// return true as web storage is always cleared on desktop.
|
6838
|
-
if (GlobalVars.hostClientType === HostClientType.desktop) {
|
6839
|
-
return true;
|
6840
|
-
}
|
6841
7151
|
return isSupported();
|
6842
7152
|
}
|
6843
7153
|
webStorage.isWebStorageClearedOnUserLogOut = isWebStorageClearedOnUserLogOut;
|
@@ -6999,11 +7309,10 @@ function initialize(callback, validMessageOrigins) {
|
|
6999
7309
|
* As of 2.0.0, please use {@link app._initialize app._initialize(hostWindow: any): void} instead.
|
7000
7310
|
*
|
7001
7311
|
* @hidden
|
7002
|
-
* Hide from docs.
|
7003
|
-
* ------
|
7004
7312
|
* Undocumented function used to set a mock window for unit tests
|
7005
7313
|
*
|
7006
7314
|
* @internal
|
7315
|
+
* Limited to Microsoft-internal use
|
7007
7316
|
*/
|
7008
7317
|
// eslint-disable-next-line
|
7009
7318
|
function _initialize(hostWindow) {
|
@@ -7014,11 +7323,10 @@ function _initialize(hostWindow) {
|
|
7014
7323
|
* As of 2.0.0, please use {@link app._uninitialize app._uninitialize(): void} instead.
|
7015
7324
|
*
|
7016
7325
|
* @hidden
|
7017
|
-
* Hide from docs.
|
7018
|
-
* ------
|
7019
7326
|
* Undocumented function used to clear state between unit tests
|
7020
7327
|
*
|
7021
7328
|
* @internal
|
7329
|
+
* Limited to Microsoft-internal use
|
7022
7330
|
*/
|
7023
7331
|
function _uninitialize() {
|
7024
7332
|
app._uninitialize();
|
@@ -7697,6 +8005,7 @@ var tasks;
|
|
7697
8005
|
|
7698
8006
|
|
7699
8007
|
|
8008
|
+
|
7700
8009
|
|
7701
8010
|
|
7702
8011
|
|
@@ -7707,17 +8016,21 @@ var tasks;
|
|
7707
8016
|
|
7708
8017
|
/**
|
7709
8018
|
* @hidden
|
7710
|
-
*
|
7711
|
-
* ------
|
8019
|
+
*
|
7712
8020
|
* Namespace to interact with the files specific part of the SDK.
|
8021
|
+
*
|
8022
|
+
* @internal
|
8023
|
+
* Limited to Microsoft-internal use
|
7713
8024
|
*/
|
7714
8025
|
var files;
|
7715
8026
|
(function (files_1) {
|
7716
8027
|
/**
|
7717
8028
|
* @hidden
|
7718
|
-
*
|
7719
|
-
* ------
|
8029
|
+
*
|
7720
8030
|
* Cloud storage providers registered with Microsoft Teams
|
8031
|
+
*
|
8032
|
+
* @internal
|
8033
|
+
* Limited to Microsoft-internal use
|
7721
8034
|
*/
|
7722
8035
|
var CloudStorageProvider;
|
7723
8036
|
(function (CloudStorageProvider) {
|
@@ -7730,9 +8043,11 @@ var files;
|
|
7730
8043
|
})(CloudStorageProvider = files_1.CloudStorageProvider || (files_1.CloudStorageProvider = {}));
|
7731
8044
|
/**
|
7732
8045
|
* @hidden
|
7733
|
-
* Hide from docs
|
7734
8046
|
*
|
7735
8047
|
* Cloud storage provider type enums
|
8048
|
+
*
|
8049
|
+
* @internal
|
8050
|
+
* Limited to Microsoft-internal use
|
7736
8051
|
*/
|
7737
8052
|
var CloudStorageProviderType;
|
7738
8053
|
(function (CloudStorageProviderType) {
|
@@ -7749,9 +8064,11 @@ var files;
|
|
7749
8064
|
})(CloudStorageProviderType = files_1.CloudStorageProviderType || (files_1.CloudStorageProviderType = {}));
|
7750
8065
|
/**
|
7751
8066
|
* @hidden
|
7752
|
-
* Hide from docs
|
7753
8067
|
*
|
7754
8068
|
* Special Document Library enum
|
8069
|
+
*
|
8070
|
+
* @internal
|
8071
|
+
* Limited to Microsoft-internal use
|
7755
8072
|
*/
|
7756
8073
|
var SpecialDocumentLibraryType;
|
7757
8074
|
(function (SpecialDocumentLibraryType) {
|
@@ -7759,9 +8076,11 @@ var files;
|
|
7759
8076
|
})(SpecialDocumentLibraryType = files_1.SpecialDocumentLibraryType || (files_1.SpecialDocumentLibraryType = {}));
|
7760
8077
|
/**
|
7761
8078
|
* @hidden
|
7762
|
-
* Hide from docs
|
7763
8079
|
*
|
7764
8080
|
* Document Library Access enum
|
8081
|
+
*
|
8082
|
+
* @internal
|
8083
|
+
* Limited to Microsoft-internal use
|
7765
8084
|
*/
|
7766
8085
|
var DocumentLibraryAccessType;
|
7767
8086
|
(function (DocumentLibraryAccessType) {
|
@@ -7769,9 +8088,11 @@ var files;
|
|
7769
8088
|
})(DocumentLibraryAccessType = files_1.DocumentLibraryAccessType || (files_1.DocumentLibraryAccessType = {}));
|
7770
8089
|
/**
|
7771
8090
|
* @hidden
|
7772
|
-
* Hide from docs
|
7773
8091
|
*
|
7774
8092
|
* Download status enum
|
8093
|
+
*
|
8094
|
+
* @internal
|
8095
|
+
* Limited to Microsoft-internal use
|
7775
8096
|
*/
|
7776
8097
|
var FileDownloadStatus;
|
7777
8098
|
(function (FileDownloadStatus) {
|
@@ -7784,6 +8105,9 @@ var files;
|
|
7784
8105
|
* Hide from docs
|
7785
8106
|
*
|
7786
8107
|
* Actions specific to 3P cloud storage provider file and / or account
|
8108
|
+
*
|
8109
|
+
* @internal
|
8110
|
+
* Limited to Microsoft-internal use
|
7787
8111
|
*/
|
7788
8112
|
var CloudStorageProviderFileAction;
|
7789
8113
|
(function (CloudStorageProviderFileAction) {
|
@@ -7798,6 +8122,9 @@ var files;
|
|
7798
8122
|
* Gets a list of cloud storage folders added to the channel
|
7799
8123
|
* @param channelId - ID of the channel whose cloud storage folders should be retrieved
|
7800
8124
|
* @param callback - Callback that will be triggered post folders load
|
8125
|
+
*
|
8126
|
+
* @internal
|
8127
|
+
* Limited to Microsoft-internal use
|
7801
8128
|
*/
|
7802
8129
|
function getCloudStorageFolders(channelId, callback) {
|
7803
8130
|
ensureInitialized(FrameContexts.content);
|
@@ -7818,6 +8145,9 @@ var files;
|
|
7818
8145
|
*
|
7819
8146
|
* @param channelId - ID of the channel to add cloud storage folder
|
7820
8147
|
* @param callback - Callback that will be triggered post add folder flow is compelete
|
8148
|
+
*
|
8149
|
+
* @internal
|
8150
|
+
* Limited to Microsoft-internal use
|
7821
8151
|
*/
|
7822
8152
|
function addCloudStorageFolder(channelId, callback) {
|
7823
8153
|
ensureInitialized(FrameContexts.content);
|
@@ -7840,6 +8170,9 @@ var files;
|
|
7840
8170
|
* @param channelId - ID of the channel where folder is to be deleted
|
7841
8171
|
* @param folderToDelete - cloud storage folder to be deleted
|
7842
8172
|
* @param callback - Callback that will be triggered post delete
|
8173
|
+
*
|
8174
|
+
* @internal
|
8175
|
+
* Limited to Microsoft-internal use
|
7843
8176
|
*/
|
7844
8177
|
function deleteCloudStorageFolder(channelId, folderToDelete, callback) {
|
7845
8178
|
ensureInitialized(FrameContexts.content);
|
@@ -7865,6 +8198,9 @@ var files;
|
|
7865
8198
|
* @param folder - Cloud storage folder (CloudStorageFolder) / sub directory (CloudStorageFolderItem)
|
7866
8199
|
* @param providerCode - Code of the cloud storage folder provider
|
7867
8200
|
* @param callback - Callback that will be triggered post contents are loaded
|
8201
|
+
*
|
8202
|
+
* @internal
|
8203
|
+
* Limited to Microsoft-internal use
|
7868
8204
|
*/
|
7869
8205
|
function getCloudStorageFolderContents(folder, providerCode, callback) {
|
7870
8206
|
ensureInitialized(FrameContexts.content);
|
@@ -7890,6 +8226,9 @@ var files;
|
|
7890
8226
|
* @param file - cloud storage file that should be opened
|
7891
8227
|
* @param providerCode - Code of the cloud storage folder provider
|
7892
8228
|
* @param fileOpenPreference - Whether file should be opened in web/inline
|
8229
|
+
*
|
8230
|
+
* @internal
|
8231
|
+
* Limited to Microsoft-internal use
|
7893
8232
|
*/
|
7894
8233
|
function openCloudStorageFile(file, providerCode, fileOpenPreference) {
|
7895
8234
|
ensureInitialized(FrameContexts.content);
|
@@ -7908,6 +8247,9 @@ var files;
|
|
7908
8247
|
* third party cloud storage accounts that the tenant supports
|
7909
8248
|
* @param excludeAddedProviders: return a list of support third party
|
7910
8249
|
* cloud storages that hasn't been added yet.
|
8250
|
+
*
|
8251
|
+
* @internal
|
8252
|
+
* Limited to Microsoft-internal use
|
7911
8253
|
*/
|
7912
8254
|
function getExternalProviders(excludeAddedProviders, callback) {
|
7913
8255
|
if (excludeAddedProviders === void 0) { excludeAddedProviders = false; }
|
@@ -7922,6 +8264,9 @@ var files;
|
|
7922
8264
|
* @hidden
|
7923
8265
|
* Allow 1st party apps to call this function to move files
|
7924
8266
|
* among SharePoint and third party cloud storages.
|
8267
|
+
*
|
8268
|
+
* @internal
|
8269
|
+
* Limited to Microsoft-internal use
|
7925
8270
|
*/
|
7926
8271
|
function copyMoveFiles(selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove, callback) {
|
7927
8272
|
if (isMove === void 0) { isMove = false; }
|
@@ -7951,6 +8296,9 @@ var files;
|
|
7951
8296
|
*
|
7952
8297
|
* Gets list of downloads for current user
|
7953
8298
|
* @param callback Callback that will be triggered post downloads load
|
8299
|
+
*
|
8300
|
+
* @internal
|
8301
|
+
* Limited to Microsoft-internal use
|
7954
8302
|
*/
|
7955
8303
|
function getFileDownloads(callback) {
|
7956
8304
|
ensureInitialized(FrameContexts.content);
|
@@ -7967,6 +8315,9 @@ var files;
|
|
7967
8315
|
* Open download preference folder if fileObjectId value is undefined else open folder containing the file with id fileObjectId
|
7968
8316
|
* @param fileObjectId - Id of the file whose containing folder should be opened
|
7969
8317
|
* @param callback Callback that will be triggered post open download folder/path
|
8318
|
+
*
|
8319
|
+
* @internal
|
8320
|
+
* Limited to Microsoft-internal use
|
7970
8321
|
*/
|
7971
8322
|
function openDownloadFolder(fileObjectId, callback) {
|
7972
8323
|
if (fileObjectId === void 0) { fileObjectId = undefined; }
|
@@ -7986,6 +8337,9 @@ var files;
|
|
7986
8337
|
* for selected 3P provider is performed on success of which the selected 3P provider support is added for user
|
7987
8338
|
*
|
7988
8339
|
* @param callback Callback that will be triggered post add 3P cloud storage provider action
|
8340
|
+
*
|
8341
|
+
* @internal
|
8342
|
+
* Limited to Microsoft-internal use
|
7989
8343
|
*/
|
7990
8344
|
function addCloudStorageProvider(callback) {
|
7991
8345
|
ensureInitialized(FrameContexts.content);
|
@@ -8005,6 +8359,9 @@ var files;
|
|
8005
8359
|
*
|
8006
8360
|
* @param logoutRequest 3P cloud storage provider remove action request content
|
8007
8361
|
* @param callback Callback that will be triggered post signout of 3P cloud storage provider action
|
8362
|
+
*
|
8363
|
+
* @internal
|
8364
|
+
* Limited to Microsoft-internal use
|
8008
8365
|
*/
|
8009
8366
|
function removeCloudStorageProvider(logoutRequest, callback) {
|
8010
8367
|
ensureInitialized(FrameContexts.content);
|
@@ -8025,6 +8382,9 @@ var files;
|
|
8025
8382
|
*
|
8026
8383
|
* @param addNewFileRequest 3P cloud storage provider add action request content
|
8027
8384
|
* @param callback Callback that will be triggered post adding a new file flow is finished
|
8385
|
+
*
|
8386
|
+
* @internal
|
8387
|
+
* Limited to Microsoft-internal use
|
8028
8388
|
*/
|
8029
8389
|
function addCloudStorageProviderFile(addNewFileRequest, callback) {
|
8030
8390
|
ensureInitialized(FrameContexts.content);
|
@@ -8045,6 +8405,9 @@ var files;
|
|
8045
8405
|
*
|
8046
8406
|
* @param renameFileRequest 3P cloud storage provider rename action request content
|
8047
8407
|
* @param callback Callback that will be triggered post renaming an existing file flow is finished
|
8408
|
+
*
|
8409
|
+
* @internal
|
8410
|
+
* Limited to Microsoft-internal use
|
8048
8411
|
*/
|
8049
8412
|
function renameCloudStorageProviderFile(renameFileRequest, callback) {
|
8050
8413
|
ensureInitialized(FrameContexts.content);
|
@@ -8066,6 +8429,9 @@ var files;
|
|
8066
8429
|
*
|
8067
8430
|
* @param deleteFileRequest 3P cloud storage provider delete action request content
|
8068
8431
|
* @param callback Callback that will be triggered post deleting existing file(s) flow is finished
|
8432
|
+
*
|
8433
|
+
* @internal
|
8434
|
+
* Limited to Microsoft-internal use
|
8069
8435
|
*/
|
8070
8436
|
function deleteCloudStorageProviderFile(deleteFileRequest, callback) {
|
8071
8437
|
ensureInitialized(FrameContexts.content);
|
@@ -8090,6 +8456,9 @@ var files;
|
|
8090
8456
|
*
|
8091
8457
|
* @param downloadFileRequest 3P cloud storage provider download file(s) action request content
|
8092
8458
|
* @param callback Callback that will be triggered post downloading existing file(s) flow is finished
|
8459
|
+
*
|
8460
|
+
* @internal
|
8461
|
+
* Limited to Microsoft-internal use
|
8093
8462
|
*/
|
8094
8463
|
function downloadCloudStorageProviderFile(downloadFileRequest, callback) {
|
8095
8464
|
ensureInitialized(FrameContexts.content);
|
@@ -8113,6 +8482,9 @@ var files;
|
|
8113
8482
|
*
|
8114
8483
|
* @param uploadFileRequest 3P cloud storage provider upload file(s) action request content
|
8115
8484
|
* @param callback Callback that will be triggered post uploading file(s) flow is finished
|
8485
|
+
*
|
8486
|
+
* @internal
|
8487
|
+
* Limited to Microsoft-internal use
|
8116
8488
|
*/
|
8117
8489
|
function uploadCloudStorageProviderFile(uploadFileRequest, callback) {
|
8118
8490
|
ensureInitialized(FrameContexts.content);
|
@@ -8144,6 +8516,7 @@ var files;
|
|
8144
8516
|
*
|
8145
8517
|
* @param handler - When 3P cloud storage provider list is updated this handler is called
|
8146
8518
|
*
|
8519
|
+
* @internal Limited to Microsoft-internal use
|
8147
8520
|
*/
|
8148
8521
|
function registerCloudStorageProviderListChangeHandler(handler) {
|
8149
8522
|
ensureInitialized();
|
@@ -8162,6 +8535,8 @@ var files;
|
|
8162
8535
|
*
|
8163
8536
|
* @param handler - When 3P cloud storage provider content is updated this handler is called
|
8164
8537
|
*
|
8538
|
+
* @internal
|
8539
|
+
* Limited to Microsoft-internal use
|
8165
8540
|
*/
|
8166
8541
|
function registerCloudStorageProviderContentChangeHandler(handler) {
|
8167
8542
|
ensureInitialized();
|
@@ -8186,15 +8561,22 @@ var files;
|
|
8186
8561
|
|
8187
8562
|
|
8188
8563
|
|
8564
|
+
/**
|
8565
|
+
* @hidden
|
8566
|
+
*
|
8567
|
+
* @internal
|
8568
|
+
* Limited to Microsoft-internal use
|
8569
|
+
*/
|
8189
8570
|
var meetingRoom;
|
8190
8571
|
(function (meetingRoom) {
|
8191
8572
|
/**
|
8192
8573
|
* @hidden
|
8193
|
-
* Hide from docs
|
8194
|
-
* ------
|
8195
8574
|
* Fetch the meeting room info that paired with current client.
|
8196
8575
|
*
|
8197
8576
|
* @returns Promise resolved with meeting room info or rejected with SdkError value
|
8577
|
+
*
|
8578
|
+
* @internal
|
8579
|
+
* Limited to Microsoft-internal use
|
8198
8580
|
*/
|
8199
8581
|
function getPairedMeetingRoomInfo() {
|
8200
8582
|
return new Promise(function (resolve) {
|
@@ -8208,12 +8590,13 @@ var meetingRoom;
|
|
8208
8590
|
meetingRoom.getPairedMeetingRoomInfo = getPairedMeetingRoomInfo;
|
8209
8591
|
/**
|
8210
8592
|
* @hidden
|
8211
|
-
* Hide from docs
|
8212
|
-
* ------
|
8213
8593
|
* Send a command to paired meeting room.
|
8214
8594
|
*
|
8215
8595
|
* @param commandName The command name.
|
8216
8596
|
* @returns Promise resolved upon completion or rejected with SdkError value
|
8597
|
+
*
|
8598
|
+
* @internal
|
8599
|
+
* Limited to Microsoft-internal use
|
8217
8600
|
*/
|
8218
8601
|
function sendCommandToPairedMeetingRoom(commandName) {
|
8219
8602
|
return new Promise(function (resolve) {
|
@@ -8230,12 +8613,13 @@ var meetingRoom;
|
|
8230
8613
|
meetingRoom.sendCommandToPairedMeetingRoom = sendCommandToPairedMeetingRoom;
|
8231
8614
|
/**
|
8232
8615
|
* @hidden
|
8233
|
-
* Hide from docs
|
8234
|
-
* ------
|
8235
8616
|
* Registers a handler for meeting room capabilities update.
|
8236
8617
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
8237
8618
|
*
|
8238
8619
|
* @param handler The handler to invoke when the capabilities of meeting room update.
|
8620
|
+
*
|
8621
|
+
* @internal
|
8622
|
+
* Limited to Microsoft-internal use
|
8239
8623
|
*/
|
8240
8624
|
function registerMeetingRoomCapabilitiesUpdateHandler(handler) {
|
8241
8625
|
if (!handler) {
|
@@ -8258,6 +8642,9 @@ var meetingRoom;
|
|
8258
8642
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
8259
8643
|
*
|
8260
8644
|
* @param handler The handler to invoke when the states of meeting room update.
|
8645
|
+
*
|
8646
|
+
* @internal
|
8647
|
+
* Limited to Microsoft-internal use
|
8261
8648
|
*/
|
8262
8649
|
function registerMeetingRoomStatesUpdateHandler(handler) {
|
8263
8650
|
if (!handler) {
|
@@ -8273,6 +8660,14 @@ var meetingRoom;
|
|
8273
8660
|
});
|
8274
8661
|
}
|
8275
8662
|
meetingRoom.registerMeetingRoomStatesUpdateHandler = registerMeetingRoomStatesUpdateHandler;
|
8663
|
+
/**
|
8664
|
+
* @hidden
|
8665
|
+
*
|
8666
|
+
* @returns boolean to represent whether the meetingRoom capability is supported
|
8667
|
+
*
|
8668
|
+
* @internal
|
8669
|
+
* Limited to Microsoft-internal use
|
8670
|
+
*/
|
8276
8671
|
function isSupported() {
|
8277
8672
|
return runtime.supports.meetingRoom ? true : false;
|
8278
8673
|
}
|
@@ -8288,14 +8683,13 @@ var notifications;
|
|
8288
8683
|
(function (notifications) {
|
8289
8684
|
/**
|
8290
8685
|
* @hidden
|
8291
|
-
* Hide from docs.
|
8292
|
-
* ------
|
8293
8686
|
* display notification API.
|
8294
8687
|
*
|
8295
8688
|
* @param message - Notification message.
|
8296
8689
|
* @param notificationType - Notification type
|
8297
8690
|
*
|
8298
8691
|
* @internal
|
8692
|
+
* Limited to Microsoft-internal use
|
8299
8693
|
*/
|
8300
8694
|
function showNotification(showNotificationParameters) {
|
8301
8695
|
ensureInitialized(FrameContexts.content);
|
@@ -8305,6 +8699,13 @@ var notifications;
|
|
8305
8699
|
sendMessageToParent('notifications.showNotification', [showNotificationParameters]);
|
8306
8700
|
}
|
8307
8701
|
notifications.showNotification = showNotification;
|
8702
|
+
/**
|
8703
|
+
* @hidden
|
8704
|
+
* @returns boolean to represent whether the notifications capability is supported
|
8705
|
+
*
|
8706
|
+
* @internal
|
8707
|
+
* Limited to Microsoft-internal use
|
8708
|
+
*/
|
8308
8709
|
function isSupported() {
|
8309
8710
|
return runtime.supports.notifications ? true : false;
|
8310
8711
|
}
|
@@ -8317,13 +8718,20 @@ var notifications;
|
|
8317
8718
|
|
8318
8719
|
|
8319
8720
|
|
8721
|
+
/**
|
8722
|
+
* @hidden
|
8723
|
+
*
|
8724
|
+
* @internal
|
8725
|
+
* Limited to Microsoft-internal use
|
8726
|
+
*/
|
8320
8727
|
var remoteCamera;
|
8321
8728
|
(function (remoteCamera) {
|
8322
8729
|
/**
|
8323
8730
|
* @hidden
|
8324
|
-
* Hide from docs
|
8325
|
-
* ------
|
8326
8731
|
* Enum used to indicate possible camera control commands.
|
8732
|
+
*
|
8733
|
+
* @internal
|
8734
|
+
* Limited to Microsoft-internal use
|
8327
8735
|
*/
|
8328
8736
|
var ControlCommand;
|
8329
8737
|
(function (ControlCommand) {
|
@@ -8337,9 +8745,10 @@ var remoteCamera;
|
|
8337
8745
|
})(ControlCommand = remoteCamera.ControlCommand || (remoteCamera.ControlCommand = {}));
|
8338
8746
|
/**
|
8339
8747
|
* @hidden
|
8340
|
-
* Hide from docs
|
8341
|
-
* ------
|
8342
8748
|
* Enum used to indicate the reason for the error.
|
8749
|
+
*
|
8750
|
+
* @internal
|
8751
|
+
* Limited to Microsoft-internal use
|
8343
8752
|
*/
|
8344
8753
|
var ErrorReason;
|
8345
8754
|
(function (ErrorReason) {
|
@@ -8354,9 +8763,10 @@ var remoteCamera;
|
|
8354
8763
|
})(ErrorReason = remoteCamera.ErrorReason || (remoteCamera.ErrorReason = {}));
|
8355
8764
|
/**
|
8356
8765
|
* @hidden
|
8357
|
-
* Hide from docs
|
8358
|
-
* ------
|
8359
8766
|
* Enum used to indicate the reason the session was terminated.
|
8767
|
+
*
|
8768
|
+
* @internal
|
8769
|
+
* Limited to Microsoft-internal use
|
8360
8770
|
*/
|
8361
8771
|
var SessionTerminatedReason;
|
8362
8772
|
(function (SessionTerminatedReason) {
|
@@ -8374,14 +8784,15 @@ var remoteCamera;
|
|
8374
8784
|
})(SessionTerminatedReason = remoteCamera.SessionTerminatedReason || (remoteCamera.SessionTerminatedReason = {}));
|
8375
8785
|
/**
|
8376
8786
|
* @hidden
|
8377
|
-
* Hide from docs
|
8378
|
-
* ------
|
8379
8787
|
* Fetch a list of the participants with controllable-cameras in a meeting.
|
8380
8788
|
*
|
8381
8789
|
* @param callback - Callback contains 2 parameters, error and participants.
|
8382
8790
|
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
8383
8791
|
* participants can either contain an array of Participant objects, incase of a successful fetch or null when it fails
|
8384
8792
|
* participants: object that contains an array of participants with controllable-cameras
|
8793
|
+
*
|
8794
|
+
* @internal
|
8795
|
+
* Limited to Microsoft-internal use
|
8385
8796
|
*/
|
8386
8797
|
function getCapableParticipants(callback) {
|
8387
8798
|
if (!callback) {
|
@@ -8396,8 +8807,6 @@ var remoteCamera;
|
|
8396
8807
|
remoteCamera.getCapableParticipants = getCapableParticipants;
|
8397
8808
|
/**
|
8398
8809
|
* @hidden
|
8399
|
-
* Hide from docs
|
8400
|
-
* ------
|
8401
8810
|
* Request control of a participant's camera.
|
8402
8811
|
*
|
8403
8812
|
* @param participant - Participant specifies the participant to send the request for camera control.
|
@@ -8405,6 +8814,9 @@ var remoteCamera;
|
|
8405
8814
|
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
8406
8815
|
* requestResponse can either contain the true/false value, incase of a successful request or null when it fails
|
8407
8816
|
* requestResponse: True means request was accepted and false means request was denied
|
8817
|
+
*
|
8818
|
+
* @internal
|
8819
|
+
* Limited to Microsoft-internal use
|
8408
8820
|
*/
|
8409
8821
|
function requestControl(participant, callback) {
|
8410
8822
|
if (!participant) {
|
@@ -8422,12 +8834,13 @@ var remoteCamera;
|
|
8422
8834
|
remoteCamera.requestControl = requestControl;
|
8423
8835
|
/**
|
8424
8836
|
* @hidden
|
8425
|
-
* Hide from docs
|
8426
|
-
* ------
|
8427
8837
|
* Send control command to the participant's camera.
|
8428
8838
|
*
|
8429
8839
|
* @param ControlCommand - ControlCommand specifies the command for controling the camera.
|
8430
8840
|
* @param callback - Callback to invoke when the command response returns.
|
8841
|
+
*
|
8842
|
+
* @internal
|
8843
|
+
* Limited to Microsoft-internal use
|
8431
8844
|
*/
|
8432
8845
|
function sendControlCommand(ControlCommand, callback) {
|
8433
8846
|
if (!ControlCommand) {
|
@@ -8445,11 +8858,12 @@ var remoteCamera;
|
|
8445
8858
|
remoteCamera.sendControlCommand = sendControlCommand;
|
8446
8859
|
/**
|
8447
8860
|
* @hidden
|
8448
|
-
* Hide from docs
|
8449
|
-
* ------
|
8450
8861
|
* Terminate the remote session
|
8451
8862
|
*
|
8452
8863
|
* @param callback - Callback to invoke when the command response returns.
|
8864
|
+
*
|
8865
|
+
* @internal
|
8866
|
+
* Limited to Microsoft-internal use
|
8453
8867
|
*/
|
8454
8868
|
function terminateSession(callback) {
|
8455
8869
|
if (!callback) {
|
@@ -8468,6 +8882,9 @@ var remoteCamera;
|
|
8468
8882
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
8469
8883
|
*
|
8470
8884
|
* @param handler - The handler to invoke when the list of participants with controllable-cameras changes.
|
8885
|
+
*
|
8886
|
+
* @internal
|
8887
|
+
* Limited to Microsoft-internal use
|
8471
8888
|
*/
|
8472
8889
|
function registerOnCapableParticipantsChangeHandler(handler) {
|
8473
8890
|
if (!handler) {
|
@@ -8486,6 +8903,9 @@ var remoteCamera;
|
|
8486
8903
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
8487
8904
|
*
|
8488
8905
|
* @param handler - The handler to invoke when there is an error from the camera handler.
|
8906
|
+
*
|
8907
|
+
* @internal
|
8908
|
+
* Limited to Microsoft-internal use
|
8489
8909
|
*/
|
8490
8910
|
function registerOnErrorHandler(handler) {
|
8491
8911
|
if (!handler) {
|
@@ -8504,6 +8924,9 @@ var remoteCamera;
|
|
8504
8924
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
8505
8925
|
*
|
8506
8926
|
* @param handler - The handler to invoke when the controlled device changes state.
|
8927
|
+
*
|
8928
|
+
* @internal
|
8929
|
+
* Limited to Microsoft-internal use
|
8507
8930
|
*/
|
8508
8931
|
function registerOnDeviceStateChangeHandler(handler) {
|
8509
8932
|
if (!handler) {
|
@@ -8522,6 +8945,9 @@ var remoteCamera;
|
|
8522
8945
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
8523
8946
|
*
|
8524
8947
|
* @param handler - The handler to invoke when the current session status changes.
|
8948
|
+
*
|
8949
|
+
* @internal
|
8950
|
+
* Limited to Microsoft-internal use
|
8525
8951
|
*/
|
8526
8952
|
function registerOnSessionStatusChangeHandler(handler) {
|
8527
8953
|
if (!handler) {
|
@@ -8534,6 +8960,13 @@ var remoteCamera;
|
|
8534
8960
|
registerHandler('remoteCamera.sessionStatusChange', handler);
|
8535
8961
|
}
|
8536
8962
|
remoteCamera.registerOnSessionStatusChangeHandler = registerOnSessionStatusChangeHandler;
|
8963
|
+
/**
|
8964
|
+
* @hidden
|
8965
|
+
* @returns boolean to represent whether the remoteCamera capability is supported
|
8966
|
+
*
|
8967
|
+
* @internal
|
8968
|
+
* Limited to Microsoft-internal use
|
8969
|
+
*/
|
8537
8970
|
function isSupported() {
|
8538
8971
|
return runtime.supports.remoteCamera ? true : false;
|
8539
8972
|
}
|
@@ -8549,6 +8982,9 @@ var remoteCamera;
|
|
8549
8982
|
/**
|
8550
8983
|
* @hidden
|
8551
8984
|
* Namespace to interact with the application entities specific part of the SDK.
|
8985
|
+
*
|
8986
|
+
* @internal
|
8987
|
+
* Limited to Microsoft-internal use
|
8552
8988
|
*/
|
8553
8989
|
var appEntity;
|
8554
8990
|
(function (appEntity_1) {
|
@@ -8564,6 +9000,9 @@ var appEntity;
|
|
8564
9000
|
* @param callback Callback that will be triggered once the app entity information is available.
|
8565
9001
|
* The callback takes two arguments: an SdkError in case something happened (i.e.
|
8566
9002
|
* no permissions to execute the API) and the app entity configuration, if available
|
9003
|
+
*
|
9004
|
+
* @internal
|
9005
|
+
* Limited to Microsoft-internal use
|
8567
9006
|
*/
|
8568
9007
|
function selectAppEntity(threadId, categories, subEntityId, callback) {
|
8569
9008
|
ensureInitialized(FrameContexts.content);
|
@@ -8580,9 +9019,14 @@ var appEntity;
|
|
8580
9019
|
}
|
8581
9020
|
appEntity_1.selectAppEntity = selectAppEntity;
|
8582
9021
|
/**
|
9022
|
+
* @hidden
|
9023
|
+
*
|
8583
9024
|
* Checks if appEntity capability is supported by the host
|
8584
9025
|
* @returns true if the appEntity capability is enabled in runtime.supports.appEntity and
|
8585
9026
|
* false if it is disabled
|
9027
|
+
*
|
9028
|
+
* @internal
|
9029
|
+
* Limited to Microsoft-internal use
|
8586
9030
|
*/
|
8587
9031
|
function isSupported() {
|
8588
9032
|
return runtime.supports.appEntity ? true : false;
|
@@ -8601,10 +9045,9 @@ var appEntity;
|
|
8601
9045
|
/**
|
8602
9046
|
* @hidden
|
8603
9047
|
* Namespace to interact with the `teams` specific part of the SDK.
|
8604
|
-
* ------
|
8605
|
-
* Hide from docs
|
8606
9048
|
*
|
8607
9049
|
* @internal
|
9050
|
+
* Limited to Microsoft-internal use
|
8608
9051
|
*/
|
8609
9052
|
var teams;
|
8610
9053
|
(function (teams) {
|
@@ -8616,11 +9059,12 @@ var teams;
|
|
8616
9059
|
})(ChannelType = teams.ChannelType || (teams.ChannelType = {}));
|
8617
9060
|
/**
|
8618
9061
|
* @hidden
|
8619
|
-
* Hide from docs
|
8620
|
-
* ------
|
8621
9062
|
* Get a list of channels belong to a Team
|
8622
9063
|
*
|
8623
9064
|
* @param groupId - a team's objectId
|
9065
|
+
*
|
9066
|
+
* @internal
|
9067
|
+
* Limited to Microsoft-internal use
|
8624
9068
|
*/
|
8625
9069
|
function getTeamChannels(groupId, callback) {
|
8626
9070
|
ensureInitialized(FrameContexts.content);
|
@@ -8643,6 +9087,9 @@ var teams;
|
|
8643
9087
|
*
|
8644
9088
|
* @param threadId - ID of the thread where the app entity will be created; if threadId is not
|
8645
9089
|
* provided, the threadId from route params will be used.
|
9090
|
+
*
|
9091
|
+
* @internal
|
9092
|
+
* Limited to Microsoft-internal use
|
8646
9093
|
*/
|
8647
9094
|
function refreshSiteUrl(threadId, callback) {
|
8648
9095
|
ensureInitialized();
|
@@ -8664,6 +9111,9 @@ var teams;
|
|
8664
9111
|
*
|
8665
9112
|
* @returns true if the teams capability is enabled in runtime.supports.teams and
|
8666
9113
|
* false if it is disabled
|
9114
|
+
*
|
9115
|
+
* @internal
|
9116
|
+
* Limited to Microsoft-internal use
|
8667
9117
|
*/
|
8668
9118
|
function isSupported() {
|
8669
9119
|
return runtime.supports.teams ? true : false;
|
@@ -8671,23 +9121,27 @@ var teams;
|
|
8671
9121
|
teams.isSupported = isSupported;
|
8672
9122
|
/**
|
8673
9123
|
* @hidden
|
8674
|
-
* Hide from docs
|
8675
|
-
* ------
|
8676
|
-
*
|
8677
9124
|
* @internal
|
9125
|
+
* Limited to Microsoft-internal use
|
8678
9126
|
*/
|
8679
9127
|
var fullTrust;
|
8680
9128
|
(function (fullTrust) {
|
9129
|
+
/**
|
9130
|
+
* @hidden
|
9131
|
+
* @internal
|
9132
|
+
* Limited to Microsoft-internal use
|
9133
|
+
*/
|
8681
9134
|
var joinedTeams;
|
8682
9135
|
(function (joinedTeams) {
|
8683
9136
|
/**
|
8684
9137
|
* @hidden
|
8685
|
-
* Hide from docs
|
8686
|
-
* ------
|
8687
9138
|
* Allows an app to retrieve information of all user joined teams
|
8688
9139
|
*
|
8689
9140
|
* @param teamInstanceParameters - Optional flags that specify whether to scope call to favorite teams
|
8690
9141
|
* @returns Promise that resolves with information about the user joined teams or rejects with an error when the operation has completed
|
9142
|
+
*
|
9143
|
+
* @internal
|
9144
|
+
* Limited to Microsoft-internal use
|
8691
9145
|
*/
|
8692
9146
|
function getUserJoinedTeams(teamInstanceParameters) {
|
8693
9147
|
return new Promise(function (resolve) {
|
@@ -8709,12 +9163,13 @@ var teams;
|
|
8709
9163
|
joinedTeams.getUserJoinedTeams = getUserJoinedTeams;
|
8710
9164
|
/**
|
8711
9165
|
* @hidden
|
8712
|
-
* Hide from docs
|
8713
|
-
* ------
|
8714
9166
|
* Checks if teams.fullTrust.joinedTeams capability is supported by the host
|
8715
9167
|
*
|
8716
9168
|
* @returns true if the teams.fullTrust.joinedTeams capability is enabled in
|
8717
9169
|
* runtime.supports.teams.fullTrust.joinedTeams and false if it is disabled
|
9170
|
+
*
|
9171
|
+
* @internal
|
9172
|
+
* Limited to Microsoft-internal use
|
8718
9173
|
*/
|
8719
9174
|
function isSupported() {
|
8720
9175
|
return runtime.supports.teams
|
@@ -8729,12 +9184,13 @@ var teams;
|
|
8729
9184
|
})(joinedTeams = fullTrust.joinedTeams || (fullTrust.joinedTeams = {}));
|
8730
9185
|
/**
|
8731
9186
|
* @hidden
|
8732
|
-
* Hide from docs
|
8733
|
-
* ------
|
8734
9187
|
* Allows an app to get the configuration setting value
|
8735
9188
|
*
|
8736
9189
|
* @param key - The key for the config setting
|
8737
9190
|
* @returns Promise that resolves with the value for the provided configuration setting or rejects with an error when the operation has completed
|
9191
|
+
*
|
9192
|
+
* @internal
|
9193
|
+
* Limited to Microsoft-internal use
|
8738
9194
|
*/
|
8739
9195
|
function getConfigSetting(key) {
|
8740
9196
|
return new Promise(function (resolve) {
|
@@ -8748,11 +9204,12 @@ var teams;
|
|
8748
9204
|
fullTrust.getConfigSetting = getConfigSetting;
|
8749
9205
|
/**
|
8750
9206
|
* @hidden
|
8751
|
-
* Hide from docs
|
8752
|
-
* ------
|
8753
9207
|
* Checks if teams.fullTrust capability is supported by the host
|
8754
9208
|
* @returns true if the teams.fullTrust capability is enabled in runtime.supports.teams.fullTrust and
|
8755
9209
|
* false if it is disabled
|
9210
|
+
*
|
9211
|
+
* @internal
|
9212
|
+
* Limited to Microsoft-internal use
|
8756
9213
|
*/
|
8757
9214
|
function isSupported() {
|
8758
9215
|
return runtime.supports.teams ? (runtime.supports.teams.fullTrust ? true : false) : false;
|