@microsoft/teams-js 2.0.0-beta.7 → 2.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -8
- package/dist/MicrosoftTeams.d.ts +332 -20
- package/dist/MicrosoftTeams.js +320 -1
- 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 -33
package/dist/MicrosoftTeams.js
CHANGED
@@ -1092,6 +1092,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1092
1092
|
"pages": () => (/* reexport */ pages),
|
1093
1093
|
"people": () => (/* reexport */ people),
|
1094
1094
|
"print": () => (/* reexport */ print),
|
1095
|
+
"profile": () => (/* reexport */ profile),
|
1095
1096
|
"registerAppButtonClickHandler": () => (/* reexport */ registerAppButtonClickHandler),
|
1096
1097
|
"registerAppButtonHoverEnterHandler": () => (/* reexport */ registerAppButtonHoverEnterHandler),
|
1097
1098
|
"registerAppButtonHoverLeaveHandler": () => (/* reexport */ registerAppButtonHoverLeaveHandler),
|
@@ -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.
|
1125
|
+
var version = "2.1.0-beta.0";
|
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.
|
@@ -2377,6 +2378,7 @@ var runtime = {
|
|
2377
2378
|
fullTrust: undefined,
|
2378
2379
|
},
|
2379
2380
|
people: undefined,
|
2381
|
+
profile: undefined,
|
2380
2382
|
remoteCamera: undefined,
|
2381
2383
|
sharing: undefined,
|
2382
2384
|
teams: {
|
@@ -5687,6 +5689,19 @@ var location_location;
|
|
5687
5689
|
|
5688
5690
|
var meeting;
|
5689
5691
|
(function (meeting) {
|
5692
|
+
/**
|
5693
|
+
* Different types of meeting reactions that can be sent/received
|
5694
|
+
*
|
5695
|
+
* @beta
|
5696
|
+
*/
|
5697
|
+
var MeetingReactionType;
|
5698
|
+
(function (MeetingReactionType) {
|
5699
|
+
MeetingReactionType["like"] = "like";
|
5700
|
+
MeetingReactionType["heart"] = "heart";
|
5701
|
+
MeetingReactionType["laugh"] = "laugh";
|
5702
|
+
MeetingReactionType["surprised"] = "surprised";
|
5703
|
+
MeetingReactionType["applause"] = "applause";
|
5704
|
+
})(MeetingReactionType = meeting.MeetingReactionType || (meeting.MeetingReactionType = {}));
|
5690
5705
|
var MeetingType;
|
5691
5706
|
(function (MeetingType) {
|
5692
5707
|
MeetingType["Unknown"] = "Unknown";
|
@@ -5917,6 +5932,40 @@ var meeting;
|
|
5917
5932
|
registerHandler('meeting.speakingStateChanged', handler);
|
5918
5933
|
}
|
5919
5934
|
meeting.registerSpeakingStateChangeHandler = registerSpeakingStateChangeHandler;
|
5935
|
+
/**
|
5936
|
+
* Registers a handler for changes to the selfParticipant's (current user's) raiseHandState. If the selfParticipant raises their hand, isHandRaised
|
5937
|
+
* will be true. By default and if the selfParticipant hand is lowered, isHandRaised will be false. This API will return {@link RaiseHandStateChangedEvent}
|
5938
|
+
* that will have the raiseHandState or an error object. Only one handler can be registered at a time. A subsequent registration
|
5939
|
+
* replaces an existing registration.
|
5940
|
+
*
|
5941
|
+
* @param handler The handler to invoke when the selfParticipant's (current user's) raiseHandState changes.
|
5942
|
+
*
|
5943
|
+
* @beta
|
5944
|
+
*/
|
5945
|
+
function registerRaiseHandStateChangedHandler(handler) {
|
5946
|
+
if (!handler) {
|
5947
|
+
throw new Error('[registerRaiseHandStateChangedHandler] Handler cannot be null');
|
5948
|
+
}
|
5949
|
+
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5950
|
+
registerHandler('meeting.raiseHandStateChanged', handler);
|
5951
|
+
}
|
5952
|
+
meeting.registerRaiseHandStateChangedHandler = registerRaiseHandStateChangedHandler;
|
5953
|
+
/**
|
5954
|
+
* Registers a handler for receiving meeting reactions. When the selfParticipant (current user) successfully sends a meeting reaction and it is being rendered on the UI, the meetingReactionType will be populated. Only one handler can be registered
|
5955
|
+
* at a time. A subsequent registration replaces an existing registration.
|
5956
|
+
*
|
5957
|
+
* @param handler The handler to invoke when the selfParticipant (current user) successfully sends a meeting reaction
|
5958
|
+
*
|
5959
|
+
* @beta
|
5960
|
+
*/
|
5961
|
+
function registerMeetingReactionReceivedHandler(handler) {
|
5962
|
+
if (!handler) {
|
5963
|
+
throw new Error('[registerMeetingReactionReceivedHandler] Handler cannot be null');
|
5964
|
+
}
|
5965
|
+
ensureInitialized(FrameContexts.sidePanel, FrameContexts.meetingStage);
|
5966
|
+
registerHandler('meeting.meetingReactionReceived', handler);
|
5967
|
+
}
|
5968
|
+
meeting.registerMeetingReactionReceivedHandler = registerMeetingReactionReceivedHandler;
|
5920
5969
|
})(meeting || (meeting = {}));
|
5921
5970
|
|
5922
5971
|
;// CONCATENATED MODULE: ./src/public/monetization.ts
|
@@ -6103,6 +6152,115 @@ var people;
|
|
6103
6152
|
people_1.isSupported = isSupported;
|
6104
6153
|
})(people || (people = {}));
|
6105
6154
|
|
6155
|
+
;// CONCATENATED MODULE: ./src/internal/profileUtil.ts
|
6156
|
+
/**
|
6157
|
+
* @hidden
|
6158
|
+
* Validates the request parameters
|
6159
|
+
* @param showProfileRequest The request parameters
|
6160
|
+
* @returns true if the parameters are valid, false otherwise
|
6161
|
+
*
|
6162
|
+
* @internal
|
6163
|
+
*/
|
6164
|
+
function validateShowProfileRequest(showProfileRequest) {
|
6165
|
+
if (!showProfileRequest) {
|
6166
|
+
return [false, 'A request object is required'];
|
6167
|
+
}
|
6168
|
+
// Validate modality
|
6169
|
+
if (showProfileRequest.modality && typeof showProfileRequest.modality !== 'string') {
|
6170
|
+
return [false, 'modality must be a string'];
|
6171
|
+
}
|
6172
|
+
// Validate targetElementBoundingRect
|
6173
|
+
if (!showProfileRequest.targetElementBoundingRect ||
|
6174
|
+
typeof showProfileRequest.targetElementBoundingRect !== 'object') {
|
6175
|
+
return [false, 'targetElementBoundingRect must be a DOMRect'];
|
6176
|
+
}
|
6177
|
+
// Validate triggerType
|
6178
|
+
if (!showProfileRequest.triggerType || typeof showProfileRequest.triggerType !== 'string') {
|
6179
|
+
return [false, 'triggerType must be a valid string'];
|
6180
|
+
}
|
6181
|
+
return validatePersona(showProfileRequest.persona);
|
6182
|
+
}
|
6183
|
+
/**
|
6184
|
+
* @hidden
|
6185
|
+
* Validates the persona that is used to resolve the profile target
|
6186
|
+
* @param persona The persona object
|
6187
|
+
* @returns true if the persona is valid, false otherwise
|
6188
|
+
*
|
6189
|
+
* @internal
|
6190
|
+
*/
|
6191
|
+
function validatePersona(persona) {
|
6192
|
+
if (!persona) {
|
6193
|
+
return [false, 'persona object must be provided'];
|
6194
|
+
}
|
6195
|
+
if (persona.displayName && typeof persona.displayName !== 'string') {
|
6196
|
+
return [false, 'displayName must be a string'];
|
6197
|
+
}
|
6198
|
+
if (!persona.identifiers || typeof persona.identifiers !== 'object') {
|
6199
|
+
return [false, 'persona identifiers object must be provided'];
|
6200
|
+
}
|
6201
|
+
if (!persona.identifiers.AadObjectId && !persona.identifiers.Smtp && !persona.identifiers.Upn) {
|
6202
|
+
return [false, 'at least one valid identifier must be provided'];
|
6203
|
+
}
|
6204
|
+
if (persona.identifiers.AadObjectId && typeof persona.identifiers.AadObjectId !== 'string') {
|
6205
|
+
return [false, 'AadObjectId identifier must be a string'];
|
6206
|
+
}
|
6207
|
+
if (persona.identifiers.Smtp && typeof persona.identifiers.Smtp !== 'string') {
|
6208
|
+
return [false, 'Smtp identifier must be a string'];
|
6209
|
+
}
|
6210
|
+
if (persona.identifiers.Upn && typeof persona.identifiers.Upn !== 'string') {
|
6211
|
+
return [false, 'Upn identifier must be a string'];
|
6212
|
+
}
|
6213
|
+
return [true, undefined];
|
6214
|
+
}
|
6215
|
+
|
6216
|
+
;// CONCATENATED MODULE: ./src/public/profile.ts
|
6217
|
+
|
6218
|
+
|
6219
|
+
|
6220
|
+
|
6221
|
+
|
6222
|
+
|
6223
|
+
/**
|
6224
|
+
* Namespace for profile related APIs.
|
6225
|
+
*
|
6226
|
+
* @beta
|
6227
|
+
*/
|
6228
|
+
var profile;
|
6229
|
+
(function (profile) {
|
6230
|
+
/**
|
6231
|
+
* Opens a profile card at a specified position to show profile information about a persona.
|
6232
|
+
* @param showProfileRequest The parameters to position the card and identify the target user.
|
6233
|
+
* @returns Promise that will be fulfilled when the operation has completed
|
6234
|
+
*/
|
6235
|
+
function showProfile(showProfileRequest) {
|
6236
|
+
ensureInitialized(FrameContexts.content);
|
6237
|
+
return new Promise(function (resolve) {
|
6238
|
+
var _a = validateShowProfileRequest(showProfileRequest), isValid = _a[0], message = _a[1];
|
6239
|
+
if (!isValid) {
|
6240
|
+
throw { errorCode: ErrorCode.INVALID_ARGUMENTS, message: message };
|
6241
|
+
}
|
6242
|
+
// Convert the app provided parameters to the form suitable for postMessage.
|
6243
|
+
var requestInternal = {
|
6244
|
+
modality: showProfileRequest.modality,
|
6245
|
+
persona: showProfileRequest.persona,
|
6246
|
+
triggerType: showProfileRequest.triggerType,
|
6247
|
+
targetRectangle: {
|
6248
|
+
x: showProfileRequest.targetElementBoundingRect.x,
|
6249
|
+
y: showProfileRequest.targetElementBoundingRect.y,
|
6250
|
+
width: showProfileRequest.targetElementBoundingRect.width,
|
6251
|
+
height: showProfileRequest.targetElementBoundingRect.height,
|
6252
|
+
},
|
6253
|
+
};
|
6254
|
+
resolve(sendAndHandleSdkError('profile.showProfile', requestInternal));
|
6255
|
+
});
|
6256
|
+
}
|
6257
|
+
profile.showProfile = showProfile;
|
6258
|
+
function isSupported() {
|
6259
|
+
return runtime.supports.profile ? true : false;
|
6260
|
+
}
|
6261
|
+
profile.isSupported = isSupported;
|
6262
|
+
})(profile || (profile = {}));
|
6263
|
+
|
6106
6264
|
;// CONCATENATED MODULE: ./src/public/video.ts
|
6107
6265
|
|
6108
6266
|
|
@@ -7146,6 +7304,7 @@ var tasks;
|
|
7146
7304
|
|
7147
7305
|
|
7148
7306
|
|
7307
|
+
|
7149
7308
|
|
7150
7309
|
|
7151
7310
|
|
@@ -7153,6 +7312,7 @@ var tasks;
|
|
7153
7312
|
|
7154
7313
|
|
7155
7314
|
|
7315
|
+
|
7156
7316
|
/**
|
7157
7317
|
* @hidden
|
7158
7318
|
* Hide from docs
|
@@ -7227,6 +7387,18 @@ var files;
|
|
7227
7387
|
FileDownloadStatus["Downloading"] = "Downloading";
|
7228
7388
|
FileDownloadStatus["Failed"] = "Failed";
|
7229
7389
|
})(FileDownloadStatus = files_1.FileDownloadStatus || (files_1.FileDownloadStatus = {}));
|
7390
|
+
/**
|
7391
|
+
* @hidden
|
7392
|
+
* Hide from docs
|
7393
|
+
*
|
7394
|
+
* Actions specific to 3P cloud storage provider file and / or account
|
7395
|
+
*/
|
7396
|
+
var CloudStorageProviderFileAction;
|
7397
|
+
(function (CloudStorageProviderFileAction) {
|
7398
|
+
CloudStorageProviderFileAction["Download"] = "DOWNLOAD";
|
7399
|
+
CloudStorageProviderFileAction["Upload"] = "UPLOAD";
|
7400
|
+
CloudStorageProviderFileAction["Delete"] = "DELETE";
|
7401
|
+
})(CloudStorageProviderFileAction = files_1.CloudStorageProviderFileAction || (files_1.CloudStorageProviderFileAction = {}));
|
7230
7402
|
/**
|
7231
7403
|
* @hidden
|
7232
7404
|
* Hide from docs
|
@@ -7413,6 +7585,153 @@ var files;
|
|
7413
7585
|
sendMessageToParent('files.openDownloadFolder', [fileObjectId], callback);
|
7414
7586
|
}
|
7415
7587
|
files_1.openDownloadFolder = openDownloadFolder;
|
7588
|
+
/**
|
7589
|
+
* @hidden
|
7590
|
+
* Hide from docs
|
7591
|
+
*
|
7592
|
+
* Initiates add 3P cloud storage provider flow, where a pop up window opens for user to select required
|
7593
|
+
* 3P provider from the configured policy supported 3P provider list, following which user authentication
|
7594
|
+
* for selected 3P provider is performed on success of which the selected 3P provider support is added for user
|
7595
|
+
*
|
7596
|
+
* @param callback Callback that will be triggered post add 3P cloud storage provider action
|
7597
|
+
*/
|
7598
|
+
function addCloudStorageProvider(callback) {
|
7599
|
+
ensureInitialized(FrameContexts.content);
|
7600
|
+
if (!callback) {
|
7601
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.addCloudStorageProvider] callback cannot be null');
|
7602
|
+
}
|
7603
|
+
sendMessageToParent('files.addCloudStorageProvider', [], callback);
|
7604
|
+
}
|
7605
|
+
files_1.addCloudStorageProvider = addCloudStorageProvider;
|
7606
|
+
/**
|
7607
|
+
* @hidden
|
7608
|
+
* Hide from docs
|
7609
|
+
*
|
7610
|
+
* Initiates signout of 3P cloud storage provider flow, which will remove the selected
|
7611
|
+
* 3P cloud storage provider from the list of added providers. No other user input and / or action
|
7612
|
+
* is required except the 3P cloud storage provider to signout from
|
7613
|
+
*
|
7614
|
+
* @param logoutRequest 3P cloud storage provider remove action request content
|
7615
|
+
* @param callback Callback that will be triggered post signout of 3P cloud storage provider action
|
7616
|
+
*/
|
7617
|
+
function removeCloudStorageProvider(logoutRequest, callback) {
|
7618
|
+
ensureInitialized(FrameContexts.content);
|
7619
|
+
if (!callback) {
|
7620
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.removeCloudStorageProvider] callback cannot be null');
|
7621
|
+
}
|
7622
|
+
if (!(logoutRequest && logoutRequest.content)) {
|
7623
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing');
|
7624
|
+
}
|
7625
|
+
sendMessageToParent('files.removeCloudStorageProvider', [logoutRequest], callback);
|
7626
|
+
}
|
7627
|
+
files_1.removeCloudStorageProvider = removeCloudStorageProvider;
|
7628
|
+
/**
|
7629
|
+
* @hidden
|
7630
|
+
* Hide from docs
|
7631
|
+
*
|
7632
|
+
* Initiates the add 3P cloud storage file flow, which will add a new file for the given 3P provider
|
7633
|
+
*
|
7634
|
+
* @param addNewFileRequest 3P cloud storage provider add action request content
|
7635
|
+
* @param callback Callback that will be triggered post adding a new file flow is finished
|
7636
|
+
*/
|
7637
|
+
function addCloudStorageProviderFile(addNewFileRequest, callback) {
|
7638
|
+
ensureInitialized(FrameContexts.content);
|
7639
|
+
if (!callback) {
|
7640
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.addCloudStorageProviderFile] callback cannot be null');
|
7641
|
+
}
|
7642
|
+
if (!(addNewFileRequest && addNewFileRequest.content)) {
|
7643
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing');
|
7644
|
+
}
|
7645
|
+
sendMessageToParent('files.addCloudStorageProviderFile', [addNewFileRequest], callback);
|
7646
|
+
}
|
7647
|
+
files_1.addCloudStorageProviderFile = addCloudStorageProviderFile;
|
7648
|
+
/**
|
7649
|
+
* @hidden
|
7650
|
+
* Hide from docs
|
7651
|
+
*
|
7652
|
+
* Initiates the rename 3P cloud storage file flow, which will rename an existing file in the given 3P provider
|
7653
|
+
*
|
7654
|
+
* @param renameFileRequest 3P cloud storage provider rename action request content
|
7655
|
+
* @param callback Callback that will be triggered post renaming an existing file flow is finished
|
7656
|
+
*/
|
7657
|
+
function renameCloudStorageProviderFile(renameFileRequest, callback) {
|
7658
|
+
ensureInitialized(FrameContexts.content);
|
7659
|
+
if (!callback) {
|
7660
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.renameCloudStorageProviderFile] callback cannot be null');
|
7661
|
+
}
|
7662
|
+
if (!(renameFileRequest && renameFileRequest.content)) {
|
7663
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing');
|
7664
|
+
}
|
7665
|
+
sendMessageToParent('files.renameCloudStorageProviderFile', [renameFileRequest], callback);
|
7666
|
+
}
|
7667
|
+
files_1.renameCloudStorageProviderFile = renameCloudStorageProviderFile;
|
7668
|
+
/**
|
7669
|
+
* @hidden
|
7670
|
+
* Hide from docs
|
7671
|
+
*
|
7672
|
+
* Initiates the 3P cloud storage provider file action (Upload / Download / Delete) flow
|
7673
|
+
*
|
7674
|
+
* Upload Action : Allows uploading file(s) to the given 3P cloud storage provider
|
7675
|
+
* Download Action : Allows downloading file(s) from the given 3P cloud storage provider
|
7676
|
+
* Delete Action : Allows deleting file(s) from the given 3P cloud storage provider
|
7677
|
+
*
|
7678
|
+
* @param cloudStorageProviderFileActionRequest 3P cloud storage provider file action (Upload / Download / Delete) request content
|
7679
|
+
* @param callback Callback that will be triggered post 3P cloud storage action
|
7680
|
+
*/
|
7681
|
+
function performCloudStorageProviderFileAction(cloudStorageProviderFileActionRequest, callback) {
|
7682
|
+
ensureInitialized(FrameContexts.content);
|
7683
|
+
if (!callback) {
|
7684
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.performCloudStorageProviderFileAction] callback cannot be null');
|
7685
|
+
}
|
7686
|
+
if (!(cloudStorageProviderFileActionRequest && cloudStorageProviderFileActionRequest.content)) {
|
7687
|
+
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.performCloudStorageProviderFileAction] 3P cloud storage provider request content is missing');
|
7688
|
+
}
|
7689
|
+
sendMessageToParent('files.performCloudStorageProviderFileAction', [cloudStorageProviderFileActionRequest], callback);
|
7690
|
+
}
|
7691
|
+
files_1.performCloudStorageProviderFileAction = performCloudStorageProviderFileAction;
|
7692
|
+
/**
|
7693
|
+
* @hidden
|
7694
|
+
* Hide from docs
|
7695
|
+
*
|
7696
|
+
* Register a handler to be called when a user's 3P cloud storage provider list changes i.e.
|
7697
|
+
* post adding / removing a 3P provider, list is updated
|
7698
|
+
*
|
7699
|
+
* @param handler - When 3P cloud storage provider list is updated this handler is called
|
7700
|
+
*
|
7701
|
+
*/
|
7702
|
+
function registerCloudStorageProviderListChangeHandler(handler) {
|
7703
|
+
ensureInitialized();
|
7704
|
+
if (!handler) {
|
7705
|
+
throw new Error('[registerCloudStorageProviderListChangeHandler] Handler cannot be null');
|
7706
|
+
}
|
7707
|
+
registerHandler('files.cloudStorageProviderList', handler);
|
7708
|
+
}
|
7709
|
+
files_1.registerCloudStorageProviderListChangeHandler = registerCloudStorageProviderListChangeHandler;
|
7710
|
+
/**
|
7711
|
+
* @hidden
|
7712
|
+
* Hide from docs
|
7713
|
+
*
|
7714
|
+
* Register a handler to be called when a user's 3P cloud storage provider content changes i.e.
|
7715
|
+
* when file(s) is/are added / renamed / deleted / uploaded, the list of files is updated
|
7716
|
+
*
|
7717
|
+
* @param handler - When 3P cloud storage provider content is updated this handler is called
|
7718
|
+
*
|
7719
|
+
*/
|
7720
|
+
function registerCloudStorageProviderContentChangeHandler(handler) {
|
7721
|
+
ensureInitialized();
|
7722
|
+
if (!handler) {
|
7723
|
+
throw new Error('[registerCloudStorageProviderContentChangeHandler] Handler cannot be null');
|
7724
|
+
}
|
7725
|
+
registerHandler('files.cloudStorageProviderContent', handler);
|
7726
|
+
}
|
7727
|
+
files_1.registerCloudStorageProviderContentChangeHandler = registerCloudStorageProviderContentChangeHandler;
|
7728
|
+
function getSdkError(errorCode, message) {
|
7729
|
+
var sdkError = {
|
7730
|
+
errorCode: errorCode,
|
7731
|
+
message: message,
|
7732
|
+
};
|
7733
|
+
return sdkError;
|
7734
|
+
}
|
7416
7735
|
})(files || (files = {}));
|
7417
7736
|
|
7418
7737
|
;// CONCATENATED MODULE: ./src/private/meetingRoom.ts
|