@microsoft/teams-js 2.12.0 → 2.13.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/dist/MicrosoftTeams.d.ts +146 -139
- package/dist/MicrosoftTeams.js +95 -82
- 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
@@ -805,7 +805,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
805
805
|
"ActionObjectType": () => (/* reexport */ ActionObjectType),
|
806
806
|
"ChannelType": () => (/* reexport */ ChannelType),
|
807
807
|
"ChildAppWindow": () => (/* reexport */ ChildAppWindow),
|
808
|
-
"ContainerState": () => (/* reexport */ ContainerState),
|
809
808
|
"DialogDimension": () => (/* reexport */ DialogDimension),
|
810
809
|
"ErrorCode": () => (/* reexport */ ErrorCode),
|
811
810
|
"FileOpenPreference": () => (/* reexport */ FileOpenPreference),
|
@@ -818,7 +817,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
818
817
|
"SecondaryM365ContentIdName": () => (/* reexport */ SecondaryM365ContentIdName),
|
819
818
|
"TaskModuleDimension": () => (/* reexport */ TaskModuleDimension),
|
820
819
|
"TeamType": () => (/* reexport */ TeamType),
|
821
|
-
"UserMeetingRole": () => (/* reexport */ UserMeetingRole),
|
822
820
|
"UserSettingTypes": () => (/* reexport */ UserSettingTypes),
|
823
821
|
"UserTeamRole": () => (/* reexport */ UserTeamRole),
|
824
822
|
"ViewerActionTypes": () => (/* reexport */ ViewerActionTypes),
|
@@ -843,7 +841,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
843
841
|
"getTabInstances": () => (/* reexport */ getTabInstances),
|
844
842
|
"initialize": () => (/* reexport */ initialize),
|
845
843
|
"initializeWithFrameContext": () => (/* reexport */ initializeWithFrameContext),
|
846
|
-
"
|
844
|
+
"liveShare": () => (/* reexport */ liveShare),
|
847
845
|
"location": () => (/* reexport */ location_location),
|
848
846
|
"logs": () => (/* reexport */ logs),
|
849
847
|
"mail": () => (/* reexport */ mail),
|
@@ -1059,6 +1057,8 @@ var errorLibraryNotInitialized = 'The library has not yet been initialized';
|
|
1059
1057
|
var errorRuntimeNotInitialized = 'The runtime has not yet been initialized';
|
1060
1058
|
/** @hidden */
|
1061
1059
|
var errorRuntimeNotSupported = 'The runtime version is not supported';
|
1060
|
+
/** @hidden */
|
1061
|
+
var errorCallNotStarted = 'The call was not properly started';
|
1062
1062
|
|
1063
1063
|
;// CONCATENATED MODULE: ./src/internal/globalVars.ts
|
1064
1064
|
var GlobalVars = /** @class */ (function () {
|
@@ -2088,7 +2088,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2088
2088
|
* @hidden
|
2089
2089
|
* Package version.
|
2090
2090
|
*/
|
2091
|
-
var version = "2.
|
2091
|
+
var version = "2.13.0-beta.0";
|
2092
2092
|
|
2093
2093
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2094
2094
|
|
@@ -4853,8 +4853,8 @@ function sendAndHandleStatusAndReason(actionName) {
|
|
4853
4853
|
args[_i - 1] = arguments[_i];
|
4854
4854
|
}
|
4855
4855
|
return sendMessageToParentAsync(actionName, args).then(function (_a) {
|
4856
|
-
var
|
4857
|
-
if (!
|
4856
|
+
var wasSuccessful = _a[0], reason = _a[1];
|
4857
|
+
if (!wasSuccessful) {
|
4858
4858
|
throw new Error(reason);
|
4859
4859
|
}
|
4860
4860
|
});
|
@@ -4869,8 +4869,8 @@ function sendAndHandleStatusAndReasonWithDefaultError(actionName, defaultError)
|
|
4869
4869
|
args[_i - 2] = arguments[_i];
|
4870
4870
|
}
|
4871
4871
|
return sendMessageToParentAsync(actionName, args).then(function (_a) {
|
4872
|
-
var
|
4873
|
-
if (!
|
4872
|
+
var wasSuccessful = _a[0], reason = _a[1];
|
4873
|
+
if (!wasSuccessful) {
|
4874
4874
|
throw new Error(reason ? reason : defaultError);
|
4875
4875
|
}
|
4876
4876
|
});
|
@@ -8647,7 +8647,10 @@ var call;
|
|
8647
8647
|
* Starts a call with other users
|
8648
8648
|
*
|
8649
8649
|
* @param startCallParams - Parameters for the call
|
8650
|
-
*
|
8650
|
+
*
|
8651
|
+
* @throws Error if call capability is not supported
|
8652
|
+
* @throws Error if host notifies of a failed start call attempt in a legacy Teams environment
|
8653
|
+
* @returns always true if the host notifies of a successful call inititation
|
8651
8654
|
*/
|
8652
8655
|
function startCall(startCallParams) {
|
8653
8656
|
return new Promise(function (resolve) {
|
@@ -8657,7 +8660,12 @@ var call;
|
|
8657
8660
|
throw errorNotSupportedOnPlatform;
|
8658
8661
|
}
|
8659
8662
|
if (runtime.isLegacyTeams) {
|
8660
|
-
resolve(
|
8663
|
+
resolve(sendAndUnwrap('executeDeepLink', createTeamsDeepLinkForCall(startCallParams.targets, (_a = startCallParams.requestedModalities) === null || _a === void 0 ? void 0 : _a.includes(CallModalities.Video), startCallParams.source)).then(function (result) {
|
8664
|
+
if (!result) {
|
8665
|
+
throw new Error(errorCallNotStarted);
|
8666
|
+
}
|
8667
|
+
return result;
|
8668
|
+
}));
|
8661
8669
|
}
|
8662
8670
|
else {
|
8663
8671
|
return sendMessageToParent('call.startCall', [startCallParams], resolve);
|
@@ -9357,51 +9365,88 @@ var tasks;
|
|
9357
9365
|
|
9358
9366
|
|
9359
9367
|
/**
|
9360
|
-
*
|
9361
|
-
*
|
9362
|
-
*
|
9363
|
-
* @beta
|
9364
|
-
*/
|
9365
|
-
var UserMeetingRole;
|
9366
|
-
(function (UserMeetingRole) {
|
9367
|
-
UserMeetingRole["guest"] = "Guest";
|
9368
|
-
UserMeetingRole["attendee"] = "Attendee";
|
9369
|
-
UserMeetingRole["presenter"] = "Presenter";
|
9370
|
-
UserMeetingRole["organizer"] = "Organizer";
|
9371
|
-
})(UserMeetingRole || (UserMeetingRole = {}));
|
9372
|
-
/**
|
9373
|
-
* @hidden
|
9374
|
-
* State of the current Live Share sessions backing fluid container.
|
9368
|
+
* APIs involving Live Share, a framework for building real-time collaborative apps.
|
9369
|
+
* For more information, visit https://aka.ms/teamsliveshare
|
9375
9370
|
*
|
9376
|
-
* @
|
9371
|
+
* @see LiveShareHost
|
9377
9372
|
*/
|
9378
|
-
var
|
9379
|
-
(function (
|
9380
|
-
/**
|
9381
|
-
* The call to `LiveShareHost.setContainerId()` successfully created the container mapping
|
9382
|
-
* for the current Live Share session.
|
9383
|
-
*/
|
9384
|
-
ContainerState["added"] = "Added";
|
9373
|
+
var liveShare;
|
9374
|
+
(function (liveShare) {
|
9385
9375
|
/**
|
9386
|
-
*
|
9387
|
-
*
|
9376
|
+
* @hidden
|
9377
|
+
* The meeting roles of a user.
|
9378
|
+
* Used in Live Share for its role verification feature.
|
9379
|
+
* For more information, visit https://learn.microsoft.com/microsoftteams/platform/apps-in-teams-meetings/teams-live-share-capabilities?tabs=javascript#role-verification-for-live-data-structures
|
9388
9380
|
*/
|
9389
|
-
|
9381
|
+
var UserMeetingRole;
|
9382
|
+
(function (UserMeetingRole) {
|
9383
|
+
/**
|
9384
|
+
* Guest role.
|
9385
|
+
*/
|
9386
|
+
UserMeetingRole["guest"] = "Guest";
|
9387
|
+
/**
|
9388
|
+
* Attendee role.
|
9389
|
+
*/
|
9390
|
+
UserMeetingRole["attendee"] = "Attendee";
|
9391
|
+
/**
|
9392
|
+
* Presenter role.
|
9393
|
+
*/
|
9394
|
+
UserMeetingRole["presenter"] = "Presenter";
|
9395
|
+
/**
|
9396
|
+
* Organizer role.
|
9397
|
+
*/
|
9398
|
+
UserMeetingRole["organizer"] = "Organizer";
|
9399
|
+
})(UserMeetingRole = liveShare.UserMeetingRole || (liveShare.UserMeetingRole = {}));
|
9390
9400
|
/**
|
9391
|
-
*
|
9392
|
-
*
|
9401
|
+
* @hidden
|
9402
|
+
* State of the current Live Share session's Fluid container.
|
9403
|
+
* This is used internally by the `LiveShareClient` when joining a Live Share session.
|
9393
9404
|
*/
|
9394
|
-
ContainerState
|
9405
|
+
var ContainerState;
|
9406
|
+
(function (ContainerState) {
|
9407
|
+
/**
|
9408
|
+
* The call to `LiveShareHost.setContainerId()` successfully created the container mapping
|
9409
|
+
* for the current Live Share session.
|
9410
|
+
*/
|
9411
|
+
ContainerState["added"] = "Added";
|
9412
|
+
/**
|
9413
|
+
* A container mapping for the current Live Share session already exists.
|
9414
|
+
* This indicates to Live Share that a new container does not need be created.
|
9415
|
+
*/
|
9416
|
+
ContainerState["alreadyExists"] = "AlreadyExists";
|
9417
|
+
/**
|
9418
|
+
* The call to `LiveShareHost.setContainerId()` failed to create the container mapping.
|
9419
|
+
* This happens when another client has already set the container ID for the session.
|
9420
|
+
*/
|
9421
|
+
ContainerState["conflict"] = "Conflict";
|
9422
|
+
/**
|
9423
|
+
* A container mapping for the current Live Share session does not yet exist.
|
9424
|
+
* This indicates to Live Share that a new container should be created.
|
9425
|
+
*/
|
9426
|
+
ContainerState["notFound"] = "NotFound";
|
9427
|
+
})(ContainerState = liveShare.ContainerState || (liveShare.ContainerState = {}));
|
9395
9428
|
/**
|
9396
|
-
*
|
9429
|
+
* Checks if the interactive capability is supported by the host
|
9430
|
+
* @returns boolean to represent whether the interactive capability is supported
|
9431
|
+
*
|
9432
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
9397
9433
|
*/
|
9398
|
-
|
9399
|
-
|
9434
|
+
function isSupported() {
|
9435
|
+
return ensureInitialized(runtime, FrameContexts.meetingStage, FrameContexts.sidePanel) &&
|
9436
|
+
runtime.supports.interactive
|
9437
|
+
? true
|
9438
|
+
: false;
|
9439
|
+
}
|
9440
|
+
liveShare.isSupported = isSupported;
|
9441
|
+
})(liveShare || (liveShare = {}));
|
9400
9442
|
/**
|
9401
|
-
*
|
9402
|
-
*
|
9443
|
+
* Live Share host implementation for connecting to real-time collaborative sessions.
|
9444
|
+
* Designed for use with the `LiveShareClient` class in the `@microsoft/live-share` package.
|
9445
|
+
* Learn more at https://aka.ms/teamsliveshare
|
9403
9446
|
*
|
9404
|
-
* @
|
9447
|
+
* @remarks
|
9448
|
+
* The `LiveShareClient` class from Live Share uses the hidden API's to join/manage the session.
|
9449
|
+
* To create a new `LiveShareHost` instance use the static `LiveShareHost.create()` function.
|
9405
9450
|
*/
|
9406
9451
|
var LiveShareHost = /** @class */ (function () {
|
9407
9452
|
function LiveShareHost() {
|
@@ -9409,8 +9454,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9409
9454
|
/**
|
9410
9455
|
* @hidden
|
9411
9456
|
* Returns the Fluid Tenant connection info for user's current context.
|
9412
|
-
*
|
9413
|
-
* @beta
|
9414
9457
|
*/
|
9415
9458
|
LiveShareHost.prototype.getFluidTenantInfo = function () {
|
9416
9459
|
ensureSupported();
|
@@ -9424,8 +9467,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9424
9467
|
*
|
9425
9468
|
* @param containerId Fluid's container Id for the request. Undefined for new containers.
|
9426
9469
|
* @returns token for connecting to Fluid's session.
|
9427
|
-
*
|
9428
|
-
* @beta
|
9429
9470
|
*/
|
9430
9471
|
LiveShareHost.prototype.getFluidToken = function (containerId) {
|
9431
9472
|
ensureSupported();
|
@@ -9437,8 +9478,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9437
9478
|
/**
|
9438
9479
|
* @hidden
|
9439
9480
|
* Returns the ID of the fluid container associated with the user's current context.
|
9440
|
-
*
|
9441
|
-
* @beta
|
9442
9481
|
*/
|
9443
9482
|
LiveShareHost.prototype.getFluidContainerId = function () {
|
9444
9483
|
ensureSupported();
|
@@ -9455,8 +9494,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9455
9494
|
* `getFluidContainerId()` to get the ID of the container being used.
|
9456
9495
|
* @param containerId ID of the fluid container the client created.
|
9457
9496
|
* @returns A data structure with a `containerState` indicating the success or failure of the request.
|
9458
|
-
*
|
9459
|
-
* @beta
|
9460
9497
|
*/
|
9461
9498
|
LiveShareHost.prototype.setFluidContainerId = function (containerId) {
|
9462
9499
|
ensureSupported();
|
@@ -9467,8 +9504,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9467
9504
|
/**
|
9468
9505
|
* @hidden
|
9469
9506
|
* Returns the shared clock server's current time.
|
9470
|
-
*
|
9471
|
-
* @beta
|
9472
9507
|
*/
|
9473
9508
|
LiveShareHost.prototype.getNtpTime = function () {
|
9474
9509
|
ensureSupported();
|
@@ -9482,8 +9517,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9482
9517
|
*
|
9483
9518
|
* @param clientId The ID for the current user's Fluid client. Changes on reconnects.
|
9484
9519
|
* @returns The roles for the current user.
|
9485
|
-
*
|
9486
|
-
* @beta
|
9487
9520
|
*/
|
9488
9521
|
LiveShareHost.prototype.registerClientId = function (clientId) {
|
9489
9522
|
ensureSupported();
|
@@ -9497,8 +9530,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9497
9530
|
*
|
9498
9531
|
* @param clientId The Client ID the message was received from.
|
9499
9532
|
* @returns The roles for a given client. Returns `undefined` if the client ID hasn't been registered yet.
|
9500
|
-
*
|
9501
|
-
* @beta
|
9502
9533
|
*/
|
9503
9534
|
LiveShareHost.prototype.getClientRoles = function (clientId) {
|
9504
9535
|
ensureSupported();
|
@@ -9512,8 +9543,6 @@ var LiveShareHost = /** @class */ (function () {
|
|
9512
9543
|
*
|
9513
9544
|
* @param clientId The Client ID the message was received from.
|
9514
9545
|
* @returns The info for a given client. Returns `undefined` if the client ID hasn't been registered yet.
|
9515
|
-
*
|
9516
|
-
* @beta
|
9517
9546
|
*/
|
9518
9547
|
LiveShareHost.prototype.getClientInfo = function (clientId) {
|
9519
9548
|
ensureSupported();
|
@@ -9522,12 +9551,12 @@ var LiveShareHost = /** @class */ (function () {
|
|
9522
9551
|
});
|
9523
9552
|
};
|
9524
9553
|
/**
|
9525
|
-
*
|
9554
|
+
* Factories a new `LiveShareHost` instance for use with the `LiveShareClient` class
|
9555
|
+
* in the `@microsoft/live-share` package.
|
9526
9556
|
*
|
9527
9557
|
* @remarks
|
9528
|
-
*
|
9529
|
-
*
|
9530
|
-
* @beta
|
9558
|
+
* `app.initialize()` must first be called before using this API.
|
9559
|
+
* This API can only be called from `meetingStage` or `sidePanel` contexts.
|
9531
9560
|
*/
|
9532
9561
|
LiveShareHost.create = function () {
|
9533
9562
|
ensureSupported();
|
@@ -9536,24 +9565,8 @@ var LiveShareHost = /** @class */ (function () {
|
|
9536
9565
|
return LiveShareHost;
|
9537
9566
|
}());
|
9538
9567
|
|
9539
|
-
/**
|
9540
|
-
* @hidden
|
9541
|
-
*
|
9542
|
-
* Checks if the interactive capability is supported by the host
|
9543
|
-
* @returns boolean to represent whether the interactive capability is supported
|
9544
|
-
*
|
9545
|
-
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
9546
|
-
*
|
9547
|
-
* @internal
|
9548
|
-
* Limited to Microsoft-internal use
|
9549
|
-
*/
|
9550
|
-
function isSupported() {
|
9551
|
-
return ensureInitialized(runtime, FrameContexts.meetingStage, FrameContexts.sidePanel) && runtime.supports.interactive
|
9552
|
-
? true
|
9553
|
-
: false;
|
9554
|
-
}
|
9555
9568
|
function ensureSupported() {
|
9556
|
-
if (!isSupported()) {
|
9569
|
+
if (!liveShare.isSupported()) {
|
9557
9570
|
throw new Error('LiveShareHost Not supported');
|
9558
9571
|
}
|
9559
9572
|
}
|