@microsoft/teams-js 2.5.0 → 2.6.0-beta.1

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.
@@ -1133,7 +1133,7 @@ __webpack_require__.d(__webpack_exports__, {
1133
1133
  });
1134
1134
 
1135
1135
  ;// CONCATENATED MODULE: ./src/public/version.ts
1136
- var version = "2.5.0";
1136
+ var version = "2.6.0-beta.1";
1137
1137
 
1138
1138
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1139
1139
  var GlobalVars = /** @class */ (function () {
@@ -1516,6 +1516,8 @@ var teamsDeepLinkProtocol = 'https';
1516
1516
  * Limited to Microsoft-internal use
1517
1517
  */
1518
1518
  var teamsDeepLinkHost = 'teams.microsoft.com';
1519
+ /** @hidden */
1520
+ var errorLibraryNotInitialized = 'The library has not yet been initialized';
1519
1521
 
1520
1522
  // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1521
1523
  var browser = __webpack_require__(227);
@@ -1884,8 +1886,8 @@ var ensureInitializedLogger = internalLogger.extend('ensureInitialized');
1884
1886
  */
1885
1887
  function ensureInitializeCalled() {
1886
1888
  if (!GlobalVars.initializeCalled) {
1887
- ensureInitializeCalledLogger('The library has not yet been initialized.');
1888
- throw new Error('The library has not yet been initialized');
1889
+ ensureInitializeCalledLogger(errorLibraryNotInitialized);
1890
+ throw new Error(errorLibraryNotInitialized);
1889
1891
  }
1890
1892
  }
1891
1893
  /**
@@ -1901,8 +1903,8 @@ function ensureInitialized() {
1901
1903
  expectedFrameContexts[_i] = arguments[_i];
1902
1904
  }
1903
1905
  if (!GlobalVars.initializeCompleted) {
1904
- ensureInitializedLogger('The library has not yet been initialized. initializeCalled: %s', GlobalVars.initializeCalled.toString());
1905
- throw new Error('The library has not yet been initialized');
1906
+ ensureInitializedLogger('%s. initializeCalled: %s', errorLibraryNotInitialized, GlobalVars.initializeCalled.toString());
1907
+ throw new Error(errorLibraryNotInitialized);
1906
1908
  }
1907
1909
  if (expectedFrameContexts && expectedFrameContexts.length > 0) {
1908
1910
  var found = false;
@@ -2384,54 +2386,19 @@ var __assign = (undefined && undefined.__assign) || function () {
2384
2386
 
2385
2387
 
2386
2388
  var runtimeLogger = getLogger('runtime');
2387
- var runtime = {
2388
- apiVersion: 1,
2389
- supports: {
2390
- appInstallDialog: undefined,
2391
- barCode: undefined,
2392
- calendar: undefined,
2393
- call: undefined,
2394
- chat: undefined,
2395
- webStorage: undefined,
2396
- conversations: undefined,
2397
- dialog: {
2398
- bot: undefined,
2399
- update: undefined,
2400
- },
2401
- geoLocation: {
2402
- map: undefined,
2403
- },
2404
- location: undefined,
2405
- logs: undefined,
2406
- mail: undefined,
2407
- meetingRoom: undefined,
2408
- menus: undefined,
2409
- monetization: undefined,
2410
- notifications: undefined,
2411
- pages: {
2412
- appButton: undefined,
2413
- backStack: undefined,
2414
- config: undefined,
2415
- currentApp: undefined,
2416
- fullTrust: undefined,
2417
- tabs: undefined,
2418
- },
2419
- people: undefined,
2420
- permissions: undefined,
2421
- profile: undefined,
2422
- remoteCamera: undefined,
2423
- search: undefined,
2424
- sharing: undefined,
2425
- stageView: undefined,
2426
- teams: {
2427
- fullTrust: {
2428
- joinedTeams: undefined,
2429
- },
2430
- },
2431
- teamsCore: undefined,
2432
- video: undefined,
2433
- },
2389
+ /**
2390
+ * @hidden
2391
+ * Constant used to set the runtime configuration
2392
+ * to its uninitialized state.
2393
+ *
2394
+ * @internal
2395
+ * Limited to Microsoft-internal use
2396
+ */
2397
+ var _uninitializedRuntime = {
2398
+ apiVersion: -1,
2399
+ supports: {},
2434
2400
  };
2401
+ var runtime = _uninitializedRuntime;
2435
2402
  var teamsRuntimeConfig = {
2436
2403
  apiVersion: 1,
2437
2404
  isLegacyTeams: true,
@@ -2741,13 +2708,15 @@ var dialog;
2741
2708
  }
2742
2709
  dialog.registerOnMessageFromParent = registerOnMessageFromParent;
2743
2710
  /**
2744
- * Checks if dialog module is supported by the host
2711
+ * Checks if dialog capability is supported by the host
2712
+ * @returns boolean to represent whether dialog capabilty is supported
2745
2713
  *
2746
- * @returns boolean to represent whether dialog module is supported
2714
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2747
2715
  *
2748
2716
  * @beta
2749
2717
  */
2750
2718
  function isSupported() {
2719
+ ensureInitialized();
2751
2720
  return runtime.supports.dialog ? true : false;
2752
2721
  }
2753
2722
  dialog.isSupported = isSupported;
@@ -2775,12 +2744,14 @@ var dialog;
2775
2744
  update.resize = resize;
2776
2745
  /**
2777
2746
  * Checks if dialog.update capability is supported by the host
2747
+ * @returns boolean to represent whether dialog.update capabilty is supported
2778
2748
  *
2779
- * @returns boolean to represent whether dialog.update is supported
2749
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2780
2750
  *
2781
2751
  * @beta
2782
2752
  */
2783
2753
  function isSupported() {
2754
+ ensureInitialized();
2784
2755
  return runtime.supports.dialog ? (runtime.supports.dialog.update ? true : false) : false;
2785
2756
  }
2786
2757
  update.isSupported = isSupported;
@@ -2820,12 +2791,14 @@ var dialog;
2820
2791
  bot.open = open;
2821
2792
  /**
2822
2793
  * Checks if dialog.bot capability is supported by the host
2823
- *
2824
2794
  * @returns boolean to represent whether dialog.bot is supported
2825
2795
  *
2796
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2797
+ *
2826
2798
  * @beta
2827
2799
  */
2828
2800
  function isSupported() {
2801
+ ensureInitialized();
2829
2802
  return runtime.supports.dialog ? (runtime.supports.dialog.bot ? true : false) : false;
2830
2803
  }
2831
2804
  bot.isSupported = isSupported;
@@ -3008,7 +2981,14 @@ var menus;
3008
2981
  sendMessageToParent('handleActionMenuItemPress', [id]);
3009
2982
  }
3010
2983
  }
