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

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),
@@ -1127,7 +1130,7 @@ function isFollowingApiVersionTagFormat(apiVersionTag) {
1127
1130
  }
1128
1131
 
1129
1132
  ;// CONCATENATED MODULE: ./src/artifactsForCDN/validDomains.json
1130
- const validDomains_namespaceObject = /*#__PURE__*/JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');
1133
+ const validDomains_namespaceObject = /*#__PURE__*/JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com","fa000000125.resources.office.net","fa000000129.resources.office.net","fa000000124.resources.office.net","fa000000128.resources.office.net"]}');
1131
1134
  var artifactsForCDN_validDomains_namespaceObject = /*#__PURE__*/__webpack_require__.t(validDomains_namespaceObject, 2);
1132
1135
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
1133
1136
 
@@ -1300,7 +1303,7 @@ GlobalVars.printCapabilityEnabled = false;
1300
1303
 
1301
1304
  // EXTERNAL MODULE: ../../node_modules/.pnpm/base64-js@1.5.1/node_modules/base64-js/index.js
1302
1305
  var base64_js = __webpack_require__(933);
1303
- ;// CONCATENATED MODULE: ../../node_modules/.pnpm/file+skeleton-buffer/node_modules/skeleton-buffer/index.js
1306
+ ;// CONCATENATED MODULE: ../../node_modules/.pnpm/skeleton-buffer@file+skeleton-buffer/node_modules/skeleton-buffer/index.js
1304
1307
 
1305
1308
 
1306
1309
  const _Buffer = Buffer;
@@ -2932,9 +2935,79 @@ 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
+ * This function takes in a string that represents a full or relative path and returns a
2952
+ * fully qualified URL object.
2953
+ *
2954
+ * Currently this is accomplished by assigning the input string to an a tag and then retrieving
2955
+ * the a tag's href value. A side effect of doing this is that the string becomes a fully qualified
2956
+ * URL. This is probably not how I would choose to do this, but in order to not unintentionally
2957
+ * break something I've preseved the functionality here and just isolated the code to make it
2958
+ * easier to mock.
2959
+ *
2960
+ * @example
2961
+ * `fullyQualifyUrlString('https://example.com')` returns `new URL('https://example.com')`
2962
+ * `fullyQualifyUrlString('helloWorld')` returns `new URL('https://example.com/helloWorld')`
2963
+ * `fullyQualifyUrlString('hello%20World')` returns `new URL('https://example.com/hello%20World')`
2964
+ *
2965
+ * @param fullOrRelativePath A string representing a full or relative URL.
2966
+ * @returns A fully qualified URL representing the input string.
2967
+ */
2968
+ function fullyQualifyUrlString(fullOrRelativePath) {
2969
+ const link = document.createElement('a');
2970
+ link.href = fullOrRelativePath;
2971
+ return new URL(link.href);
2972
+ }
2973
+ /**
2974
+ * The hasScriptTags function first decodes any HTML entities in the input string using the decodeHTMLEntities function.
2975
+ * 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.
2976
+ * 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),
2977
+ * and ends with </script> (preceded by any characters).
2978
+ * 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.
2979
+ * @param input URL converted to string to pattern match
2980
+ * @returns true if the input string contains a script tag, false otherwise
2981
+ */
2982
+ function hasScriptTags(input) {
2983
+ let decodedInput;
2984
+ try {
2985
+ const decodedHTMLInput = decodeHTMLEntities(input);
2986
+ decodedInput = decodeURIComponent(decodedHTMLInput);
2987
+ }
2988
+ catch (e) {
2989
+ // input was not encoded, use it as is
2990
+ decodedInput = input;
2991
+ }
2936
2992
  const scriptRegex = /<script[^>]*>[\s\S]*?<\/script[^>]*>/gi;
2937
- return scriptRegex.test(id);
2993
+ return scriptRegex.test(decodedInput);
2994
+ }
2995
+ /**
2996
+ * The decodeHTMLEntities function replaces HTML entities in the input string with their corresponding characters.
2997
+ */
2998
+ function decodeHTMLEntities(input) {
2999
+ const entityMap = new Map([
3000
+ ['&lt;', '<'],
3001
+ ['&gt;', '>'],
3002
+ ['&amp;', '&'],
3003
+ ['&quot;', '"'],
3004
+ ['&#39;', "'"],
3005
+ ['&#x2F;', '/'],
3006
+ ]);
3007
+ entityMap.forEach((value, key) => {
3008
+ input = input.replace(new RegExp(key, 'gi'), value);
3009
+ });
3010
+ return input;
2938
3011
  }
