@microsoft/teams-js 2.18.0 → 2.19.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.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),
|
@@ -887,6 +889,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
887
889
|
tasks: () => (/* reexport */ tasks),
|
888
890
|
teams: () => (/* reexport */ teams),
|
889
891
|
teamsCore: () => (/* reexport */ teamsCore),
|
892
|
+
thirdPartyCloudStorage: () => (/* reexport */ thirdPartyCloudStorage),
|
890
893
|
uploadCustomApp: () => (/* reexport */ uploadCustomApp),
|
891
894
|
version: () => (/* reexport */ version),
|
892
895
|
videoEffects: () => (/* reexport */ videoEffects),
|
@@ -2431,7 +2434,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2431
2434
|
* @hidden
|
2432
2435
|
* Package version.
|
2433
2436
|
*/
|
2434
|
-
var version = "2.
|
2437
|
+
var version = "2.19.0-beta.0";
|
2435
2438
|
|
2436
2439
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2437
2440
|
|
@@ -8424,6 +8427,13 @@ var meeting;
|
|
8424
8427
|
|
8425
8428
|
|
8426
8429
|
|
8430
|
+
/**
|
8431
|
+
* @hidden
|
8432
|
+
* Hidden from Docs
|
8433
|
+
*
|
8434
|
+
* @internal
|
8435
|
+
* Limited to Microsoft-internal use
|
8436
|
+
*/
|
8427
8437
|
var monetization;
|
8428
8438
|
(function (monetization) {
|
8429
8439
|
/**
|
@@ -8756,6 +8766,9 @@ var teamsCore;
|
|
8756
8766
|
|
8757
8767
|
|
8758
8768
|
|
8769
|
+
/**
|
8770
|
+
* Allows your app to add a people picker enabling users to search for and select people in their organization.
|
8771
|
+
*/
|
8759
8772
|
var people;
|
8760
8773
|
(function (people_1) {
|
8761
8774
|
/**
|
@@ -10697,6 +10710,149 @@ var appInitialization;
|
|
10697
10710
|
appInitialization.notifyExpectedFailure = notifyExpectedFailure;
|
10698
10711
|
})(appInitialization || (appInitialization = {}));
|
10699
10712
|
|
10713
|
+
;// CONCATENATED MODULE: ./src/public/thirdPartyCloudStorage.ts
|
10714
|
+
|
10715
|
+
|
10716
|
+
|
10717
|
+
|
10718
|
+
|
10719
|
+
|
10720
|
+
|
10721
|
+
var Files3PLogger = getLogger('thirdPartyCloudStorage');
|
10722
|
+
/**
|
10723
|
+
* Extended files API 3P storage providers, features like sending Blob from Teams to 3P app on user
|
10724
|
+
* actions like drag and drop to compose
|
10725
|
+
* @beta
|
10726
|
+
*/
|
10727
|
+
var thirdPartyCloudStorage;
|
10728
|
+
(function (thirdPartyCloudStorage) {
|
10729
|
+
/** Get context callback function type */
|
10730
|
+
var files = [];
|
10731
|
+
var helper = {
|
10732
|
+
fileType: '',
|
10733
|
+
assembleAttachment: [],
|
10734
|
+
};
|
10735
|
+
var lastChunkVal = true; // setting it to true so that the very first file and first chunk does not fail
|
10736
|
+
var callback = null;
|
10737
|
+
/**
|
10738
|
+
* Get drag-and-drop files using a callback.
|
10739
|
+
*
|
10740
|
+
* @param {string} dragAndDropInput - Teams thread id or Teams conversation id from a Teams chat/channel
|
10741
|
+
* @param {DragAndDropFileCallback} dragAndDropFileCallback - callback
|
10742
|
+
* A callback function to handle the result of the operation
|
10743
|
+
* @beta
|
10744
|
+
*/
|
10745
|
+
function getDragAndDropFiles(dragAndDropInput, dragAndDropFileCallback) {
|
10746
|
+
if (!dragAndDropFileCallback) {
|
10747
|
+
throw new Error('[getDragAndDropFiles] Callback cannot be null');
|
10748
|
+
}
|
10749
|
+
if (!dragAndDropInput || dragAndDropInput === '') {
|
10750
|
+
var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
|
10751
|
+
dragAndDropFileCallback([], invalidInput);
|
10752
|
+
return;
|
10753
|
+
}
|
10754
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
10755
|
+
if (!isSupported()) {
|
10756
|
+
throw errorNotSupportedOnPlatform;
|
10757
|
+
}
|
10758
|
+
if (callback) {
|
10759
|
+
callback = null;
|
10760
|
+
throw new Error('getDragAndDropFiles cannot be called twice');
|
10761
|
+
}
|
10762
|
+
else {
|
10763
|
+
callback = dragAndDropFileCallback;
|
10764
|
+
}
|
10765
|
+
lastChunkVal = true;
|
10766
|
+
sendMessageToParent('thirdPartyCloudStorage.getDragAndDropFiles', [dragAndDropInput], handleGetDragAndDropFilesCallbackRequest);
|
10767
|
+
}
|
10768
|
+
thirdPartyCloudStorage.getDragAndDropFiles = getDragAndDropFiles;
|
10769
|
+
function handleGetDragAndDropFilesCallbackRequest(fileResult) {
|
10770
|
+
if (callback) {
|
10771
|
+
if (fileResult && fileResult.error) {
|
10772
|
+
callback([], fileResult.error);
|
10773
|
+
callback = null;
|
10774
|
+
}
|
10775
|
+
else {
|
10776
|
+
if (fileResult && fileResult.fileChunk) {
|
10777
|
+
try {
|
10778
|
+
if (!lastChunkVal && fileResult.fileChunk.chunkSequence === 0) {
|
10779
|
+
// last chunk value was false
|
10780
|
+
Files3PLogger("Last chunk is not received or 'endOfFile' value for previous chunk was not set to true");
|
10781
|
+
lastChunkVal = true; // for next iteration
|
10782
|
+
callback([], {
|
10783
|
+
errorCode: ErrorCode.INTERNAL_ERROR,
|
10784
|
+
message: 'error occurred while receiving data',
|
10785
|
+
});
|
10786
|
+
files = [];
|
10787
|
+
callback = null;
|
10788
|
+
}
|
10789
|
+
var assemble = decodeAttachment(fileResult.fileChunk, fileResult.fileType);
|
10790
|
+
if (assemble) {
|
10791
|
+
helper.assembleAttachment.push(assemble);
|
10792
|
+
}
|
10793
|
+
else {
|
10794
|
+
Files3PLogger("Received a null assemble attachment for when decoding chunk sequence ".concat(fileResult.fileChunk.chunkSequence, "; not including the chunk in the assembled file."));
|
10795
|
+
callback
|
10796
|
+
? callback([], { errorCode: ErrorCode.INTERNAL_ERROR, message: 'error occurred while receiving data' })
|
10797
|
+
: (callback = null);
|
10798
|
+
files = [];
|
10799
|
+
callback = null;
|
10800
|
+
lastChunkVal = true;
|
10801
|
+
}
|
10802
|
+
// we will store this value to determine whether we received the last chunk of the previous file
|
10803
|
+
lastChunkVal = fileResult.fileChunk.endOfFile;
|
10804
|
+
if (fileResult.fileChunk.endOfFile) {
|
10805
|
+
var fileBlob = createFile(helper.assembleAttachment, helper.fileType);
|
10806
|
+
if (fileBlob) {
|
10807
|
+
// Convert blob to File
|
10808
|
+
var receivedFile = new File([fileBlob], fileResult.fileName, {
|
10809
|
+
type: fileBlob.type,
|
10810
|
+
});
|
10811
|
+
files.push(receivedFile);
|
10812
|
+
}
|
10813
|
+
if (fileResult.isLastFile && callback) {
|
10814
|
+
callback(files, fileResult.error);
|
10815
|
+
files = [];
|
10816
|
+
callback = null;
|
10817
|
+
lastChunkVal = true;
|
10818
|
+
}
|
10819
|
+
helper = {
|
10820
|
+
fileType: '',
|
10821
|
+
assembleAttachment: [],
|
10822
|
+
};
|
10823
|
+
}
|
10824
|
+
}
|
10825
|
+
catch (e) {
|
10826
|
+
if (callback) {
|
10827
|
+
callback([], { errorCode: ErrorCode.INTERNAL_ERROR, message: e });
|
10828
|
+
files = [];
|
10829
|
+
callback = null;
|
10830
|
+
lastChunkVal = true;
|
10831
|
+
}
|
10832
|
+
}
|
10833
|
+
}
|
10834
|
+
else {
|
10835
|
+
callback([], { errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' });
|
10836
|
+
files = [];
|
10837
|
+
callback = null;
|
10838
|
+
lastChunkVal = true;
|
10839
|
+
}
|
10840
|
+
}
|
10841
|
+
}
|
10842
|
+
}
|
10843
|
+
/**
|
10844
|
+
* Checks if the thirdPartyCloudStorage capability is supported by the host
|
10845
|
+
* @returns boolean to represent whether the thirdPartyCloudStorage capability is supported
|
10846
|
+
*
|
10847
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
10848
|
+
* @beta
|
10849
|
+
*/
|
10850
|
+
function isSupported() {
|
10851
|
+
return internalAPIs_ensureInitialized(runtime_runtime) && runtime_runtime.supports.thirdPartyCloudStorage ? true : false;
|
10852
|
+
}
|
10853
|
+
thirdPartyCloudStorage.isSupported = isSupported;
|
10854
|
+
})(thirdPartyCloudStorage || (thirdPartyCloudStorage = {}));
|
10855
|
+
|
10700
10856
|
;// CONCATENATED MODULE: ./src/public/publicAPIs.ts
|
10701
10857
|
|
10702
10858
|
|
@@ -11994,8 +12150,309 @@ var marketplace;
|
|
11994
12150
|
|
11995
12151
|
|
11996
12152
|
|
12153
|
+
|
11997
12154
|
|
11998
12155
|
|
12156
|
+
|
12157
|
+
;// CONCATENATED MODULE: ./src/private/externalAppAuthentication.ts
|
12158
|
+
|
12159
|
+
|
12160
|
+
|
12161
|
+
|
12162
|
+
|
12163
|
+
/**
|
12164
|
+
* @hidden
|
12165
|
+
* Namespace to delegate authentication and message extension requests to the host
|
12166
|
+
* @internal
|
12167
|
+
* Limited to Microsoft-internal use
|
12168
|
+
*/
|
12169
|
+
var externalAppAuthentication;
|
12170
|
+
(function (externalAppAuthentication) {
|
12171
|
+
/**
|
12172
|
+
* @hidden
|
12173
|
+
* This is the only allowed value for IActionExecuteInvokeRequest.type. Used for validation
|
12174
|
+
* @internal
|
12175
|
+
* Limited to Microsoft-internal use
|
12176
|
+
*/
|
12177
|
+
var ActionExecuteInvokeRequestType = 'Action.Execute';
|
12178
|
+
/**
|
12179
|
+
* @hidden
|
12180
|
+
* Used to differentiate between IOriginalRequestInfo types
|
12181
|
+
* @internal
|
12182
|
+
* Limited to Microsoft-internal use
|
12183
|
+
*/
|
12184
|
+
var OriginalRequestType;
|
12185
|
+
(function (OriginalRequestType) {
|
12186
|
+
OriginalRequestType["ActionExecuteInvokeRequest"] = "ActionExecuteInvokeRequest";
|
12187
|
+
OriginalRequestType["QueryMessageExtensionRequest"] = "QueryMessageExtensionRequest";
|
12188
|
+
})(OriginalRequestType = externalAppAuthentication.OriginalRequestType || (externalAppAuthentication.OriginalRequestType = {}));
|
12189
|
+
/**
|
12190
|
+
* @hidden
|
12191
|
+
* Used to differentiate between IInvokeResponse types
|
12192
|
+
* @internal
|
12193
|
+
* Limited to Microsoft-internal use
|
12194
|
+
*/
|
12195
|
+
var InvokeResponseType;
|
12196
|
+
(function (InvokeResponseType) {
|
12197
|
+
InvokeResponseType["ActionExecuteInvokeResponse"] = "ActionExecuteInvokeResponse";
|
12198
|
+
InvokeResponseType["QueryMessageExtensionResponse"] = "QueryMessageExtensionResponse";
|
12199
|
+
})(InvokeResponseType = externalAppAuthentication.InvokeResponseType || (externalAppAuthentication.InvokeResponseType = {}));
|
12200
|
+
/**
|
12201
|
+
* @hidden
|
12202
|
+
*
|
12203
|
+
* @internal
|
12204
|
+
* Limited to Microsoft-internal use
|
12205
|
+
*/
|
12206
|
+
var InvokeErrorCode;
|
12207
|
+
(function (InvokeErrorCode) {
|
12208
|
+
InvokeErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
12209
|
+
})(InvokeErrorCode = externalAppAuthentication.InvokeErrorCode || (externalAppAuthentication.InvokeErrorCode = {}));
|
12210
|
+
/*********** END ERROR TYPE ***********/
|
12211
|
+
/**
|
12212
|
+
* @hidden
|
12213
|
+
* @internal
|
12214
|
+
* Limited to Microsoft-internal use
|
12215
|
+
* TODO - Add more validation here as we get more details on the allowed request schemas
|
12216
|
+
*/
|
12217
|
+
function validateOriginalRequestInfo(originalRequestInfo) {
|
12218
|
+
if (originalRequestInfo.requestType === OriginalRequestType.ActionExecuteInvokeRequest) {
|
12219
|
+
var actionExecuteRequest = originalRequestInfo;
|
12220
|
+
if (actionExecuteRequest.type !== ActionExecuteInvokeRequestType) {
|
12221
|
+
var error = {
|
12222
|
+
errorCode: InvokeErrorCode.INTERNAL_ERROR,
|
12223
|
+
message: "Invalid action type ".concat(actionExecuteRequest.type, ". Action type must be \"").concat(ActionExecuteInvokeRequestType, "\""),
|
12224
|
+
};
|
12225
|
+
throw error;
|
12226
|
+
}
|
12227
|
+
}
|
12228
|
+
}
|
12229
|
+
/**
|
12230
|
+
* @beta
|
12231
|
+
* @hidden
|
12232
|
+
* 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.
|
12233
|
+
* @internal
|
12234
|
+
* Limited to Microsoft-internal use
|
12235
|
+
* @param appId ID of the application backend to which the request and authentication response should be sent. This must be a UUID
|
12236
|
+
* @param authenticateParameters Parameters for the authentication pop-up
|
12237
|
+
* @param originalRequestInfo Information about the original request that should be resent
|
12238
|
+
* @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
|
12239
|
+
*/
|
12240
|
+
function authenticateAndResendRequest(appId, authenticateParameters, originalRequestInfo) {
|
12241
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12242
|
+
if (!isSupported()) {
|
12243
|
+
throw errorNotSupportedOnPlatform;
|
12244
|
+
}
|
12245
|
+
validateOriginalRequestInfo(originalRequestInfo);
|
12246
|
+
// Ask the parent window to open an authentication window with the parameters provided by the caller.
|
12247
|
+
return sendMessageToParentAsync('externalAppAuthentication.authenticateAndResendRequest', [
|
12248
|
+
appId,
|
12249
|
+
originalRequestInfo,
|
12250
|
+
authenticateParameters.url.href,
|
12251
|
+
authenticateParameters.width,
|
12252
|
+
authenticateParameters.height,
|
12253
|
+
authenticateParameters.isExternal,
|
12254
|
+
]).then(function (_a) {
|
12255
|
+
var wasSuccessful = _a[0], response = _a[1];
|
12256
|
+
if (wasSuccessful && response.responseType != null) {
|
12257
|
+
return response;
|
12258
|
+
}
|
12259
|
+
else {
|
12260
|
+
var error = response;
|
12261
|
+
throw error;
|
12262
|
+
}
|
12263
|
+
});
|
12264
|
+
}
|
12265
|
+
externalAppAuthentication.authenticateAndResendRequest = authenticateAndResendRequest;
|
12266
|
+
/**
|
12267
|
+
* @beta
|
12268
|
+
* @hidden
|
12269
|
+
* Signals to the host to perform SSO authentication for the application specified by the app ID
|
12270
|
+
* @internal
|
12271
|
+
* Limited to Microsoft-internal use
|
12272
|
+
* @param appId ID of the application backend for which the host should attempt SSO authentication. This must be a UUID
|
12273
|
+
* @param authTokenRequest Parameters for SSO authentication
|
12274
|
+
* @returns A promise that resolves when authentication and succeeds and rejects with InvokeError on failure
|
12275
|
+
*/
|
12276
|
+
function authenticateWithSSO(appId, authTokenRequest) {
|
12277
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12278
|
+
if (!isSupported()) {
|
12279
|
+
throw errorNotSupportedOnPlatform;
|
12280
|
+
}
|
12281
|
+
return sendMessageToParentAsync('externalAppAuthentication.authenticateWithSSO', [
|
12282
|
+
appId,
|
12283
|
+
authTokenRequest.claims,
|
12284
|
+
authTokenRequest.silent,
|
12285
|
+
]).then(function (_a) {
|
12286
|
+
var wasSuccessful = _a[0], error = _a[1];
|
12287
|
+
if (!wasSuccessful) {
|
12288
|
+
throw error;
|
12289
|
+
}
|
12290
|
+
});
|
12291
|
+
}
|
12292
|
+
externalAppAuthentication.authenticateWithSSO = authenticateWithSSO;
|
12293
|
+
/**
|
12294
|
+
* @beta
|
12295
|
+
* @hidden
|
12296
|
+
* 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
|
12297
|
+
* @internal
|
12298
|
+
* Limited to Microsoft-internal use
|
12299
|
+
* @param appId ID of the application backend for which the host should attempt SSO authentication and resend the request and authentication response. This must be a UUID.
|
12300
|
+
* @param authTokenRequest Parameters for SSO authentication
|
12301
|
+
* @param originalRequestInfo Information about the original request that should be resent
|
12302
|
+
* @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
|
12303
|
+
*/
|
12304
|
+
function authenticateWithSSOAndResendRequest(appId, authTokenRequest, originalRequestInfo) {
|
12305
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12306
|
+
if (!isSupported()) {
|
12307
|
+
throw errorNotSupportedOnPlatform;
|
12308
|
+
}
|
12309
|
+
validateOriginalRequestInfo(originalRequestInfo);
|
12310
|
+
return sendMessageToParentAsync('externalAppAuthentication.authenticateWithSSOAndResendRequest', [appId, originalRequestInfo, authTokenRequest.claims, authTokenRequest.silent]).then(function (_a) {
|
12311
|
+
var wasSuccessful = _a[0], response = _a[1];
|
12312
|
+
if (wasSuccessful && response.responseType != null) {
|
12313
|
+
return response;
|
12314
|
+
}
|
12315
|
+
else {
|
12316
|
+
var error = response;
|
12317
|
+
throw error;
|
12318
|
+
}
|
12319
|
+
});
|
12320
|
+
}
|
12321
|
+
externalAppAuthentication.authenticateWithSSOAndResendRequest = authenticateWithSSOAndResendRequest;
|
12322
|
+
/**
|
12323
|
+
* @hidden
|
12324
|
+
* Checks if the externalAppAuthentication capability is supported by the host
|
12325
|
+
* @returns boolean to represent whether externalAppAuthentication capability is supported
|
12326
|
+
*
|
12327
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
12328
|
+
*
|
12329
|
+
* @internal
|
12330
|
+
* Limited to Microsoft-internal use
|
12331
|
+
*/
|
12332
|
+
function isSupported() {
|
12333
|
+
return internalAPIs_ensureInitialized(runtime_runtime) && runtime_runtime.supports.externalAppAuthentication ? true : false;
|
12334
|
+
}
|
12335
|
+
externalAppAuthentication.isSupported = isSupported;
|
12336
|
+
})(externalAppAuthentication || (externalAppAuthentication = {}));
|
12337
|
+
|
12338
|
+
;// CONCATENATED MODULE: ./src/private/externalAppCardActions.ts
|
12339
|
+
|
12340
|
+
|
12341
|
+
|
12342
|
+
|
12343
|
+
|
12344
|
+
/**
|
12345
|
+
* @hidden
|
12346
|
+
* Namespace to delegate adaptive card action execution to the host
|
12347
|
+
* @internal
|
12348
|
+
* Limited to Microsoft-internal use
|
12349
|
+
*/
|
12350
|
+
var externalAppCardActions;
|
12351
|
+
(function (externalAppCardActions) {
|
12352
|
+
/**
|
12353
|
+
* @hidden
|
12354
|
+
* The type of deeplink action that was executed by the host
|
12355
|
+
* @internal
|
12356
|
+
* Limited to Microsoft-internal use
|
12357
|
+
*/
|
12358
|
+
var ActionOpenUrlType;
|
12359
|
+
(function (ActionOpenUrlType) {
|
12360
|
+
ActionOpenUrlType["DeepLinkDialog"] = "DeepLinkDialog";
|
12361
|
+
ActionOpenUrlType["DeepLinkOther"] = "DeepLinkOther";
|
12362
|
+
ActionOpenUrlType["DeepLinkStageView"] = "DeepLinkStageView";
|
12363
|
+
ActionOpenUrlType["GenericUrl"] = "GenericUrl";
|
12364
|
+
})(ActionOpenUrlType = externalAppCardActions.ActionOpenUrlType || (externalAppCardActions.ActionOpenUrlType = {}));
|
12365
|
+
/**
|
12366
|
+
* @hidden
|
12367
|
+
* Error codes that can be thrown from IExternalAppCardActionService.handleActionOpenUrl
|
12368
|
+
* @internal
|
12369
|
+
* Limited to Microsoft-internal use
|
12370
|
+
*/
|
12371
|
+
var ActionOpenUrlErrorCode;
|
12372
|
+
(function (ActionOpenUrlErrorCode) {
|
12373
|
+
ActionOpenUrlErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
12374
|
+
ActionOpenUrlErrorCode["INVALID_LINK"] = "INVALID_LINK";
|
12375
|
+
ActionOpenUrlErrorCode["NOT_SUPPORTED"] = "NOT_SUPPORTED";
|
12376
|
+
})(ActionOpenUrlErrorCode = externalAppCardActions.ActionOpenUrlErrorCode || (externalAppCardActions.ActionOpenUrlErrorCode = {}));
|
12377
|
+
/**
|
12378
|
+
* @hidden
|
12379
|
+
* Error codes that can be thrown from IExternalAppCardActionService.handleActionSubmit
|
12380
|
+
* @internal
|
12381
|
+
* Limited to Microsoft-internal use
|
12382
|
+
*/
|
12383
|
+
var ActionSubmitErrorCode;
|
12384
|
+
(function (ActionSubmitErrorCode) {
|
12385
|
+
ActionSubmitErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
|
12386
|
+
})(ActionSubmitErrorCode = externalAppCardActions.ActionSubmitErrorCode || (externalAppCardActions.ActionSubmitErrorCode = {}));
|
12387
|
+
/**
|
12388
|
+
* @beta
|
12389
|
+
* @hidden
|
12390
|
+
* Delegates an Adaptive Card Action.Submit request to the host for the application with the provided app ID
|
12391
|
+
* @internal
|
12392
|
+
* Limited to Microsoft-internal use
|
12393
|
+
* @param appId ID of the application the request is intended for. This must be a UUID
|
12394
|
+
* @param actionSubmitPayload The Adaptive Card Action.Submit payload
|
12395
|
+
* @param cardActionsConfig The card actions configuration. This indicates which subtypes should be handled by this API
|
12396
|
+
* @returns Promise that resolves when the request is completed and rejects with ActionSubmitError if the request fails
|
12397
|
+
*/
|
12398
|
+
function processActionSubmit(appId, actionSubmitPayload, cardActionsConfig) {
|
12399
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12400
|
+
if (!isSupported()) {
|
12401
|
+
throw errorNotSupportedOnPlatform;
|
12402
|
+
}
|
12403
|
+
return sendMessageToParentAsync('externalAppCardActions.processActionSubmit', [
|
12404
|
+
appId,
|
12405
|
+
actionSubmitPayload,
|
12406
|
+
cardActionsConfig,
|
12407
|
+
]).then(function (_a) {
|
12408
|
+
var wasSuccessful = _a[0], error = _a[1];
|
12409
|
+
if (!wasSuccessful) {
|
12410
|
+
throw error;
|
12411
|
+
}
|
12412
|
+
});
|
12413
|
+
}
|
12414
|
+
externalAppCardActions.processActionSubmit = processActionSubmit;
|
12415
|
+
/**
|
12416
|
+
* @beta
|
12417
|
+
* @hidden
|
12418
|
+
* Delegates an Adaptive Card Action.OpenUrl request to the host for the application with the provided app ID
|
12419
|
+
* @internal
|
12420
|
+
* Limited to Microsoft-internal use
|
12421
|
+
* @param appId ID of the application the request is intended for. This must be a UUID
|
12422
|
+
* @param url The URL to open
|
12423
|
+
* @returns Promise that resolves to ActionOpenUrlType indicating the type of URL that was opened on success and rejects with ActionOpenUrlError if the request fails
|
12424
|
+
*/
|
12425
|
+
function processActionOpenUrl(appId, url) {
|
12426
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
12427
|
+
if (!isSupported()) {
|
12428
|
+
throw errorNotSupportedOnPlatform;
|
12429
|
+
}
|
12430
|
+
return sendMessageToParentAsync('externalAppCardActions.processActionOpenUrl', [appId, url.href]).then(function (_a) {
|
12431
|
+
var error = _a[0], response = _a[1];
|
12432
|
+
if (error) {
|
12433
|
+
throw error;
|
12434
|
+
}
|
12435
|
+
else {
|
12436
|
+
return response;
|
12437
|
+
}
|
12438
|
+
});
|
12439
|
+
}
|
12440
|
+
externalAppCardActions.processActionOpenUrl = processActionOpenUrl;
|
12441
|
+
/**
|
12442
|
+
* @hidden
|
12443
|
+
* Checks if the externalAppCardActions capability is supported by the host
|
12444
|
+
* @returns boolean to represent whether externalAppCardActions capability is supported
|
12445
|
+
*
|
12446
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
12447
|
+
*
|
12448
|
+
* @internal
|
12449
|
+
* Limited to Microsoft-internal use
|
12450
|
+
*/
|
12451
|
+
function isSupported() {
|
12452
|
+
return internalAPIs_ensureInitialized(runtime_runtime) && runtime_runtime.supports.externalAppCardActions ? true : false;
|
12453
|
+
}
|
12454
|
+
externalAppCardActions.isSupported = isSupported;
|
12455
|
+
})(externalAppCardActions || (externalAppCardActions = {}));
|
11999
12456
|
|
12000
12457
|
;// CONCATENATED MODULE: ./src/private/files.ts
|
12001
12458
|
|
@@ -12671,6 +13128,13 @@ var meetingRoom;
|
|
12671
13128
|
|
12672
13129
|
|
12673
13130
|
|
13131
|
+
/**
|
13132
|
+
* @hidden
|
13133
|
+
* Hidden from Docs
|
13134
|
+
*
|
13135
|
+
* @internal
|
13136
|
+
* Limited to Microsoft-internal use
|
13137
|
+
*/
|
12674
13138
|
var notifications;
|
12675
13139
|
(function (notifications) {
|
12676
13140
|
/**
|
@@ -13530,6 +13994,8 @@ var videoEffectsEx;
|
|
13530
13994
|
|
13531
13995
|
|
13532
13996
|
|
13997
|
+
|
13998
|
+
|
13533
13999
|
|
13534
14000
|
;// CONCATENATED MODULE: ./src/index.ts
|
13535
14001
|
|