2984
+ /**
2985
+ * Checks if the menus capability is supported by the host
2986
+ * @returns boolean to represent whether the menus capability is supported
2987
+ *
2988
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
2989
+ */
3011
2990
  function isSupported() {
2991
+ ensureInitialized();
3012
2992
  return runtime.supports.menus ? true : false;
3013
2993
  }
3014
2994
  menus.isSupported = isSupported;
@@ -3064,7 +3044,7 @@ var teamsCore;
3064
3044
  */
3065
3045
  function registerOnLoadHandler(handler) {
3066
3046
  registerOnLoadHandlerHelper(handler, function () {
3067
- if (!isSupported()) {
3047
+ if (handler && !isSupported()) {
3068
3048
  throw errorNotSupportedOnPlatform;
3069
3049
  }
3070
3050
  });
@@ -3083,7 +3063,7 @@ var teamsCore;
3083
3063
  function registerOnLoadHandlerHelper(handler, versionSpecificHelper) {
3084
3064
  // allow for registration cleanup even when not finished initializing
3085
3065
  handler && ensureInitialized();
3086
- if (versionSpecificHelper) {
3066
+ if (handler && versionSpecificHelper) {
3087
3067
  versionSpecificHelper();
3088
3068
  }
3089
3069
  handlers_registerOnLoadHandler(handler);
@@ -3100,7 +3080,7 @@ var teamsCore;
3100
3080
  */
3101
3081
  function registerBeforeUnloadHandler(handler) {
3102
3082
  registerBeforeUnloadHandlerHelper(handler, function () {
3103
- if (!isSupported()) {
3083
+ if (handler && !isSupported()) {
3104
3084
  throw errorNotSupportedOnPlatform;
3105
3085
  }
3106
3086
  });
@@ -3120,7 +3100,7 @@ var teamsCore;
3120
3100
  function registerBeforeUnloadHandlerHelper(handler, versionSpecificHelper) {
3121
3101
  // allow for registration cleanup even when not finished initializing
3122
3102
  handler && ensureInitialized();
3123
- if (versionSpecificHelper) {
3103
+ if (handler && versionSpecificHelper) {
3124
3104
  versionSpecificHelper();
3125
3105
  }
3126
3106
  handlers_registerBeforeUnloadHandler(handler);
@@ -3128,10 +3108,14 @@ var teamsCore;
3128
3108
  teamsCore.registerBeforeUnloadHandlerHelper = registerBeforeUnloadHandlerHelper;
3129
3109
  /**
3130
3110
  * Checks if teamsCore capability is supported by the host
3131
- * @returns true if the teamsCore capability is enabled in runtime.supports.teamsCore and
3132
- * false if it is disabled
3111
+ *
3112
+ * @returns boolean to represent whether the teamsCore capability is supported
3113
+ *
3114
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
3115
+ *
3133
3116
  */
3134
3117
  function isSupported() {
3118
+ ensureInitialized();
3135
3119
  return runtime.supports.teamsCore ? true : false;
3136
3120
  }
3137
3121
  teamsCore.isSupported = isSupported;
@@ -3721,7 +3705,7 @@ var pages;
3721
3705
  */
3722
3706
  function registerFullScreenHandler(handler) {
3723
3707
  registerHandlerHelper('fullScreenChange', handler, [], function () {
3724
- if (!isSupported()) {
3708
+ if (handler && !isSupported()) {
3725
3709
  throw errorNotSupportedOnPlatform;
3726
3710
  }
3727
3711
  });
@@ -3729,10 +3713,12 @@ var pages;
3729
3713
  pages.registerFullScreenHandler = registerFullScreenHandler;
3730
3714
  /**
3731
3715
  * Checks if the pages capability is supported by the host
3732
- * @returns true if the pages capability is enabled in runtime.supports.pages and
3733
- * false if it is disabled
3716
+ * @returns boolean to represent whether the appEntity capability is supported
3717
+ *
3718
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
3734
3719
  */
3735
3720
  function isSupported() {
3721
+ ensureInitialized();
3736
3722
  return runtime.supports.pages ? true : false;
3737
3723
  }
3738
3724
  pages.isSupported = isSupported;
@@ -3793,10 +3779,12 @@ var pages;
3793
3779
  tabs.getMruTabInstances = getMruTabInstances;
3794
3780
  /**
3795
3781
  * Checks if the pages.tab capability is supported by the host
3796
- * @returns true if the pages.tabs capability is enabled in runtime.supports.pages.tabs and
3797
- * false if it is disabled
3782
+ * @returns boolean to represent whether the pages.tab capability is supported
3783
+ *
3784
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
3798
3785
  */
3799
3786
  function isSupported() {
3787
+ ensureInitialized();
3800
3788
  return runtime.supports.pages ? (runtime.supports.pages.tabs ? true : false) : false;
3801
3789
  }
3802
3790
  tabs.isSupported = isSupported;
@@ -3860,7 +3848,7 @@ var pages;
3860
3848
  */
3861
3849
  function registerOnSaveHandler(handler) {
3862
3850
  registerOnSaveHandlerHelper(handler, function () {
3863
- if (!isSupported()) {
3851
+ if (handler && !isSupported()) {
3864
3852
  throw errorNotSupportedOnPlatform;
3865
3853
  }
3866
3854
  });
@@ -3895,7 +3883,7 @@ var pages;
3895
3883
  */
3896
3884
  function registerOnRemoveHandler(handler) {
3897
3885
  registerOnRemoveHandlerHelper(handler, function () {
3898
- if (!isSupported()) {
3886
+ if (handler && !isSupported()) {
3899
3887
  throw errorNotSupportedOnPlatform;
3900
3888
  }
3901
3889
  });
@@ -4012,10 +4000,12 @@ var pages;
4012
4000
  }());
4013
4001
  /**
4014
4002
  * Checks if the pages.config capability is supported by the host
4015
- * @returns true if the pages.config capability is enabled in runtime.supports.pages.config and
4016
- * false if it is disabled
4003
+ * @returns boolean to represent whether the pages.config capability is supported
4004
+ *
4005
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4017
4006
  */
4018
4007
  function isSupported() {
4008
+ ensureInitialized();
4019
4009
  return runtime.supports.pages ? (runtime.supports.pages.config ? true : false) : false;
4020
4010
  }
4021
4011
  config.isSupported = isSupported;
@@ -4054,7 +4044,7 @@ var pages;
4054
4044
  */
4055
4045
  function registerBackButtonHandler(handler) {
4056
4046
  registerBackButtonHandlerHelper(handler, function () {
4057
- if (!isSupported()) {
4047
+ if (handler && !isSupported()) {
4058
4048
  throw errorNotSupportedOnPlatform;
4059
4049
  }
4060
4050
  });
@@ -4093,10 +4083,12 @@ var pages;
4093
4083
  }
4094
4084
  /**
4095
4085
  * Checks if the pages.backStack capability is supported by the host
4096
- * @returns true if the pages.backStack capability is enabled in runtime.supports.pages.backStack and
4097
- * false if it is disabled
4086
+ * @returns boolean to represent whether the pages.backStack capability is supported
4087
+ *
4088
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4098
4089
  */
4099
4090
  function isSupported() {
4091
+ ensureInitialized();
4100
4092
  return runtime.supports.pages ? (runtime.supports.pages.backStack ? true : false) : false;
4101
4093
  }
4102
4094
  backStack.isSupported = isSupported;
@@ -4139,13 +4131,14 @@ var pages;
4139
4131
  fullTrust.exitFullscreen = exitFullscreen;
4140
4132
  /**
4141
4133
  * @hidden
4142
- * Hide from docs
4143
- * ------
4134
+ *
4144
4135
  * Checks if the pages.fullTrust capability is supported by the host
4145
- * @returns true if the pages.fullTrust capability is enabled in runtime.supports.pages.fullTrust and
4146
- * false if it is disabled
4136
+ * @returns boolean to represent whether the pages.fullTrust capability is supported
4137
+ *
4138
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4147
4139
  */
4148
4140
  function isSupported() {
4141
+ ensureInitialized();
4149
4142
  return runtime.supports.pages ? (runtime.supports.pages.fullTrust ? true : false) : false;
4150
4143
  }
4151
4144
  fullTrust.isSupported = isSupported;
@@ -4196,10 +4189,12 @@ var pages;
4196
4189
  appButton.onHoverLeave = onHoverLeave;
4197
4190
  /**
4198
4191
  * Checks if pages.appButton capability is supported by the host
4199
- * @returns true if the pages.appButton capability is enabled in runtime.supports.pages.appButton and
4200
- * false if it is disabled
4192
+ * @returns boolean to represent whether the pages.appButton capability is supported
4193
+ *
4194
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4201
4195
  */
4202
4196
  function isSupported() {
4197
+ ensureInitialized();
4203
4198
  return runtime.supports.pages ? (runtime.supports.pages.appButton ? true : false) : false;
4204
4199
  }
4205
4200
  appButton.isSupported = isSupported;
@@ -4246,8 +4241,9 @@ var pages;
4246
4241
  currentApp.navigateToDefaultPage = navigateToDefaultPage;
4247
4242
  /**
4248
4243
  * Checks if pages.currentApp capability is supported by the host
4249
- * @returns true if the pages.currentApp capability is enabled in runtime.supports.pages.currentApp and
4250
- * false if it is disabled
4244
+ * @returns boolean to represent whether the pages.currentApp capability is supported
4245
+ *
4246
+ * @throws Error if {@linkcode app.initialize} has not successfully complete
4251
4247
  *
4252
4248
  * @beta
4253
4249
  */
@@ -4977,7 +4973,7 @@ var logs;
4977
4973
  function registerGetLogHandler(handler) {
4978
4974
  // allow for registration cleanup even when not finished initializing
4979
4975
  handler && ensureInitialized();
4980
- if (!isSupported()) {
4976
+ if (handler && !isSupported()) {
4981
4977
  throw errorNotSupportedOnPlatform;
4982
4978
  }
4983
4979
  if (handler) {
@@ -4994,12 +4990,16 @@ var logs;
4994
4990
  /**
4995
4991
  * @hidden
4996
4992
  *
4993
+ * Checks if the logs capability is supported by the host
4997
4994
  * @returns boolean to represent whether the logs capability is supported
4998
4995
  *
4996
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4997
+ *
4999
4998
  * @internal
5000
4999
  * Limited to Microsoft-internal use
5001
5000
  */
5002
5001
  function isSupported() {
5002
+ ensureInitialized();
5003
5003
  return runtime.supports.logs ? true : false;
5004
5004
  }
5005
5005
  logs.isSupported = isSupported;
@@ -5279,12 +5279,16 @@ var conversations;
5279
5279
  }
5280
5280
  conversations.getChatMembers = getChatMembers;
5281
5281
  /**
5282
+ * Checks if the conversations capability is supported by the host
5282
5283
  * @returns boolean to represent whether conversations capability is supported
5283
5284
  *
5285
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
5286
+ *
5284
5287
  * @internal
5285
5288
  * Limited to Microsoft-internal use
5286
5289
  */
5287
5290
  function isSupported() {
5291
+ ensureInitialized();
5288
5292
  return runtime.supports.conversations ? true : false;
5289
5293
  }
5290
5294
  conversations.isSupported = isSupported;
@@ -5382,7 +5386,14 @@ var appInstallDialog;
5382
5386
  });
5383
5387
  }
5384
5388
  appInstallDialog.openAppInstallDialog = openAppInstallDialog;
5389
+ /**
5390
+ * Checks if the appInstallDialog capability is supported by the host
5391
+ * @returns boolean to represent whether the appInstallDialog capability is supported
5392
+ *
5393
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
5394
+ */
5385
5395
  function isSupported() {
5396
+ ensureInitialized();
5386
5397
  return runtime.supports.appInstallDialog ? true : false;
5387
5398
  }
5388
5399
  appInstallDialog.isSupported = isSupported;
@@ -6136,12 +6147,14 @@ var barCode;
6136
6147
  barCode.requestPermission = requestPermission;
6137
6148
  /**
6138
6149
  * Checks if barCode capability is supported by the host
6150
+ * @returns boolean to represent whether the barCode capability is supported
6139
6151
  *
6140
- * @returns boolean to represent whether barCode is supported
6152
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6141
6153
  *
6142
6154
  * @beta
6143
6155
  */
6144
6156
  function isSupported() {
6157
+ ensureInitialized();
6145
6158
  return runtime.supports.barCode && runtime.supports.permissions ? true : false;
6146
6159
  }
6147
6160
  barCode.isSupported = isSupported;
@@ -6233,13 +6246,15 @@ var chat;
6233
6246
  }
6234
6247
  chat.openGroupChat = openGroupChat;
6235
6248
  /**
6236
- * Checks if chat capability is supported by the host
6237
- *
6249
+ * Checks if the chat capability is supported by the host
6238
6250
  * @returns boolean to represent whether the chat capability is supported
6239
6251
  *
6252
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6253
+ *
6240
6254
  * @beta
6241
6255
  */
6242
6256
  function isSupported() {
6257
+ ensureInitialized();
6243
6258
  return runtime.supports.chat ? true : false;
6244
6259
  }
6245
6260
  chat.isSupported = isSupported;
@@ -6313,12 +6328,14 @@ var geoLocation;
6313
6328
  geoLocation.requestPermission = requestPermission;
6314
6329
  /**
6315
6330
  * Checks if geoLocation capability is supported by the host
6316
- *
6317
6331
  * @returns boolean to represent whether geoLocation is supported
6318
6332
  *
6333
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6334
+ *
6319
6335
  * @beta
6320
6336
  */
6321
6337
  function isSupported() {
6338
+ ensureInitialized();
6322
6339
  return runtime.supports.geoLocation && runtime.supports.permissions ? true : false;
6323
6340
  }
6324
6341
  geoLocation.isSupported = isSupported;
@@ -6365,12 +6382,14 @@ var geoLocation;
6365
6382
  map.showLocation = showLocation;
6366
6383
  /**
6367
6384
  * Checks if geoLocation.map capability is supported by the host
6368
- *
6369
6385
  * @returns boolean to represent whether geoLocation.map is supported
6370
6386
  *
6387
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6388
+ *
6371
6389
  * @beta
6372
6390
  */
6373
6391
  function isSupported() {
6392
+ ensureInitialized();
6374
6393
  return runtime.supports.geoLocation && runtime.supports.geoLocation.map && runtime.supports.permissions
6375
6394
  ? true
6376
6395
  : false;
@@ -6527,9 +6546,12 @@ var location_location;
6527
6546
  *
6528
6547
  * Checks if Location capability is supported by the host
6529
6548
  *
6549
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6550
+ *
6530
6551
  * @returns boolean to represent whether Location is supported
6531
6552
  */
6532
6553
  function isSupported() {
6554
+ ensureInitialized();
6533
6555
  return runtime.supports.location ? true : false;
6534
6556
  }
6535
6557
  location_1.isSupported = isSupported;
@@ -6819,6 +6841,32 @@ var meeting;
6819
6841
  registerHandler('meeting.meetingReactionReceived', handler);
6820
6842
  }
6821
6843
  meeting.registerMeetingReactionReceivedHandler = registerMeetingReactionReceivedHandler;
6844
+ /**
6845
+ * Nested namespace for functions to control behavior of the app share button
6846
+ *
6847
+ * @beta
6848
+ */
6849
+ var appShareButton;
6850
+ (function (appShareButton) {
6851
+ /**
6852
+ * By default app share button will be hidden and this API will govern the visibility of it.
6853
+ *
6854
+ * This function can be used to hide/show app share button in meeting,
6855
+ * along with contentUrl (overrides contentUrl populated in app manifest)
6856
+ * @throws standard Invalid Url error
6857
+ * @param shareInformation has two elements, one isVisible boolean flag and another
6858
+ * optional string contentUrl, which will override contentUrl coming from Manifest
6859
+ * @beta
6860
+ */
6861
+ function setOptions(shareInformation) {
6862
+ ensureInitialized(FrameContexts.sidePanel);
6863
+ if (shareInformation.contentUrl) {
6864
+ new URL(shareInformation.contentUrl);
6865
+ }
6866
+ sendMessageToParent('meeting.appShareButton.setOptions', [shareInformation]);
6867
+ }
6868
+ appShareButton.setOptions = setOptions;
6869
+ })(appShareButton = meeting.appShareButton || (meeting.appShareButton = {}));
6822
6870
  })(meeting || (meeting = {}));
6823
6871
 
6824
6872
  ;// CONCATENATED MODULE: ./src/public/monetization.ts
@@ -6861,7 +6909,16 @@ var monetization;
6861
6909
  return callCallbackWithErrorOrResultOrNullFromPromiseAndReturnPromise(wrappedFunction, callback);
6862
6910
  }
6863
6911
  monetization.openPurchaseExperience = openPurchaseExperience;
6912
+ /**
6913
+ * @hidden
6914
+ *
6915
+ * Checks if the monetization capability is supported by the host
6916
+ * @returns boolean to represent whether the monetization capability is supported
6917
+ *
6918
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6919
+ */
6864
6920
  function isSupported() {
6921
+ ensureInitialized();
6865
6922
  return runtime.supports.monetization ? true : false;
6866
6923
  }
6867
6924
  monetization.isSupported = isSupported;
@@ -6903,7 +6960,14 @@ var calendar;
6903
6960
  });
6904
6961
  }
6905
6962
  calendar.composeMeeting = composeMeeting;
6963
+ /**
6964
+ * Checks if the calendar capability is supported by the host
6965
+ * @returns boolean to represent whether the calendar capability is supported
6966
+ *
6967
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6968
+ */
6906
6969
  function isSupported() {
6970
+ ensureInitialized();
6907
6971
  return runtime.supports.calendar ? true : false;
6908
6972
  }
6909
6973
  calendar.isSupported = isSupported;
@@ -6939,7 +7003,14 @@ var mail;
6939
7003
  });
6940
7004
  }
6941
7005
  mail.composeMail = composeMail;
7006
+ /**
7007
+ * Checks if the mail capability is supported by the host
7008
+ * @returns boolean to represent whether the mail capability is supported
7009
+ *
7010
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7011
+ */
6942
7012
  function isSupported() {
7013
+ ensureInitialized();
6943
7014
  return runtime.supports.mail ? true : false;
6944
7015
  }
6945
7016
  mail.isSupported = isSupported;
@@ -7004,7 +7075,14 @@ var people;
7004
7075
  resolve(sendAndHandleSdkError('people.selectPeople', peoplePickerInputs));
7005
7076
  });
