@microsoft/teams-js 2.23.0-beta.0 → 2.23.0-beta.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1000,11 +1000,14 @@ __webpack_require__.d(__webpack_exports__, {
1000
1000
  HostClientType: () => (/* reexport */ HostClientType),
1001
1001
  HostName: () => (/* reexport */ HostName),
1002
1002
  LiveShareHost: () => (/* reexport */ LiveShareHost),
1003
+ NotificationTypes: () => (/* reexport */ NotificationTypes),
1003
1004
  ParentAppWindow: () => (/* reexport */ ParentAppWindow),
1004
1005
  SecondaryM365ContentIdName: () => (/* reexport */ SecondaryM365ContentIdName),
1005
1006
  TaskModuleDimension: () => (/* reexport */ TaskModuleDimension),
1006
1007
  TeamType: () => (/* reexport */ TeamType),
1008
+ UserSettingTypes: () => (/* reexport */ UserSettingTypes),
1007
1009
  UserTeamRole: () => (/* reexport */ UserTeamRole),
1010
+ ViewerActionTypes: () => (/* reexport */ ViewerActionTypes),
1008
1011
  app: () => (/* reexport */ app),
1009
1012
  appEntity: () => (/* reexport */ appEntity),
1010
1013
  appInitialization: () => (/* reexport */ appInitialization),
@@ -2932,9 +2935,56 @@ function validateId(id, errorToThrow) {
2932
2935
  throw errorToThrow || new Error('id is not valid.');
2933
2936
  }
2934
2937
  }
2935
- function hasScriptTags(id) {
2938
+ function validateUrl(url, errorToThrow) {
2939
+ const urlString = url.toString().toLocaleLowerCase();
2940
+ if (hasScriptTags(urlString)) {
2941
+ throw errorToThrow || new Error('Invalid Url');
2942
+ }
2943
+ if (urlString.length > 2048) {
2944
+ throw errorToThrow || new Error('Url exceeds the maximum size of 2048 characters');
2945
+ }
2946
+ if (!isValidHttpsURL(url)) {
2947
+ throw errorToThrow || new Error('Url should be a valid https url');
2948
+ }
2949
+ }
2950
+ /**
2951
+ * The hasScriptTags function first decodes any HTML entities in the input string using the decodeHTMLEntities function.
2952
+ * It then tries to decode the result as a URI component. If the URI decoding fails (which would throw an error), it assumes that the input was not encoded and uses the original input.
2953
+ * Next, it defines a regular expression scriptRegex that matches any string that starts with <script (followed by any characters), then has any characters (including newlines),
2954
+ * and ends with </script> (preceded by any characters).
2955
+ * Finally, it uses the test method to check if the decoded input matches this regular expression. The function returns true if a match is found and false otherwise.
2956
+ * @param input URL converted to string to pattern match
2957
+ * @returns true if the input string contains a script tag, false otherwise
2958
+ */
2959
+ function hasScriptTags(input) {
2960
+ let decodedInput;
2961
+ try {
2962
+ const decodedHTMLInput = decodeHTMLEntities(input);
2963
+ decodedInput = decodeURIComponent(decodedHTMLInput);
2964
+ }
2965
+ catch (e) {
2966
+ // input was not encoded, use it as is
2967
+ decodedInput = input;
2968
+ }
2936
2969
  const scriptRegex = /<script[^>]*>[\s\S]*?<\/script[^>]*>/gi;
2937
- return scriptRegex.test(id);
2970
+ return scriptRegex.test(decodedInput);
2971
+ }
2972
+ /**
2973
+ * The decodeHTMLEntities function replaces HTML entities in the input string with their corresponding characters.
2974
+ */
2975
+ function decodeHTMLEntities(input) {
2976
+ const entityMap = new Map([
2977
+ ['&lt;', '<'],
2978
+ ['&gt;', '>'],
2979
+ ['&amp;', '&'],
2980
+ ['&quot;', '"'],
2981
+ ['&#39;', "'"],
2982
+ ['&#x2F;', '/'],
2983
+ ]);
2984
+ entityMap.forEach((value, key) => {
2985
+ input = input.replace(new RegExp(key, 'gi'), value);
2986
+ });
2987
+ return input;
2938
2988
  }
2939
2989
  function isIdLengthValid(id) {
2940
2990
  return id.length < 256 && id.length > 4;
@@ -3322,7 +3372,7 @@ const _minRuntimeConfigToUninitialize = {
3322
3372
  * @hidden
3323
3373
  * Package version.
3324
3374
  */
3325
- const version = "2.23.0-beta.0";
3375
+ const version = "2.23.0-beta.1";
3326
3376
 
3327
3377
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
3328
3378
 
@@ -3805,6 +3855,14 @@ var authentication;
3805
3855
  Communication.childOrigin = null;
3806
3856
  }
3807
3857
  }
3858
+ /**
3859
+ * Different browsers handle authentication flows in pop-up windows differently.
3860
+ * Firefox and Safari, which use Quantum and WebKit browser engines respectively, block the use of 'window.open' for pop-up windows.
3861
+ * Any chrome-based browser (Chrome, Edge, Brave, etc.) opens a new browser window without any user-prompts.
3862
+ * To ensure consistent behavior across all browsers, consider using the following function to create a new authentication window.
3863
+ *
3864
+ * @param authenticateParameters - Parameters describing the authentication window used for executing the authentication flow.
3865
+ */
3808
3866
  function openAuthenticationWindow(authenticateParameters) {
3809
3867
  // Close the previously opened window if we have one
3810
3868
  closeAuthenticationWindow();
@@ -5857,8 +5915,6 @@ var pages;
5857
5915
  })(appButton = pages.appButton || (pages.appButton = {}));
5858
5916
  /**
5859
5917
  * Provides functions for navigating without needing to specify your application ID.
5860
- *
5861
- * @beta
5862
5918
  */
5863
5919
  let currentApp;
5864
5920
  (function (currentApp) {
@@ -5867,8 +5923,6 @@ var pages;
5867
5923
  * specific content within the page).
5868
5924
  * @param params - Parameters for the navigation
5869
5925
  * @returns a promise that will resolve if the navigation was successful
5870
- *
5871
- * @beta
5872
5926
  */
5873
5927
  function navigateTo(params) {
5874
5928
  return new Promise((resolve) => {
@@ -5883,7 +5937,6 @@ var pages;
5883
5937
  /**
5884
5938
  * Navigate to the currently running application's first static page defined in the application
5885
5939
  * manifest.
5886
- * @beta
5887
5940
  */
5888
5941
  function navigateToDefaultPage() {
5889
5942
  return new Promise((resolve) => {
@@ -5900,8 +5953,6 @@ var pages;
5900
5953
  * @returns boolean to represent whether the pages.currentApp capability is supported
5901
5954
  *
5902
5955
  * @throws Error if {@linkcode app.initialize} has not successfully completed
5903
- *
5904
- * @beta
5905
5956
  */
5906
5957
  function isSupported() {
5907
5958
  return ensureInitialized(runtime) && runtime.supports.pages
@@ -7065,6 +7116,55 @@ var logs;
7065
7116
  logs.isSupported = isSupported;
7066
7117
  })(logs || (logs = {}));
7067
7118
 
7119
+ ;// CONCATENATED MODULE: ./src/private/interfaces.ts
7120
+ /**
7121
+ * @hidden
7122
+ *
7123
+ * @internal
7124
+ * Limited to Microsoft-internal use
7125
+ */
7126
+ var NotificationTypes;
7127
+ (function (NotificationTypes) {
7128
+ NotificationTypes["fileDownloadStart"] = "fileDownloadStart";
7129
+ NotificationTypes["fileDownloadComplete"] = "fileDownloadComplete";
7130
+ })(NotificationTypes || (NotificationTypes = {}));
7131
+ /**
7132
+ * @hidden
7133
+ *
7134
+ * @internal
7135
+ * Limited to Microsoft-internal use
7136
+ */
7137
+ var ViewerActionTypes;
7138
+ (function (ViewerActionTypes) {
7139
+ ViewerActionTypes["view"] = "view";
7140
+ ViewerActionTypes["edit"] = "edit";
7141
+ ViewerActionTypes["editNew"] = "editNew";
7142
+ })(ViewerActionTypes || (ViewerActionTypes = {}));
7143
+ /**
7144
+ * @hidden
7145
+ *
7146
+ * User setting changes that can be subscribed to
7147
+ */
7148
+ var UserSettingTypes;
7149
+ (function (UserSettingTypes) {
7150
+ /**
7151
+ * @hidden
7152
+ * Use this key to subscribe to changes in user's file open preference
7153
+ *
7154
+ * @internal
7155
+ * Limited to Microsoft-internal use
7156
+ */
7157
+ UserSettingTypes["fileOpenPreference"] = "fileOpenPreference";
7158
+ /**
7159
+ * @hidden
7160
+ * Use this key to subscribe to theme changes
7161
+ *
7162
+ * @internal
7163
+ * Limited to Microsoft-internal use
7164
+ */
7165
+ UserSettingTypes["theme"] = "theme";
7166
+ })(UserSettingTypes || (UserSettingTypes = {}));
7167
+
7068
7168
  ;// CONCATENATED MODULE: ./src/private/privateAPIs.ts
7069
7169
  /* eslint-disable @typescript-eslint/no-explicit-any */
7070
7170
 
@@ -8873,6 +8973,7 @@ var meeting_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
8873
8973
 
8874
8974
 
8875
8975
 
8976
+
8876
8977
  /**
8877
8978
  * v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
8878
8979
  */
@@ -9057,6 +9158,10 @@ var meeting;
9057
9158
  }
9058
9159
  meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
9059
9160
  /**
9161
+ * @throws error if your app manifest does not include the `OnlineMeeting.ReadBasic.Chat` RSC permission.
9162
+ * Find the app manifest reference at https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema.
9163
+ * Find the RSC reference at https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent.
9164
+ *
9060
9165
  * @hidden
9061
9166
  * Allows an app to get the meeting details for the meeting
9062
9167
  *
@@ -9075,6 +9180,43 @@ var meeting;
9075
9180
  sendMessageToParent(getApiVersionTag(meetingTelemetryVersionNumber, "meeting.getMeetingDetails" /* ApiName.Meeting_GetMeetingDetails */), 'meeting.getMeetingDetails', callback);
9076
9181
  }
9077
9182
  meeting.getMeetingDetails = getMeetingDetails;
9183
+ /**
9184
+ * @throws error if your app manifest does not include both the `OnlineMeeting.ReadBasic.Chat` RSC permission
9185
+ * and the `OnlineMeetingParticipant.Read.Chat` RSC permission.
9186
+ * Find the app manifest reference at https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema.
9187
+ * Find the RSC reference at https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent.
9188
+ *
9189
+ * @throws `not supported on platform` error if your app is run on a host that does not support returning additional meeting details.
9190
+ *
9191
+ * @hidden
9192
+ * Allows an app to get the additional meeting details for the meeting.
9193
+ * Some additional details are returned on a best-effort basis. They may not be present for every meeting.
9194
+ *
9195
+ * @internal
9196
+ * Limited to Microsoft-internal use
9197
+ *
9198
+ * @beta
9199
+ */
9200
+ function getMeetingDetailsVerbose() {
9201
+ var _a, _b, _c;
9202
+ return meeting_awaiter(this, void 0, void 0, function* () {
9203
+ ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage, FrameContexts.settings, FrameContexts.content);
9204
+ let response;
9205
+ try {
9206
+ const shouldGetVerboseDetails = true;
9207
+ response = (yield sendAndHandleSdkError(getApiVersionTag("v2" /* ApiVersionNumber.V_2 */, "meeting.getMeetingDetailsVerbose" /* ApiName.Meeting_GetMeetingDetailsVerbose */), 'meeting.getMeetingDetails', shouldGetVerboseDetails));
9208
+ }
9209
+ catch (error) {
9210
+ throw new Error((_a = error === null || error === void 0 ? void 0 : error.errorCode) === null || _a === void 0 ? void 0 : _a.toString());
9211
+ }
9212
+ if ((((_b = response.details) === null || _b === void 0 ? void 0 : _b.type) == CallType.GroupCall || ((_c = response.details) === null || _c === void 0 ? void 0 : _c.type) == CallType.OneOnOneCall) &&
9213
+ !response.details.originalCaller) {
9214
+ throw new Error(ErrorCode.NOT_SUPPORTED_ON_PLATFORM.toString());
9215
+ }
9216
+ return response;
9217
+ });
9218
+ }
9219
+ meeting.getMeetingDetailsVerbose = getMeetingDetailsVerbose;
9078
9220
  /**
9079
9221
  * @hidden
9080
9222
  * Allows an app to get the authentication token for the anonymous or guest user in the meeting
@@ -13167,6 +13309,38 @@ var externalAppAuthentication;
13167
13309
  * Limited to Microsoft-internal use
13168
13310
  */
13169
13311
  const ActionExecuteInvokeRequestType = 'Action.Execute';
13312
+ /**
13313
+ * @hidden
13314
+ * Used to differentiate between IOriginalRequestInfo types
13315
+ * @internal
13316
+ * Limited to Microsoft-internal use
13317
+ */
13318
+ let OriginalRequestType;
13319
+ (function (OriginalRequestType) {
13320
+ OriginalRequestType["ActionExecuteInvokeRequest"] = "ActionExecuteInvokeRequest";
13321
+ OriginalRequestType["QueryMessageExtensionRequest"] = "QueryMessageExtensionRequest";
13322
+ })(OriginalRequestType = externalAppAuthentication.OriginalRequestType || (externalAppAuthentication.OriginalRequestType = {}));
13323
+ /**
13324
+ * @hidden
13325
+ * Used to differentiate between IInvokeResponse types
13326
+ * @internal
13327
+ * Limited to Microsoft-internal use
13328
+ */
13329
+ let InvokeResponseType;
13330
+ (function (InvokeResponseType) {
13331
+ InvokeResponseType["ActionExecuteInvokeResponse"] = "ActionExecuteInvokeResponse";
13332
+ InvokeResponseType["QueryMessageExtensionResponse"] = "QueryMessageExtensionResponse";
13333
+ })(InvokeResponseType = externalAppAuthentication.InvokeResponseType || (externalAppAuthentication.InvokeResponseType = {}));
13334
+ /**
13335
+ * @hidden
13336
+ *
13337
+ * @internal
13338
+ * Limited to Microsoft-internal use
13339
+ */
13340
+ let InvokeErrorCode;
13341
+ (function (InvokeErrorCode) {
13342
+ InvokeErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
13343
+ })(InvokeErrorCode = externalAppAuthentication.InvokeErrorCode || (externalAppAuthentication.InvokeErrorCode = {}));
13170
13344
  /*********** END ERROR TYPE ***********/
13171
13345
  /**
13172
13346
  * @hidden
@@ -13174,17 +13348,17 @@ var externalAppAuthentication;
13174
13348
  * Limited to Microsoft-internal use
13175
13349
  */
13176
13350
  function validateOriginalRequestInfo(originalRequestInfo) {
13177
- if (originalRequestInfo.requestType === "ActionExecuteInvokeRequest" /* OriginalRequestType.ActionExecuteInvokeRequest */) {
13351
+ if (originalRequestInfo.requestType === OriginalRequestType.ActionExecuteInvokeRequest) {
13178
13352
  const actionExecuteRequest = originalRequestInfo;
13179
13353
  if (actionExecuteRequest.type !== ActionExecuteInvokeRequestType) {
13180
13354
  const error = {
13181
- errorCode: "INTERNAL_ERROR" /* InvokeErrorCode.INTERNAL_ERROR */,
13355
+ errorCode: InvokeErrorCode.INTERNAL_ERROR,
13182
13356
  message: `Invalid action type ${actionExecuteRequest.type}. Action type must be "${ActionExecuteInvokeRequestType}"`,
13183
13357
  };
13184
13358
  throw error;
13185
13359
  }
13186
13360
  }
13187
- else if (originalRequestInfo.requestType === "QueryMessageExtensionRequest" /* OriginalRequestType.QueryMessageExtensionRequest */) {
13361
+ else if (originalRequestInfo.requestType === OriginalRequestType.QueryMessageExtensionRequest) {
13188
13362
  if (originalRequestInfo.commandId.length > 64) {
13189
13363
  throw new Error('originalRequestInfo.commandId exceeds the maximum size of 64 characters');
13190
13364
  }
@@ -13321,6 +13495,39 @@ var externalAppAuthentication;
13321
13495
  });
13322
13496
  }
13323
13497
  externalAppAuthentication.authenticateWithOauth2 = authenticateWithOauth2;
13498
+ /**
13499
+ * @beta
13500
+ * @hidden
13501
+ * API to authenticate power platform connector plugins
13502
+ * @internal
13503
+ * Limited to Microsoft-internal use
13504
+ * @param titleId ID of the acquisition
13505
+ * @param signInUrl signInUrl for the connctor page listing the connector. This is optional
13506
+ * @param oauthWindowParameters parameters for the signIn window
13507
+ * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
13508
+ */
13509
+ function authenticateWithPowerPlatformConnectorPlugins(titleId, signInUrl, oauthWindowParameters) {
13510
+ ensureInitialized(runtime, FrameContexts.content);
13511
+ if (!isSupported()) {
13512
+ throw errorNotSupportedOnPlatform;
13513
+ }
13514
+ validateId(titleId, new Error('titleId is Invalid.'));
13515
+ if (signInUrl) {
13516
+ validateUrl(signInUrl);
13517
+ }
13518
+ return sendMessageToParentAsync(getApiVersionTag(externalAppAuthenticationTelemetryVersionNumber, "externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins" /* ApiName.ExternalAppAuthentication_AuthenticateWithPowerPlatformConnectorPlugins */), 'externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins', [
13519
+ titleId,
13520
+ signInUrl === null || signInUrl === void 0 ? void 0 : signInUrl.toString(),
13521
+ oauthWindowParameters === null || oauthWindowParameters === void 0 ? void 0 : oauthWindowParameters.width,
13522
+ oauthWindowParameters === null || oauthWindowParameters === void 0 ? void 0 : oauthWindowParameters.height,
13523
+ oauthWindowParameters === null || oauthWindowParameters === void 0 ? void 0 : oauthWindowParameters.isExternal,
13524
+ ]).then(([wasSuccessful, error]) => {
13525
+ if (!wasSuccessful) {
13526
+ throw error;
13527
+ }
13528
+ });
13529
+ }
13530
+ externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins = authenticateWithPowerPlatformConnectorPlugins;
13324
13531
  /**
13325
13532
  * @hidden
13326
13533
  * Checks if the externalAppAuthentication capability is supported by the host
@@ -13357,6 +13564,31 @@ const externalAppCardActionsTelemetryVersionNumber = "v2" /* ApiVersionNumber.V_
13357
13564
  */
13358
13565
  var externalAppCardActions;
13359
13566
  (function (externalAppCardActions) {
13567
+ /**
13568
+ * @hidden
13569
+ * The type of deeplink action that was executed by the host
13570
+ * @internal
13571
+ * Limited to Microsoft-internal use
13572
+ */
13573
+ let ActionOpenUrlType;
13574
+ (function (ActionOpenUrlType) {
13575
+ ActionOpenUrlType["DeepLinkDialog"] = "DeepLinkDialog";
13576
+ ActionOpenUrlType["DeepLinkOther"] = "DeepLinkOther";
13577
+ ActionOpenUrlType["DeepLinkStageView"] = "DeepLinkStageView";
13578
+ ActionOpenUrlType["GenericUrl"] = "GenericUrl";
13579
+ })(ActionOpenUrlType = externalAppCardActions.ActionOpenUrlType || (externalAppCardActions.ActionOpenUrlType = {}));
13580
+ /**
13581
+ * @hidden
13582
+ * Error codes that can be thrown from IExternalAppCardActionService.handleActionOpenUrl
13583
+ * @internal
13584
+ * Limited to Microsoft-internal use
13585
+ */
13586
+ let ActionOpenUrlErrorCode;
13587
+ (function (ActionOpenUrlErrorCode) {
13588
+ ActionOpenUrlErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
13589
+ ActionOpenUrlErrorCode["INVALID_LINK"] = "INVALID_LINK";
13590
+ ActionOpenUrlErrorCode["NOT_SUPPORTED"] = "NOT_SUPPORTED";
13591
+ })(ActionOpenUrlErrorCode = externalAppCardActions.ActionOpenUrlErrorCode || (externalAppCardActions.ActionOpenUrlErrorCode = {}));
13360
13592
  /**
13361
13593
  * @beta
13362
13594
  * @hidden
@@ -13526,6 +13758,97 @@ var externalAppCommands;
13526
13758
  const filesTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
13527
13759
  var files;
13528
13760
  (function (files_1) {
13761
+ /**
13762
+ * @hidden
13763
+ *
13764
+ * Cloud storage providers registered with Microsoft Teams
13765
+ *
13766
+ * @internal
13767
+ * Limited to Microsoft-internal use
13768
+ */
13769
+ let CloudStorageProvider;
13770
+ (function (CloudStorageProvider) {
13771
+ CloudStorageProvider["Dropbox"] = "DROPBOX";
13772
+ CloudStorageProvider["Box"] = "BOX";
13773
+ CloudStorageProvider["Sharefile"] = "SHAREFILE";
13774
+ CloudStorageProvider["GoogleDrive"] = "GOOGLEDRIVE";
13775
+ CloudStorageProvider["Egnyte"] = "EGNYTE";
13776
+ CloudStorageProvider["SharePoint"] = "SharePoint";
13777
+ })(CloudStorageProvider = files_1.CloudStorageProvider || (files_1.CloudStorageProvider = {}));
13778
+ /**
13779
+ * @hidden
13780
+ *
13781
+ * Cloud storage provider type enums
13782
+ *
13783
+ * @internal
13784
+ * Limited to Microsoft-internal use
13785
+ */
13786
+ let CloudStorageProviderType;
13787
+ (function (CloudStorageProviderType) {
13788
+ CloudStorageProviderType[CloudStorageProviderType["Sharepoint"] = 0] = "Sharepoint";
13789
+ CloudStorageProviderType[CloudStorageProviderType["WopiIntegration"] = 1] = "WopiIntegration";
13790
+ CloudStorageProviderType[CloudStorageProviderType["Google"] = 2] = "Google";
13791
+ CloudStorageProviderType[CloudStorageProviderType["OneDrive"] = 3] = "OneDrive";
13792
+ CloudStorageProviderType[CloudStorageProviderType["Recent"] = 4] = "Recent";
13793
+ CloudStorageProviderType[CloudStorageProviderType["Aggregate"] = 5] = "Aggregate";
13794
+ CloudStorageProviderType[CloudStorageProviderType["FileSystem"] = 6] = "FileSystem";
13795
+ CloudStorageProviderType[CloudStorageProviderType["Search"] = 7] = "Search";
13796
+ CloudStorageProviderType[CloudStorageProviderType["AllFiles"] = 8] = "AllFiles";
13797
+ CloudStorageProviderType[CloudStorageProviderType["SharedWithMe"] = 9] = "SharedWithMe";
13798
+ })(CloudStorageProviderType = files_1.CloudStorageProviderType || (files_1.CloudStorageProviderType = {}));
13799
+ /**
13800
+ * @hidden
13801
+ *
13802
+ * Special Document Library enum
13803
+ *
13804
+ * @internal
13805
+ * Limited to Microsoft-internal use
13806
+ */
13807
+ let SpecialDocumentLibraryType;
13808
+ (function (SpecialDocumentLibraryType) {
13809
+ SpecialDocumentLibraryType["ClassMaterials"] = "classMaterials";
13810
+ })(SpecialDocumentLibraryType = files_1.SpecialDocumentLibraryType || (files_1.SpecialDocumentLibraryType = {}));
13811
+ /**
13812
+ * @hidden
13813
+ *
13814
+ * Document Library Access enum
13815
+ *
13816
+ * @internal
13817
+ * Limited to Microsoft-internal use
13818
+ */
13819
+ let DocumentLibraryAccessType;
13820
+ (function (DocumentLibraryAccessType) {
13821
+ DocumentLibraryAccessType["Readonly"] = "readonly";
13822
+ })(DocumentLibraryAccessType = files_1.DocumentLibraryAccessType || (files_1.DocumentLibraryAccessType = {}));
13823
+ /**
13824
+ * @hidden
13825
+ *
13826
+ * Download status enum
13827
+ *
13828
+ * @internal
13829
+ * Limited to Microsoft-internal use
13830
+ */
13831
+ let FileDownloadStatus;
13832
+ (function (FileDownloadStatus) {
13833
+ FileDownloadStatus["Downloaded"] = "Downloaded";
13834
+ FileDownloadStatus["Downloading"] = "Downloading";
13835
+ FileDownloadStatus["Failed"] = "Failed";
13836
+ })(FileDownloadStatus = files_1.FileDownloadStatus || (files_1.FileDownloadStatus = {}));
13837
+ /**
13838
+ * @hidden
13839
+ * Hide from docs
13840
+ *
13841
+ * Actions specific to 3P cloud storage provider file and / or account
13842
+ *
13843
+ * @internal
13844
+ * Limited to Microsoft-internal use
13845
+ */
13846
+ let CloudStorageProviderFileAction;
13847
+ (function (CloudStorageProviderFileAction) {
13848
+ CloudStorageProviderFileAction["Download"] = "DOWNLOAD";
13849
+ CloudStorageProviderFileAction["Upload"] = "UPLOAD";
13850
+ CloudStorageProviderFileAction["Delete"] = "DELETE";
13851
+ })(CloudStorageProviderFileAction = files_1.CloudStorageProviderFileAction || (files_1.CloudStorageProviderFileAction = {}));
13529
13852
  /**
13530
13853
  * @hidden
13531
13854
  * Hide from docs
@@ -14117,39 +14440,140 @@ var messageChannels_awaiter = (undefined && undefined.__awaiter) || function (th
14117
14440
  */
14118
14441
  var messageChannels;
14119
14442
  (function (messageChannels) {
14120
- let telemetryPort;
14121
- const messageChannelsTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14122
- const logger = getLogger('messageChannels');
14123
- /**
14124
- * @hidden
14125
- * @beta
14126
- *
14127
- * Fetches a MessagePort to batch telemetry through the host's telemetry worker.
14128
- * The port is cached once received, so subsequent calls return the same port.
14129
- * @returns MessagePort.
14130
- *
14131
- * @throws Error if {@linkcode app.initialize} has not successfully completed,
14132
- * if the host does not support the feature, or if the port request is rejected.
14133
- *
14134
- * @internal
14135
- * Limited to Microsoft-internal use
14136
- */
14137
- function getTelemetryPort() {
14138
- return messageChannels_awaiter(this, void 0, void 0, function* () {
14139
- // If the port has already been initialized, return it.
14140
- if (telemetryPort) {
14141
- logger('Returning telemetry port from cache');
14443
+ let telemetry;
14444
+ (function (telemetry) {
14445
+ let telemetryPort;
14446
+ const messageChannelsTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14447
+ const logger = getLogger('messageChannels.telemetry');
14448
+ /**
14449
+ * @hidden
14450
+ * @beta
14451
+ *
14452
+ * Fetches a MessagePort to batch telemetry through the host's telemetry worker.
14453
+ * The port is cached once received, so subsequent calls return the same port.
14454
+ * @returns MessagePort.
14455
+ *
14456
+ * @throws Error if {@linkcode app.initialize} has not successfully completed,
14457
+ * if the host does not support the feature, or if the port request is rejected.
14458
+ *
14459
+ * @internal
14460
+ * Limited to Microsoft-internal use
14461
+ */
14462
+ function getTelemetryPort() {
14463
+ return messageChannels_awaiter(this, void 0, void 0, function* () {
14464
+ // If the port has already been initialized, return it.
14465
+ if (telemetryPort) {
14466
+ logger('Returning telemetry port from cache');
14467
+ return telemetryPort;
14468
+ }
14469
+ if (!isSupported()) {
14470
+ throw errorNotSupportedOnPlatform;
14471
+ }
14472
+ // Send request for telemetry port, will throw if the request is rejected
14473
+ telemetryPort = yield requestPortFromParentWithVersion(getApiVersionTag(messageChannelsTelemetryVersionNumber, "messageChannels.telemetry.getTelemetryPort" /* ApiName.MessageChannels_Telemetry_GetTelemetryPort */), "messageChannels.telemetry.getTelemetryPort" /* ApiName.MessageChannels_Telemetry_GetTelemetryPort */);
14142
14474
  return telemetryPort;
14143
- }
14144
- if (!isSupported()) {
14145
- throw errorNotSupportedOnPlatform;
14146
- }
14147
- // Send request for telemetry port, will throw if the request is rejected
14148
- telemetryPort = yield requestPortFromParentWithVersion(getApiVersionTag(messageChannelsTelemetryVersionNumber, "messageChannels.getTelemetryPort" /* ApiName.MessageChannels_GetTelemetryPort */), 'messageChannels.getTelemetryPort');
14149
- return telemetryPort;
14150
- });
14151
- }
14152
- messageChannels.getTelemetryPort = getTelemetryPort;
14475
+ });
14476
+ }
14477
+ telemetry.getTelemetryPort = getTelemetryPort;
14478
+ /**
14479
+ * @hidden
14480
+ *
14481
+ * @beta
14482
+ *
14483
+ * Checks if the messageChannels.telemetry capability is supported by the host
14484
+ * @returns boolean to represent whether the messageChannels.telemetry capability is supported
14485
+ *
14486
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
14487
+ *
14488
+ * @internal
14489
+ * Limited to Microsoft-internal use
14490
+ */
14491
+ function isSupported() {
14492
+ var _a;
14493
+ return ensureInitialized(runtime) && ((_a = runtime.supports.messageChannels) === null || _a === void 0 ? void 0 : _a.telemetry) ? true : false;
14494
+ }
14495
+ telemetry.isSupported = isSupported;
14496
+ /**
14497
+ * @hidden
14498
+ * Undocumented function used to clear state between unit tests
14499
+ *
14500
+ * @beta
14501
+ *
14502
+ * @internal
14503
+ * Limited to Microsoft-internal use
14504
+ */
14505
+ function _clearTelemetryPort() {
14506
+ telemetryPort = undefined;
14507
+ }
14508
+ telemetry._clearTelemetryPort = _clearTelemetryPort;
14509
+ })(telemetry = messageChannels.telemetry || (messageChannels.telemetry = {}));
14510
+ let dataLayer;
14511
+ (function (dataLayer) {
14512
+ let dataLayerPort;
14513
+ const messageChannelsDataLayerVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14514
+ const logger = getLogger('messageChannels.dataLayer');
14515
+ /**
14516
+ * @hidden
14517
+ * @beta
14518
+ *
14519
+ * Fetches a MessagePort to allow access to the host's data layer worker.
14520
+ * The port is cached once received, so subsequent calls return the same port.
14521
+ * @returns MessagePort.
14522
+ *
14523
+ * @throws Error if {@linkcode app.initialize} has not successfully completed,
14524
+ * if the host does not support the feature, or if the port request is rejected.
14525
+ *
14526
+ * @internal
14527
+ * Limited to Microsoft-internal use
14528
+ */
14529
+ function getDataLayerPort() {
14530
+ return messageChannels_awaiter(this, void 0, void 0, function* () {
14531
+ // If the port has already been initialized, return it.
14532
+ if (dataLayerPort) {
14533
+ logger('Returning dataLayer port from cache');
14534
+ return dataLayerPort;
14535
+ }
14536
+ if (!isSupported()) {
14537
+ throw errorNotSupportedOnPlatform;
14538
+ }
14539
+ // Send request for telemetry port, will throw if the request is rejected
14540
+ dataLayerPort = yield requestPortFromParentWithVersion(getApiVersionTag(messageChannelsDataLayerVersionNumber, "messageChannels.dataLayer.getDataLayerPort" /* ApiName.MessageChannels_DataLayer_GetDataLayerPort */), "messageChannels.dataLayer.getDataLayerPort" /* ApiName.MessageChannels_DataLayer_GetDataLayerPort */);
14541
+ return dataLayerPort;
14542
+ });
14543
+ }
14544
+ dataLayer.getDataLayerPort = getDataLayerPort;
14545
+ /**
14546
+ * @hidden
14547
+ *
14548
+ * @beta
14549
+ *
14550
+ * Checks if the messageChannels.dataLayer capability is supported by the host
14551
+ * @returns boolean to represent whether the messageChannels.dataLayer capability is supported
14552
+ *
14553
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
14554
+ *
14555
+ * @internal
14556
+ * Limited to Microsoft-internal use
14557
+ */
14558
+ function isSupported() {
14559
+ var _a;
14560
+ return ensureInitialized(runtime) && ((_a = runtime.supports.messageChannels) === null || _a === void 0 ? void 0 : _a.dataLayer) ? true : false;
14561
+ }
14562
+ dataLayer.isSupported = isSupported;
14563
+ /**
14564
+ * @hidden
14565
+ * Undocumented function used to clear state between unit tests
14566
+ *
14567
+ * @beta
14568
+ *
14569
+ * @internal
14570
+ * Limited to Microsoft-internal use
14571
+ */
14572
+ function _clearDataLayerPort() {
14573
+ dataLayerPort = undefined;
14574
+ }
14575
+ dataLayer._clearDataLayerPort = _clearDataLayerPort;
14576
+ })(dataLayer = messageChannels.dataLayer || (messageChannels.dataLayer = {}));
14153
14577
  /**
14154
14578
  * @hidden
14155
14579
  *
@@ -14167,19 +14591,6 @@ var messageChannels;
14167
14591
  return ensureInitialized(runtime) && runtime.supports.messageChannels ? true : false;
14168
14592
  }
14169
14593
  messageChannels.isSupported = isSupported;
14170
- /**
14171
- * @hidden
14172
- * Undocumented function used to clear state between unit tests
14173
- *
14174
- * @beta
14175
- *
14176
- * @internal
14177
- * Limited to Microsoft-internal use
14178
- */
14179
- function _clearTelemetryPort() {
14180
- telemetryPort = undefined;
14181
- }
14182
- messageChannels._clearTelemetryPort = _clearTelemetryPort;
14183
14594
  })(messageChannels || (messageChannels = {}));
14184
14595
 
14185
14596
  ;// CONCATENATED MODULE: ./src/private/notifications.ts
@@ -14362,6 +14773,45 @@ var remoteCamera;
14362
14773
  ControlCommand["TiltUp"] = "TiltUp";
14363
14774
  ControlCommand["TiltDown"] = "TiltDown";
14364
14775
  })(ControlCommand = remoteCamera.ControlCommand || (remoteCamera.ControlCommand = {}));
14776
+ /**
14777
+ * @hidden
14778
+ * Enum used to indicate the reason for the error.
14779
+ *
14780
+ * @internal
14781
+ * Limited to Microsoft-internal use
14782
+ */
14783
+ let ErrorReason;
14784
+ (function (ErrorReason) {
14785
+ ErrorReason[ErrorReason["CommandResetError"] = 0] = "CommandResetError";
14786
+ ErrorReason[ErrorReason["CommandZoomInError"] = 1] = "CommandZoomInError";
14787
+ ErrorReason[ErrorReason["CommandZoomOutError"] = 2] = "CommandZoomOutError";
14788
+ ErrorReason[ErrorReason["CommandPanLeftError"] = 3] = "CommandPanLeftError";
14789
+ ErrorReason[ErrorReason["CommandPanRightError"] = 4] = "CommandPanRightError";
14790
+ ErrorReason[ErrorReason["CommandTiltUpError"] = 5] = "CommandTiltUpError";
14791
+ ErrorReason[ErrorReason["CommandTiltDownError"] = 6] = "CommandTiltDownError";
14792
+ ErrorReason[ErrorReason["SendDataError"] = 7] = "SendDataError";
14793
+ })(ErrorReason = remoteCamera.ErrorReason || (remoteCamera.ErrorReason = {}));
14794
+ /**
14795
+ * @hidden
14796
+ * Enum used to indicate the reason the session was terminated.
14797
+ *
14798
+ * @internal
14799
+ * Limited to Microsoft-internal use
14800
+ */
14801
+ let SessionTerminatedReason;
14802
+ (function (SessionTerminatedReason) {
14803
+ SessionTerminatedReason[SessionTerminatedReason["None"] = 0] = "None";
14804
+ SessionTerminatedReason[SessionTerminatedReason["ControlDenied"] = 1] = "ControlDenied";
14805
+ SessionTerminatedReason[SessionTerminatedReason["ControlNoResponse"] = 2] = "ControlNoResponse";
14806
+ SessionTerminatedReason[SessionTerminatedReason["ControlBusy"] = 3] = "ControlBusy";
14807
+ SessionTerminatedReason[SessionTerminatedReason["AckTimeout"] = 4] = "AckTimeout";
14808
+ SessionTerminatedReason[SessionTerminatedReason["ControlTerminated"] = 5] = "ControlTerminated";
14809
+ SessionTerminatedReason[SessionTerminatedReason["ControllerTerminated"] = 6] = "ControllerTerminated";
14810
+ SessionTerminatedReason[SessionTerminatedReason["DataChannelError"] = 7] = "DataChannelError";
14811
+ SessionTerminatedReason[SessionTerminatedReason["ControllerCancelled"] = 8] = "ControllerCancelled";
14812
+ SessionTerminatedReason[SessionTerminatedReason["ControlDisabled"] = 9] = "ControlDisabled";
14813
+ SessionTerminatedReason[SessionTerminatedReason["ControlTerminatedToAllowOtherController"] = 10] = "ControlTerminatedToAllowOtherController";
14814
+ })(SessionTerminatedReason = remoteCamera.SessionTerminatedReason || (remoteCamera.SessionTerminatedReason = {}));
14365
14815
  /**
14366
14816
  * @hidden
14367
14817
  * Fetch a list of the participants with controllable-cameras in a meeting.
@@ -14645,6 +15095,12 @@ var appEntity;
14645
15095
  const teamsTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14646
15096
  var teams;
14647
15097
  (function (teams) {
15098
+ let ChannelType;
15099
+ (function (ChannelType) {
15100
+ ChannelType[ChannelType["Regular"] = 0] = "Regular";
15101
+ ChannelType[ChannelType["Private"] = 1] = "Private";
15102
+ ChannelType[ChannelType["Shared"] = 2] = "Shared";
15103
+ })(ChannelType = teams.ChannelType || (teams.ChannelType = {}));
14648
15104
  /**
14649
15105
  * @hidden
14650
15106
  * Get a list of channels belong to a Team
@@ -14853,6 +15309,19 @@ var videoEffectsEx;
14853
15309
  const videoPerformanceMonitor = inServerSideRenderingEnvironment()
14854
15310
  ? undefined
14855
15311
  : new VideoPerformanceMonitor(sendMessageToParent);
15312
+ /**
15313
+ * @hidden
15314
+ * Error level when notifying errors to the host, the host will decide what to do acording to the error level.
15315
+ * @beta
15316
+ *
15317
+ * @internal
15318
+ * Limited to Microsoft-internal use
15319
+ */
15320
+ let ErrorLevel;
15321
+ (function (ErrorLevel) {
15322
+ ErrorLevel["Fatal"] = "fatal";
15323
+ ErrorLevel["Warn"] = "warn";
15324
+ })(ErrorLevel = videoEffectsEx.ErrorLevel || (videoEffectsEx.ErrorLevel = {}));
14856
15325
  /**
14857
15326
  * @hidden
14858
15327
  * Register to process video frames
@@ -14912,7 +15381,7 @@ var videoEffectsEx;
14912
15381
  videoEffectsEx.registerForVideoFrame = registerForVideoFrame;
14913
15382
  function createFrameProcessingTimeout() {
14914
15383
  const frameProcessingTimer = setTimeout(() => {
14915
- notifyError(`Frame not processed in ${videoEffectsEx.frameProcessingTimeoutInMs}ms`, "warn" /* ErrorLevel.Warn */);
15384
+ notifyError(`Frame not processed in ${videoEffectsEx.frameProcessingTimeoutInMs}ms`, ErrorLevel.Warn);
14916
15385
  }, videoEffectsEx.frameProcessingTimeoutInMs);
