@microsoft/teams-js 2.17.1-beta.2 → 2.18.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
package/dist/MicrosoftTeams.js
CHANGED
@@ -834,6 +834,8 @@ __webpack_require__.d(__webpack_exports__, {
|
|
834
834
|
dialog: () => (/* reexport */ dialog),
|
835
835
|
enablePrintCapability: () => (/* reexport */ enablePrintCapability),
|
836
836
|
executeDeepLink: () => (/* reexport */ executeDeepLink),
|
837
|
+
externalAppAuthentication: () => (/* reexport */ externalAppAuthentication),
|
838
|
+
externalAppCardActions: () => (/* reexport */ externalAppCardActions),
|
837
839
|
files: () => (/* reexport */ files),
|
838
840
|
geoLocation: () => (/* reexport */ geoLocation),
|
839
841
|
getAdaptiveCardSchemaVersion: () => (/* reexport */ getAdaptiveCardSchemaVersion),
|
@@ -1371,6 +1373,9 @@ var SecondaryM365ContentIdName;
|
|
1371
1373
|
/** User ID */
|
1372
1374
|
SecondaryM365ContentIdName["UserId"] = "userId";
|
1373
1375
|
})(SecondaryM365ContentIdName || (SecondaryM365ContentIdName = {}));
|
1376
|
+
function isSdkError(err) {
|
1377
|
+
return (err === null || err === void 0 ? void 0 : err.errorCode) !== undefined;
|
1378
|
+
}
|
1374
1379
|
/** Error codes used to identify different types of errors that can occur while developing apps. */
|
1375
1380
|
var ErrorCode;
|
1376
1381
|
(function (ErrorCode) {
|
@@ -2428,7 +2433,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2428
2433
|
* @hidden
|
2429
2434
|
* Package version.
|
2430
2435
|
*/
|
2431
|
-
var version = "2.
|
2436
|
+
var version = "2.18.0-beta.0";
|
2432
2437
|
|
2433
2438
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2434
2439
|
|
@@ -8362,6 +8367,11 @@ var meeting;
|
|
8362
8367
|
});
|
8363
8368
|
}); };
|
8364
8369
|
registerHandler('meeting.micStateChanged', micStateChangedCallback);
|
8370
|
+
var audioDeviceSelectionChangedCallback = function (selectedDevicesInHost) {
|
8371
|
+
var _a;
|
8372
|
+
(_a = requestAppAudioHandlingParams.audioDeviceSelectionChangedCallback) === null || _a === void 0 ? void 0 : _a.call(requestAppAudioHandlingParams, selectedDevicesInHost);
|
8373
|
+
};
|
8374
|
+
registerHandler('meeting.audioDeviceSelectionChanged', audioDeviceSelectionChangedCallback);
|
8365
8375
|
callback(isHostAudioless);
|
8366
8376
|
};
|
8367
8377
|
sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalRequest);
|
@@ -8380,6 +8390,9 @@ var meeting;
|
|
8380
8390
|
if (doesHandlerExist('meeting.micStateChanged')) {
|
8381
8391
|
removeHandler('meeting.micStateChanged');
|
8382
8392
|
}
|
8393
|
+
if (doesHandlerExist('meeting.audioDeviceSelectionChanged')) {
|
8394
|
+
removeHandler('meeting.audioDeviceSelectionChanged');
|
8395
|
+
}
|
8383
8396
|
callback(isHostAudioless);
|
8384
8397
|
};
|
8385
8398
|
sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalStop);
|
@@ -11985,6 +11998,307 @@ var marketplace;
|
|
11985
11998
|
|
11986
11999
|
|
11987
12000
|
|
12001
|
+
|
12002
|
+
;// CONCATENATED MODULE: ./src/private/externalAppAuthentication.ts
|
12003
|
+
|
12004
|
+
|
12005
|
+
|
12006
|
+
|
12007
|
+
|
12008
|
+
/**
|
12009
|
+
* @hidden
|
12010
|
+
* Namespace to delegate authentication and message extension requests to the host
|
12011
|
+
* @internal
|
12012
|
+
* Limited to Microsoft-internal use
|
12013
|
+
*/
|
12014
|
+
var externalAppAuthentication;
|
12015
|
+
(function (externalAppAuthentication) {
|
12016
|
+
/**
|
12017
|
+
* @hidden
|
12018
|
+
* This is the only allowed value for IActionExecuteInvokeRequest.type. Used for validation
|
12019
|
+
* @internal
|
12020
|
+
* Limited to Microsoft-internal use
|
12021
|
+
*/
|
12022
|
+
var ActionExecuteInvokeRequestType = 'Action.Execute';
|
12023
|
+
/**
|
12024
|
+
* @hidden
|
12025
|
+
* Used to differentiate between IOriginalRequestInfo types
|
12026
|
+
* @internal
|
12027
|
+
* Limited to Microsoft-internal use
|
12028
|
+
*/
|
12029
|
+
var OriginalRequestType;
|
12030
|
+
(function (OriginalRequestType) {
|
12031
|
+
OriginalRequestType["ActionExecuteInvokeRequest"] = "ActionExecuteInvokeRequest";
|
12032
|
+
OriginalRequestType["QueryMessageExtensionRequest"] = "QueryMessageExtensionRequest";
|
12033
|
+
})(OriginalRequestType = externalAppAuthentication.OriginalRequestType || (externalAppAuthentication.OriginalRequestType = {}));
|
12034
|
+
/**
|
12035
|
+
* @hidden
|
12036
|
+
* Used to differentiate between IInvokeResponse types
|
12037
|
+
* @internal
|
12038
|
+
* Limited to Microsoft-internal use
|
12039
|
+
*/
|
12040
|
+
var InvokeResponseType;
|
12041
|
+
(function (InvokeResponseType) {
|
12042
|
+
InvokeResponseType["ActionExecuteInvokeResponse"] = "ActionExecuteInvokeResponse";
|
12043
|
+
InvokeResponseType["QueryMessageExtensionResponse"] = "QueryMessageExtensionResponse";
|
12044
|
+
})(InvokeResponseType = externalAppAuthentication.InvokeResponseType || (externalAppAuthentication.InvokeResponseType = {}));
|
12045
|
+
/**
|
12046
|
+
* @hidden
|
12047
|
+
*
|
12048
|
+
* @internal
|
12049
|
+
* Limited to Microsoft-internal use
|
12050
|
+
*/
|
12051
|
+
var InvokeErrorCode;
|
12052
|
+
(function (InvokeErrorCode) {
|
12053
|
+
InvokeErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
12054
|
+
})(InvokeErrorCode = externalAppAuthentication.InvokeErrorCode || (externalAppAuthentication.InvokeErrorCode = {}));
|
12055
|
+
/*********** END ERROR TYPE ***********/
|
12056
|
+
/**
|
12057
|
+
* @hidden
|
12058
|
+
* @internal
|
12059
|
+
* Limited to Microsoft-internal use
|
12060
|
+
* TODO - Add more validation here as we get more details on the allowed request schemas
|
12061
|
+
*/
|
12062
|
+
function validateOriginalRequestInfo(originalRequestInfo) {
|
12063
|
+
if (originalRequestInfo.requestType === OriginalRequestType.ActionExecuteInvokeRequest) {
|
12064
|
+
var actionExecuteRequest = originalRequestInfo;
|
12065
|
+
if (actionExecuteRequest.type !== ActionExecuteInvokeRequestType) {
|
12066
|
+
var error = {
|
12067
|
+
errorCode: InvokeErrorCode.INTERNAL_ERROR,
|
12068
|
+
message: "Invalid action type ".concat(actionExecuteRequest.type, ". Action type must be \"").concat(ActionExecuteInvokeRequestType, "\""),
|
12069
|
+
};
|
12070
|
+
throw error;
|
12071
|
+
}
|
12072
|
+
}
|
12073
|
+
}
|
12074
|
+
/**
|
12075
|
+
* @beta
|
12076
|
+
* @hidden
|
12077
|
+
* Signals to the host to perform authentication using the given authentication parameters and then resend the request to the application specified by the app ID with the authentication result.
|
12078
|
+
* @internal
|
12079
|
+
* Limited to Microsoft-internal use
|
12080
|
+
* @param appId ID of the application backend to which the request and authentication response should be sent
|
12081
|
+
* @param authenticateParameters Parameters for the authentication pop-up
|
12082
|
+
* @param originalRequestInfo Information about the original request that should be resent
|
12083
|
+
* @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
|
12084
|
+
*/
|
12085
|
+
function authenticateAndResendRequest(appId, authenticateParameters, originalRequestInfo) {
|
12086
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12087
|
+
if (!isSupported()) {
|
12088
|
+
throw errorNotSupportedOnPlatform;
|
12089
|
+
}
|
12090
|
+
validateOriginalRequestInfo(originalRequestInfo);
|
12091
|
+
// Ask the parent window to open an authentication window with the parameters provided by the caller.
|
12092
|
+
return sendMessageToParentAsync('externalAppAuthentication.authenticateAndResendRequest', [
|
12093
|
+
appId,
|
12094
|
+
originalRequestInfo,
|
12095
|
+
authenticateParameters.url,
|
12096
|
+
authenticateParameters.width,
|
12097
|
+
authenticateParameters.height,
|
12098
|
+
authenticateParameters.isExternal,
|
12099
|
+
]).then(function (_a) {
|
12100
|
+
var wasSuccessful = _a[0], response = _a[1];
|
12101
|
+
if (wasSuccessful && response.responseType != null) {
|
12102
|
+
return response;
|
12103
|
+
}
|
12104
|
+
else {
|
12105
|
+
var error = response;
|
12106
|
+
throw error;
|
12107
|
+
}
|
12108
|
+
});
|
12109
|
+
}
|
12110
|
+
externalAppAuthentication.authenticateAndResendRequest = authenticateAndResendRequest;
|
12111
|
+
/**
|
12112
|
+
* @beta
|
12113
|
+
* @hidden
|
12114
|
+
* Signals to the host to perform SSO authentication for the application specified by the app ID
|
12115
|
+
* @internal
|
12116
|
+
* Limited to Microsoft-internal use
|
12117
|
+
* @param appId ID of the application backend for which the host should attempt SSO authentication
|
12118
|
+
* @param authTokenRequest Parameters for SSO authentication
|
12119
|
+
* @returns A promise that resolves when authentication and succeeds and rejects with InvokeError on failure
|
12120
|
+
*/
|
12121
|
+
function authenticateWithSSO(appId, authTokenRequest) {
|
12122
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12123
|
+
if (!isSupported()) {
|
12124
|
+
throw errorNotSupportedOnPlatform;
|
12125
|
+
}
|
12126
|
+
return sendMessageToParentAsync('externalAppAuthentication.authenticateWithSSO', [
|
12127
|
+
appId,
|
12128
|
+
authTokenRequest.resources,
|
12129
|
+
authTokenRequest.claims,
|
12130
|
+
authTokenRequest.silent,
|
12131
|
+
]).then(function (_a) {
|
12132
|
+
var wasSuccessful = _a[0], error = _a[1];
|
12133
|
+
if (!wasSuccessful) {
|
12134
|
+
throw error;
|
12135
|
+
}
|
12136
|
+
});
|
12137
|
+
}
|
12138
|
+
externalAppAuthentication.authenticateWithSSO = authenticateWithSSO;
|
12139
|
+
/**
|
12140
|
+
* @beta
|
12141
|
+
* @hidden
|
12142
|
+
* Signals to the host to perform SSO authentication for the application specified by the app ID and then resend the request to the application backend with the authentication result
|
12143
|
+
* @internal
|
12144
|
+
* Limited to Microsoft-internal use
|
12145
|
+
* @param appId ID of the application backend for which the host should attempt SSO authentication and resend the request and authentication response
|
12146
|
+
* @param authTokenRequest Parameters for SSO authentication
|
12147
|
+
* @param originalRequestInfo Information about the original request that should be resent
|
12148
|
+
* @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
|
12149
|
+
*/
|
12150
|
+
function authenticateWithSSOAndResendRequest(appId, authTokenRequest, originalRequestInfo) {
|
12151
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12152
|
+
if (!isSupported()) {
|
12153
|
+
throw errorNotSupportedOnPlatform;
|
12154
|
+
}
|
12155
|
+
validateOriginalRequestInfo(originalRequestInfo);
|
12156
|
+
return sendMessageToParentAsync('externalAppAuthentication.authenticateWithSSOAndResendRequest', [appId, originalRequestInfo, authTokenRequest.resources, authTokenRequest.claims, authTokenRequest.silent]).then(function (_a) {
|
12157
|
+
var wasSuccessful = _a[0], response = _a[1];
|
12158
|
+
if (wasSuccessful && response.responseType != null) {
|
12159
|
+
return response;
|
12160
|
+
}
|
12161
|
+
else {
|
12162
|
+
var error = response;
|
12163
|
+
throw error;
|
12164
|
+
}
|
12165
|
+
});
|
12166
|
+
}
|
12167
|
+
externalAppAuthentication.authenticateWithSSOAndResendRequest = authenticateWithSSOAndResendRequest;
|
12168
|
+
/**
|
12169
|
+
* @hidden
|
12170
|
+
* Checks if the externalAppAuthentication capability is supported by the host
|
12171
|
+
* @returns boolean to represent whether externalAppAuthentication capability is supported
|
12172
|
+
*
|
12173
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
12174
|
+
*
|
12175
|
+
* @internal
|
12176
|
+
* Limited to Microsoft-internal use
|
12177
|
+
*/
|
12178
|
+
function isSupported() {
|
12179
|
+
return internalAPIs_ensureInitialized(runtime_runtime) && runtime_runtime.supports.externalAppAuthentication ? true : false;
|
12180
|
+
}
|
12181
|
+
externalAppAuthentication.isSupported = isSupported;
|
12182
|
+
})(externalAppAuthentication || (externalAppAuthentication = {}));
|
12183
|
+
|
12184
|
+
;// CONCATENATED MODULE: ./src/private/externalAppCardActions.ts
|
12185
|
+
|
12186
|
+
|
12187
|
+
|
12188
|
+
|
12189
|
+
|
12190
|
+
/**
|
12191
|
+
* @hidden
|
12192
|
+
* Namespace to delegate adaptive card action execution to the host
|
12193
|
+
* @internal
|
12194
|
+
* Limited to Microsoft-internal use
|
12195
|
+
*/
|
12196
|
+
var externalAppCardActions;
|
12197
|
+
(function (externalAppCardActions) {
|
12198
|
+
/**
|
12199
|
+
* @hidden
|
12200
|
+
* The type of deeplink action that was executed by the host
|
12201
|
+
* @internal
|
12202
|
+
* Limited to Microsoft-internal use
|
12203
|
+
*/
|
12204
|
+
var ActionOpenUrlType;
|
12205
|
+
(function (ActionOpenUrlType) {
|
12206
|
+
ActionOpenUrlType["DeepLinkDialog"] = "DeepLinkDialog";
|
12207
|
+
ActionOpenUrlType["DeepLinkOther"] = "DeepLinkOther";
|
12208
|
+
ActionOpenUrlType["DeepLinkStageView"] = "DeepLinkStageView";
|
12209
|
+
ActionOpenUrlType["GenericUrl"] = "GenericUrl";
|
12210
|
+
})(ActionOpenUrlType = externalAppCardActions.ActionOpenUrlType || (externalAppCardActions.ActionOpenUrlType = {}));
|
12211
|
+
/**
|
12212
|
+
* @hidden
|
12213
|
+
* Error codes that can be thrown from IExternalAppCardActionService.handleActionOpenUrl
|
12214
|
+
* @internal
|
12215
|
+
* Limited to Microsoft-internal use
|
12216
|
+
*/
|
12217
|
+
var ActionOpenUrlErrorCode;
|
12218
|
+
(function (ActionOpenUrlErrorCode) {
|
12219
|
+
ActionOpenUrlErrorCode["INVALID_LINK"] = "INVALID_LINK";
|
12220
|
+
ActionOpenUrlErrorCode["NOT_SUPPORTED"] = "NOT_SUPPORTED";
|
12221
|
+
ActionOpenUrlErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
12222
|
+
})(ActionOpenUrlErrorCode = externalAppCardActions.ActionOpenUrlErrorCode || (externalAppCardActions.ActionOpenUrlErrorCode = {}));
|
12223
|
+
/**
|
12224
|
+
* @hidden
|
12225
|
+
* Error codes that can be thrown from IExternalAppCardActionService.handleActionSubmit
|
12226
|
+
* @internal
|
12227
|
+
* Limited to Microsoft-internal use
|
12228
|
+
*/
|
12229
|
+
var ActionSubmitErrorCode;
|
12230
|
+
(function (ActionSubmitErrorCode) {
|
12231
|
+
ActionSubmitErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
12232
|
+
})(ActionSubmitErrorCode = externalAppCardActions.ActionSubmitErrorCode || (externalAppCardActions.ActionSubmitErrorCode = {}));
|
12233
|
+
/**
|
12234
|
+
* @beta
|
12235
|
+
* @hidden
|
12236
|
+
* Delegates an Adaptive Card Action.Submit request to the host for the application with the provided app ID
|
12237
|
+
* @internal
|
12238
|
+
* Limited to Microsoft-internal use
|
12239
|
+
* @param appId ID of the application the request is intended for
|
12240
|
+
* @param actionSubmitPayload The Adaptive Card Action.Submit payload
|
12241
|
+
* @param cardActionsConfig The card actions configuration. This indicates which subtypes should be handled by this API
|
12242
|
+
* @returns Promise that resolves when the request is completed and rejects with ActionSubmitError if the request fails
|
12243
|
+
*/
|
12244
|
+
function processActionSubmit(appId, actionSubmitPayload, cardActionsConfig) {
|
12245
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12246
|
+
if (!isSupported()) {
|
12247
|
+
throw errorNotSupportedOnPlatform;
|
12248
|
+
}
|
12249
|
+
return sendMessageToParentAsync('externalAppCardActions.processActionSubmit', [
|
12250
|
+
appId,
|
12251
|
+
actionSubmitPayload,
|
12252
|
+
cardActionsConfig,
|
12253
|
+
]).then(function (_a) {
|
12254
|
+
var wasSuccessful = _a[0], error = _a[1];
|
12255
|
+
if (!wasSuccessful) {
|
12256
|
+
throw error;
|
12257
|
+
}
|
12258
|
+
});
|
12259
|
+
}
|
12260
|
+
externalAppCardActions.processActionSubmit = processActionSubmit;
|
12261
|
+
/**
|
12262
|
+
* @beta
|
12263
|
+
* @hidden
|
12264
|
+
* Delegates an Adaptive Card Action.OpenUrl request to the host for the application with the provided app ID
|
12265
|
+
* @internal
|
12266
|
+
* Limited to Microsoft-internal use
|
12267
|
+
* @param appId ID of the application the request is intended for
|
12268
|
+
* @param url The URL to open
|
12269
|
+
* @returns Promise that resolves to ActionOpenUrlType indicating the type of URL that was opened on success and rejects with ActionOpenUrlError if the request fails
|
12270
|
+
*/
|
12271
|
+
function processActionOpenUrl(appId, url) {
|
12272
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12273
|
+
if (!isSupported()) {
|
12274
|
+
throw errorNotSupportedOnPlatform;
|
12275
|
+
}
|
12276
|
+
return sendMessageToParentAsync('externalAppCardActions.processActionOpenUrl', [appId, url]).then(function (_a) {
|
12277
|
+
var error = _a[0], response = _a[1];
|
12278
|
+
if (error) {
|
12279
|
+
throw error;
|
12280
|
+
}
|
12281
|
+
else {
|
12282
|
+
return response;
|
12283
|
+
}
|
12284
|
+
});
|
12285
|
+
}
|
12286
|
+
externalAppCardActions.processActionOpenUrl = processActionOpenUrl;
|
12287
|
+
/**
|
12288
|
+
* @hidden
|
12289
|
+
* Checks if the externalAppCardActions capability is supported by the host
|
12290
|
+
* @returns boolean to represent whether externalAppCardActions capability is supported
|
12291
|
+
*
|
12292
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
12293
|
+
*
|
12294
|
+
* @internal
|
12295
|
+
* Limited to Microsoft-internal use
|
12296
|
+
*/
|
12297
|
+
function isSupported() {
|
12298
|
+
return internalAPIs_ensureInitialized(runtime_runtime) && runtime_runtime.supports.externalAppCardActions ? true : false;
|
12299
|
+
}
|
12300
|
+
externalAppCardActions.isSupported = isSupported;
|
12301
|
+
})(externalAppCardActions || (externalAppCardActions = {}));
|
11988
12302
|
|
11989
12303
|
;// CONCATENATED MODULE: ./src/private/files.ts
|
11990
12304
|
|
@@ -13519,6 +13833,8 @@ var videoEffectsEx;
|
|
13519
13833
|
|
13520
13834
|
|
13521
13835
|
|
13836
|
+
|
13837
|
+
|
13522
13838
|
|
13523
13839
|
;// CONCATENATED MODULE: ./src/index.ts
|
13524
13840
|
|