@microsoft/teams-js 2.0.0-beta.5-dev.4 → 2.0.0-beta.5-dev.7
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
@@ -1653,6 +1653,7 @@ export enum ChannelType {
|
|
1653
1653
|
Private = "Private",
|
1654
1654
|
Shared = "Shared"
|
1655
1655
|
}
|
1656
|
+
export const errorNotSupportedOnPlatform: string;
|
1656
1657
|
|
1657
1658
|
/**
|
1658
1659
|
* Represents information about tabs for an app
|
@@ -2085,6 +2086,26 @@ export interface Context {
|
|
2085
2086
|
*/
|
2086
2087
|
mySitePath?: string;
|
2087
2088
|
}
|
2089
|
+
export interface ShareDeepLinkParameters {
|
2090
|
+
/**
|
2091
|
+
* The developer-defined unique ID for the sub-page to which this deep link points in the current page.
|
2092
|
+
* This field should be used to restore to a specific state within a page, such as scrolling to or activating a specific piece of content.
|
2093
|
+
*/
|
2094
|
+
subPageId: string;
|
2095
|
+
/**
|
2096
|
+
* The label for the sub-page that should be displayed when the deep link is rendered in a client.
|
2097
|
+
*/
|
2098
|
+
subPageLabel: string;
|
2099
|
+
/**
|
2100
|
+
* The fallback URL to which to navigate the user if the client cannot render the page.
|
2101
|
+
* This URL should lead directly to the sub-entity.
|
2102
|
+
*/
|
2103
|
+
subPageWebUrl?: string;
|
2104
|
+
}
|
2105
|
+
/**
|
2106
|
+
* @deprecated
|
2107
|
+
* As of 2.0.0-beta.5, please use {@link ShareDeepLinkParameters} instead.
|
2108
|
+
*/
|
2088
2109
|
export interface DeepLinkParameters {
|
2089
2110
|
/**
|
2090
2111
|
* The developer-defined unique ID for the sub-entity to which this deep link points in the current entity.
|
@@ -2818,7 +2839,7 @@ export namespace dialog {
|
|
2818
2839
|
*
|
2819
2840
|
* @returns a function that can be used to send messages to the dialog.
|
2820
2841
|
*/
|
2821
|
-
function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel):
|
2842
|
+
function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void;
|
2822
2843
|
/**
|
2823
2844
|
* Submit the dialog module.
|
2824
2845
|
*
|
@@ -2835,6 +2856,12 @@ export namespace dialog {
|
|
2835
2856
|
* @param message - The message to send to the parent
|
2836
2857
|
*/
|
2837
2858
|
function sendMessageToParentFromDialog(message: any): void;
|
2859
|
+
/**
|
2860
|
+
* Send message to the dialog from the parent
|
2861
|
+
*
|
2862
|
+
* @param message - The message to send
|
2863
|
+
*/
|
2864
|
+
function sendMessageToDialog(message: any): void;
|
2838
2865
|
/**
|
2839
2866
|
* Register a listener that will be triggered when a message is received from the app that opened the dialog.
|
2840
2867
|
*
|
@@ -2880,7 +2907,7 @@ export namespace dialog {
|
|
2880
2907
|
*
|
2881
2908
|
* @returns a function that can be used to send messages to the dialog.
|
2882
2909
|
*/
|
2883
|
-
function open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel):
|
2910
|
+
function open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void;
|
2884
2911
|
/**
|
2885
2912
|
* Checks if dialog.bot capability is supported by the host
|
2886
2913
|
*
|
@@ -2966,7 +2993,7 @@ export namespace pages {
|
|
2966
2993
|
*
|
2967
2994
|
* @param deepLinkParameters - ID and label for the link and fallback URL.
|
2968
2995
|
*/
|
2969
|
-
function shareDeepLink(deepLinkParameters:
|
2996
|
+
function shareDeepLink(deepLinkParameters: ShareDeepLinkParameters): void;
|
2970
2997
|
/**
|
2971
2998
|
* Registers a handler for changes from or to full-screen view for a tab.
|
2972
2999
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
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.7";
|
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);
|
@@ -3142,9 +3144,9 @@ var pages;
|
|
3142
3144
|
function shareDeepLink(deepLinkParameters) {
|
3143
3145
|
ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
3144
3146
|
sendMessageToParent('shareDeepLink', [
|
3145
|
-
deepLinkParameters.
|
3146
|
-
deepLinkParameters.
|
3147
|
-
deepLinkParameters.
|
3147
|
+
deepLinkParameters.subPageId,
|
3148
|
+
deepLinkParameters.subPageLabel,
|
3149
|
+
deepLinkParameters.subPageWebUrl,
|
3148
3150
|
]);
|
3149
3151
|
}
|
3150
3152
|
pages.shareDeepLink = shareDeepLink;
|
@@ -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
|
}
|
@@ -4397,11 +4414,6 @@ var dialog;
|
|
4397
4414
|
submitHandler({ err: err, result: result });
|
4398
4415
|
removeHandler('messageForParent');
|
4399
4416
|
});
|
4400
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
4401
|
-
var sendMessageToDialog = function (message) {
|
4402
|
-
sendMessageToParent('messageForChild', [message]);
|
4403
|
-
};
|
4404
|
-
return sendMessageToDialog;
|
4405
4417
|
}
|
4406
4418
|
dialog.open = open;
|
4407
4419
|
/**
|
@@ -4431,6 +4443,18 @@ var dialog;
|
|
4431
4443
|
sendMessageToParent('messageForParent', [message]);
|
4432
4444
|
}
|
4433
4445
|
dialog.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
|
4446
|
+
/**
|
4447
|
+
* Send message to the dialog from the parent
|
4448
|
+
*
|
4449
|
+
* @param message - The message to send
|
4450
|
+
*/
|
4451
|
+
function sendMessageToDialog(
|
4452
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
4453
|
+
message) {
|
4454
|
+
ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
4455
|
+
sendMessageToParent('messageForChild', [message]);
|
4456
|
+
}
|
4457
|
+
dialog.sendMessageToDialog = sendMessageToDialog;
|
4434
4458
|
/**
|
4435
4459
|
* Register a listener that will be triggered when a message is received from the app that opened the dialog.
|
4436
4460
|
*
|
@@ -4501,11 +4525,6 @@ var dialog;
|
|
4501
4525
|
submitHandler({ err: err, result: result });
|
4502
4526
|
removeHandler('messageForParent');
|
4503
4527
|
});
|
4504
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
4505
|
-
var sendMessageToDialog = function (message) {
|
4506
|
-
sendMessageToParent('messageForChild', [message]);
|
4507
|
-
};
|
4508
|
-
return sendMessageToDialog;
|
4509
4528
|
}
|
4510
4529
|
bot.open = open;
|
4511
4530
|
/**
|
@@ -6204,7 +6223,11 @@ function getMruTabInstances(callback, tabInstanceParameters) {
|
|
6204
6223
|
* @param deepLinkParameters - ID and label for the link and fallback URL.
|
6205
6224
|
*/
|
6206
6225
|
function shareDeepLink(deepLinkParameters) {
|
6207
|
-
pages.shareDeepLink(
|
6226
|
+
pages.shareDeepLink({
|
6227
|
+
subPageId: deepLinkParameters.subEntityId,
|
6228
|
+
subPageLabel: deepLinkParameters.subEntityLabel,
|
6229
|
+
subPageWebUrl: deepLinkParameters.subEntityWebUrl,
|
6230
|
+
});
|
6208
6231
|
}
|
6209
6232
|
/**
|
6210
6233
|
* @deprecated
|