7006
7077
  }
7078
+ /**
7079
+ * Checks if the people capability is supported by the host
7080
+ * @returns boolean to represent whether the people capability is supported
7081
+ *
7082
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7083
+ */
7007
7084
  function isSupported() {
7085
+ ensureInitialized();
7008
7086
  return runtime.supports.people ? true : false;
7009
7087
  }
7010
7088
  people_1.isSupported = isSupported;
@@ -7117,18 +7195,16 @@ var profile;
7117
7195
  });
7118
7196
  }
7119
7197
  profile.showProfile = showProfile;
7120
- /**
7121
- * An internal representation of the showProfile parameters suitable for sending via postMessage.
7122
- * The hub expects to receive an object of this type.
7123
- */
7124
7198
  /**
7125
7199
  * Checks if the profile capability is supported by the host
7126
- *
7127
7200
  * @returns boolean to represent whether the profile capability is supported
7128
7201
  *
7202
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7203
+ *
7129
7204
  * @beta
7130
7205
  */
7131
7206
  function isSupported() {
7207
+ ensureInitialized();
7132
7208
  return runtime.supports.profile ? true : false;
7133
7209
  }
7134
7210
  profile.isSupported = isSupported;
@@ -7240,10 +7316,13 @@ var video;
7240
7316
  /**
7241
7317
  * Checks if video capability is supported by the host
7242
7318
  * @beta
7243
- * @returns true if the video capability is enabled in runtime.supports.video and
7244
- * false if it is disabled
7319
+ * @returns boolean to represent whether the video capability is supported
7320
+ *
7321
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7322
+ *
7245
7323
  */
