@microsoft/teams-js 2.8.0-beta.0 → 2.8.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.
@@ -3367,7 +3367,7 @@ export interface UrlDialogInfo extends BaseDialogInfo {
3367
3367
  *
3368
3368
  * @remarks
3369
3369
  * The domain of the url must match at least one of the
3370
- * valid domains specified in the validDomains block of the manifest
3370
+ * valid domains specified in the [validDomains block](https://learn.microsoft.com/microsoftteams/platform/resources/schema/manifest-schema#validdomains) of the app manifest
3371
3371
  */
3372
3372
  url: string;
3373
3373
  /**
@@ -3850,7 +3850,8 @@ export namespace app {
3850
3850
  */
3851
3851
  isPSTNCallingAllowed?: boolean;
3852
3852
  /**
3853
- * The license type for the current user.
3853
+ * The license type for the current user. Possible values are:
3854
+ * "Unknown", "Teacher", "Student", "Free", "SmbBusinessVoice", "SmbNonVoice", "FrontlineWorker"
3854
3855
  */
3855
3856
  licenseType?: string;
3856
3857
  /**
@@ -3950,7 +3951,7 @@ export namespace app {
3950
3951
  */
3951
3952
  meeting?: MeetingInfo;
3952
3953
  /**
3953
- * When hosted in SharePoint, this is the [SharePoint PageContext](https://learn.microsoft.com/en-us/javascript/api/sp-page-context/pagecontext?view=sp-typescript-latest), else `undefined`
3954
+ * When hosted in SharePoint, this is the [SharePoint PageContext](https://learn.microsoft.com/javascript/api/sp-page-context/pagecontext?view=sp-typescript-latest), else `undefined`
3954
3955
  */
3955
3956
  sharepoint?: any;
3956
3957
  /**
@@ -4215,7 +4216,7 @@ export namespace dialog {
4215
4216
  */
4216
4217
  err?: string;
4217
4218
  /**
4218
- * Value provided in the `result` parameter by the dialog when the {@linkcode submit} function
4219
+ * Value provided in the `result` parameter by the dialog when the {@linkcode url.submit} function
4219
4220
  * was called.
4220
4221
  * If the dialog was closed by the user without submitting (e.g., using a control in the corner
4221
4222
  * of the dialog), this value will be `undefined` here.
@@ -4228,7 +4229,7 @@ export namespace dialog {
4228
4229
  */
4229
4230
  type PostMessageChannel = (message: any) => void;
4230
4231
  /**
4231
- * Handler used for receiving results when a dialog closes, either the value passed by {@linkcode submit}
4232
+ * Handler used for receiving results when a dialog closes, either the value passed by {@linkcode url.submit}
4232
4233
  * or an error if the dialog was closed by the user.
4233
4234
  * @beta
4234
4235
  */
@@ -4262,6 +4263,9 @@ export namespace dialog {
4262
4263
  /**
4263
4264
  * Submit the dialog module and close the dialog
4264
4265
  *
4266
+ * @remarks
4267
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
4268
+ *
4265
4269
  * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
4266
4270
  * If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
4267
4271
  *
@@ -4273,8 +4277,8 @@ export namespace dialog {
4273
4277
  /**
4274
4278
  * Send message to the parent from dialog
4275
4279
  *
4276
- * @remarks
4277
- * This function is only called from inside of a dialog
4280
+ * @remarks
4281
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
4278
4282
  *
4279
4283
  * @param message - The message to send to the parent
4280
4284
  *
@@ -4293,7 +4297,7 @@ export namespace dialog {
4293
4297
  * Register a listener that will be triggered when a message is received from the app that opened the dialog.
4294
4298
  *
4295
4299
  * @remarks
4296
- * This function is only called from inside of a dialog.
4300
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
4297
4301
  *
4298
4302
  * @param listener - The listener that will be triggered.
4299
4303
  *
@@ -4405,7 +4409,7 @@ export namespace dialog {
4405
4409
  * This function cannot be called from inside of a dialog
4406
4410
  *
4407
4411
  * @param adaptiveCardDialogInfo - An object containing the parameters of the dialog module {@link AdaptiveCardDialogInfo}.
4408
- * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
4412
+ * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode url.submit} function or when the user closes the dialog.
4409
4413
  *
4410
4414
  * @beta
4411
4415
  */
@@ -4583,7 +4587,7 @@ export namespace geoLocation {
4583
4587
  }
4584
4588
 
4585
4589
  /**
4586
- * @returns The {@linkcode: AdaptiveCardVersion} representing the Adaptive Card schema
4590
+ * @returns The {@linkcode AdaptiveCardVersion} representing the Adaptive Card schema
4587
4591
  * version supported by the host, or undefined if the host does not support Adaptive Cards
4588
4592
  */
4589
4593
  export function getAdaptiveCardSchemaVersion(): AdaptiveCardVersion | undefined;
@@ -4994,7 +4998,7 @@ export namespace pages {
4994
4998
  interface NavigateWithinAppParams {
4995
4999
  /**
4996
5000
  * The developer-defined unique ID for the page defined in the manifest or when first configuring
4997
- * the page. (Known as {entityId} prior to TeamsJS v.2.0.0)
5001
+ * the page. (Known as {@linkcode Context.entityId} prior to TeamsJS v.2.0.0)
4998
5002
  */
4999
5003
  pageId: string;
5000
5004
  /**
@@ -5850,45 +5854,126 @@ export namespace meeting {
5850
5854
  /**
5851
5855
  * Property bag for the meeting reaction received event
5852
5856
  *
5857
+ * @hidden
5858
+ * Hide from docs.
5859
+ *
5860
+ * @internal
5861
+ * Limited to Microsoft-internal use
5862
+ *
5853
5863
  * @beta
5854
5864
  */
5855
5865
  interface MeetingReactionReceivedEventData {
5856
5866
  /**
5857
5867
  * Indicates the type of meeting reaction received
5868
+ *
5869
+ * @hidden
5870
+ * Hide from docs.
5858
5871
  */
5859
5872
  meetingReactionType?: MeetingReactionType;
5860
5873
  /**
5861
5874
  * error object in case there is a failure
5875
+ *
5876
+ * @hidden
5877
+ * Hide from docs.
5862
5878
  */
5863
5879
  error?: SdkError;
5864
5880
  }
5865
5881
  /**
5866
5882
  * Interface for raiseHandState properties
5867
5883
  *
5884
+ * @hidden
5885
+ * Hide from docs.
5886
+ *
5887
+ * @internal
5888
+ * Limited to Microsoft-internal use
5889
+ *
5868
5890
  * @beta
5869
5891
  */
5870
5892
  interface IRaiseHandState {
5871
- /** Indicates whether the selfParticipant's hand is raised or not*/
5893
+ /** Indicates whether the selfParticipant's hand is raised or not
5894
+ *
5895
+ * @hidden
5896
+ * Hide from docs.
5897
+ */
5872
5898
  isHandRaised: boolean;
5873
5899
  }
5874
5900
  /**
5875
5901
  * Property bag for the raiseHandState changed event
5876
5902
  *
5903
+ * @hidden
5904
+ * Hide from docs.
5905
+ *
5906
+ * @internal
5907
+ * Limited to Microsoft-internal use
5908
+ *
5877
5909
  * @beta
5878
5910
  */
5879
5911
  interface RaiseHandStateChangedEventData {
5880
5912
  /**
5881
5913
  * entire raiseHandState object for the selfParticipant
5914
+ *
5915
+ * @hidden
5916
+ * Hide from docs.
5882
5917
  */
5883
5918
  raiseHandState: IRaiseHandState;
5884
5919
  /**
5885
5920
  * error object in case there is a failure
5921
+ *
5922
+ * @hidden
5923
+ * Hide from docs.
5886
5924
  */
5887
5925
  error?: SdkError;
5888
5926
  }
5927
+ /**
5928
+ * Interface for mic state change
5929
+ *
5930
+ * @hidden
5931
+ * Hide from docs.
5932
+ *
5933
+ * @internal
5934
+ * Limited to Microsoft-internal use
5935
+ *
5936
+ * @beta
5937
+ */
5938
+ interface MicState {
5939
+ /**
5940
+ * Indicates the mute status of the mic
5941
+ */
5942
+ isMicMuted: boolean;
5943
+ }
5944
+ /**
5945
+ * Interface for RequestAppAudioHandling properties
5946
+ *
5947
+ * @hidden
5948
+ * Hide from docs.
5949
+ *
5950
+ * @internal
5951
+ * Limited to Microsoft-internal use
5952
+ *
5953
+ * @beta
5954
+ */
5955
+ interface RequestAppAudioHandlingParams {
5956
+ /**
5957
+ * Indicates whether the app is requesting to start handling audio, or if
5958
+ * it's giving audio back to the host
5959
+ */
5960
+ isAppHandlingAudio: boolean;
5961
+ /**
5962
+ * Callback for the host to tell the app to change its microphone state
5963
+ * @param micState The microphone state for the app to use
5964
+ * @returns A promise with the updated microphone state
5965
+ */
5966
+ micMuteStateChangedCallback: (micState: MicState) => Promise<MicState>;
5967
+ }
5889
5968
  /**
5890
5969
  * Different types of meeting reactions that can be sent/received
5891
5970
  *
5971
+ * @hidden
5972
+ * Hide from docs.
5973
+ *
5974
+ * @internal
5975
+ * Limited to Microsoft-internal use
5976
+ *
5892
5977
  * @beta
5893
5978
  */
5894
5979
  enum MeetingReactionType {
@@ -6043,6 +6128,12 @@ export namespace meeting {
6043
6128
  *
6044
6129
  * @param handler The handler to invoke when the selfParticipant's (current user's) raiseHandState changes.
6045
6130
  *
6131
+ * @hidden
6132
+ * Hide from docs.
6133
+ *
6134
+ * @internal
6135
+ * Limited to Microsoft-internal use
6136
+ *
6046
6137
  * @beta
6047
6138
  */
6048
6139
  function registerRaiseHandStateChangedHandler(handler: (eventData: RaiseHandStateChangedEventData) => void): void;
@@ -6052,6 +6143,12 @@ export namespace meeting {
6052
6143
  *
6053
6144
  * @param handler The handler to invoke when the selfParticipant (current user) successfully sends a meeting reaction
6054
6145
  *
6146
+ * @hidden
6147
+ * Hide from docs.
6148
+ *
6149
+ * @internal
6150
+ * Limited to Microsoft-internal use
6151
+ *
6055
6152
  * @beta
6056
6153
  */
6057
6154
  function registerMeetingReactionReceivedHandler(handler: (eventData: MeetingReactionReceivedEventData) => void): void;
@@ -6088,6 +6185,46 @@ export namespace meeting {
6088
6185
  */
6089
6186
  function setOptions(shareInformation: ShareInformation): void;
6090
6187
  }
6188
+ /**
6189
+ * Have the app handle audio (mic & speaker) and turn off host audio.
6190
+ *
6191
+ * When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is true, the host will switch to audioless mode
6192
+ * Registers for mic mute status change events, which are events that the app can receive from the host asking the app to
6193
+ * mute or unmute the microphone.
6194
+ *
6195
+ * When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is false, the host will switch out of audioless mode
6196
+ * Unregisters the mic mute status change events so the app will no longer receive these events
6197
+ *
6198
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6199
+ * @throws Error if {@link RequestAppAudioHandlingParams.micMuteStateChangedCallback} parameter is not defined
6200
+ *
6201
+ * @param requestAppAudioHandlingParams - {@link RequestAppAudioHandlingParams} object with values for the audio switchover
6202
+ * @param callback - Callback with one parameter, the result
6203
+ * can either be true (the host is now in audioless mode) or false (the host is not in audioless mode)
6204
+ *
6205
+ * @hidden
6206
+ * Hide from docs.
6207
+ *
6208
+ * @internal
6209
+ * Limited to Microsoft-internal use
6210
+ *
6211
+ * @beta
6212
+ */
6213
+ function requestAppAudioHandling(requestAppAudioHandlingParams: RequestAppAudioHandlingParams, callback: (isHostAudioless: boolean) => void): void;
6214
+ /**
6215
+ * Notifies the host that the microphone state has changed in the app.
6216
+ * @param micState - The new state that the microphone is in
6217
+ * isMicMuted - Boolean to indicate the current mute status of the mic.
6218
+ *
6219
+ * @hidden
6220
+ * Hide from docs.
6221
+ *
6222
+ * @internal
6223
+ * Limited to Microsoft-internal use
6224
+ *
6225
+ * @beta
6226
+ */
6227
+ function updateMicState(micState: MicState): void;
6091
6228
  }
6092
6229
 
6093
6230
  export namespace monetization {
@@ -6679,7 +6816,7 @@ export namespace search {
6679
6816
 
6680
6817
  /**
6681
6818
  * Namespace to open a share dialog for web content.
6682
- * For more info, see {@link https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab Share to Teams from personal app or tab}
6819
+ * For more info, see [Share to Teams from personal app or tab](https://learn.microsoft.com/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab)
6683
6820
  */
6684
6821
  export namespace sharing {
6685
6822
  export const SharingAPIMessages: {
@@ -7269,7 +7406,7 @@ export namespace settings {
7269
7406
  export namespace tasks {
7270
7407
  /**
7271
7408
  * @deprecated
7272
- * As of 2.0.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
7409
+ * As of 2.8.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
7273
7410
  * and {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot-based dialogs. In Teams,
7274
7411
  * this function can be used for Adaptive Card-based dialogs. Support for Adaptive Card-based dialogs is coming to other hosts in the future.
7275
7412
  *
@@ -7290,7 +7427,7 @@ export namespace tasks {
7290
7427
  function updateTask(taskInfo: TaskInfo): void;
7291
7428
  /**
7292
7429
  * @deprecated
7293
- * As of 2.0.0, please use {@link dialog.submit} instead.
7430
+ * As of 2.8.0, please use {@link dialog.url.submit} instead.
7294
7431
  *
7295
7432
  * Submit the task module.
7296
7433
  *