@microsoft/teams-js 2.0.0-beta.6-dev.4 → 2.0.0-beta.6-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 +117 -170
- package/dist/MicrosoftTeams.js +341 -265
- 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 -1
package/dist/MicrosoftTeams.js
CHANGED
@@ -1089,6 +1089,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1089
1089
|
"navigateCrossDomain": () => (/* reexport */ navigateCrossDomain),
|
1090
1090
|
"navigateToTab": () => (/* reexport */ navigateToTab),
|
1091
1091
|
"notifications": () => (/* reexport */ notifications),
|
1092
|
+
"openFilePreview": () => (/* reexport */ openFilePreview),
|
1092
1093
|
"pages": () => (/* reexport */ pages),
|
1093
1094
|
"people": () => (/* reexport */ people),
|
1094
1095
|
"print": () => (/* reexport */ print),
|
@@ -1121,7 +1122,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1121
1122
|
});
|
1122
1123
|
|
1123
1124
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1124
|
-
var version = "2.0.0-beta.6-dev.
|
1125
|
+
var version = "2.0.0-beta.6-dev.7";
|
1125
1126
|
/**
|
1126
1127
|
* @hidden
|
1127
1128
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
@@ -1831,6 +1832,7 @@ function processAdditionalValidOrigins(validMessageOrigins) {
|
|
1831
1832
|
|
1832
1833
|
|
1833
1834
|
|
1835
|
+
|
1834
1836
|
/**
|
1835
1837
|
* @internal
|
1836
1838
|
*/
|
@@ -1926,6 +1928,34 @@ function registerUserSettingsChangeHandler(settingTypes, handler) {
|
|
1926
1928
|
ensureInitialized();
|
1927
1929
|
registerHandler('userSettingsChange', handler, true, [settingTypes]);
|
1928
1930
|
}
|
1931
|
+
/**
|
1932
|
+
* @hidden
|
1933
|
+
* Hide from docs.
|
1934
|
+
* ------
|
1935
|
+
* Opens a client-friendly preview of the specified file.
|
1936
|
+
*
|
1937
|
+
* @param file - The file to preview.
|
1938
|
+
*/
|
1939
|
+
function openFilePreview(filePreviewParameters) {
|
1940
|
+
ensureInitialized(FrameContexts.content, FrameContexts.task);
|
1941
|
+
var params = [
|
1942
|
+
filePreviewParameters.entityId,
|
1943
|
+
filePreviewParameters.title,
|
1944
|
+
filePreviewParameters.description,
|
1945
|
+
filePreviewParameters.type,
|
1946
|
+
filePreviewParameters.objectUrl,
|
1947
|
+
filePreviewParameters.downloadUrl,
|
1948
|
+
filePreviewParameters.webPreviewUrl,
|
1949
|
+
filePreviewParameters.webEditUrl,
|
1950
|
+
filePreviewParameters.baseUrl,
|
1951
|
+
filePreviewParameters.editFile,
|
1952
|
+
filePreviewParameters.subEntityId,
|
1953
|
+
filePreviewParameters.viewerAction,
|
1954
|
+
filePreviewParameters.fileOpenPreference,
|
1955
|
+
filePreviewParameters.conversationId,
|
1956
|
+
];
|
1957
|
+
sendMessageToParent('openFilePreview', params);
|
1958
|
+
}
|
1929
1959
|
|
1930
1960
|
;// CONCATENATED MODULE: ./src/public/authentication.ts
|
1931
1961
|
|
@@ -2337,7 +2367,6 @@ var runtime = {
|
|
2337
2367
|
logs: undefined,
|
2338
2368
|
mail: undefined,
|
2339
2369
|
media: undefined,
|
2340
|
-
meeting: undefined,
|
2341
2370
|
meetingRoom: undefined,
|
2342
2371
|
menus: undefined,
|
2343
2372
|
monetization: undefined,
|
@@ -2374,10 +2403,8 @@ var teamsRuntimeConfig = {
|
|
2374
2403
|
bot: {},
|
2375
2404
|
update: {},
|
2376
2405
|
},
|
2377
|
-
files: {},
|
2378
2406
|
logs: {},
|
2379
2407
|
media: {},
|
2380
|
-
meeting: {},
|
2381
2408
|
meetingRoom: {},
|
2382
2409
|
menus: {},
|
2383
2410
|
monetization: {},
|
@@ -2527,7 +2554,8 @@ var dialog;
|
|
2527
2554
|
if (messageFromChildHandler) {
|
2528
2555
|
registerHandler('messageForParent', messageFromChildHandler);
|
2529
2556
|
}
|
2530
|
-
|
2557
|
+
var dialogInfo = getDialogInfoFromUrlDialogInfo(urlDialogInfo);
|
2558
|
+
sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
|
2531
2559
|
submitHandler({ err: err, result: result });
|
2532
2560
|
removeHandler('messageForParent');
|
2533
2561
|
});
|
@@ -2647,7 +2675,8 @@ var dialog;
|
|
2647
2675
|
if (messageFromChildHandler) {
|
2648
2676
|
registerHandler('messageForParent', messageFromChildHandler);
|
2649
2677
|
}
|
2650
|
-
|
2678
|
+
var dialogInfo = getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo);
|
2679
|
+
sendMessageToParent('tasks.startTask', [dialogInfo], function (err, result) {
|
2651
2680
|
submitHandler({ err: err, result: result });
|
2652
2681
|
removeHandler('messageForParent');
|
2653
2682
|
});
|
@@ -2663,6 +2692,45 @@ var dialog;
|
|
2663
2692
|
}
|
2664
2693
|
bot.isSupported = isSupported;
|
2665
2694
|
})(bot = dialog.bot || (dialog.bot = {}));
|
2695
|
+
/**
|
2696
|
+
* @hidden
|
2697
|
+
* Hide from docs
|
2698
|
+
* --------
|
2699
|
+
* Convert UrlDialogInfo to DialogInfo to send the information to host in {@linkcode open} API.
|
2700
|
+
*
|
2701
|
+
* @internal
|
2702
|
+
*/
|
2703
|
+
function getDialogInfoFromUrlDialogInfo(urlDialogInfo) {
|
2704
|
+
var dialogInfo = {
|
2705
|
+
url: urlDialogInfo.url,
|
2706
|
+
height: urlDialogInfo.size ? urlDialogInfo.size.height : DialogDimension.Small,
|
2707
|
+
width: urlDialogInfo.size ? urlDialogInfo.size.width : DialogDimension.Small,
|
2708
|
+
title: urlDialogInfo.title,
|
2709
|
+
fallbackUrl: urlDialogInfo.fallbackUrl,
|
2710
|
+
};
|
2711
|
+
return dialogInfo;
|
2712
|
+
}
|
2713
|
+
dialog.getDialogInfoFromUrlDialogInfo = getDialogInfoFromUrlDialogInfo;
|
2714
|
+
/**
|
2715
|
+
* @hidden
|
2716
|
+
* Hide from docs
|
2717
|
+
* --------
|
2718
|
+
* Convert BotUrlDialogInfo to DialogInfo to send the information to host in {@linkcode bot.open} API.
|
2719
|
+
*
|
2720
|
+
* @internal
|
2721
|
+
*/
|
2722
|
+
function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo) {
|
2723
|
+
var dialogInfo = {
|
2724
|
+
url: botUrlDialogInfo.url,
|
2725
|
+
height: botUrlDialogInfo.size ? botUrlDialogInfo.size.height : DialogDimension.Small,
|
2726
|
+
width: botUrlDialogInfo.size ? botUrlDialogInfo.size.width : DialogDimension.Small,
|
2727
|
+
title: botUrlDialogInfo.title,
|
2728
|
+
fallbackUrl: botUrlDialogInfo.fallbackUrl,
|
2729
|
+
completionBotId: botUrlDialogInfo.completionBotId,
|
2730
|
+
};
|
2731
|
+
return dialogInfo;
|
2732
|
+
}
|
2733
|
+
dialog.getDialogInfoFromBotUrlDialogInfo = getDialogInfoFromBotUrlDialogInfo;
|
2666
2734
|
})(dialog || (dialog = {}));
|
2667
2735
|
|
2668
2736
|
;// CONCATENATED MODULE: ./src/public/menus.ts
|
@@ -5369,10 +5437,9 @@ var location_location;
|
|
5369
5437
|
|
5370
5438
|
|
5371
5439
|
|
5372
|
-
|
5373
|
-
|
5374
5440
|
/**
|
5375
|
-
* @
|
5441
|
+
* @deprecated
|
5442
|
+
* As of 2.0.0-beta.6, use meeting only for backwards compatibility of existing code.
|
5376
5443
|
*/
|
5377
5444
|
var meeting;
|
5378
5445
|
(function (meeting) {
|
@@ -5385,102 +5452,156 @@ var meeting;
|
|
5385
5452
|
MeetingType["Broadcast"] = "Broadcast";
|
5386
5453
|
MeetingType["MeetNow"] = "MeetNow";
|
5387
5454
|
})(MeetingType = meeting.MeetingType || (meeting.MeetingType = {}));
|
5455
|
+
var CallType;
|
5456
|
+
(function (CallType) {
|
5457
|
+
CallType["OneOnOneCall"] = "oneOnOneCall";
|
5458
|
+
CallType["GroupCall"] = "groupCall";
|
5459
|
+
})(CallType = meeting.CallType || (meeting.CallType = {}));
|
5460
|
+
/**
|
5461
|
+
* @deprecated
|
5462
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5463
|
+
*
|
5464
|
+
* Allows an app to get the incoming audio speaker setting for the meeting user
|
5465
|
+
*
|
5466
|
+
* @param callback - Callback contains 2 parameters, error and result.
|
5467
|
+
*
|
5468
|
+
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
5469
|
+
* result can either contain the true/false value, incase of a successful fetch or null when the fetching fails
|
5470
|
+
* result: True means incoming audio is muted and false means incoming audio is unmuted
|
5471
|
+
*/
|
5388
5472
|
function getIncomingClientAudioState(callback) {
|
5473
|
+
if (!callback) {
|
5474
|
+
throw new Error('[get incoming client audio state] Callback cannot be null');
|
5475
|
+
}
|
5389
5476
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5390
|
-
|
5477
|
+
sendMessageToParent('getIncomingClientAudioState', callback);
|
5391
5478
|
}
|
5392
5479
|
meeting.getIncomingClientAudioState = getIncomingClientAudioState;
|
5393
|
-
|
5394
|
-
|
5395
|
-
|
5396
|
-
|
5397
|
-
|
5480
|
+
/**
|
5481
|
+
* @deprecated
|
5482
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5483
|
+
*
|
5484
|
+
* Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
|
5485
|
+
*
|
5486
|
+
* @param callback - Callback contains 2 parameters, error and result.
|
5487
|
+
* error can either contain an error of type SdkError, incase of an error, or null when toggle is successful
|
5488
|
+
* result can either contain the true/false value, incase of a successful toggle or null when the toggling fails
|
5489
|
+
* result: True means incoming audio is muted and false means incoming audio is unmuted
|
5490
|
+
*/
|
5398
5491
|
function toggleIncomingClientAudio(callback) {
|
5492
|
+
if (!callback) {
|
5493
|
+
throw new Error('[toggle incoming client audio] Callback cannot be null');
|
5494
|
+
}
|
5399
5495
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5400
|
-
|
5496
|
+
sendMessageToParent('toggleIncomingClientAudio', callback);
|
5401
5497
|
}
|
5402
5498
|
meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
|
5403
|
-
|
5404
|
-
|
5405
|
-
|
5406
|
-
|
5407
|
-
|
5499
|
+
/**
|
5500
|
+
* @deprecated
|
5501
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5502
|
+
*
|
5503
|
+
* @hidden
|
5504
|
+
* Hide from docs
|
5505
|
+
*
|
5506
|
+
* Allows an app to get the meeting details for the meeting
|
5507
|
+
*
|
5508
|
+
* @param callback - Callback contains 2 parameters, error and meetingDetailsResponse.
|
5509
|
+
* error can either contain an error of type SdkError, incase of an error, or null when get is successful
|
5510
|
+
* result can either contain a IMeetingDetailsResponse value, incase of a successful get or null when the get fails
|
5511
|
+
*
|
5512
|
+
* @internal
|
5513
|
+
*/
|
5408
5514
|
function getMeetingDetails(callback) {
|
5515
|
+
if (!callback) {
|
5516
|
+
throw new Error('[get meeting details] Callback cannot be null');
|
5517
|
+
}
|
5409
5518
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage, FrameContexts.settings, FrameContexts.content);
|
5410
|
-
|
5519
|
+
sendMessageToParent('meeting.getMeetingDetails', callback);
|
5411
5520
|
}
|
5412
5521
|
meeting.getMeetingDetails = getMeetingDetails;
|
5413
|
-
|
5414
|
-
|
5415
|
-
|
5416
|
-
|
5417
|
-
|
5522
|
+
/**
|
5523
|
+
* @deprecated
|
5524
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5525
|
+
*
|
5526
|
+
* @hidden
|
5527
|
+
* Allows an app to get the authentication token for the anonymous or guest user in the meeting
|
5528
|
+
*
|
5529
|
+
* @param callback - Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.
|
5530
|
+
* error can either contain an error of type SdkError, incase of an error, or null when get is successful
|
5531
|
+
* authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails
|
5532
|
+
*
|
5533
|
+
* @internal
|
5534
|
+
*/
|
5418
5535
|
function getAuthenticationTokenForAnonymousUser(callback) {
|
5536
|
+
if (!callback) {
|
5537
|
+
throw new Error('[get Authentication Token For AnonymousUser] Callback cannot be null');
|
5538
|
+
}
|
5419
5539
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5420
|
-
|
5540
|
+
sendMessageToParent('meeting.getAuthenticationTokenForAnonymousUser', callback);
|
5421
5541
|
}
|
5422
5542
|
meeting.getAuthenticationTokenForAnonymousUser = getAuthenticationTokenForAnonymousUser;
|
5423
|
-
|
5424
|
-
|
5425
|
-
|
5426
|
-
|
5427
|
-
|
5428
|
-
|
5429
|
-
|
5430
|
-
|
5431
|
-
|
5543
|
+
/**
|
5544
|
+
* @deprecated
|
5545
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5546
|
+
*
|
5547
|
+
* Allows an app to get the state of the live stream in the current meeting
|
5548
|
+
*
|
5549
|
+
* @param callback - Callback contains 2 parameters: error and liveStreamState.
|
5550
|
+
* error can either contain an error of type SdkError, in case of an error, or null when get is successful
|
5551
|
+
* liveStreamState can either contain a LiveStreamState value, or null when operation fails
|
5552
|
+
*/
|
5432
5553
|
function getLiveStreamState(callback) {
|
5433
|
-
|
5434
|
-
|
5554
|
+
if (!callback) {
|
5555
|
+
throw new Error('[get live stream state] Callback cannot be null');
|
5556
|
+
}
|
5557
|
+
ensureInitialized(FrameContexts.sidePanel);
|
5558
|
+
sendMessageToParent('meeting.getLiveStreamState', callback);
|
5435
5559
|
}
|
5436
5560
|
meeting.getLiveStreamState = getLiveStreamState;
|
5437
|
-
function getLiveStreamStateHelper() {
|
5438
|
-
return new Promise(function (resolve) {
|
5439
|
-
resolve(sendAndHandleSdkError('meeting.getLiveStreamState'));
|
5440
|
-
});
|
5441
|
-
}
|
5442
5561
|
/**
|
5443
|
-
* @
|
5444
|
-
*
|
5445
|
-
*
|
5446
|
-
*
|
5447
|
-
*
|
5448
|
-
* @
|
5449
|
-
*
|
5450
|
-
*
|
5562
|
+
* @deprecated
|
5563
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5564
|
+
*
|
5565
|
+
* Allows an app to request the live streaming be started at the given streaming url
|
5566
|
+
*
|
5567
|
+
* @remarks
|
5568
|
+
* Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
|
5569
|
+
*
|
5570
|
+
* @param streamUrl - the url to the stream resource
|
5571
|
+
* @param streamKey - the key to the stream resource
|
5572
|
+
* @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
|
5451
5573
|
*/
|
5452
|
-
function requestStartLiveStreaming(
|
5453
|
-
|
5454
|
-
|
5455
|
-
var streamUrl;
|
5456
|
-
var streamKey;
|
5457
|
-
var callback;
|
5458
|
-
if (typeof param1 === 'function') {
|
5459
|
-
// Legacy code, with callbacks.
|
5460
|
-
_a = [param1, param2, param3], callback = _a[0], streamUrl = _a[1], streamKey = _a[2];
|
5461
|
-
}
|
5462
|
-
else if (typeof param1 === 'string') {
|
5463
|
-
_b = [param1, param2], streamUrl = _b[0], streamKey = _b[1];
|
5574
|
+
function requestStartLiveStreaming(callback, streamUrl, streamKey) {
|
5575
|
+
if (!callback) {
|
5576
|
+
throw new Error('[request start live streaming] Callback cannot be null');
|
5464
5577
|
}
|
5465
|
-
|
5578
|
+
ensureInitialized(FrameContexts.sidePanel);
|
5579
|
+
sendMessageToParent('meeting.requestStartLiveStreaming', [streamUrl, streamKey], callback);
|
5466
5580
|
}
|
5467
5581
|
meeting.requestStartLiveStreaming = requestStartLiveStreaming;
|
5468
|
-
|
5469
|
-
|
5470
|
-
|
5471
|
-
|
5472
|
-
|
5582
|
+
/**
|
5583
|
+
* @deprecated
|
5584
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5585
|
+
*
|
5586
|
+
* Allows an app to request the live streaming be stopped at the given streaming url
|
5587
|
+
*
|
5588
|
+
* @remarks
|
5589
|
+
* Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
|
5590
|
+
*
|
5591
|
+
* @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
|
5592
|
+
*/
|
5473
5593
|
function requestStopLiveStreaming(callback) {
|
5594
|
+
if (!callback) {
|
5595
|
+
throw new Error('[request stop live streaming] Callback cannot be null');
|
5596
|
+
}
|
5474
5597
|
ensureInitialized(FrameContexts.sidePanel);
|
5475
|
-
|
5598
|
+
sendMessageToParent('meeting.requestStopLiveStreaming', callback);
|
5476
5599
|
}
|
5477
5600
|
meeting.requestStopLiveStreaming = requestStopLiveStreaming;
|
5478
|
-
function requestStopLiveStreamingHelper() {
|
5479
|
-
return new Promise(function (resolve) {
|
5480
|
-
resolve(sendAndHandleSdkError('meeting.requestStopLiveStreaming'));
|
5481
|
-
});
|
5482
|
-
}
|
5483
5601
|
/**
|
5602
|
+
* @deprecated
|
5603
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5604
|
+
*
|
5484
5605
|
* Registers a handler for changes to the live stream.
|
5485
5606
|
*
|
5486
5607
|
* @remarks
|
@@ -5497,81 +5618,90 @@ var meeting;
|
|
5497
5618
|
}
|
5498
5619
|
meeting.registerLiveStreamChangedHandler = registerLiveStreamChangedHandler;
|
5499
5620
|
/**
|
5500
|
-
*
|
5501
|
-
*
|
5502
|
-
*
|
5503
|
-
*
|
5504
|
-
*
|
5505
|
-
* @
|
5621
|
+
* @deprecated
|
5622
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5623
|
+
*
|
5624
|
+
* Allows an app to share contents in the meeting
|
5625
|
+
*
|
5626
|
+
* @param callback - Callback contains 2 parameters, error and result.
|
5627
|
+
* error can either contain an error of type SdkError, incase of an error, or null when share is successful
|
5628
|
+
* result can either contain a true value, incase of a successful share or null when the share fails
|
5629
|
+
* @param appContentUrl - is the input URL which needs to be shared on to the stage
|
5506
5630
|
*/
|
5507
|
-
function shareAppContentToStage(
|
5508
|
-
|
5509
|
-
|
5510
|
-
var appContentUrl;
|
5511
|
-
var callback;
|
5512
|
-
if (typeof param1 === 'function') {
|
5513
|
-
// Legacy callback
|
5514
|
-
_a = [param1, param2], callback = _a[0], appContentUrl = _a[1];
|
5515
|
-
}
|
5516
|
-
else {
|
5517
|
-
appContentUrl = param1;
|
5631
|
+
function shareAppContentToStage(callback, appContentUrl) {
|
5632
|
+
if (!callback) {
|
5633
|
+
throw new Error('[share app content to stage] Callback cannot be null');
|
5518
5634
|
}
|
5519
|
-
|
5635
|
+
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5636
|
+
sendMessageToParent('meeting.shareAppContentToStage', [appContentUrl], callback);
|
5520
5637
|
}
|
5521
5638
|
meeting.shareAppContentToStage = shareAppContentToStage;
|
5522
5639
|
/**
|
5523
|
-
* @
|
5524
|
-
*
|
5525
|
-
*
|
5526
|
-
*
|
5640
|
+
* @deprecated
|
5641
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5642
|
+
*
|
5643
|
+
* Provides information related app's in-meeting sharing capabilities
|
5644
|
+
*
|
5645
|
+
* @param callback - Callback contains 2 parameters, error and result.
|
5646
|
+
* error can either contain an error of type SdkError (error indication), or null (non-error indication)
|
5647
|
+
* appContentStageSharingCapabilities can either contain an IAppContentStageSharingCapabilities object
|
5648
|
+
* (indication of successful retrieval), or null (indication of failed retrieval)
|
5527
5649
|
*/
|
5528
|
-
function shareAppContentToStageHelper(appContentUrl) {
|
5529
|
-
return new Promise(function (resolve) {
|
5530
|
-
resolve(sendAndHandleSdkError('meeting.shareAppContentToStage', appContentUrl));
|
5531
|
-
});
|
5532
|
-
}
|
5533
5650
|
function getAppContentStageSharingCapabilities(callback) {
|
5651
|
+
if (!callback) {
|
5652
|
+
throw new Error('[get app content stage sharing capabilities] Callback cannot be null');
|
5653
|
+
}
|
5534
5654
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5535
|
-
|
5655
|
+
sendMessageToParent('meeting.getAppContentStageSharingCapabilities', callback);
|
5536
5656
|
}
|
5537
5657
|
meeting.getAppContentStageSharingCapabilities = getAppContentStageSharingCapabilities;
|
5538
5658
|
/**
|
5659
|
+
* @deprecated
|
5660
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5661
|
+
*
|
5539
5662
|
* @hidden
|
5540
|
-
*
|
5663
|
+
* Hide from docs.
|
5664
|
+
* Terminates current stage sharing session in meeting
|
5665
|
+
*
|
5666
|
+
* @param callback - Callback contains 2 parameters, error and result.
|
5667
|
+
* error can either contain an error of type SdkError (error indication), or null (non-error indication)
|
5668
|
+
* result can either contain a true boolean value (successful termination), or null (unsuccessful fetch)
|
5541
5669
|
*/
|
5542
|
-
function getAppContentStageSharingCapabilitiesHelper() {
|
5543
|
-
return new Promise(function (resolve) {
|
5544
|
-
resolve(sendAndHandleSdkError('meeting.getAppContentStageSharingCapabilities'));
|
5545
|
-
});
|
5546
|
-
}
|
5547
5670
|
function stopSharingAppContentToStage(callback) {
|
5671
|
+
if (!callback) {
|
5672
|
+
throw new Error('[stop sharing app content to stage] Callback cannot be null');
|
5673
|
+
}
|
5548
5674
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5549
|
-
|
5675
|
+
sendMessageToParent('meeting.stopSharingAppContentToStage', callback);
|
5550
5676
|
}
|
5551
5677
|
meeting.stopSharingAppContentToStage = stopSharingAppContentToStage;
|
5552
5678
|
/**
|
5553
|
-
* @
|
5554
|
-
*
|
5679
|
+
* @deprecated
|
5680
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5681
|
+
*
|
5682
|
+
* Provides information related to current stage sharing state for app
|
5683
|
+
*
|
5684
|
+
* @param callback - Callback contains 2 parameters, error and result.
|
5685
|
+
* error can either contain an error of type SdkError (error indication), or null (non-error indication)
|
5686
|
+
* appContentStageSharingState can either contain an IAppContentStageSharingState object
|
5687
|
+
* (indication of successful retrieval), or null (indication of failed retrieval)
|
5555
5688
|
*/
|
5556
|
-
function stopSharingAppContentToStageHelper() {
|
5557
|
-
return new Promise(function (resolve) {
|
5558
|
-
resolve(sendAndHandleSdkError('meeting.stopSharingAppContentToStage'));
|
5559
|
-
});
|
5560
|
-
}
|
5561
5689
|
function getAppContentStageSharingState(callback) {
|
5690
|
+
if (!callback) {
|
5691
|
+
throw new Error('[get app content stage sharing state] Callback cannot be null');
|
5692
|
+
}
|
5562
5693
|
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5563
|
-
|
5694
|
+
sendMessageToParent('meeting.getAppContentStageSharingState', callback);
|
5564
5695
|
}
|
5565
5696
|
meeting.getAppContentStageSharingState = getAppContentStageSharingState;
|
5566
|
-
function getAppContentStageSharingStateHelper() {
|
5567
|
-
return new Promise(function (resolve) {
|
5568
|
-
resolve(sendAndHandleSdkError('meeting.getAppContentStageSharingState'));
|
5569
|
-
});
|
5570
|
-
}
|
5571
5697
|
/**
|
5698
|
+
* @deprecated
|
5699
|
+
* As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
|
5700
|
+
*
|
5572
5701
|
* Registers a handler for changes to paticipant speaking states. If any participant is speaking, isSpeakingDetected
|
5573
5702
|
* will be true. If no participants are speaking, isSpeakingDetected will be false. Only one handler can be registered
|
5574
5703
|
* at a time. A subsequent registration replaces an existing registration.
|
5704
|
+
*
|
5575
5705
|
* @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).
|
5576
5706
|
*/
|
5577
5707
|
function registerSpeakingStateChangeHandler(handler) {
|
@@ -6801,16 +6931,11 @@ var tasks;
|
|
6801
6931
|
|
6802
6932
|
|
6803
6933
|
|
6804
|
-
|
6805
|
-
|
6806
|
-
|
6807
6934
|
/**
|
6808
6935
|
* @hidden
|
6809
6936
|
* Hide from docs
|
6810
6937
|
* ------
|
6811
6938
|
* Namespace to interact with the files specific part of the SDK.
|
6812
|
-
*
|
6813
|
-
* @alpha
|
6814
6939
|
*/
|
6815
6940
|
var files;
|
6816
6941
|
(function (files_1) {
|
@@ -6883,22 +7008,20 @@ var files;
|
|
6883
7008
|
/**
|
6884
7009
|
* @hidden
|
6885
7010
|
* Hide from docs
|
6886
|
-
* ------
|
6887
|
-
* Gets a list of cloud storage folders added to the channel
|
6888
7011
|
*
|
7012
|
+
* Gets a list of cloud storage folders added to the channel
|
6889
7013
|
* @param channelId - ID of the channel whose cloud storage folders should be retrieved
|
7014
|
+
* @param callback - Callback that will be triggered post folders load
|
6890
7015
|
*/
|
6891
|
-
function getCloudStorageFolders(channelId) {
|
6892
|
-
|
6893
|
-
|
6894
|
-
|
6895
|
-
|
6896
|
-
|
6897
|
-
|
6898
|
-
|
6899
|
-
|
6900
|
-
resolve(sendAndHandleSdkError('files.getCloudStorageFolders', channelId));
|
6901
|
-
});
|
7016
|
+
function getCloudStorageFolders(channelId, callback) {
|
7017
|
+
ensureInitialized(FrameContexts.content);
|
7018
|
+
if (!channelId || channelId.length === 0) {
|
7019
|
+
throw new Error('[files.getCloudStorageFolders] channelId name cannot be null or empty');
|
7020
|
+
}
|
7021
|
+
if (!callback) {
|
7022
|
+
throw new Error('[files.getCloudStorageFolders] Callback cannot be null');
|
7023
|
+
}
|
7024
|
+
sendMessageToParent('files.getCloudStorageFolders', [channelId], callback);
|
6902
7025
|
}
|
6903
7026
|
files_1.getCloudStorageFolders = getCloudStorageFolders;
|
6904
7027
|
/**
|
@@ -6906,82 +7029,76 @@ var files;
|
|
6906
7029
|
* Hide from docs
|
6907
7030
|
* ------
|
6908
7031
|
* Initiates the add cloud storage folder flow
|
7032
|
+
*
|
6909
7033
|
* @param channelId - ID of the channel to add cloud storage folder
|
7034
|
+
* @param callback - Callback that will be triggered post add folder flow is compelete
|
6910
7035
|
*/
|
6911
|
-
function addCloudStorageFolder(channelId) {
|
6912
|
-
|
6913
|
-
|
6914
|
-
|
6915
|
-
|
6916
|
-
|
6917
|
-
|
6918
|
-
|
6919
|
-
|
6920
|
-
resolve(sendMessageToParentAsync('files.addCloudStorageFolder', [channelId]));
|
6921
|
-
}).then(function (_a) {
|
6922
|
-
var error = _a[0], isFolderAdded = _a[1], folders = _a[2];
|
6923
|
-
if (error) {
|
6924
|
-
throw error;
|
6925
|
-
}
|
6926
|
-
var result = [isFolderAdded, folders];
|
6927
|
-
return result;
|
6928
|
-
});
|
7036
|
+
function addCloudStorageFolder(channelId, callback) {
|
7037
|
+
ensureInitialized(FrameContexts.content);
|
7038
|
+
if (!channelId || channelId.length === 0) {
|
7039
|
+
throw new Error('[files.addCloudStorageFolder] channelId name cannot be null or empty');
|
7040
|
+
}
|
7041
|
+
if (!callback) {
|
7042
|
+
throw new Error('[files.addCloudStorageFolder] Callback cannot be null');
|
7043
|
+
}
|
7044
|
+
sendMessageToParent('files.addCloudStorageFolder', [channelId], callback);
|
6929
7045
|
}
|
6930
7046
|
files_1.addCloudStorageFolder = addCloudStorageFolder;
|
6931
7047
|
/**
|
6932
7048
|
* @hidden
|
6933
7049
|
* Hide from docs
|
6934
7050
|
* ------
|
7051
|
+
*
|
6935
7052
|
* Deletes a cloud storage folder from channel
|
6936
7053
|
*
|
6937
7054
|
* @param channelId - ID of the channel where folder is to be deleted
|
6938
7055
|
* @param folderToDelete - cloud storage folder to be deleted
|
7056
|
+
* @param callback - Callback that will be triggered post delete
|
6939
7057
|
*/
|
6940
|
-
function deleteCloudStorageFolder(channelId, folderToDelete) {
|
6941
|
-
|
6942
|
-
|
6943
|
-
|
6944
|
-
|
6945
|
-
|
6946
|
-
|
6947
|
-
|
6948
|
-
|
6949
|
-
|
6950
|
-
|
6951
|
-
|
6952
|
-
resolve(sendAndHandleSdkError('files.deleteCloudStorageFolder', channelId, folderToDelete));
|
6953
|
-
});
|
7058
|
+
function deleteCloudStorageFolder(channelId, folderToDelete, callback) {
|
7059
|
+
ensureInitialized(FrameContexts.content);
|
7060
|
+
if (!channelId) {
|
7061
|
+
throw new Error('[files.deleteCloudStorageFolder] channelId name cannot be null or empty');
|
7062
|
+
}
|
7063
|
+
if (!folderToDelete) {
|
7064
|
+
throw new Error('[files.deleteCloudStorageFolder] folderToDelete cannot be null or empty');
|
7065
|
+
}
|
7066
|
+
if (!callback) {
|
7067
|
+
throw new Error('[files.deleteCloudStorageFolder] Callback cannot be null');
|
7068
|
+
}
|
7069
|
+
sendMessageToParent('files.deleteCloudStorageFolder', [channelId, folderToDelete], callback);
|
6954
7070
|
}
|
6955
7071
|
files_1.deleteCloudStorageFolder = deleteCloudStorageFolder;
|
6956
7072
|
/**
|
6957
7073
|
* @hidden
|
6958
7074
|
* Hide from docs
|
6959
7075
|
* ------
|
7076
|
+
*
|
6960
7077
|
* Fetches the contents of a Cloud storage folder (CloudStorageFolder) / sub directory
|
6961
7078
|
*
|
6962
7079
|
* @param folder - Cloud storage folder (CloudStorageFolder) / sub directory (CloudStorageFolderItem)
|
6963
7080
|
* @param providerCode - Code of the cloud storage folder provider
|
7081
|
+
* @param callback - Callback that will be triggered post contents are loaded
|
6964
7082
|
*/
|
6965
|
-
function getCloudStorageFolderContents(folder, providerCode) {
|
6966
|
-
|
6967
|
-
|
6968
|
-
|
6969
|
-
|
6970
|
-
|
6971
|
-
|
6972
|
-
|
6973
|
-
|
6974
|
-
|
6975
|
-
|
6976
|
-
|
6977
|
-
resolve(sendAndHandleSdkError('files.getCloudStorageFolderContents', folder, providerCode));
|
6978
|
-
});
|
7083
|
+
function getCloudStorageFolderContents(folder, providerCode, callback) {
|
7084
|
+
ensureInitialized(FrameContexts.content);
|
7085
|
+
if (!folder || !providerCode) {
|
7086
|
+
throw new Error('[files.getCloudStorageFolderContents] folder/providerCode name cannot be null or empty');
|
7087
|
+
}
|
7088
|
+
if (!callback) {
|
7089
|
+
throw new Error('[files.getCloudStorageFolderContents] Callback cannot be null');
|
7090
|
+
}
|
7091
|
+
if ('isSubdirectory' in folder && !folder.isSubdirectory) {
|
7092
|
+
throw new Error('[files.getCloudStorageFolderContents] provided folder is not a subDirectory');
|
7093
|
+
}
|
7094
|
+
sendMessageToParent('files.getCloudStorageFolderContents', [folder, providerCode], callback);
|
6979
7095
|
}
|
6980
7096
|
files_1.getCloudStorageFolderContents = getCloudStorageFolderContents;
|
6981
7097
|
/**
|
6982
7098
|
* @hidden
|
6983
7099
|
* Hide from docs
|
6984
7100
|
* ------
|
7101
|
+
*
|
6985
7102
|
* Open a cloud storage file in teams
|
6986
7103
|
*
|
6987
7104
|
* @param file - cloud storage file that should be opened
|
@@ -6990,9 +7107,6 @@ var files;
|
|
6990
7107
|
*/
|
6991
7108
|
function openCloudStorageFile(file, providerCode, fileOpenPreference) {
|
6992
7109
|
ensureInitialized(FrameContexts.content);
|
6993
|
-
if (!isSupported()) {
|
6994
|
-
throw errorNotSupportedOnPlatform;
|
6995
|
-
}
|
6996
7110
|
if (!file || !providerCode) {
|
6997
7111
|
throw new Error('[files.openCloudStorageFile] file/providerCode cannot be null or empty');
|
6998
7112
|
}
|
@@ -7002,38 +7116,6 @@ var files;
|
|
7002
7116
|
sendMessageToParent('files.openCloudStorageFile', [file, providerCode, fileOpenPreference]);
|
7003
7117
|
}
|
7004
7118
|
files_1.openCloudStorageFile = openCloudStorageFile;
|
7005
|
-
/**
|
7006
|
-
* @hidden
|
7007
|
-
* Hide from docs.
|
7008
|
-
* ------
|
7009
|
-
* Opens a client-friendly preview of the specified file.
|
7010
|
-
*
|
7011
|
-
* @param file - The file to preview.
|
7012
|
-
*/
|
7013
|
-
function openFilePreview(filePreviewParameters) {
|
7014
|
-
ensureInitialized(FrameContexts.content);
|
7015
|
-
if (!isSupported()) {
|
7016
|
-
throw errorNotSupportedOnPlatform;
|
7017
|
-
}
|
7018
|
-
var params = [
|
7019
|
-
filePreviewParameters.entityId,
|
7020
|
-
filePreviewParameters.title,
|
7021
|
-
filePreviewParameters.description,
|
7022
|
-
filePreviewParameters.type,
|
7023
|
-
filePreviewParameters.objectUrl,
|
7024
|
-
filePreviewParameters.downloadUrl,
|
7025
|
-
filePreviewParameters.webPreviewUrl,
|
7026
|
-
filePreviewParameters.webEditUrl,
|
7027
|
-
filePreviewParameters.baseUrl,
|
7028
|
-
filePreviewParameters.editFile,
|
7029
|
-
filePreviewParameters.subEntityId,
|
7030
|
-
filePreviewParameters.viewerAction,
|
7031
|
-
filePreviewParameters.fileOpenPreference,
|
7032
|
-
filePreviewParameters.conversationId,
|
7033
|
-
];
|
7034
|
-
sendMessageToParent('openFilePreview', params);
|
7035
|
-
}
|
7036
|
-
files_1.openFilePreview = openFilePreview;
|
7037
7119
|
/**
|
7038
7120
|
* @hidden
|
7039
7121
|
* Allow 1st party apps to call this function to get the external
|
@@ -7041,15 +7123,13 @@ var files;
|
|
7041
7123
|
* @param excludeAddedProviders: return a list of support third party
|
7042
7124
|
* cloud storages that hasn't been added yet.
|
7043
7125
|
*/
|
7044
|
-
function getExternalProviders(excludeAddedProviders) {
|
7126
|
+
function getExternalProviders(excludeAddedProviders, callback) {
|
7045
7127
|
if (excludeAddedProviders === void 0) { excludeAddedProviders = false; }
|
7046
|
-
|
7047
|
-
|
7048
|
-
|
7049
|
-
|
7050
|
-
|
7051
|
-
resolve(sendAndHandleSdkError('files.getExternalProviders', excludeAddedProviders));
|
7052
|
-
});
|
7128
|
+
ensureInitialized(FrameContexts.content);
|
7129
|
+
if (!callback) {
|
7130
|
+
throw new Error('[files.getExternalProviders] Callback cannot be null');
|
7131
|
+
}
|
7132
|
+
sendMessageToParent('files.getExternalProviders', [excludeAddedProviders], callback);
|
7053
7133
|
}
|
7054
7134
|
files_1.getExternalProviders = getExternalProviders;
|
7055
7135
|
/**
|
@@ -7057,42 +7137,41 @@ var files;
|
|
7057
7137
|
* Allow 1st party apps to call this function to move files
|
7058
7138
|
* among SharePoint and third party cloud storages.
|
7059
7139
|
*/
|
7060
|
-
function copyMoveFiles(selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove) {
|
7140
|
+
function copyMoveFiles(selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove, callback) {
|
7061
7141
|
if (isMove === void 0) { isMove = false; }
|
7062
|
-
|
7063
|
-
|
7064
|
-
|
7065
|
-
|
7066
|
-
|
7067
|
-
|
7068
|
-
|
7069
|
-
|
7070
|
-
|
7071
|
-
|
7072
|
-
|
7073
|
-
|
7074
|
-
|
7075
|
-
|
7076
|
-
|
7077
|
-
|
7078
|
-
|
7079
|
-
resolve(sendAndHandleSdkError('files.copyMoveFiles', selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove));
|
7080
|
-
});
|
7142
|
+
ensureInitialized(FrameContexts.content);
|
7143
|
+
if (!selectedFiles || selectedFiles.length === 0) {
|
7144
|
+
throw new Error('[files.copyMoveFiles] selectedFiles cannot be null or empty');
|
7145
|
+
}
|
7146
|
+
if (!providerCode) {
|
7147
|
+
throw new Error('[files.copyMoveFiles] providerCode cannot be null or empty');
|
7148
|
+
}
|
7149
|
+
if (!destinationFolder) {
|
7150
|
+
throw new Error('[files.copyMoveFiles] destinationFolder cannot be null or empty');
|
7151
|
+
}
|
7152
|
+
if (!destinationProviderCode) {
|
7153
|
+
throw new Error('[files.copyMoveFiles] destinationProviderCode cannot be null or empty');
|
7154
|
+
}
|
7155
|
+
if (!callback) {
|
7156
|
+
throw new Error('[files.copyMoveFiles] callback cannot be null');
|
7157
|
+
}
|
7158
|
+
sendMessageToParent('files.copyMoveFiles', [selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove], callback);
|
7081
7159
|
}
|
7082
7160
|
files_1.copyMoveFiles = copyMoveFiles;
|
7083
|
-
|
7084
|
-
|
7085
|
-
|
7086
|
-
|
7161
|
+
/**
|
7162
|
+
* @hidden
|
7163
|
+
* Hide from docs
|
7164
|
+
* ------
|
7165
|
+
*
|
7166
|
+
* Gets list of downloads for current user
|
7167
|
+
* @param callback Callback that will be triggered post downloads load
|
7168
|
+
*/
|
7087
7169
|
function getFileDownloads(callback) {
|
7088
7170
|
ensureInitialized(FrameContexts.content);
|
7089
|
-
if (!
|
7090
|
-
throw
|
7171
|
+
if (!callback) {
|
7172
|
+
throw new Error('[files.getFileDownloads] Callback cannot be null');
|
7091
7173
|
}
|
7092
|
-
|
7093
|
-
return new Promise(function (resolve) { return resolve(sendAndHandleSdkError('files.getFileDownloads', [])); });
|
7094
|
-
};
|
7095
|
-
return callCallbackWithErrorOrResultFromPromiseAndReturnPromise(wrappedFunction, callback);
|
7174
|
+
sendMessageToParent('files.getFileDownloads', [], callback);
|
7096
7175
|
}
|
7097
7176
|
files_1.getFileDownloads = getFileDownloads;
|
7098
7177
|
/**
|
@@ -7100,15 +7179,12 @@ var files;
|
|
7100
7179
|
* Hide from docs
|
7101
7180
|
*
|
7102
7181
|
* Open download preference folder if fileObjectId value is undefined else open folder containing the file with id fileObjectId
|
7103
|
-
* @param fileObjectId Id of the file whose containing folder should be opened
|
7182
|
+
* @param fileObjectId - Id of the file whose containing folder should be opened
|
7104
7183
|
* @param callback Callback that will be triggered post open download folder/path
|
7105
7184
|
*/
|
7106
7185
|
function openDownloadFolder(fileObjectId, callback) {
|
7107
7186
|
if (fileObjectId === void 0) { fileObjectId = undefined; }
|
7108
7187
|
ensureInitialized(FrameContexts.content);
|
7109
|
-
if (!isSupported()) {
|
7110
|
-
throw errorNotSupportedOnPlatform;
|
7111
|
-
}
|
7112
7188
|
if (!callback) {
|
7113
7189
|
throw new Error('[files.openDownloadFolder] Callback cannot be null');
|
7114
7190
|
}
|