7246
7324
  function isSupported() {
7325
+ ensureInitialized();
7247
7326
  return runtime.supports.video ? true : false;
7248
7327
  }
7249
7328
  video.isSupported = isSupported;
@@ -7342,12 +7421,14 @@ var search;
7342
7421
  search.unregisterHandlers = unregisterHandlers;
7343
7422
  /**
7344
7423
  * Checks if search capability is supported by the host
7345
- * @returns true if the search capability is supported by the host and false otherwise
7346
- * false if it is disabled
7424
+ * @returns boolean to represent whether the search capability is supported
7425
+ *
7426
+ * @throws Error if {@link app.initialize} has not successfully completed
7347
7427
  *
7348
7428
  * @beta
7349
7429
  */
7350
7430
  function isSupported() {
7431
+ ensureInitialized();
7351
7432
  return runtime.supports.search ? true : false;
7352
7433
  }
7353
7434
  search.isSupported = isSupported;
@@ -7437,7 +7518,14 @@ var sharing;
7437
7518
  throw err;
7438
7519
  }
7439
7520
  }
7521
+ /**
7522
+ * Checks if the sharing capability is supported by the host
7523
+ * @returns boolean to represent whether the sharing capability is supported
7524
+ *
7525
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7526
+ */
7440
7527
  function isSupported() {
7528
+ ensureInitialized();
7441
7529
  return runtime.supports.sharing ? true : false;
7442
7530
  }
