@microsoft/teams-js 2.0.0-beta.5-dev.5 → 2.0.0-beta.5-dev.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/MicrosoftTeams.d.ts
CHANGED
package/dist/MicrosoftTeams.js
CHANGED
@@ -1121,7 +1121,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1121
1121
|
});
|
1122
1122
|
|
1123
1123
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1124
|
-
var version = "2.0.0-beta.5-dev.
|
1124
|
+
var version = "2.0.0-beta.5-dev.6";
|
1125
1125
|
/**
|
1126
1126
|
* @hidden
|
1127
1127
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
@@ -1265,6 +1265,81 @@ var GlobalVars = /** @class */ (function () {
|
|
1265
1265
|
}());
|
1266
1266
|
|
1267
1267
|
|
1268
|
+
;// CONCATENATED MODULE: ./src/public/interfaces.ts
|
1269
|
+
/* eslint-disable @typescript-eslint/no-explicit-any*/
|
1270
|
+
/**
|
1271
|
+
* Allowed user file open preferences
|
1272
|
+
*/
|
1273
|
+
var FileOpenPreference;
|
1274
|
+
(function (FileOpenPreference) {
|
1275
|
+
FileOpenPreference["Inline"] = "inline";
|
1276
|
+
FileOpenPreference["Desktop"] = "desktop";
|
1277
|
+
FileOpenPreference["Web"] = "web";
|
1278
|
+
})(FileOpenPreference || (FileOpenPreference = {}));
|
1279
|
+
var ErrorCode;
|
1280
|
+
(function (ErrorCode) {
|
1281
|
+
/**
|
1282
|
+
* API not supported in the current platform.
|
1283
|
+
*/
|
1284
|
+
ErrorCode[ErrorCode["NOT_SUPPORTED_ON_PLATFORM"] = 100] = "NOT_SUPPORTED_ON_PLATFORM";
|
1285
|
+
/**
|
1286
|
+
* Internal error encountered while performing the required operation.
|
1287
|
+
*/
|
1288
|
+
ErrorCode[ErrorCode["INTERNAL_ERROR"] = 500] = "INTERNAL_ERROR";
|
1289
|
+
/**
|
1290
|
+
* API is not supported in the current context
|
1291
|
+
*/
|
1292
|
+
ErrorCode[ErrorCode["NOT_SUPPORTED_IN_CURRENT_CONTEXT"] = 501] = "NOT_SUPPORTED_IN_CURRENT_CONTEXT";
|
1293
|
+
/**
|
1294
|
+
Permissions denied by user
|
1295
|
+
*/
|
1296
|
+
ErrorCode[ErrorCode["PERMISSION_DENIED"] = 1000] = "PERMISSION_DENIED";
|
1297
|
+
/**
|
1298
|
+
* Network issue
|
1299
|
+
*/
|
1300
|
+
ErrorCode[ErrorCode["NETWORK_ERROR"] = 2000] = "NETWORK_ERROR";
|
1301
|
+
/**
|
1302
|
+
* Underlying hardware doesn't support the capability
|
1303
|
+
*/
|
1304
|
+
ErrorCode[ErrorCode["NO_HW_SUPPORT"] = 3000] = "NO_HW_SUPPORT";
|
1305
|
+
/**
|
1306
|
+
* One or more arguments are invalid
|
1307
|
+
*/
|
1308
|
+
ErrorCode[ErrorCode["INVALID_ARGUMENTS"] = 4000] = "INVALID_ARGUMENTS";
|
1309
|
+
/**
|
1310
|
+
* User is not authorized for this operation
|
1311
|
+
*/
|
1312
|
+
ErrorCode[ErrorCode["UNAUTHORIZED_USER_OPERATION"] = 5000] = "UNAUTHORIZED_USER_OPERATION";
|
1313
|
+
/**
|
1314
|
+
* Could not complete the operation due to insufficient resources
|
1315
|
+
*/
|
1316
|
+
ErrorCode[ErrorCode["INSUFFICIENT_RESOURCES"] = 6000] = "INSUFFICIENT_RESOURCES";
|
1317
|
+
/**
|
1318
|
+
* Platform throttled the request because of API was invoked too frequently
|
1319
|
+
*/
|
1320
|
+
ErrorCode[ErrorCode["THROTTLE"] = 7000] = "THROTTLE";
|
1321
|
+
/**
|
1322
|
+
* User aborted the operation
|
1323
|
+
*/
|
1324
|
+
ErrorCode[ErrorCode["USER_ABORT"] = 8000] = "USER_ABORT";
|
1325
|
+
/**
|
1326
|
+
* Could not complete the operation in the given time interval
|
1327
|
+
*/
|
1328
|
+
ErrorCode[ErrorCode["OPERATION_TIMED_OUT"] = 8001] = "OPERATION_TIMED_OUT";
|
1329
|
+
/**
|
1330
|
+
* Platform code is old and doesn't implement this API
|
1331
|
+
*/
|
1332
|
+
ErrorCode[ErrorCode["OLD_PLATFORM"] = 9000] = "OLD_PLATFORM";
|
1333
|
+
/**
|
1334
|
+
* The file specified was not found on the given location
|
1335
|
+
*/
|
1336
|
+
ErrorCode[ErrorCode["FILE_NOT_FOUND"] = 404] = "FILE_NOT_FOUND";
|
1337
|
+
/**
|
1338
|
+
* The return value is too big and has exceeded our size boundries
|
1339
|
+
*/
|
1340
|
+
ErrorCode[ErrorCode["SIZE_EXCEEDED"] = 10000] = "SIZE_EXCEEDED";
|
1341
|
+
})(ErrorCode || (ErrorCode = {}));
|
1342
|
+
|
1268
1343
|
;// CONCATENATED MODULE: ./src/public/constants.ts
|
1269
1344
|
var HostClientType;
|
1270
1345
|
(function (HostClientType) {
|
@@ -1332,6 +1407,7 @@ var DialogDimension;
|
|
1332
1407
|
DialogDimension["Medium"] = "medium";
|
1333
1408
|
DialogDimension["Small"] = "small";
|
1334
1409
|
})(DialogDimension || (DialogDimension = {}));
|
1410
|
+
|
1335
1411
|
/**
|
1336
1412
|
* @deprecated
|
1337
1413
|
* As of 2.0.0-beta.1, please use {@link DialogDimension} instead.
|
@@ -1347,81 +1423,7 @@ var ChannelType;
|
|
1347
1423
|
ChannelType["Private"] = "Private";
|
1348
1424
|
ChannelType["Shared"] = "Shared";
|
1349
1425
|
})(ChannelType || (ChannelType = {}));
|
1350
|
-
|
1351
|
-
;// CONCATENATED MODULE: ./src/public/interfaces.ts
|
1352
|
-
/* eslint-disable @typescript-eslint/no-explicit-any*/
|
1353
|
-
/**
|
1354
|
-
* Allowed user file open preferences
|
1355
|
-
*/
|
1356
|
-
var FileOpenPreference;
|
1357
|
-
(function (FileOpenPreference) {
|
1358
|
-
FileOpenPreference["Inline"] = "inline";
|
1359
|
-
FileOpenPreference["Desktop"] = "desktop";
|
1360
|
-
FileOpenPreference["Web"] = "web";
|
1361
|
-
})(FileOpenPreference || (FileOpenPreference = {}));
|
1362
|
-
var ErrorCode;
|
1363
|
-
(function (ErrorCode) {
|
1364
|
-
/**
|
1365
|
-
* API not supported in the current platform.
|
1366
|
-
*/
|
1367
|
-
ErrorCode[ErrorCode["NOT_SUPPORTED_ON_PLATFORM"] = 100] = "NOT_SUPPORTED_ON_PLATFORM";
|
1368
|
-
/**
|
1369
|
-
* Internal error encountered while performing the required operation.
|
1370
|
-
*/
|
1371
|
-
ErrorCode[ErrorCode["INTERNAL_ERROR"] = 500] = "INTERNAL_ERROR";
|
1372
|
-
/**
|
1373
|
-
* API is not supported in the current context
|
1374
|
-
*/
|
1375
|
-
ErrorCode[ErrorCode["NOT_SUPPORTED_IN_CURRENT_CONTEXT"] = 501] = "NOT_SUPPORTED_IN_CURRENT_CONTEXT";
|
1376
|
-
/**
|
1377
|
-
Permissions denied by user
|
1378
|
-
*/
|
1379
|
-
ErrorCode[ErrorCode["PERMISSION_DENIED"] = 1000] = "PERMISSION_DENIED";
|
1380
|
-
/**
|
1381
|
-
* Network issue
|
1382
|
-
*/
|
1383
|
-
ErrorCode[ErrorCode["NETWORK_ERROR"] = 2000] = "NETWORK_ERROR";
|
1384
|
-
/**
|
1385
|
-
* Underlying hardware doesn't support the capability
|
1386
|
-
*/
|
1387
|
-
ErrorCode[ErrorCode["NO_HW_SUPPORT"] = 3000] = "NO_HW_SUPPORT";
|
1388
|
-
/**
|
1389
|
-
* One or more arguments are invalid
|
1390
|
-
*/
|
1391
|
-
ErrorCode[ErrorCode["INVALID_ARGUMENTS"] = 4000] = "INVALID_ARGUMENTS";
|
1392
|
-
/**
|
1393
|
-
* User is not authorized for this operation
|
1394
|
-
*/
|
1395
|
-
ErrorCode[ErrorCode["UNAUTHORIZED_USER_OPERATION"] = 5000] = "UNAUTHORIZED_USER_OPERATION";
|
1396
|
-
/**
|
1397
|
-
* Could not complete the operation due to insufficient resources
|
1398
|
-
*/
|
1399
|
-
ErrorCode[ErrorCode["INSUFFICIENT_RESOURCES"] = 6000] = "INSUFFICIENT_RESOURCES";
|
1400
|
-
/**
|
1401
|
-
* Platform throttled the request because of API was invoked too frequently
|
1402
|
-
*/
|
1403
|
-
ErrorCode[ErrorCode["THROTTLE"] = 7000] = "THROTTLE";
|
1404
|
-
/**
|
1405
|
-
* User aborted the operation
|
1406
|
-
*/
|
1407
|
-
ErrorCode[ErrorCode["USER_ABORT"] = 8000] = "USER_ABORT";
|
1408
|
-
/**
|
1409
|
-
* Could not complete the operation in the given time interval
|
1410
|
-
*/
|
1411
|
-
ErrorCode[ErrorCode["OPERATION_TIMED_OUT"] = 8001] = "OPERATION_TIMED_OUT";
|
1412
|
-
/**
|
1413
|
-
* Platform code is old and doesn't implement this API
|
1414
|
-
*/
|
1415
|
-
ErrorCode[ErrorCode["OLD_PLATFORM"] = 9000] = "OLD_PLATFORM";
|
1416
|
-
/**
|
1417
|
-
* The file specified was not found on the given location
|
1418
|
-
*/
|
1419
|
-
ErrorCode[ErrorCode["FILE_NOT_FOUND"] = 404] = "FILE_NOT_FOUND";
|
1420
|
-
/**
|
1421
|
-
* The return value is too big and has exceeded our size boundries
|
1422
|
-
*/
|
1423
|
-
ErrorCode[ErrorCode["SIZE_EXCEEDED"] = 10000] = "SIZE_EXCEEDED";
|
1424
|
-
})(ErrorCode || (ErrorCode = {}));
|
1426
|
+
var errorNotSupportedOnPlatform = JSON.stringify({ errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM });
|
1425
1427
|
|
1426
1428
|
// EXTERNAL MODULE: ../../node_modules/uuid/index.js
|
1427
1429
|
var uuid = __webpack_require__(22);
|
@@ -4164,6 +4166,9 @@ var conversations;
|
|
4164
4166
|
function openConversation(openConversationRequest) {
|
4165
4167
|
return new Promise(function (resolve) {
|
4166
4168
|
ensureInitialized(FrameContexts.content);
|
4169
|
+
if (!isSupported()) {
|
4170
|
+
throw new Error(errorNotSupportedOnPlatform);
|
4171
|
+
}
|
4167
4172
|
var sendPromise = sendAndHandleStatusAndReason('conversations.openConversation', {
|
4168
4173
|
title: openConversationRequest.title,
|
4169
4174
|
subEntityId: openConversationRequest.subEntityId,
|
@@ -4203,6 +4208,9 @@ var conversations;
|
|
4203
4208
|
*/
|
4204
4209
|
function closeConversation() {
|
4205
4210
|
ensureInitialized(FrameContexts.content);
|
4211
|
+
if (!isSupported()) {
|
4212
|
+
throw new Error(errorNotSupportedOnPlatform);
|
4213
|
+
}
|
4206
4214
|
sendMessageToParent('conversations.closeConversation');
|
4207
4215
|
removeHandler('startConversation');
|
4208
4216
|
removeHandler('closeConversation');
|
@@ -4223,6 +4231,9 @@ var conversations;
|
|
4223
4231
|
function getChatMembers() {
|
4224
4232
|
return new Promise(function (resolve) {
|
4225
4233
|
ensureInitialized();
|
4234
|
+
if (!isSupported()) {
|
4235
|
+
throw new Error(errorNotSupportedOnPlatform);
|
4236
|
+
}
|
4226
4237
|
resolve(sendAndUnwrap('getChatMembers'));
|
4227
4238
|
});
|
4228
4239
|
}
|
@@ -4303,6 +4314,9 @@ var chat;
|
|
4303
4314
|
function openChat(openChatRequest) {
|
4304
4315
|
return new Promise(function (resolve) {
|
4305
4316
|
ensureInitialized(FrameContexts.content);
|
4317
|
+
if (!isSupported()) {
|
4318
|
+
throw new Error(errorNotSupportedOnPlatform);
|
4319
|
+
}
|
4306
4320
|
if (runtime.isLegacyTeams) {
|
4307
4321
|
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForChat([openChatRequest.user], undefined /*topic*/, openChatRequest.message)));
|
4308
4322
|
}
|
@@ -4339,6 +4353,9 @@ var chat;
|
|
4339
4353
|
}
|
4340
4354
|
else {
|
4341
4355
|
ensureInitialized(FrameContexts.content);
|
4356
|
+
if (!isSupported()) {
|
4357
|
+
throw new Error(errorNotSupportedOnPlatform);
|
4358
|
+
}
|
4342
4359
|
if (runtime.isLegacyTeams) {
|
4343
4360
|
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForChat(openChatRequest.users, openChatRequest.topic, openChatRequest.message)));
|
4344
4361
|
}
|