2939
3012
  function isIdLengthValid(id) {
2940
3013
  return id.length < 256 && id.length > 4;
@@ -3322,7 +3395,7 @@ const _minRuntimeConfigToUninitialize = {
3322
3395
  * @hidden
3323
3396
  * Package version.
3324
3397
  */
3325
- const version = "2.23.0-beta.0";
3398
+ const version = "2.23.0-beta.2";
3326
3399
 
3327
3400
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
3328
3401
 
@@ -3597,6 +3670,7 @@ function validateOrigin(messageOrigin) {
3597
3670
 
3598
3671
 
3599
3672
 
3673
+
3600
3674
  /**
3601
3675
  * Namespace to interact with the authentication-specific part of the SDK.
3602
3676
  *
@@ -3679,23 +3753,13 @@ var authentication;
3679
3753
  authentication.authenticate = authenticate;
3680
3754
  function authenticateHelper(apiVersionTag, authenticateParameters) {
3681
3755
  return new Promise((resolve, reject) => {
3682
- if (GlobalVars.hostClientType === HostClientType.desktop ||
3683
- GlobalVars.hostClientType === HostClientType.android ||
3684
- GlobalVars.hostClientType === HostClientType.ios ||
3685
- GlobalVars.hostClientType === HostClientType.ipados ||
3686
- GlobalVars.hostClientType === HostClientType.macos ||
3687
- GlobalVars.hostClientType === HostClientType.rigel ||
3688
- GlobalVars.hostClientType === HostClientType.teamsRoomsWindows ||
3689
- GlobalVars.hostClientType === HostClientType.teamsRoomsAndroid ||
3690
- GlobalVars.hostClientType === HostClientType.teamsPhones ||
3691
- GlobalVars.hostClientType === HostClientType.teamsDisplays ||
3692
- GlobalVars.hostClientType === HostClientType.surfaceHub) {
3756
+ if (GlobalVars.hostClientType !== HostClientType.web) {
3693
3757
  // Convert any relative URLs into absolute URLs before sending them over to the parent window.
3694
- const link = document.createElement('a');
3695
- link.href = authenticateParameters.url;
3758
+ const fullyQualifiedURL = fullyQualifyUrlString(authenticateParameters.url);
3759
+ validateUrl(fullyQualifiedURL);
3696
3760
  // Ask the parent window to open an authentication window with the parameters provided by the caller.
3697
3761
  resolve(sendMessageToParentAsync(apiVersionTag, 'authentication.authenticate', [
3698
- link.href,
3762
+ fullyQualifiedURL.href,
3699
3763
  authenticateParameters.width,
3700
3764
  authenticateParameters.height,
3701
3765
  authenticateParameters.isExternal,
@@ -3805,6 +3869,14 @@ var authentication;
3805
3869
  Communication.childOrigin = null;
3806
3870
  }
3807
3871
  }
3872
+ /**
3873
+ * Different browsers handle authentication flows in pop-up windows differently.
3874
+ * Firefox and Safari, which use Quantum and WebKit browser engines respectively, block the use of 'window.open' for pop-up windows.
3875
+ * Any chrome-based browser (Chrome, Edge, Brave, etc.) opens a new browser window without any user-prompts.
3876
+ * To ensure consistent behavior across all browsers, consider using the following function to create a new authentication window.
3877
+ *
3878
+ * @param authenticateParameters - Parameters describing the authentication window used for executing the authentication flow.
3879
+ */
3808
3880
  function openAuthenticationWindow(authenticateParameters) {
3809
3881
  // Close the previously opened window if we have one
3810
3882
  closeAuthenticationWindow();
@@ -3815,8 +3887,8 @@ var authentication;
3815
3887
  width = Math.min(width, Communication.currentWindow.outerWidth - 400);
3816
3888
  height = Math.min(height, Communication.currentWindow.outerHeight - 200);
3817
3889
  // Convert any relative URLs into absolute URLs before sending them over to the parent window
3818
- const link = document.createElement('a');
3819
- link.href = authenticateParameters.url.replace('{oauthRedirectMethod}', 'web');
3890
+ const fullyQualifiedURL = fullyQualifyUrlString(authenticateParameters.url.replace('{oauthRedirectMethod}', 'web'));
3891
+ validateUrl(fullyQualifiedURL);
3820
3892
  // We are running in the browser, so we need to center the new window ourselves
3821
3893
  let left = typeof Communication.currentWindow.screenLeft !== 'undefined'
3822
3894
  ? Communication.currentWindow.screenLeft
@@ -3827,7 +3899,7 @@ var authentication;
3827
3899
  left += Communication.currentWindow.outerWidth / 2 - width / 2;
3828
3900
  top += Communication.currentWindow.outerHeight / 2 - height / 2;
3829
3901
  // Open a child window with a desired set of standard browser features
3830
- Communication.childWindow = Communication.currentWindow.open(link.href, '_blank', 'toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top=' +
3902
+ Communication.childWindow = Communication.currentWindow.open(fullyQualifiedURL.href, '_blank', 'toolbar=no, location=yes, status=no, menubar=no, scrollbars=yes, top=' +
3831
3903
  top +
3832
3904
  ', left=' +
3833
3905
  left +
@@ -5346,7 +5418,7 @@ var pages;
5346
5418
  if (!isSupported()) {
5347
5419
  throw errorNotSupportedOnPlatform;
5348
5420
  }
5349
- const apiVersionTag = getApiVersionTag(pagesTelemetryVersionNumber, "pages.navigateCrossDomain" /* ApiName.Pages_NavigateCrossDomain */);
5421
+ const apiVersionTag = getApiVersionTag(pagesTelemetryVersionNumber, "pages.navigateToApp" /* ApiName.Pages_NavigateToApp */);
5350
5422
  if (runtime.isLegacyTeams) {
5351
5423
  resolve(sendAndHandleStatusAndReason(apiVersionTag, 'executeDeepLink', createTeamsAppLink(params)));
5352
5424
  }
@@ -5857,8 +5929,6 @@ var pages;
5857
5929
  })(appButton = pages.appButton || (pages.appButton = {}));
5858
5930
  /**
5859
5931
  * Provides functions for navigating without needing to specify your application ID.
5860
- *
5861
- * @beta
5862
5932
  */
5863
5933
  let currentApp;
5864
5934
  (function (currentApp) {
@@ -5867,8 +5937,6 @@ var pages;
5867
5937
  * specific content within the page).
5868
5938
  * @param params - Parameters for the navigation
5869
5939
  * @returns a promise that will resolve if the navigation was successful
5870
- *
5871
- * @beta
5872
5940
  */
5873
5941
  function navigateTo(params) {
5874
5942
  return new Promise((resolve) => {
@@ -5883,7 +5951,6 @@ var pages;
5883
5951
  /**
5884
5952
  * Navigate to the currently running application's first static page defined in the application
5885
5953
  * manifest.
5886
- * @beta
5887
5954
  */
5888
5955
  function navigateToDefaultPage() {
5889
5956
  return new Promise((resolve) => {
@@ -5900,8 +5967,6 @@ var pages;
5900
5967
  * @returns boolean to represent whether the pages.currentApp capability is supported
5901
5968
  *
5902
5969
  * @throws Error if {@linkcode app.initialize} has not successfully completed
5903
- *
5904
- * @beta
5905
5970
  */
5906
5971
  function isSupported() {
5907
5972
  return ensureInitialized(runtime) && runtime.supports.pages
@@ -6334,6 +6399,7 @@ function initializeCommunication(validMessageOrigins, apiVersionTag) {
6334
6399
  return sendMessageToParentAsync(apiVersionTag, 'initialize', [
6335
6400
  version,
6336
6401
  latestRuntimeApiVersion,
6402
+ validMessageOrigins,
6337
6403
  ]).then(([context, clientType, runtimeConfig, clientSupportedSDKVersion]) => {
6338
6404
  tryPolyfillWithNestedAppAuthBridge(clientSupportedSDKVersion, Communication.currentWindow, {
6339
6405
  onMessage: processAuthBridgeMessage,
@@ -7065,6 +7131,55 @@ var logs;
7065
7131
  logs.isSupported = isSupported;
7066
7132
  })(logs || (logs = {}));
7067
7133
 
7134
+ ;// CONCATENATED MODULE: ./src/private/interfaces.ts
7135
+ /**
7136
+ * @hidden
7137
+ *
7138
+ * @internal
7139
+ * Limited to Microsoft-internal use
7140
+ */
7141
+ var NotificationTypes;
7142
+ (function (NotificationTypes) {
7143
+ NotificationTypes["fileDownloadStart"] = "fileDownloadStart";
7144
+ NotificationTypes["fileDownloadComplete"] = "fileDownloadComplete";
7145
+ })(NotificationTypes || (NotificationTypes = {}));
7146
+ /**
7147
+ * @hidden
7148
+ *
7149
+ * @internal
7150
+ * Limited to Microsoft-internal use
7151
+ */
7152
+ var ViewerActionTypes;
7153
+ (function (ViewerActionTypes) {
7154
+ ViewerActionTypes["view"] = "view";
7155
+ ViewerActionTypes["edit"] = "edit";
7156
+ ViewerActionTypes["editNew"] = "editNew";
7157
+ })(ViewerActionTypes || (ViewerActionTypes = {}));
7158
+ /**
7159
+ * @hidden
7160
+ *
7161
+ * User setting changes that can be subscribed to
7162
+ */
7163
+ var UserSettingTypes;
7164
+ (function (UserSettingTypes) {
7165
+ /**
7166
+ * @hidden
7167
+ * Use this key to subscribe to changes in user's file open preference
7168
+ *
7169
+ * @internal
7170
+ * Limited to Microsoft-internal use
7171
+ */
7172
+ UserSettingTypes["fileOpenPreference"] = "fileOpenPreference";
7173
+ /**
7174
+ * @hidden
7175
+ * Use this key to subscribe to theme changes
7176
+ *
7177
+ * @internal
7178
+ * Limited to Microsoft-internal use
7179
+ */
7180
+ UserSettingTypes["theme"] = "theme";
7181
+ })(UserSettingTypes || (UserSettingTypes = {}));
7182
+
7068
7183
  ;// CONCATENATED MODULE: ./src/private/privateAPIs.ts
7069
7184
  /* eslint-disable @typescript-eslint/no-explicit-any */
7070
7185
 
@@ -8873,6 +8988,7 @@ var meeting_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
8873
8988
 
8874
8989
 
8875
8990
 
8991
+
8876
8992
  /**
8877
8993
  * v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
8878
8994
  */
@@ -9057,6 +9173,10 @@ var meeting;
9057
9173
  }
9058
9174
  meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
9059
9175
  /**
9176
+ * @throws error if your app manifest does not include the `OnlineMeeting.ReadBasic.Chat` RSC permission.
9177
+ * Find the app manifest reference at https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema.
9178
+ * Find the RSC reference at https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent.
9179
+ *
9060
9180
  * @hidden
9061
9181
  * Allows an app to get the meeting details for the meeting
9062
9182
  *
@@ -9075,6 +9195,43 @@ var meeting;
9075
9195
  sendMessageToParent(getApiVersionTag(meetingTelemetryVersionNumber, "meeting.getMeetingDetails" /* ApiName.Meeting_GetMeetingDetails */), 'meeting.getMeetingDetails', callback);
9076
9196
  }
9077
9197
  meeting.getMeetingDetails = getMeetingDetails;
9198
+ /**
9199
+ * @throws error if your app manifest does not include both the `OnlineMeeting.ReadBasic.Chat` RSC permission
9200
+ * and the `OnlineMeetingParticipant.Read.Chat` RSC permission.
9201
+ * Find the app manifest reference at https://learn.microsoft.com/en-us/microsoftteams/platform/resources/schema/manifest-schema.
9202
+ * Find the RSC reference at https://learn.microsoft.com/en-us/microsoftteams/platform/graph-api/rsc/resource-specific-consent.
9203
+ *
9204
+ * @throws `not supported on platform` error if your app is run on a host that does not support returning additional meeting details.
9205
+ *
9206
+ * @hidden
9207
+ * Allows an app to get the additional meeting details for the meeting.
9208
+ * Some additional details are returned on a best-effort basis. They may not be present for every meeting.
9209
+ *
9210
+ * @internal
9211
+ * Limited to Microsoft-internal use
9212
+ *
9213
+ * @beta
9214
+ */
9215
+ function getMeetingDetailsVerbose() {
9216
+ var _a, _b, _c;
9217
+ return meeting_awaiter(this, void 0, void 0, function* () {
9218
+ ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage, FrameContexts.settings, FrameContexts.content);
9219
+ let response;
9220
+ try {
9221
+ const shouldGetVerboseDetails = true;
9222
+ response = (yield sendAndHandleSdkError(getApiVersionTag("v2" /* ApiVersionNumber.V_2 */, "meeting.getMeetingDetailsVerbose" /* ApiName.Meeting_GetMeetingDetailsVerbose */), 'meeting.getMeetingDetails', shouldGetVerboseDetails));
9223
+ }
9224
+ catch (error) {
9225
+ throw new Error((_a = error === null || error === void 0 ? void 0 : error.errorCode) === null || _a === void 0 ? void 0 : _a.toString());
9226
+ }
9227
+ 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) &&
9228
+ !response.details.originalCaller) {
9229
+ throw new Error(ErrorCode.NOT_SUPPORTED_ON_PLATFORM.toString());
9230
+ }
9231
+ return response;
9232
+ });
9233
+ }
9234
+ meeting.getMeetingDetailsVerbose = getMeetingDetailsVerbose;
9078
9235
  /**
9079
9236
  * @hidden
9080
9237
  * Allows an app to get the authentication token for the anonymous or guest user in the meeting
@@ -11528,25 +11685,44 @@ var visualMedia;
11528
11685
  })(visualMedia || (visualMedia = {}));
11529
11686
 
11530
11687
  ;// CONCATENATED MODULE: ./src/public/webStorage.ts
11688
+ var webStorage_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
11689
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11690
+ return new (P || (P = Promise))(function (resolve, reject) {
11691
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
11692
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
11693
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
11694
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
11695
+ });
11696
+ };
11697
+
11698
+
11699
+
11531
11700
 
11532
11701
 
11533
11702
  /**
11534
- * Contains functionality to allow web apps to store data in webview cache
11703
+ * Contains functionality enabling apps to query properties about how the host manages web storage (`Window.LocalStorage`)
11535
11704
  *
11536
11705
  * @beta
11537
11706
  */
11538
11707
  var webStorage;
11539
11708
  (function (webStorage) {
11540
11709
  /**
11541
- * Checks if web storage gets cleared when a user logs out from host client
11710
+ * Checks if web storage (`Window.LocalStorage`) gets cleared when a user logs out from host
11542
11711
  *
11543
- * @returns true is web storage gets cleared on logout and false if it does not
11712
+ * @returns `true` if web storage gets cleared on logout and `false` if not
11713
+ *
11714
+ * @throws `Error` if {@linkcode app.initialize} has not successfully completed
11544
11715
  *
11545
11716
  * @beta
11546
11717
  */
11547
11718
  function isWebStorageClearedOnUserLogOut() {
11548
- ensureInitialized(runtime);
11549
- return isSupported();
11719
+ return webStorage_awaiter(this, void 0, void 0, function* () {
11720
+ ensureInitialized(runtime);
11721
+ if (!isSupported()) {
11722
+ throw errorNotSupportedOnPlatform;
11723
+ }
11724
+ return yield sendAndUnwrap(getApiVersionTag("v2" /* ApiVersionNumber.V_2 */, "webStorage.isWebStorageClearedOnUserLogOut" /* ApiName.WebStorage_IsWebStorageClearedOnUserLogOut */), "webStorage.isWebStorageClearedOnUserLogOut" /* ApiName.WebStorage_IsWebStorageClearedOnUserLogOut */);
11725
+ });
11550
11726
  }
11551
11727
  webStorage.isWebStorageClearedOnUserLogOut = isWebStorageClearedOnUserLogOut;
11552
11728
  /**
@@ -11558,7 +11734,7 @@ var webStorage;
11558
11734
  * @beta
11559
11735
  */
11560
11736
  function isSupported() {
11561
- return ensureInitialized(runtime) && runtime.supports.webStorage ? true : false;
11737
+ return ensureInitialized(runtime) && runtime.supports.webStorage !== undefined;
11562
11738
  }
11563
11739
  webStorage.isSupported = isSupported;
11564
11740
  })(webStorage || (webStorage = {}));
@@ -13167,6 +13343,38 @@ var externalAppAuthentication;
13167
13343
  * Limited to Microsoft-internal use
13168
13344
  */
13169
13345
  const ActionExecuteInvokeRequestType = 'Action.Execute';
13346
+ /**
13347
+ * @hidden
13348
+ * Used to differentiate between IOriginalRequestInfo types
13349
+ * @internal
13350
+ * Limited to Microsoft-internal use
13351
+ */
13352
+ let OriginalRequestType;
13353
+ (function (OriginalRequestType) {
13354
+ OriginalRequestType["ActionExecuteInvokeRequest"] = "ActionExecuteInvokeRequest";
13355
+ OriginalRequestType["QueryMessageExtensionRequest"] = "QueryMessageExtensionRequest";
13356
+ })(OriginalRequestType = externalAppAuthentication.OriginalRequestType || (externalAppAuthentication.OriginalRequestType = {}));
13357
+ /**
13358
+ * @hidden
13359
+ * Used to differentiate between IInvokeResponse types
13360
+ * @internal
13361
+ * Limited to Microsoft-internal use
13362
+ */
13363
+ let InvokeResponseType;
13364
+ (function (InvokeResponseType) {
13365
+ InvokeResponseType["ActionExecuteInvokeResponse"] = "ActionExecuteInvokeResponse";
13366
+ InvokeResponseType["QueryMessageExtensionResponse"] = "QueryMessageExtensionResponse";
13367
+ })(InvokeResponseType = externalAppAuthentication.InvokeResponseType || (externalAppAuthentication.InvokeResponseType = {}));
13368
+ /**
13369
+ * @hidden
13370
+ *
13371
+ * @internal
13372
+ * Limited to Microsoft-internal use
13373
+ */
13374
+ let InvokeErrorCode;
13375
+ (function (InvokeErrorCode) {
13376
+ InvokeErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
13377
+ })(InvokeErrorCode = externalAppAuthentication.InvokeErrorCode || (externalAppAuthentication.InvokeErrorCode = {}));
13170
13378
  /*********** END ERROR TYPE ***********/
13171
13379
  /**
13172
13380
  * @hidden
@@ -13174,17 +13382,17 @@ var externalAppAuthentication;
13174
13382
  * Limited to Microsoft-internal use
13175
13383
  */
13176
13384
  function validateOriginalRequestInfo(originalRequestInfo) {
13177
- if (originalRequestInfo.requestType === "ActionExecuteInvokeRequest" /* OriginalRequestType.ActionExecuteInvokeRequest */) {
13385
+ if (originalRequestInfo.requestType === OriginalRequestType.ActionExecuteInvokeRequest) {
13178
13386
  const actionExecuteRequest = originalRequestInfo;
13179
13387
  if (actionExecuteRequest.type !== ActionExecuteInvokeRequestType) {
13180
13388
  const error = {
13181
- errorCode: "INTERNAL_ERROR" /* InvokeErrorCode.INTERNAL_ERROR */,
13389
+ errorCode: InvokeErrorCode.INTERNAL_ERROR,
13182
13390
  message: `Invalid action type ${actionExecuteRequest.type}. Action type must be "${ActionExecuteInvokeRequestType}"`,
13183
13391
  };
13184
13392
  throw error;
13185
13393
  }
13186
13394
  }
13187
- else if (originalRequestInfo.requestType === "QueryMessageExtensionRequest" /* OriginalRequestType.QueryMessageExtensionRequest */) {
13395
+ else if (originalRequestInfo.requestType === OriginalRequestType.QueryMessageExtensionRequest) {
13188
13396
  if (originalRequestInfo.commandId.length > 64) {
13189
13397
  throw new Error('originalRequestInfo.commandId exceeds the maximum size of 64 characters');
13190
13398
  }
@@ -13321,6 +13529,39 @@ var externalAppAuthentication;
13321
13529
  });
13322
13530
  }
13323
13531
  externalAppAuthentication.authenticateWithOauth2 = authenticateWithOauth2;
13532
+ /**
13533
+ * @beta
13534
+ * @hidden
13535
+ * API to authenticate power platform connector plugins
13536
+ * @internal
13537
+ * Limited to Microsoft-internal use
13538
+ * @param titleId ID of the acquisition
13539
+ * @param signInUrl signInUrl for the connctor page listing the connector. This is optional
13540
+ * @param oauthWindowParameters parameters for the signIn window
13541
+ * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
13542
+ */
13543
+ function authenticateWithPowerPlatformConnectorPlugins(titleId, signInUrl, oauthWindowParameters) {
13544
+ ensureInitialized(runtime, FrameContexts.content);
13545
+ if (!isSupported()) {
13546
+ throw errorNotSupportedOnPlatform;
13547
+ }
13548
+ validateId(titleId, new Error('titleId is Invalid.'));
13549
+ if (signInUrl) {
13550
+ validateUrl(signInUrl);
13551
+ }
13552
+ return sendMessageToParentAsync(getApiVersionTag(externalAppAuthenticationTelemetryVersionNumber, "externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins" /* ApiName.ExternalAppAuthentication_AuthenticateWithPowerPlatformConnectorPlugins */), 'externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins', [
13553
+ titleId,
13554
+ signInUrl === null || signInUrl === void 0 ? void 0 : signInUrl.toString(),
13555
+ oauthWindowParameters === null || oauthWindowParameters === void 0 ? void 0 : oauthWindowParameters.width,
13556
+ oauthWindowParameters === null || oauthWindowParameters === void 0 ? void 0 : oauthWindowParameters.height,
13557
+ oauthWindowParameters === null || oauthWindowParameters === void 0 ? void 0 : oauthWindowParameters.isExternal,
13558
+ ]).then(([wasSuccessful, error]) => {
13559
+ if (!wasSuccessful) {
13560
+ throw error;
13561
+ }
13562
+ });
13563
+ }
13564
+ externalAppAuthentication.authenticateWithPowerPlatformConnectorPlugins = authenticateWithPowerPlatformConnectorPlugins;
13324
13565
  /**
13325
13566
  * @hidden
13326
13567
  * Checks if the externalAppAuthentication capability is supported by the host
@@ -13357,6 +13598,31 @@ const externalAppCardActionsTelemetryVersionNumber = "v2" /* ApiVersionNumber.V_
13357
13598
  */
13358
13599
  var externalAppCardActions;
13359
13600
  (function (externalAppCardActions) {
13601
+ /**
13602
+ * @hidden
13603
+ * The type of deeplink action that was executed by the host
13604
+ * @internal
13605
+ * Limited to Microsoft-internal use
13606
+ */
13607
+ let ActionOpenUrlType;
13608
+ (function (ActionOpenUrlType) {
13609
+ ActionOpenUrlType["DeepLinkDialog"] = "DeepLinkDialog";
13610
+ ActionOpenUrlType["DeepLinkOther"] = "DeepLinkOther";
13611
+ ActionOpenUrlType["DeepLinkStageView"] = "DeepLinkStageView";
13612
+ ActionOpenUrlType["GenericUrl"] = "GenericUrl";
13613
+ })(ActionOpenUrlType = externalAppCardActions.ActionOpenUrlType || (externalAppCardActions.ActionOpenUrlType = {}));
13614
+ /**
13615
+ * @hidden
13616
+ * Error codes that can be thrown from IExternalAppCardActionService.handleActionOpenUrl
13617
+ * @internal
13618
+ * Limited to Microsoft-internal use
13619
+ */
13620
+ let ActionOpenUrlErrorCode;
13621
+ (function (ActionOpenUrlErrorCode) {
13622
+ ActionOpenUrlErrorCode["INTERNAL_ERROR"] = "INTERNAL_ERROR";
13623
+ ActionOpenUrlErrorCode["INVALID_LINK"] = "INVALID_LINK";
13624
+ ActionOpenUrlErrorCode["NOT_SUPPORTED"] = "NOT_SUPPORTED";
13625
+ })(ActionOpenUrlErrorCode = externalAppCardActions.ActionOpenUrlErrorCode || (externalAppCardActions.ActionOpenUrlErrorCode = {}));
13360
13626
  /**
13361
13627
  * @beta
13362
13628
  * @hidden
@@ -13526,6 +13792,97 @@ var externalAppCommands;
13526
13792
  const filesTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
13527
13793
  var files;
13528
13794
  (function (files_1) {
13795
+ /**
13796
+ * @hidden
13797
+ *
13798
+ * Cloud storage providers registered with Microsoft Teams
13799
+ *
13800
+ * @internal
13801
+ * Limited to Microsoft-internal use
13802
+ */
13803
+ let CloudStorageProvider;
13804
+ (function (CloudStorageProvider) {
13805
+ CloudStorageProvider["Dropbox"] = "DROPBOX";
13806
+ CloudStorageProvider["Box"] = "BOX";
13807
+ CloudStorageProvider["Sharefile"] = "SHAREFILE";
13808
+ CloudStorageProvider["GoogleDrive"] = "GOOGLEDRIVE";
13809
+ CloudStorageProvider["Egnyte"] = "EGNYTE";
13810
+ CloudStorageProvider["SharePoint"] = "SharePoint";
13811
+ })(CloudStorageProvider = files_1.CloudStorageProvider || (files_1.CloudStorageProvider = {}));
13812
+ /**
13813
+ * @hidden
13814
+ *
13815
+ * Cloud storage provider type enums
13816
+ *
13817
+ * @internal
13818
+ * Limited to Microsoft-internal use
13819
+ */
13820
+ let CloudStorageProviderType;
13821
+ (function (CloudStorageProviderType) {
13822
+ CloudStorageProviderType[CloudStorageProviderType["Sharepoint"] = 0] = "Sharepoint";
13823
+ CloudStorageProviderType[CloudStorageProviderType["WopiIntegration"] = 1] = "WopiIntegration";
13824
+ CloudStorageProviderType[CloudStorageProviderType["Google"] = 2] = "Google";
13825
+ CloudStorageProviderType[CloudStorageProviderType["OneDrive"] = 3] = "OneDrive";
13826
+ CloudStorageProviderType[CloudStorageProviderType["Recent"] = 4] = "Recent";
13827
+ CloudStorageProviderType[CloudStorageProviderType["Aggregate"] = 5] = "Aggregate";
13828
+ CloudStorageProviderType[CloudStorageProviderType["FileSystem"] = 6] = "FileSystem";
13829
+ CloudStorageProviderType[CloudStorageProviderType["Search"] = 7] = "Search";
13830
+ CloudStorageProviderType[CloudStorageProviderType["AllFiles"] = 8] = "AllFiles";
13831
+ CloudStorageProviderType[CloudStorageProviderType["SharedWithMe"] = 9] = "SharedWithMe";
13832
+ })(CloudStorageProviderType = files_1.CloudStorageProviderType || (files_1.CloudStorageProviderType = {}));
13833
+ /**
13834
+ * @hidden
13835
+ *
13836
+ * Special Document Library enum
13837
+ *
13838
+ * @internal
13839
+ * Limited to Microsoft-internal use
13840
+ */
13841
+ let SpecialDocumentLibraryType;
13842
+ (function (SpecialDocumentLibraryType) {
13843
+ SpecialDocumentLibraryType["ClassMaterials"] = "classMaterials";
13844
+ })(SpecialDocumentLibraryType = files_1.SpecialDocumentLibraryType || (files_1.SpecialDocumentLibraryType = {}));
13845
+ /**
13846
+ * @hidden
13847
+ *
13848
+ * Document Library Access enum
13849
+ *
13850
+ * @internal
13851
+ * Limited to Microsoft-internal use
13852
+ */
13853
+ let DocumentLibraryAccessType;
13854
+ (function (DocumentLibraryAccessType) {
13855
+ DocumentLibraryAccessType["Readonly"] = "readonly";
13856
+ })(DocumentLibraryAccessType = files_1.DocumentLibraryAccessType || (files_1.DocumentLibraryAccessType = {}));
13857
+ /**
13858
+ * @hidden
13859
+ *
13860
+ * Download status enum
13861
+ *
13862
+ * @internal
13863
+ * Limited to Microsoft-internal use
13864
+ */
13865
+ let FileDownloadStatus;
13866
+ (function (FileDownloadStatus) {
13867
+ FileDownloadStatus["Downloaded"] = "Downloaded";
13868
+ FileDownloadStatus["Downloading"] = "Downloading";
13869
+ FileDownloadStatus["Failed"] = "Failed";
13870
+ })(FileDownloadStatus = files_1.FileDownloadStatus || (files_1.FileDownloadStatus = {}));
13871
+ /**
13872
+ * @hidden
13873
+ * Hide from docs
13874
+ *
13875
+ * Actions specific to 3P cloud storage provider file and / or account
13876
+ *
13877
+ * @internal
13878
+ * Limited to Microsoft-internal use
13879
+ */
13880
+ let CloudStorageProviderFileAction;
13881
+ (function (CloudStorageProviderFileAction) {
13882
+ CloudStorageProviderFileAction["Download"] = "DOWNLOAD";
13883
+ CloudStorageProviderFileAction["Upload"] = "UPLOAD";
13884
+ CloudStorageProviderFileAction["Delete"] = "DELETE";
13885
+ })(CloudStorageProviderFileAction = files_1.CloudStorageProviderFileAction || (files_1.CloudStorageProviderFileAction = {}));
13529
13886
  /**
13530
13887
  * @hidden
13531
13888
  * Hide from docs
@@ -14117,39 +14474,140 @@ var messageChannels_awaiter = (undefined && undefined.__awaiter) || function (th
14117
14474
  */
14118
14475
  var messageChannels;
14119
14476
  (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');
14477
+ let telemetry;
14478
+ (function (telemetry) {
14479
+ let telemetryPort;
14480
+ const messageChannelsTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14481
+ const logger = getLogger('messageChannels.telemetry');
14482
+ /**
14483
+ * @hidden
14484
+ * @beta
14485
+ *
14486
+ * Fetches a MessagePort to batch telemetry through the host's telemetry worker.
14487
+ * The port is cached once received, so subsequent calls return the same port.
14488
+ * @returns MessagePort.
14489
+ *
14490
+ * @throws Error if {@linkcode app.initialize} has not successfully completed,
14491
+ * if the host does not support the feature, or if the port request is rejected.
14492
+ *
14493
+ * @internal
14494
+ * Limited to Microsoft-internal use
14495
+ */
14496
+ function getTelemetryPort() {
14497
+ return messageChannels_awaiter(this, void 0, void 0, function* () {
14498
+ // If the port has already been initialized, return it.
14499
+ if (telemetryPort) {
14500
+ logger('Returning telemetry port from cache');
14501
+ return telemetryPort;
14502
+ }
14503
+ if (!isSupported()) {
14504
+ throw errorNotSupportedOnPlatform;
14505
+ }
14506
+ // Send request for telemetry port, will throw if the request is rejected
14507
+ telemetryPort = yield requestPortFromParentWithVersion(getApiVersionTag(messageChannelsTelemetryVersionNumber, "messageChannels.telemetry.getTelemetryPort" /* ApiName.MessageChannels_Telemetry_GetTelemetryPort */), "messageChannels.telemetry.getTelemetryPort" /* ApiName.MessageChannels_Telemetry_GetTelemetryPort */);
14142
14508
  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;
14509
+ });
14510
+ }
14511
+ telemetry.getTelemetryPort = getTelemetryPort;
14512
+ /**
14513
+ * @hidden
14514
+ *
14515
+ * @beta
14516
+ *
14517
+ * Checks if the messageChannels.telemetry capability is supported by the host
14518
+ * @returns boolean to represent whether the messageChannels.telemetry capability is supported
14519
+ *
14520
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
14521
+ *
14522
+ * @internal
14523
+ * Limited to Microsoft-internal use
14524
+ */
14525
+ function isSupported() {
14526
+ var _a;
14527
+ return ensureInitialized(runtime) && ((_a = runtime.supports.messageChannels) === null || _a === void 0 ? void 0 : _a.telemetry) ? true : false;
14528
+ }
14529
+ telemetry.isSupported = isSupported;
14530
+ /**
14531
+ * @hidden
14532
+ * Undocumented function used to clear state between unit tests
14533
+ *
14534
+ * @beta
14535
+ *
14536
+ * @internal
14537
+ * Limited to Microsoft-internal use
14538
+ */
14539
+ function _clearTelemetryPort() {
14540
+ telemetryPort = undefined;
14541
+ }
14542
+ telemetry._clearTelemetryPort = _clearTelemetryPort;
14543
+ })(telemetry = messageChannels.telemetry || (messageChannels.telemetry = {}));
14544
+ let dataLayer;
14545
+ (function (dataLayer) {
14546
+ let dataLayerPort;
14547
+ const messageChannelsDataLayerVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14548
+ const logger = getLogger('messageChannels.dataLayer');
14549
+ /**
14550
+ * @hidden
14551
+ * @beta
14552
+ *
14553
+ * Fetches a MessagePort to allow access to the host's data layer worker.
14554
+ * The port is cached once received, so subsequent calls return the same port.
14555
+ * @returns MessagePort.
14556
+ *
14557
+ * @throws Error if {@linkcode app.initialize} has not successfully completed,
14558
+ * if the host does not support the feature, or if the port request is rejected.
14559
+ *
14560
+ * @internal
14561
+ * Limited to Microsoft-internal use
14562
+ */
14563
+ function getDataLayerPort() {
14564
+ return messageChannels_awaiter(this, void 0, void 0, function* () {
14565
+ // If the port has already been initialized, return it.
14566
+ if (dataLayerPort) {
14567
+ logger('Returning dataLayer port from cache');
14568
+ return dataLayerPort;
14569
+ }
14570
+ if (!isSupported()) {
14571
+ throw errorNotSupportedOnPlatform;
14572
+ }
14573
+ // Send request for telemetry port, will throw if the request is rejected
14574
+ dataLayerPort = yield requestPortFromParentWithVersion(getApiVersionTag(messageChannelsDataLayerVersionNumber, "messageChannels.dataLayer.getDataLayerPort" /* ApiName.MessageChannels_DataLayer_GetDataLayerPort */), "messageChannels.dataLayer.getDataLayerPort" /* ApiName.MessageChannels_DataLayer_GetDataLayerPort */);
14575
+ return dataLayerPort;
14576
+ });
14577
+ }
14578
+ dataLayer.getDataLayerPort = getDataLayerPort;
14579
+ /**
14580
+ * @hidden
14581
+ *
14582
+ * @beta
14583
+ *
14584
+ * Checks if the messageChannels.dataLayer capability is supported by the host
14585
+ * @returns boolean to represent whether the messageChannels.dataLayer capability is supported
14586
+ *
14587
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
14588
+ *
14589
+ * @internal
14590
+ * Limited to Microsoft-internal use
14591
+ */
14592
+ function isSupported() {
14593
+ var _a;
14594
+ return ensureInitialized(runtime) && ((_a = runtime.supports.messageChannels) === null || _a === void 0 ? void 0 : _a.dataLayer) ? true : false;
14595
+ }
14596
+ dataLayer.isSupported = isSupported;
14597
+ /**
14598
+ * @hidden
14599
+ * Undocumented function used to clear state between unit tests
14600
+ *
14601
+ * @beta
14602
+ *
14603
+ * @internal
14604
+ * Limited to Microsoft-internal use
14605
+ */
14606
+ function _clearDataLayerPort() {
14607
+ dataLayerPort = undefined;
14608
+ }
14609
+ dataLayer._clearDataLayerPort = _clearDataLayerPort;
14610
+ })(dataLayer = messageChannels.dataLayer || (messageChannels.dataLayer = {}));
14153
14611
  /**
14154
14612
  * @hidden
14155
14613
  *
@@ -14167,19 +14625,6 @@ var messageChannels;
14167
14625
  return ensureInitialized(runtime) && runtime.supports.messageChannels ? true : false;
14168
14626
  }
14169
14627
  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
14628
  })(messageChannels || (messageChannels = {}));
14184
14629
 
14185
14630
  ;// CONCATENATED MODULE: ./src/private/notifications.ts
@@ -14362,6 +14807,45 @@ var remoteCamera;
14362
14807
  ControlCommand["TiltUp"] = "TiltUp";
14363
14808
  ControlCommand["TiltDown"] = "TiltDown";
14364
14809
  })(ControlCommand = remoteCamera.ControlCommand || (remoteCamera.ControlCommand = {}));
14810
+ /**
14811
+ * @hidden
14812
+ * Enum used to indicate the reason for the error.
14813
+ *
14814
+ * @internal
14815
+ * Limited to Microsoft-internal use
14816
+ */
14817
+ let ErrorReason;
14818
+ (function (ErrorReason) {
14819
+ ErrorReason[ErrorReason["CommandResetError"] = 0] = "CommandResetError";
14820
+ ErrorReason[ErrorReason["CommandZoomInError"] = 1] = "CommandZoomInError";
14821
+ ErrorReason[ErrorReason["CommandZoomOutError"] = 2] = "CommandZoomOutError";
14822
+ ErrorReason[ErrorReason["CommandPanLeftError"] = 3] = "CommandPanLeftError";
14823
+ ErrorReason[ErrorReason["CommandPanRightError"] = 4] = "CommandPanRightError";
14824
+ ErrorReason[ErrorReason["CommandTiltUpError"] = 5] = "CommandTiltUpError";
14825
+ ErrorReason[ErrorReason["CommandTiltDownError"] = 6] = "CommandTiltDownError";
14826
+ ErrorReason[ErrorReason["SendDataError"] = 7] = "SendDataError";
14827
+ })(ErrorReason = remoteCamera.ErrorReason || (remoteCamera.ErrorReason = {}));
14828
+ /**
14829
+ * @hidden
14830
+ * Enum used to indicate the reason the session was terminated.
14831
+ *
14832
+ * @internal
14833
+ * Limited to Microsoft-internal use
14834
+ */
14835
+ let SessionTerminatedReason;
14836
+ (function (SessionTerminatedReason) {
14837
+ SessionTerminatedReason[SessionTerminatedReason["None"] = 0] = "None";
14838
+ SessionTerminatedReason[SessionTerminatedReason["ControlDenied"] = 1] = "ControlDenied";
14839
+ SessionTerminatedReason[SessionTerminatedReason["ControlNoResponse"] = 2] = "ControlNoResponse";
14840
+ SessionTerminatedReason[SessionTerminatedReason["ControlBusy"] = 3] = "ControlBusy";
14841
+ SessionTerminatedReason[SessionTerminatedReason["AckTimeout"] = 4] = "AckTimeout";
14842
+ SessionTerminatedReason[SessionTerminatedReason["ControlTerminated"] = 5] = "ControlTerminated";
14843
+ SessionTerminatedReason[SessionTerminatedReason["ControllerTerminated"] = 6] = "ControllerTerminated";
14844
+ SessionTerminatedReason[SessionTerminatedReason["DataChannelError"] = 7] = "DataChannelError";
14845
+ SessionTerminatedReason[SessionTerminatedReason["ControllerCancelled"] = 8] = "ControllerCancelled";
14846
+ SessionTerminatedReason[SessionTerminatedReason["ControlDisabled"] = 9] = "ControlDisabled";
14847
+ SessionTerminatedReason[SessionTerminatedReason["ControlTerminatedToAllowOtherController"] = 10] = "ControlTerminatedToAllowOtherController";
14848
+ })(SessionTerminatedReason = remoteCamera.SessionTerminatedReason || (remoteCamera.SessionTerminatedReason = {}));
14365
14849
  /**
14366
14850
  * @hidden
14367
14851
  * Fetch a list of the participants with controllable-cameras in a meeting.
@@ -14645,6 +15129,12 @@ var appEntity;
14645
15129
  const teamsTelemetryVersionNumber = "v1" /* ApiVersionNumber.V_1 */;
14646
15130
  var teams;
14647
15131
  (function (teams) {
15132
+ let ChannelType;
15133
+ (function (ChannelType) {
15134
+ ChannelType[ChannelType["Regular"] = 0] = "Regular";
15135
+ ChannelType[ChannelType["Private"] = 1] = "Private";
15136
+ ChannelType[ChannelType["Shared"] = 2] = "Shared";
15137
+ })(ChannelType = teams.ChannelType || (teams.ChannelType = {}));
14648
15138
  /**
14649
15139
  * @hidden
14650
15140
  * Get a list of channels belong to a Team
@@ -14853,6 +15343,19 @@ var videoEffectsEx;
14853
15343
  const videoPerformanceMonitor = inServerSideRenderingEnvironment()
14854
15344
  ? undefined
14855
15345
  : new VideoPerformanceMonitor(sendMessageToParent);
15346
+ /**
15347
+ * @hidden
15348
+ * Error level when notifying errors to the host, the host will decide what to do acording to the error level.
15349
+ * @beta
15350
+ *
15351
+ * @internal
15352
+ * Limited to Microsoft-internal use
15353
+ */
15354
+ let ErrorLevel;
15355
+ (function (ErrorLevel) {
15356
+ ErrorLevel["Fatal"] = "fatal";
15357
+ ErrorLevel["Warn"] = "warn";
15358
+ })(ErrorLevel = videoEffectsEx.ErrorLevel || (videoEffectsEx.ErrorLevel = {}));
14856
15359
  /**
14857
15360
  * @hidden
14858
15361
  * Register to process video frames
@@ -14912,7 +15415,7 @@ var videoEffectsEx;
14912
15415
  videoEffectsEx.registerForVideoFrame = registerForVideoFrame;
14913
15416
  function createFrameProcessingTimeout() {
14914
15417
  const frameProcessingTimer = setTimeout(() => {
14915
- notifyError(`Frame not processed in ${videoEffectsEx.frameProcessingTimeoutInMs}ms`, "warn" /* ErrorLevel.Warn */);
15418
+ notifyError(`Frame not processed in ${videoEffectsEx.frameProcessingTimeoutInMs}ms`, ErrorLevel.Warn);
14916
15419
  }, videoEffectsEx.frameProcessingTimeoutInMs);
14917
15420
  return function clearTimer() {
14918
15421
  clearTimeout(frameProcessingTimer);
@@ -15030,7 +15533,7 @@ var videoEffectsEx;
15030
15533
  * @internal
15031
15534
  * Limited to Microsoft-internal use
15032
15535
  */
15033
- function notifyError(errorMessage, errorLevel = "warn" /* ErrorLevel.Warn */) {
15536
+ function notifyError(errorMessage, errorLevel = ErrorLevel.Warn) {
15034
15537
  sendMessageToParent(getApiVersionTag(videoEffectsExTelemetryVersionNumber, "videoEffectsEx.notifyError" /* ApiName.VideoEffectsEx_NotifyError */), 'video.notifyError', [errorMessage, errorLevel]);
15035
15538
  }
15036
15539
  /**
@@ -15048,7 +15551,7 @@ var videoEffectsEx;
15048
15551
  if (!videoEffects.isSupported()) {
15049
15552
  throw errorNotSupportedOnPlatform;
15050
15553
  }
15051
- notifyError(errorMessage, "fatal" /* ErrorLevel.Fatal */);
15554
+ notifyError(errorMessage, ErrorLevel.Fatal);
15052
15555
  }
15053
15556
  videoEffectsEx.notifyFatalError = notifyFatalError;
15054
15557
  })(videoEffectsEx || (videoEffectsEx = {}));
@@ -15069,6 +15572,7 @@ var videoEffectsEx;
15069
15572
 
15070
15573
 
15071
15574
 
15575
+
15072
15576
 
15073
15577
  ;// CONCATENATED MODULE: ./src/index.ts
15074
15578