7443
7531
  sharing.isSupported = isSupported;
@@ -7480,10 +7568,13 @@ var stageView;
7480
7568
  /**
7481
7569
  * Checks if stageView capability is supported by the host
7482
7570
  * @beta
7483
- * @returns true if the stageView capability is enabled in runtime.supports.stageView and
7484
- * false if it is disabled
7571
+ * @returns boolean to represent whether the stageView capability is supported
7572
+ *
7573
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7574
+ *
7485
7575
  */
7486
7576
  function isSupported() {
7577
+ ensureInitialized();
7487
7578
  return runtime.supports.stageView ? true : false;
7488
7579
  }
7489
7580
  stageView.isSupported = isSupported;
@@ -7513,12 +7604,14 @@ var webStorage;
7513
7604
  webStorage.isWebStorageClearedOnUserLogOut = isWebStorageClearedOnUserLogOut;
7514
7605
  /**
7515
7606
  * Checks if webStorage capability is supported by the host
7516
- * @returns true if the webStorage capability is enabled in runtime.supports.webStorage and
7517
- * false if it is disabled
7607
+ * @returns boolean to represent whether the webStorage capability is supported
7608
+ *
7609
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7518
7610
  *
7519
7611
  * @beta
7520
7612
  */
7521
7613
  function isSupported() {
7614
+ ensureInitialized();
7522
7615
  return runtime.supports.webStorage ? true : false;
7523
7616
  }