14917
15386
  return function clearTimer() {
14918
15387
  clearTimeout(frameProcessingTimer);
@@ -15030,7 +15499,7 @@ var videoEffectsEx;
15030
15499
  * @internal
15031
15500
  * Limited to Microsoft-internal use
15032
15501
  */
15033
- function notifyError(errorMessage, errorLevel = "warn" /* ErrorLevel.Warn */) {
15502
+ function notifyError(errorMessage, errorLevel = ErrorLevel.Warn) {
15034
15503
  sendMessageToParent(getApiVersionTag(videoEffectsExTelemetryVersionNumber, "videoEffectsEx.notifyError" /* ApiName.VideoEffectsEx_NotifyError */), 'video.notifyError', [errorMessage, errorLevel]);
15035
15504
  }
15036
15505
  /**
@@ -15048,7 +15517,7 @@ var videoEffectsEx;
15048
15517
  if (!videoEffects.isSupported()) {
15049
15518
  throw errorNotSupportedOnPlatform;
15050
15519
  }
15051
- notifyError(errorMessage, "fatal" /* ErrorLevel.Fatal */);
15520
+ notifyError(errorMessage, ErrorLevel.Fatal);
15052
15521
  }
15053
15522
  videoEffectsEx.notifyFatalError = notifyFatalError;
15054
15523
  })(videoEffectsEx || (videoEffectsEx = {}));
@@ -15069,6 +15538,7 @@ var videoEffectsEx;
15069
15538
 
15070
15539
 
15071
15540
 
15541
+
15072
15542
 
15073
15543
  ;// CONCATENATED MODULE: ./src/index.ts
15074
15544