@microsoft/teams-js 2.4.2-beta.1 → 2.5.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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.4.2-beta.1";
1136
+ var version = "2.5.0-beta.0";
1137
1137
 
1138
1138
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1139
1139
  var GlobalVars = /** @class */ (function () {
@@ -1481,12 +1481,14 @@ var validOrigins = [
1481
1481
  'outlook.office365.com',
1482
1482
  'outlook-sdf.office365.com',
1483
1483
  '*.teams.microsoft.com',
1484
+ '*.www.office.com',
1484
1485
  'www.office.com',
1485
1486
  'word.office.com',
1486
1487
  'excel.office.com',
1487
1488
  'powerpoint.office.com',
1488
1489
  'www.officeppe.com',
1489
- '*.www.office.com',
1490
+ '*.www.microsoft365.com',
1491
+ 'www.microsoft365.com',
1490
1492
  ];
1491
1493
  /**
1492
1494
  * @hidden
@@ -1513,6 +1515,21 @@ var teamsDeepLinkProtocol = 'https';
1513
1515
  */
1514
1516
  var teamsDeepLinkHost = 'teams.microsoft.com';
1515
1517
 
1518
+ // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1519
+ var browser = __webpack_require__(227);
1520
+ ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1521
+
1522
+ var topLevelLogger = (0,browser.debug)('teamsJs');
1523
+ /**
1524
+ * @internal
1525
+ * Limited to Microsoft-internal use
1526
+ *
1527
+ * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
1528
+ */
1529
+ function getLogger(namespace) {
1530
+ return topLevelLogger.extend(namespace);
1531
+ }
1532
+
1516
1533
  // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1517
1534
  var uuid = __webpack_require__(22);
1518
1535
  ;// CONCATENATED MODULE: ./src/internal/utils.ts
@@ -1846,7 +1863,33 @@ function createTeamsAppLink(params) {
1846
1863
 
1847
1864
 
1848
1865
 
1866
+
1867
+ var internalLogger = getLogger('internal');
1868
+ var ensureInitializeCalledLogger = internalLogger.extend('ensureInitializeCalled');
1869
+ var ensureInitializedLogger = internalLogger.extend('ensureInitialized');
1849
1870
  /**
1871
+ * Ensures `initialize` was called. This function does NOT verify that a response from Host was received and initialization completed.
1872
+ *
1873
+ * `ensureInitializeCalled` should only be used for APIs which:
1874
+ * - work in all FrameContexts
1875
+ * - are part of a required Capability
1876
+ * - are suspected to be used directly after calling `initialize`, potentially without awaiting the `initialize` call itself
1877
+ *
1878
+ * For most APIs {@link ensureInitialized} is the right validation function to use instead.
1879
+ *
1880
+ * @internal
1881
+ * Limited to Microsoft-internal use
1882
+ */
1883
+ function ensureInitializeCalled() {
1884
+ if (!GlobalVars.initializeCalled) {
1885
+ ensureInitializeCalledLogger('The library has not yet been initialized.');
1886
+ throw new Error('The library has not yet been initialized');
1887
+ }
1888
+ }
1889
+ /**
1890
+ * Ensures `initialize` was called and response from Host was received and processed.
1891
+ * If expected FrameContexts are provided, it also validates that the current FrameContext matches one of the expected ones.
1892
+ *
1850
1893
  * @internal
1851
1894
  * Limited to Microsoft-internal use
1852
1895
  */
@@ -1855,10 +1898,11 @@ function ensureInitialized() {
1855
1898
  for (var _i = 0; _i < arguments.length; _i++) {
1856
1899
  expectedFrameContexts[_i] = arguments[_i];
1857
1900
  }
1858
- if (!GlobalVars.initializeCalled) {
1901
+ if (!GlobalVars.initializeCompleted) {
1902
+ ensureInitializedLogger('The library has not yet been initialized. initializeCalled: %s', GlobalVars.initializeCalled.toString());
1859
1903
  throw new Error('The library has not yet been initialized');
1860
1904
  }
1861
- if (GlobalVars.frameContext && expectedFrameContexts && expectedFrameContexts.length > 0) {
1905
+ if (expectedFrameContexts && expectedFrameContexts.length > 0) {
1862
1906
  var found = false;
1863
1907
  for (var i = 0; i < expectedFrameContexts.length; i++) {
1864
1908
  if (expectedFrameContexts[i] === GlobalVars.frameContext) {
@@ -1943,21 +1987,6 @@ function processAdditionalValidOrigins(validMessageOrigins) {
1943
1987
  GlobalVars.additionalValidOrigins = combinedOriginUrls;
1944
1988
  }
1945
1989
 
1946
- // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1947
- var browser = __webpack_require__(227);
1948
- ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1949
-
1950
- var topLevelLogger = (0,browser.debug)('teamsJs');
1951
- /**
1952
- * @internal
1953
- * Limited to Microsoft-internal use
1954
- *
1955
- * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
1956
- */
1957
- function getLogger(namespace) {
1958
- return topLevelLogger.extend(namespace);
1959
- }
1960
-
1961
1990
  ;// CONCATENATED MODULE: ./src/public/authentication.ts
1962
1991
 
1963
1992
 
@@ -1968,8 +1997,6 @@ function getLogger(namespace) {
1968
1997
  * Namespace to interact with the authentication-specific part of the SDK.
1969
1998
  *
1970
1999
  * This object is used for starting or completing authentication flows.
1971
- *
1972
- * @beta
1973
2000
  */
1974
2001
  var authentication;
1975
2002
  (function (authentication) {
@@ -2072,7 +2099,7 @@ var authentication;
2072
2099
  });
2073
2100
  }
2074
2101
  function getAuthToken(authTokenRequest) {
2075
- ensureInitialized();
2102
+ ensureInitializeCalled();
2076
2103
  return getAuthTokenHelper(authTokenRequest)
2077
2104
  .then(function (value) {
2078
2105
  if (authTokenRequest && authTokenRequest.successCallback) {
@@ -2108,7 +2135,7 @@ var authentication;
2108
2135
  });
2109
2136
  }
2110
2137
  function getUser(userRequest) {
2111
- ensureInitialized();
2138
+ ensureInitializeCalled();
2112
2139
  return getUserHelper()
2113
2140
  .then(function (value) {
2114
2141
  if (userRequest && userRequest.successCallback) {
@@ -2480,6 +2507,10 @@ var versionConstants = {
2480
2507
  capability: { webStorage: {} },
2481
2508
  hostClientTypes: [HostClientType.desktop],
2482
2509
  },
2510
+ {
2511
+ capability: { profile: {} },
2512
+ hostClientTypes: [HostClientType.desktop, HostClientType.web],
2513
+ },
2483
2514
  ],
2484
2515
  '2.0.5': [
2485
2516
  {
@@ -2575,6 +2606,8 @@ var dialog;
2575
2606
  * Function is called during app initialization
2576
2607
  * @internal
2577
2608
  * Limited to Microsoft-internal use
2609
+ *
2610
+ * @beta
2578
2611
  */
2579
2612
  function initialize() {
2580
2613
  registerHandler('messageForChild', handleDialogMessage, false);
@@ -2604,6 +2637,8 @@ var dialog;
2604
2637
  * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
2605
2638
  *
2606
2639
  * @returns a function that can be used to send messages to the dialog.
2640
+ *
2641
+ * @beta
2607
2642
  */
2608
2643
  function open(urlDialogInfo, submitHandler, messageFromChildHandler) {
2609
2644
  ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
@@ -2623,8 +2658,12 @@ var dialog;
2623
2658
  /**
2624
2659
  * Submit the dialog module and close the dialog
2625
2660
  *
2626
- * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
2661
+ * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
2662
+ * If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
2663
+ *
2627
2664
  * @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
2665
+ *
2666
+ * @beta
2628
2667
  */
2629
2668
  function submit(result, appIds) {
2630
2669
  ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
@@ -2642,6 +2681,8 @@ var dialog;
2642
2681
  * This function is only called from inside of a dialog
2643
2682
  *
2644
2683
  * @param message - The message to send to the parent
2684
+ *
2685
+ * @beta
2645
2686
  */
2646
2687
  function sendMessageToParentFromDialog(
2647
2688
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2657,6 +2698,8 @@ var dialog;
2657
2698
  * Send message to the dialog from the parent
2658
2699
  *
2659
2700
  * @param message - The message to send
2701
+ *
2702
+ * @beta
2660
2703
  */
2661
2704
  function sendMessageToDialog(
2662
2705
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -2675,6 +2718,8 @@ var dialog;
2675
2718
  * This function is only called from inside of a dialog.
2676
2719
  *
2677
2720
  * @param listener - The listener that will be triggered.
2721
+ *
2722
+ * @beta
2678
2723
  */
2679
2724
  function registerOnMessageFromParent(listener) {
2680
2725
  ensureInitialized(FrameContexts.task);
@@ -2697,6 +2742,8 @@ var dialog;
2697
2742
  * Checks if dialog module is supported by the host
2698
2743
  *
2699
2744
  * @returns boolean to represent whether dialog module is supported
2745
+ *
2746
+ * @beta
2700
2747
  */
2701
2748
  function isSupported() {
2702
2749
  return runtime.supports.dialog ? true : false;
@@ -2704,6 +2751,8 @@ var dialog;
2704
2751
  dialog.isSupported = isSupported;
2705
2752
  /**
2706
2753
  * Namespace to update the dialog
2754
+ *
2755
+ * @beta
2707
2756
  */
2708
2757
  var update;
2709
2758
  (function (update) {
@@ -2711,6 +2760,8 @@ var dialog;
2711
2760
  * Update dimensions - height/width of a dialog.
2712
2761
  *
2713
2762
  * @param dimensions - An object containing width and height properties.
2763
+ *
2764
+ * @beta
2714
2765
  */
2715
2766
  function resize(dimensions) {
2716
2767
  ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
@@ -2724,6 +2775,8 @@ var dialog;
2724
2775
  * Checks if dialog.update capability is supported by the host
2725
2776
  *
2726
2777
  * @returns boolean to represent whether dialog.update is supported
2778
+ *
2779
+ * @beta
2727
2780
  */
2728
2781
  function isSupported() {
2729
2782
  return runtime.supports.dialog ? (runtime.supports.dialog.update ? true : false) : false;
@@ -2732,6 +2785,8 @@ var dialog;
2732
2785
  })(update = dialog.update || (dialog.update = {}));
2733
2786
  /**
2734
2787
  * Namespace to open a dialog that sends results to the bot framework
2788
+ *
2789
+ * @beta
2735
2790
  */
2736
2791
  var bot;
2737
2792
  (function (bot) {
@@ -2743,6 +2798,8 @@ var dialog;
2743
2798
  * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
2744
2799
  *
2745
2800
  * @returns a function that can be used to send messages to the dialog.
2801
+ *
2802
+ * @beta
2746
2803
  */
2747
2804
  function open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
2748
2805
  ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
@@ -2763,6 +2820,8 @@ var dialog;
2763
2820
  * Checks if dialog.bot capability is supported by the host
2764
2821
  *
2765
2822
  * @returns boolean to represent whether dialog.bot is supported
2823
+ *
2824
+ * @beta
2766
2825
  */
2767
2826
  function isSupported() {
2768
2827
  return runtime.supports.dialog ? (runtime.supports.dialog.bot ? true : false) : false;
@@ -2776,6 +2835,8 @@ var dialog;
2776
2835
  *
2777
2836
  * @internal
2778
2837
  * Limited to Microsoft-internal use
2838
+ *
2839
+ * @beta
2779
2840
  */
2780
2841
  function getDialogInfoFromUrlDialogInfo(urlDialogInfo) {
2781
2842
  var dialogInfo = {
@@ -2795,6 +2856,8 @@ var dialog;
2795
2856
  *
2796
2857
  * @internal
2797
2858
  * Limited to Microsoft-internal use
2859
+ *
2860
+ * @beta
2798
2861
  */
2799
2862
  function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo) {
2800
2863
  var dialogInfo = {
@@ -3016,7 +3079,8 @@ var teamsCore;
3016
3079
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3017
3080
  */
3018
3081
  function registerOnLoadHandlerHelper(handler, versionSpecificHelper) {
3019
- ensureInitialized();
3082
+ // allow for registration cleanup even when not finished initializing
3083
+ handler && ensureInitialized();
3020
3084
  if (versionSpecificHelper) {
3021
3085
  versionSpecificHelper();
3022
3086
  }
@@ -3052,7 +3116,8 @@ var teamsCore;
3052
3116
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3053
3117
  */
3054
3118
  function registerBeforeUnloadHandlerHelper(handler, versionSpecificHelper) {
3055
- ensureInitialized();
3119
+ // allow for registration cleanup even when not finished initializing
3120
+ handler && ensureInitialized();
3056
3121
  if (versionSpecificHelper) {
3057
3122
  versionSpecificHelper();
3058
3123
  }
@@ -3092,8 +3157,6 @@ var teamsCore;
3092
3157
 
3093
3158
  /**
3094
3159
  * Namespace to interact with app initialization and lifecycle.
3095
- *
3096
- * @beta
3097
3160
  */
3098
3161
  var app_app;
3099
3162
  (function (app) {
@@ -3155,7 +3218,7 @@ var app_app;
3155
3218
  * @returns whether the Teams client SDK has been initialized.
3156
3219
  */
3157
3220
  function isInitialized() {
3158
- return GlobalVars.initializeCalled;
3221
+ return GlobalVars.initializeCompleted;
3159
3222
  }
3160
3223
  app.isInitialized = isInitialized;
3161
3224
  /**
@@ -3321,7 +3384,7 @@ var app_app;
3321
3384
  */
3322
3385
  function getContext() {
3323
3386
  return new Promise(function (resolve) {
3324
- ensureInitialized();
3387
+ ensureInitializeCalled();
3325
3388
  resolve(sendAndUnwrap('getContext'));
3326
3389
  }).then(function (legacyContext) { return transformLegacyContextToAppContext(legacyContext); }); // converts globalcontext to app.context
3327
3390
  }
@@ -3330,7 +3393,7 @@ var app_app;
3330
3393
  * Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
3331
3394
  */
3332
3395
  function notifyAppLoaded() {
3333
- ensureInitialized();
3396
+ ensureInitializeCalled();
3334
3397
  sendMessageToParent(app.Messages.AppLoaded, [version]);
3335
3398
  }
3336
3399
  app.notifyAppLoaded = notifyAppLoaded;
@@ -3338,7 +3401,7 @@ var app_app;
3338
3401
  * Notifies the frame that app initialization is successful and is ready for user interaction.
3339
3402
  */
3340
3403
  function notifySuccess() {
3341
- ensureInitialized();
3404
+ ensureInitializeCalled();
3342
3405
  sendMessageToParent(app.Messages.Success, [version]);
3343
3406
  }
3344
3407
  app.notifySuccess = notifySuccess;
@@ -3349,7 +3412,7 @@ var app_app;
3349
3412
  * during initialization as well as an optional message.
3350
3413
  */
3351
3414
  function notifyFailure(appInitializationFailedRequest) {
3352
- ensureInitialized();
3415
+ ensureInitializeCalled();
3353
3416
  sendMessageToParent(app.Messages.Failure, [
3354
3417
  appInitializationFailedRequest.reason,
3355
3418
  appInitializationFailedRequest.message,
@@ -3362,7 +3425,7 @@ var app_app;
3362
3425
  * @param expectedFailureRequest - The expected failure request containing the reason and an optional message
3363
3426
  */
3364
3427
  function notifyExpectedFailure(expectedFailureRequest) {
3365
- ensureInitialized();
3428
+ ensureInitializeCalled();
3366
3429
  sendMessageToParent(app.Messages.ExpectedFailure, [expectedFailureRequest.reason, expectedFailureRequest.message]);
3367
3430
  }
3368
3431
  app.notifyExpectedFailure = notifyExpectedFailure;
@@ -3375,7 +3438,8 @@ var app_app;
3375
3438
  * @param handler - The handler to invoke when the user changes their theme.
3376
3439
  */
3377
3440
  function registerOnThemeChangeHandler(handler) {
3378
- ensureInitialized();
3441
+ // allow for registration cleanup even when not called initialize
3442
+ handler && ensureInitializeCalled();
3379
3443
  handlers_registerOnThemeChangeHandler(handler);
3380
3444
  }
3381
3445
  app.registerOnThemeChangeHandler = registerOnThemeChangeHandler;
@@ -3504,14 +3568,14 @@ function transformLegacyContextToAppContext(legacyContext) {
3504
3568
 
3505
3569
  /**
3506
3570
  * Navigation-specific part of the SDK.
3507
- *
3508
- * @beta
3509
3571
  */
3510
3572
  var pages;
3511
3573
  (function (pages) {
3512
3574
  /**
3513
3575
  * Return focus to the host. Will move focus forward or backward based on where the application container falls in
3514
3576
  * the F6/tab order in the host.
3577
+ * On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no
3578
+ * effect and will be a no-op when called.
3515
3579
  * @param navigateForward - Determines the direction to focus in host.
3516
3580
  */
3517
3581
  function returnFocus(navigateForward) {
@@ -3526,6 +3590,8 @@ var pages;
3526
3590
  * @hidden
3527
3591
  *
3528
3592
  * Registers a handler for specifying focus when it passes from the host to the application.
3593
+ * On mobile hosts or hosts where there is no UI notion of "focus" the handler registered with
3594
+ * this function will never be called.
3529
3595
  *
3530
3596
  * @param handler - The handler for placing focus within the application.
3531
3597
  *
@@ -3628,6 +3694,7 @@ var pages;
3628
3694
  pages.navigateToApp = navigateToApp;
3629
3695
  /**
3630
3696
  * Shares a deep link that a user can use to navigate back to a specific state in this page.
3697
+ * Please note that this method does yet work on mobile hosts.
3631
3698
  *
3632
3699
  * @param deepLinkParameters - ID and label for the link and fallback URL.
3633
3700
  */
@@ -3646,6 +3713,8 @@ var pages;
3646
3713
  /**
3647
3714
  * Registers a handler for changes from or to full-screen view for a tab.
3648
3715
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
3716
+ * On hosts where there is no support for making an app full screen, the handler registered
3717
+ * with this function will never be called.
3649
3718
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
3650
3719
  */
3651
3720
  function registerFullScreenHandler(handler) {
@@ -3806,7 +3875,8 @@ var pages;
3806
3875
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3807
3876
  */
3808
3877
  function registerOnSaveHandlerHelper(handler, versionSpecificHelper) {
3809
- ensureInitialized(FrameContexts.settings);
3878
+ // allow for registration cleanup even when not finished initializing
3879
+ handler && ensureInitialized(FrameContexts.settings);
3810
3880
  if (versionSpecificHelper) {
3811
3881
  versionSpecificHelper();
3812
3882
  }
@@ -3840,7 +3910,8 @@ var pages;
3840
3910
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3841
3911
  */
3842
3912
  function registerOnRemoveHandlerHelper(handler, versionSpecificHelper) {
3843
- ensureInitialized(FrameContexts.remove, FrameContexts.settings);
3913
+ // allow for registration cleanup even when not finished initializing
3914
+ handler && ensureInitialized(FrameContexts.remove, FrameContexts.settings);
3844
3915
  if (versionSpecificHelper) {
3845
3916
  versionSpecificHelper();
3846
3917
  }
@@ -3998,7 +4069,8 @@ var pages;
3998
4069
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
3999
4070
  */
4000
4071
  function registerBackButtonHandlerHelper(handler, versionSpecificHelper) {
4001
- ensureInitialized();
4072
+ // allow for registration cleanup even when not finished initializing
4073
+ handler && ensureInitialized();
4002
4074
  if (versionSpecificHelper) {
4003
4075
  versionSpecificHelper();
4004
4076
  }
@@ -4284,7 +4356,8 @@ function doesHandlerExist(name) {
4284
4356
  * @param registrationHelper - The helper function containing logic pertaining to a specific version of the API.
4285
4357
  */
4286
4358
  function registerHandlerHelper(name, handler, contexts, registrationHelper) {
4287
- ensureInitialized.apply(void 0, contexts);
4359
+ // allow for registration cleanup even when not finished initializing
4360
+ handler && ensureInitialized.apply(void 0, contexts);
4288
4361
  if (registrationHelper) {
4289
4362
  registrationHelper();
4290
4363
  }
@@ -4734,7 +4807,6 @@ function handleChildMessage(evt) {
4734
4807
  }
4735
4808
  else {
4736
4809
  // No handler, proxy to parent
4737
- // tslint:disable-next-line:no-any
4738
4810
  sendMessageToParent(message_1.func, message_1.args, function () {
4739
4811
  var args = [];
4740
4812
  for (var _i = 0; _i < arguments.length; _i++) {
@@ -4806,9 +4878,7 @@ function waitForMessageQueue(targetWindow, callback) {
4806
4878
  * @internal
4807
4879
  * Limited to Microsoft-internal use
4808
4880
  */
4809
- function sendMessageResponseToChild(id,
4810
- // tslint:disable-next-line:no-any
4811
- args, isPartialResponse) {
4881
+ function sendMessageResponseToChild(id, args, isPartialResponse) {
4812
4882
  var targetWindow = Communication.childWindow;
4813
4883
  /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4814
4884
  var response = createMessageResponse(id, args, isPartialResponse);
@@ -4825,9 +4895,7 @@ args, isPartialResponse) {
4825
4895
  * @internal
4826
4896
  * Limited to Microsoft-internal use
4827
4897
  */
4828
- function sendMessageEventToChild(actionName,
4829
- // tslint:disable-next-line: no-any
4830
- args) {
4898
+ function sendMessageEventToChild(actionName, args) {
4831
4899
  var targetWindow = Communication.childWindow;
4832
4900
  /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4833
4901
  var customEvent = createMessageEvent(actionName, args);
@@ -4845,7 +4913,6 @@ args) {
4845
4913
  * @internal
4846
4914
  * Limited to Microsoft-internal use
4847
4915
  */
4848
- // tslint:disable-next-line:no-any
4849
4916
  function createMessageRequest(func, args) {
4850
4917
  return {
4851
4918
  id: CommunicationPrivate.nextMessageId++,
@@ -4858,7 +4925,6 @@ function createMessageRequest(func, args) {
4858
4925
  * @internal
4859
4926
  * Limited to Microsoft-internal use
4860
4927
  */
4861
- // tslint:disable-next-line:no-any
4862
4928
  function createMessageResponse(id, args, isPartialResponse) {
4863
4929
  return {
4864
4930
  id: id,
@@ -4873,7 +4939,6 @@ function createMessageResponse(id, args, isPartialResponse) {
4873
4939
  * @internal
4874
4940
  * Limited to Microsoft-internal use
4875
4941
  */
4876
- // tslint:disable-next-line:no-any
4877
4942
  function createMessageEvent(func, args) {
4878
4943
  return {
4879
4944
  func: func,
@@ -4908,7 +4973,8 @@ var logs;
4908
4973
  * Limited to Microsoft-internal use
4909
4974
  */
4910
4975
  function registerGetLogHandler(handler) {
4911
- ensureInitialized();
4976
+ // allow for registration cleanup even when not finished initializing
4977
+ handler && ensureInitialized();
4912
4978
  if (!isSupported()) {
4913
4979
  throw errorNotSupportedOnPlatform;
4914
4980
  }
@@ -5017,11 +5083,7 @@ function uploadCustomApp(manifestBlob, onComplete) {
5017
5083
  * @internal
5018
5084
  * Limited to Microsoft-internal use
5019
5085
  */
5020
- function sendCustomMessage(actionName,
5021
- // tslint:disable-next-line:no-any
5022
- args,
5023
- // tslint:disable-next-line:no-any
5024
- callback) {
5086
+ function sendCustomMessage(actionName, args, callback) {
5025
5087
  ensureInitialized();
5026
5088
  sendMessageToParent(actionName, args, callback);
5027
5089
  }
@@ -5037,9 +5099,7 @@ callback) {
5037
5099
  * @internal
5038
5100
  * Limited to Microsoft-internal use
5039
5101
  */
5040
- function sendCustomEvent(actionName,
5041
- // tslint:disable-next-line:no-any
5042
- args) {
5102
+ function sendCustomEvent(actionName, args) {
5043
5103
  ensureInitialized();
5044
5104
  //validate childWindow
5045
5105
  if (!Communication.childWindow) {
@@ -6105,6 +6165,8 @@ var chat;
6105
6165
  * @param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
6106
6166
  *
6107
6167
  * @returns Promise resolved upon completion
6168
+ *
6169
+ * @beta
6108
6170
  */
6109
6171
  function openChat(openChatRequest) {
6110
6172
  return new Promise(function (resolve) {
@@ -6133,6 +6195,8 @@ var chat;
6133
6195
  * @param openChatRequest: {@link OpenGroupChatRequest} - a request object that contains a list of user emails as well as optional parameters for message and topic (display name for the group chat).
6134
6196
  *
6135
6197
  * @returns Promise resolved upon completion
6198
+ *
6199
+ * @beta
6136
6200
  */
6137
6201
  function openGroupChat(openChatRequest) {
6138
6202
  return new Promise(function (resolve) {
@@ -6166,6 +6230,13 @@ var chat;
6166
6230
  });
6167
6231
  }
6168
6232
  chat.openGroupChat = openGroupChat;
6233
+ /**
6234
+ * Checks if chat capability is supported by the host
6235
+ *
6236
+ * @returns boolean to represent whether the chat capability is supported
6237
+ *
6238
+ * @beta
6239
+ */
6169
6240
  function isSupported() {
6170
6241
  return runtime.supports.chat ? true : false;
6171
6242
  }
@@ -7018,6 +7089,8 @@ var profile;
7018
7089
  * Opens a profile card at a specified position to show profile information about a persona.
7019
7090
  * @param showProfileRequest The parameters to position the card and identify the target user.
7020
7091
  * @returns Promise that will be fulfilled when the operation has completed
7092
+ *
7093
+ * @beta
7021
7094
  */
7022
7095
  function showProfile(showProfileRequest) {
7023
7096
  ensureInitialized(FrameContexts.content);
@@ -7042,6 +7115,13 @@ var profile;
7042
7115
  });
7043
7116
  }
7044
7117
  profile.showProfile = showProfile;
7118
+ /**
7119
+ * Checks if the profile capability is supported by the host
7120
+ *
7121
+ * @returns boolean to represent whether the profile capability is supported
7122
+ *
7123
+ * @beta
7124
+ */
7045
7125
  function isSupported() {
7046
7126
  return runtime.supports.profile ? true : false;
7047
7127
  }
@@ -7633,7 +7713,7 @@ function print() {
7633
7713
  * @param callback - The callback to invoke when the {@link Context} object is retrieved.
7634
7714
  */
7635
7715
  function getContext(callback) {
7636
- ensureInitialized();
7716
+ ensureInitializeCalled();
7637
7717
  app_app.getContext().then(function (context) {
7638
7718
  if (callback) {
7639
7719
  callback(transformAppContextToLegacyContext(context));