7524
7617
  webStorage.isSupported = isSupported;
@@ -7563,7 +7656,14 @@ var call;
7563
7656
  });
7564
7657
  }
7565
7658
  call.startCall = startCall;
7659
+ /**
7660
+ * Checks if the call capability is supported by the host
7661
+ * @returns boolean to represent whether the call capability is supported
7662
+ *
7663
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7664
+ */
7566
7665
  function isSupported() {
7666
+ ensureInitialized();
7567
7667
  return runtime.supports.call ? true : false;
7568
7668
  }
7569
7669
  call.isSupported = isSupported;
@@ -9196,12 +9296,16 @@ var meetingRoom;
9196
9296
  /**
9197
9297
  * @hidden
9198
9298
  *
9299
+ * Checks if the meetingRoom capability is supported by the host
9199
9300
  * @returns boolean to represent whether the meetingRoom capability is supported
9200
9301
  *
9302
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9303
+ *
9201
9304
  * @internal
9202
9305
  * Limited to Microsoft-internal use
9203
9306
  */
9204
9307
  function isSupported() {
9308
+ ensureInitialized();
9205
9309
  return runtime.supports.meetingRoom ? true : false;
9206
9310
  }
9207
9311
  meetingRoom.isSupported = isSupported;
@@ -9234,12 +9338,17 @@ var notifications;
9234
9338
  notifications.showNotification = showNotification;
