@microsoft/teams-js 2.0.0-beta.6-dev.15 → 2.0.0-beta.6-dev.18

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.
@@ -3409,10 +3409,6 @@ export namespace menus {
3409
3409
  function isSupported(): boolean;
3410
3410
  }
3411
3411
 
3412
- /**
3413
- * @deprecated
3414
- * As of 2.0.0-beta.6, use media only for backwards compatibility of existing code.
3415
- */
3416
3412
  export namespace media {
3417
3413
  /**
3418
3414
  * Enum for file formats supported
@@ -3449,9 +3445,6 @@ export namespace media {
3449
3445
  name?: string;
3450
3446
  }
3451
3447
  /**
3452
- * @deprecated
3453
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3454
- *
3455
3448
  * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.
3456
3449
  *
3457
3450
  * @params callback - Callback will be called with an @see SdkError if there are any.
@@ -3737,9 +3730,6 @@ export namespace media {
3737
3730
  file: Blob;
3738
3731
  }
3739
3732
  /**
3740
- * @deprecated
3741
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3742
- *
3743
3733
  * Select an attachment using camera/gallery
3744
3734
  *
3745
3735
  * @param mediaInputs - The input params to customize the media to be selected
@@ -3747,10 +3737,8 @@ export namespace media {
3747
3737
  */
3748
3738
  export function selectMedia(mediaInputs: MediaInputs, callback: (error: SdkError, attachments: Media[]) => void): void;
3749
3739
  /**
3750
- * @deprecated
3751
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3752
- *
3753
3740
  * View images using native image viewer
3741
+ *
3754
3742
  * @param uriList - list of URIs for images to be viewed - can be content URI or server URL. Supports up to 10 Images in a single call
3755
3743
  * @param callback - returns back error if encountered, returns null in case of success
3756
3744
  */
@@ -3767,10 +3755,8 @@ export namespace media {
3767
3755
  timeOutIntervalInSec?: number;
3768
3756
  }
3769
3757
  /**
3770
- * @deprecated
3771
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
3772
- *
3773
3758
  * Scan Barcode/QRcode using camera
3759
+ *
3774
3760
  * @remarks
3775
3761
  * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
3776
3762
  *
@@ -3848,10 +3834,6 @@ export namespace location {
3848
3834
  function isSupported(): boolean;
3849
3835
  }
3850
3836
 
3851
- /**
3852
- * @deprecated
3853
- * As of 2.0.0-beta.6, use meeting only for backwards compatibility of existing code.
3854
- */
3855
3837
  export namespace meeting {
3856
3838
  /**
3857
3839
  * @hidden
@@ -4002,9 +3984,6 @@ export namespace meeting {
4002
3984
  GroupCall = "groupCall"
4003
3985
  }
4004
3986
  /**
4005
- * @deprecated
4006
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4007
- *
4008
3987
  * Allows an app to get the incoming audio speaker setting for the meeting user
4009
3988
  *
4010
3989
  * @param callback - Callback contains 2 parameters, error and result.
@@ -4015,9 +3994,6 @@ export namespace meeting {
4015
3994
  */
4016
3995
  function getIncomingClientAudioState(callback: (error: SdkError | null, result: boolean | null) => void): void;
4017
3996
  /**
4018
- * @deprecated
4019
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4020
- *
4021
3997
  * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
4022
3998
  *
4023
3999
  * @param callback - Callback contains 2 parameters, error and result.
@@ -4027,9 +4003,6 @@ export namespace meeting {
4027
4003
  */
4028
4004
  function toggleIncomingClientAudio(callback: (error: SdkError | null, result: boolean | null) => void): void;
4029
4005
  /**
4030
- * @deprecated
4031
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4032
- *
4033
4006
  * @hidden
4034
4007
  * Hide from docs
4035
4008
  *
@@ -4043,9 +4016,6 @@ export namespace meeting {
4043
4016
  */
4044
4017
  function getMeetingDetails(callback: (error: SdkError | null, meetingDetails: IMeetingDetailsResponse | null) => void): void;
4045
4018
  /**
4046
- * @deprecated
4047
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4048
- *
4049
4019
  * @hidden
4050
4020
  * Allows an app to get the authentication token for the anonymous or guest user in the meeting
4051
4021
  *
@@ -4057,9 +4027,6 @@ export namespace meeting {
4057
4027
  */
4058
4028
  function getAuthenticationTokenForAnonymousUser(callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void): void;
4059
4029
  /**
4060
- * @deprecated
4061
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4062
- *
4063
4030
  * Allows an app to get the state of the live stream in the current meeting
4064
4031
  *
4065
4032
  * @param callback - Callback contains 2 parameters: error and liveStreamState.
@@ -4068,9 +4035,6 @@ export namespace meeting {
4068
4035
  */
4069
4036
  function getLiveStreamState(callback: (error: SdkError | null, liveStreamState: LiveStreamState | null) => void): void;
4070
4037
  /**
4071
- * @deprecated
4072
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4073
- *
4074
4038
  * Allows an app to request the live streaming be started at the given streaming url
4075
4039
  *
4076
4040
  * @remarks
@@ -4082,9 +4046,6 @@ export namespace meeting {
4082
4046
  */
4083
4047
  function requestStartLiveStreaming(callback: (error: SdkError | null) => void, streamUrl: string, streamKey?: string): void;
4084
4048
  /**
4085
- * @deprecated
4086
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4087
- *
4088
4049
  * Allows an app to request the live streaming be stopped at the given streaming url
4089
4050
  *
4090
4051
  * @remarks
@@ -4094,9 +4055,6 @@ export namespace meeting {
4094
4055
  */
4095
4056
  function requestStopLiveStreaming(callback: (error: SdkError | null) => void): void;
4096
4057
  /**
4097
- * @deprecated
4098
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4099
- *
4100
4058
  * Registers a handler for changes to the live stream.
4101
4059
  *
4102
4060
  * @remarks
@@ -4106,9 +4064,6 @@ export namespace meeting {
4106
4064
  */
4107
4065
  function registerLiveStreamChangedHandler(handler: (liveStreamState: LiveStreamState) => void): void;
4108
4066
  /**
4109
- * @deprecated
4110
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4111
- *
4112
4067
  * Allows an app to share contents in the meeting
4113
4068
  *
4114
4069
  * @param callback - Callback contains 2 parameters, error and result.
@@ -4118,9 +4073,6 @@ export namespace meeting {
4118
4073
  */
4119
4074
  function shareAppContentToStage(callback: (error: SdkError | null, result: boolean | null) => void, appContentUrl: string): void;
4120
4075
  /**
4121
- * @deprecated
4122
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4123
- *
4124
4076
  * Provides information related app's in-meeting sharing capabilities
4125
4077
  *
4126
4078
  * @param callback - Callback contains 2 parameters, error and result.
@@ -4130,9 +4082,6 @@ export namespace meeting {
4130
4082
  */
4131
4083
  function getAppContentStageSharingCapabilities(callback: (error: SdkError | null, appContentStageSharingCapabilities: IAppContentStageSharingCapabilities | null) => void): void;
4132
4084
  /**
4133
- * @deprecated
4134
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4135
- *
4136
4085
  * @hidden
4137
4086
  * Hide from docs.
4138
4087
  * Terminates current stage sharing session in meeting
@@ -4143,9 +4092,6 @@ export namespace meeting {
4143
4092
  */
4144
4093
  function stopSharingAppContentToStage(callback: (error: SdkError | null, result: boolean | null) => void): void;
4145
4094
  /**
4146
- * @deprecated
4147
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4148
- *
4149
4095
  * Provides information related to current stage sharing state for app
4150
4096
  *
4151
4097
  * @param callback - Callback contains 2 parameters, error and result.
@@ -4155,9 +4101,6 @@ export namespace meeting {
4155
4101
  */
4156
4102
  function getAppContentStageSharingState(callback: (error: SdkError | null, appContentStageSharingState: IAppContentStageSharingState | null) => void): void;
4157
4103
  /**
4158
- * @deprecated
4159
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
4160
- *
4161
4104
  * Registers a handler for changes to paticipant speaking states. If any participant is speaking, isSpeakingDetected
4162
4105
  * will be true. If no participants are speaking, isSpeakingDetected will be false. Only one handler can be registered
4163
4106
  * at a time. A subsequent registration replaces an existing registration.
@@ -1122,7 +1122,7 @@ __webpack_require__.d(__webpack_exports__, {
1122
1122
  });
1123
1123
 
1124
1124
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
1125
- var version = "2.0.0-beta.6-dev.15";
1125
+ var version = "2.0.0-beta.6-dev.18";
1126
1126
  /**
1127
1127
  * @hidden
1128
1128
  * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
@@ -2781,6 +2781,7 @@ var dialog;
2781
2781
 
2782
2782
 
2783
2783
 
2784
+
2784
2785
  /**
2785
2786
  * Namespace to interact with the menu-specific part of the SDK.
2786
2787
  * This object is used to show View Configuration, Action Menu and Navigation Bar Menu.
@@ -2851,6 +2852,9 @@ var menus;
2851
2852
  */
2852
2853
  function setUpViews(viewConfig, handler) {
2853
2854
  ensureInitialized();
2855
+ if (!isSupported()) {
2856
+ throw errorNotSupportedOnPlatform;
2857
+ }
2854
2858
  viewConfigItemPressHandler = handler;
2855
2859
  sendMessageToParent('setUpViews', [viewConfig]);
2856
2860
  }
@@ -2870,6 +2874,9 @@ var menus;
2870
2874
  */
2871
2875
  function setNavBarMenu(items, handler) {
2872
2876
  ensureInitialized();
2877
+ if (!isSupported()) {
2878
+ throw errorNotSupportedOnPlatform;
2879
+ }
2873
2880
  navBarMenuItemPressHandler = handler;
2874
2881
  sendMessageToParent('setNavBarMenu', [items]);
2875
2882
  }
@@ -2889,6 +2896,9 @@ var menus;
2889
2896
  */
2890
2897
  function showActionMenu(params, handler) {
2891
2898
  ensureInitialized();
2899
+ if (!isSupported()) {
2900
+ throw errorNotSupportedOnPlatform;
2901
+ }
2892
2902
  actionMenuItemPressHandler = handler;
2893
2903
  sendMessageToParent('showActionMenu', [params]);
2894
2904
  }
@@ -2910,6 +2920,7 @@ var menus;
2910
2920
  // Conflict with some names
2911
2921
 
2912
2922
 
2923
+
2913
2924
  /**
2914
2925
  * Namespace containing the set of APIs that support Teams-specific functionalities.
2915
2926
  */
@@ -2920,8 +2931,11 @@ var teamsCore;
2920
2931
  */
2921
2932
  function enablePrintCapability() {
2922
2933
  if (!GlobalVars.printCapabilityEnabled) {
2923
- GlobalVars.printCapabilityEnabled = true;
2924
2934
  ensureInitialized();
2935
+ if (!isSupported()) {
2936
+ throw errorNotSupportedOnPlatform;
2937
+ }
2938
+ GlobalVars.printCapabilityEnabled = true;
2925
2939
  // adding ctrl+P and cmd+P handler
2926
2940
  document.addEventListener('keydown', function (event) {
2927
2941
  if ((event.ctrlKey || event.metaKey) && event.keyCode === 80) {
@@ -2951,6 +2965,9 @@ var teamsCore;
2951
2965
  */
2952
2966
  function registerOnLoadHandler(handler) {
2953
2967
  ensureInitialized();
2968
+ if (!isSupported()) {
2969
+ throw errorNotSupportedOnPlatform;
2970
+ }
2954
2971
  handlers_registerOnLoadHandler(handler);
2955
2972
  }
2956
2973
  teamsCore.registerOnLoadHandler = registerOnLoadHandler;
@@ -2965,6 +2982,9 @@ var teamsCore;
2965
2982
  */
2966
2983
  function registerBeforeUnloadHandler(handler) {
2967
2984
  ensureInitialized();
2985
+ if (!isSupported()) {
2986
+ throw errorNotSupportedOnPlatform;
2987
+ }
2968
2988
  handlers_registerBeforeUnloadHandler(handler);
2969
2989
  }
2970
2990
  teamsCore.registerBeforeUnloadHandler = registerBeforeUnloadHandler;
@@ -5110,10 +5130,6 @@ var __extends = (undefined && undefined.__extends) || (function () {
5110
5130
 
5111
5131
 
5112
5132
 
5113
- /**
5114
- * @deprecated
5115
- * As of 2.0.0-beta.6, use media only for backwards compatibility of existing code.
5116
- */
5117
5133
  var media;
5118
5134
  (function (media) {
5119
5135
  /**
@@ -5134,9 +5150,6 @@ var media;
5134
5150
  }());
5135
5151
  media.File = File;
5136
5152
  /**
5137
- * @deprecated
5138
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5139
- *
5140
5153
  * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.
5141
5154
  *
5142
5155
  * @params callback - Callback will be called with an @see SdkError if there are any.
@@ -5413,9 +5426,6 @@ var media;
5413
5426
  ImageOutputFormats[ImageOutputFormats["PDF"] = 2] = "PDF";
5414
5427
  })(ImageOutputFormats = media.ImageOutputFormats || (media.ImageOutputFormats = {}));
5415
5428
  /**
5416
- * @deprecated
5417
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5418
- *
5419
5429
  * Select an attachment using camera/gallery
5420
5430
  *
5421
5431
  * @param mediaInputs - The input params to customize the media to be selected
@@ -5468,10 +5478,8 @@ var media;
5468
5478
  }
5469
5479
  media.selectMedia = selectMedia;
5470
5480
  /**
5471
- * @deprecated
5472
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5473
- *
5474
5481
  * View images using native image viewer
5482
+ *
5475
5483
  * @param uriList - list of URIs for images to be viewed - can be content URI or server URL. Supports up to 10 Images in a single call
5476
5484
  * @param callback - returns back error if encountered, returns null in case of success
5477
5485
  */
@@ -5495,10 +5503,8 @@ var media;
5495
5503
  }
5496
5504
  media.viewImages = viewImages;
5497
5505
  /**
5498
- * @deprecated
5499
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5500
- *
5501
5506
  * Scan Barcode/QRcode using camera
5507
+ *
5502
5508
  * @remarks
5503
5509
  * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
5504
5510
  *
@@ -5596,10 +5602,6 @@ var location_location;
5596
5602
 
5597
5603
 
5598
5604
 
5599
- /**
5600
- * @deprecated
5601
- * As of 2.0.0-beta.6, use meeting only for backwards compatibility of existing code.
5602
- */
5603
5605
  var meeting;
5604
5606
  (function (meeting) {
5605
5607
  var MeetingType;
@@ -5617,9 +5619,6 @@ var meeting;
5617
5619
  CallType["GroupCall"] = "groupCall";
5618
5620
  })(CallType = meeting.CallType || (meeting.CallType = {}));
5619
5621
  /**
5620
- * @deprecated
5621
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5622
- *
5623
5622
  * Allows an app to get the incoming audio speaker setting for the meeting user
5624
5623
  *
5625
5624
  * @param callback - Callback contains 2 parameters, error and result.
@@ -5637,9 +5636,6 @@ var meeting;
5637
5636
  }
5638
5637
  meeting.getIncomingClientAudioState = getIncomingClientAudioState;
5639
5638
  /**
5640
- * @deprecated
5641
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5642
- *
5643
5639
  * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
5644
5640
  *
5645
5641
  * @param callback - Callback contains 2 parameters, error and result.
@@ -5656,9 +5652,6 @@ var meeting;
5656
5652
  }
5657
5653
  meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
5658
5654
  /**
5659
- * @deprecated
5660
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5661
- *
5662
5655
  * @hidden
5663
5656
  * Hide from docs
5664
5657
  *
@@ -5679,9 +5672,6 @@ var meeting;
5679
5672
  }
5680
5673
  meeting.getMeetingDetails = getMeetingDetails;
5681
5674
  /**
5682
- * @deprecated
5683
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5684
- *
5685
5675
  * @hidden
5686
5676
  * Allows an app to get the authentication token for the anonymous or guest user in the meeting
5687
5677
  *
@@ -5700,9 +5690,6 @@ var meeting;
5700
5690
  }
5701
5691
  meeting.getAuthenticationTokenForAnonymousUser = getAuthenticationTokenForAnonymousUser;
5702
5692
  /**
5703
- * @deprecated
5704
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5705
- *
5706
5693
  * Allows an app to get the state of the live stream in the current meeting
5707
5694
  *
5708
5695
  * @param callback - Callback contains 2 parameters: error and liveStreamState.
@@ -5718,9 +5705,6 @@ var meeting;
5718
5705
  }
5719
5706
  meeting.getLiveStreamState = getLiveStreamState;
5720
5707
  /**
5721
- * @deprecated
5722
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5723
- *
5724
5708
  * Allows an app to request the live streaming be started at the given streaming url
5725
5709
  *
5726
5710
  * @remarks
@@ -5739,9 +5723,6 @@ var meeting;
5739
5723
  }
5740
5724
  meeting.requestStartLiveStreaming = requestStartLiveStreaming;
5741
5725
  /**
5742
- * @deprecated
5743
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5744
- *
5745
5726
  * Allows an app to request the live streaming be stopped at the given streaming url
5746
5727
  *
5747
5728
  * @remarks
@@ -5758,9 +5739,6 @@ var meeting;
5758
5739
  }
5759
5740
  meeting.requestStopLiveStreaming = requestStopLiveStreaming;
5760
5741
  /**
5761
- * @deprecated
5762
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5763
- *
5764
5742
  * Registers a handler for changes to the live stream.
5765
5743
  *
5766
5744
  * @remarks
@@ -5777,9 +5755,6 @@ var meeting;
5777
5755
  }
5778
5756
  meeting.registerLiveStreamChangedHandler = registerLiveStreamChangedHandler;
5779
5757
  /**
5780
- * @deprecated
5781
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5782
- *
5783
5758
  * Allows an app to share contents in the meeting
5784
5759
  *
5785
5760
  * @param callback - Callback contains 2 parameters, error and result.
@@ -5796,9 +5771,6 @@ var meeting;
5796
5771
  }
5797
5772
  meeting.shareAppContentToStage = shareAppContentToStage;
5798
5773
  /**
5799
- * @deprecated
5800
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5801
- *
5802
5774
  * Provides information related app's in-meeting sharing capabilities
5803
5775
  *
5804
5776
  * @param callback - Callback contains 2 parameters, error and result.
@@ -5815,9 +5787,6 @@ var meeting;
5815
5787
  }
5816
5788
  meeting.getAppContentStageSharingCapabilities = getAppContentStageSharingCapabilities;
5817
5789
  /**
5818
- * @deprecated
5819
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5820
- *
5821
5790
  * @hidden
5822
5791
  * Hide from docs.
5823
5792
  * Terminates current stage sharing session in meeting
@@ -5835,9 +5804,6 @@ var meeting;
5835
5804
  }
5836
5805
  meeting.stopSharingAppContentToStage = stopSharingAppContentToStage;
5837
5806
  /**
5838
- * @deprecated
5839
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5840
- *
5841
5807
  * Provides information related to current stage sharing state for app
5842
5808
  *
5843
5809
  * @param callback - Callback contains 2 parameters, error and result.
@@ -5854,9 +5820,6 @@ var meeting;
5854
5820
  }
5855
5821
  meeting.getAppContentStageSharingState = getAppContentStageSharingState;
5856
5822
  /**
5857
- * @deprecated
5858
- * As of 2.0.0-beta.6, use only for backwards compatibility of existing code.
5859
- *
5860
5823
  * Registers a handler for changes to paticipant speaking states. If any participant is speaking, isSpeakingDetected
5861
5824
  * will be true. If no participants are speaking, isSpeakingDetected will be false. Only one handler can be registered
5862
5825
  * at a time. A subsequent registration replaces an existing registration.
@@ -5902,6 +5865,9 @@ var monetization;
5902
5865
  }
5903
5866
  var wrappedFunction = function () {
5904
5867
  return new Promise(function (resolve) {
5868
+ if (!isSupported()) {
5869
+ throw errorNotSupportedOnPlatform;
5870
+ }
5905
5871
  resolve(sendAndHandleSdkError('monetization.openPurchaseExperience', planInfo));
5906
5872
  });
5907
5873
  };
@@ -7865,6 +7831,9 @@ var teams;
7865
7831
  */
7866
7832
  function getTeamChannels(groupId, callback) {
7867
7833
  ensureInitialized(FrameContexts.content);
7834
+ if (!isSupported()) {
7835
+ throw errorNotSupportedOnPlatform;
7836
+ }
7868
7837
  if (!groupId) {
7869
7838
  throw new Error('[teams.getTeamChannels] groupId cannot be null or empty');
7870
7839
  }
@@ -7884,6 +7853,9 @@ var teams;
7884
7853
  */
7885
7854
  function refreshSiteUrl(threadId, callback) {
7886
7855
  ensureInitialized();
7856
+ if (!isSupported()) {
7857
+ throw errorNotSupportedOnPlatform;
7858
+ }
7887
7859
  if (!threadId) {
7888
7860
  throw new Error('[teams.refreshSiteUrl] threadId cannot be null or empty');
7889
7861
  }