9235
9339
  /**
9236
9340
  * @hidden
9341
+ *
9342
+ * Checks if the notifications capability is supported by the host
9237
9343
  * @returns boolean to represent whether the notifications capability is supported
9238
9344
  *
9345
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9346
+ *
9239
9347
  * @internal
9240
9348
  * Limited to Microsoft-internal use
9241
9349
  */
9242
9350
  function isSupported() {
9351
+ ensureInitialized();
9243
9352
  return runtime.supports.notifications ? true : false;
9244
9353
  }
9245
9354
  notifications.isSupported = isSupported;
@@ -9495,12 +9604,17 @@ var remoteCamera;
9495
9604
  remoteCamera.registerOnSessionStatusChangeHandler = registerOnSessionStatusChangeHandler;
9496
9605
  /**
9497
9606
  * @hidden
9607
+ *
9608
+ * Checks if the remoteCamera capability is supported by the host
9498
9609
  * @returns boolean to represent whether the remoteCamera capability is supported
9499
9610
  *
9611
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9612
+ *
9500
9613
  * @internal
9501
9614
  * Limited to Microsoft-internal use
9502
9615
  */
9503
9616
  function isSupported() {
9617
+ ensureInitialized();
9504
9618
  return runtime.supports.remoteCamera ? true : false;
9505
9619
  }
9506
9620
  remoteCamera.isSupported = isSupported;
@@ -9554,14 +9668,16 @@ var appEntity;
9554
9668
  /**
9555
9669
  * @hidden
9556
9670
  *
9557
- * Checks if appEntity capability is supported by the host
9558
- * @returns true if the appEntity capability is enabled in runtime.supports.appEntity and
9559
- * false if it is disabled
9671
+ * Checks if the appEntity capability is supported by the host
9672
+ * @returns boolean to represent whether the appEntity capability is supported
9673
+ *
9674
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9560
9675
  *
9561
9676
  * @internal
9562
9677
  * Limited to Microsoft-internal use
9563
9678
  */
9564
9679
  function isSupported() {
9680
+ ensureInitialized();
9565
9681
  return runtime.supports.appEntity ? true : false;
9566
9682
  }
9567
9683
  appEntity_1.isSupported = isSupported;
@@ -9640,15 +9756,17 @@ var teams;
9640
9756
  teams.refreshSiteUrl = refreshSiteUrl;
9641
9757
  /**
9642
9758
  * @hidden
9759
+ *
9643
9760
  * Checks if teams capability is supported by the host
9761
+ * @returns boolean to represent whether the teams capability is supported
9644
9762
  *
9645
- * @returns true if the teams capability is enabled in runtime.supports.teams and
9646
- * false if it is disabled
9763
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9647
9764
  *
9648
9765
  * @internal
9649
9766
  * Limited to Microsoft-internal use
9650
9767
  */
9651
9768
  function isSupported() {
9769
+ ensureInitialized();
9652
9770
  return runtime.supports.teams ? true : false;
9653
9771
  }
9654
9772
  teams.isSupported = isSupported;
@@ -9697,15 +9815,17 @@ var teams;
9697
9815
  joinedTeams.getUserJoinedTeams = getUserJoinedTeams;
9698
9816
  /**
9699
9817
  * @hidden
9818
+ *
9700
9819
  * Checks if teams.fullTrust.joinedTeams capability is supported by the host
9820
+ * @returns boolean to represent whether the teams.fullTrust.joinedTeams capability is supported
9701
9821
  *
9702
- * @returns true if the teams.fullTrust.joinedTeams capability is enabled in
9703
- * runtime.supports.teams.fullTrust.joinedTeams and false if it is disabled
9822
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9704
9823
  *
9705
9824
  * @internal
9706
9825
  * Limited to Microsoft-internal use
9707
9826
  */
9708
9827
  function isSupported() {
9828
+ ensureInitialized();
9709
9829
  return runtime.supports.teams
9710
9830
  ? runtime.supports.teams.fullTrust
9711
9831
  ? runtime.supports.teams.fullTrust.joinedTeams
@@ -9738,14 +9858,17 @@ var teams;
9738
9858
  fullTrust.getConfigSetting = getConfigSetting;
9739
9859
  /**
9740
9860
  * @hidden
9861
+ *
9741
9862
  * Checks if teams.fullTrust capability is supported by the host
9742
- * @returns true if the teams.fullTrust capability is enabled in runtime.supports.teams.fullTrust and
9743
- * false if it is disabled
9863
+ * @returns boolean to represent whether the teams.fullTrust capability is supported
9864
+ *
9865
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9744
9866
  *
9745
9867
  * @internal
9746
9868
  * Limited to Microsoft-internal use
9747
9869
  */
9748
9870
  function isSupported() {
9871
+ ensureInitialized();
9749
9872
  return runtime.supports.teams ? (runtime.supports.teams.fullTrust ? true : false) : false;
9750
9873
  }
9751
9874
  fullTrust.isSupported = isSupported;
@@ -9852,16 +9975,19 @@ var videoEx;
9852
9975
  videoEx.updatePersonalizedEffects = updatePersonalizedEffects;
9853
9976
  /**
9854
9977
  * @hidden
9978
+ *
9855
9979
  * Checks if video capability is supported by the host
9856
9980
  * @beta
9857
9981
  *
9858
- * @returns true if the video capability is enabled in runtime.supports.video and
9859
- * false if it is disabled
9982
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
9983
+ *
9984
+ * @returns boolean to represent whether the video capability is supported
9860
9985
  *
9861
9986
  * @internal
9862
9987
  * Limited to Microsoft-internal use
9863
9988
  */
9864
9989
  function isSupported() {
9990
+ ensureInitialized();
9865
9991
  return video.isSupported();
9866
9992
  }
9867
9993
  videoEx.isSupported = isSupported;