@microsoft/teams-js 2.10.1 → 2.11.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.
@@ -2609,23 +2609,35 @@ export namespace authentication {
2609
2609
  }
2610
2610
  }
2611
2611
 
2612
+ /** HostClientType represents the different client platforms on which host can be run. */
2612
2613
  export enum HostClientType {
2614
+ /** Represents the desktop client of host, which is installed on a user's computer and runs as a standalone application. */
2613
2615
  desktop = "desktop",
2616
+ /** Represents the web-based client of host, which runs in a web browser. */
2614
2617
  web = "web",
2618
+ /** Represents the Android mobile client of host, which runs on Android devices such as smartphones and tablets. */
2615
2619
  android = "android",
2620
+ /** Represents the iOS mobile client of host, which runs on iOS devices such as iPhones. */
2616
2621
  ios = "ios",
2622
+ /** Represents the iPadOS client of host, which runs on iOS devices such as iPads. */
2617
2623
  ipados = "ipados",
2618
2624
  /**
2619
2625
  * @deprecated
2620
2626
  * As of 2.0.0, please use {@link teamsRoomsWindows} instead.
2621
2627
  */
2622
2628
  rigel = "rigel",
2629
+ /** Represents the client of host, which runs on surface hub devices. */
2623
2630
  surfaceHub = "surfaceHub",
2631
+ /** Represents the client of host, which runs on Teams Rooms on Windows devices. More information on Microsoft Teams Rooms on Windows can be found [Microsoft Teams Rooms (Windows)](https://support.microsoft.com/office/microsoft-teams-rooms-windows-help-e667f40e-5aab-40c1-bd68-611fe0002ba2)*/
2624
2632
  teamsRoomsWindows = "teamsRoomsWindows",
2633
+ /** Represents the client of host, which runs on Teams Rooms on Android devices. More information on Microsoft Teams Rooms on Android can be found [Microsoft Teams Rooms (Android)].(https://support.microsoft.com/office/get-started-with-teams-rooms-on-android-68517298-d513-46be-8d6d-d41db5e6b4b2)*/
2625
2634
  teamsRoomsAndroid = "teamsRoomsAndroid",
2635
+ /** Represents the client of host, which runs on Teams phones. More information can be found [Microsoft Teams Phones](https://support.microsoft.com/office/get-started-with-teams-phones-694ca17d-3ecf-40ca-b45e-d21b2c442412) */
2626
2636
  teamsPhones = "teamsPhones",
2637
+ /** Represents the client of host, which runs on Teams displays devices. More information can be found [Microsoft Teams Displays](https://support.microsoft.com/office/get-started-with-teams-displays-ff299825-7f13-4528-96c2-1d3437e6d4e6) */
2627
2638
  teamsDisplays = "teamsDisplays"
2628
2639
  }
2640
+ /** HostName indicates the possible hosts for your application. */
2629
2641
  export enum HostName {
2630
2642
  /**
2631
2643
  * Office.com and Office Windows App
@@ -2653,14 +2665,35 @@ export enum HostName {
2653
2665
  */
2654
2666
  teamsModern = "TeamsModern"
2655
2667
  }
2668
+ /**
2669
+ * FrameContexts provides information about the context in which the app is running within the host.
2670
+ * Developers can use FrameContexts to determine how their app should behave in different contexts,
2671
+ * and can use the information provided by the context to adapt the app to the user's needs.
2672
+ *
2673
+ * @example
2674
+ * If your app is running in the "settings" context, you should be displaying your apps configuration page.
2675
+ * If the app is running in the content context, the developer may want to display information relevant to
2676
+ * the content the user is currently viewing.
2677
+ */
2656
2678
  export enum FrameContexts {
2679
+ /**
2680
+ * App's frame context from where settings page can be accessed.
2681
+ * See [how to create a configuration page.]( https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/create-tab-pages/configuration-page?tabs=teamsjs-v2)
2682
+ */
2657
2683
  settings = "settings",
2684
+ /** The default context for the app where all the content of the app is displayed. */
2658
2685
  content = "content",
2686
+ /** Frame context used when app is running in the authentication window launched by calling {@link authentication.authenticate} */
2659
2687
  authentication = "authentication",
2688
+ /** The page shown when the user uninstalls the app. */
2660
2689
  remove = "remove",
2690
+ /** A task module is a pop-up window that can be used to display a form, a dialog, or other interactive content within the host. */
2661
2691
  task = "task",
2692
+ /** The side panel is a persistent panel that is displayed on the right side of the host and can be used to display content or UI that is relevant to the current page or tab. */
2662
2693
  sidePanel = "sidePanel",
2694
+ /** The stage is a large area that is displayed at the center of the host and can be used to display content or UI that requires a lot of space, such as a video player or a document editor. */
2663
2695
  stage = "stage",
2696
+ /** App's frame context from where meetingStage can be accessed in a meeting session, which is the primary area where video and presentation content is displayed during a meeting. */
2664
2697
  meetingStage = "meetingStage"
2665
2698
  }
2666
2699
  /**
@@ -2668,26 +2701,37 @@ export enum FrameContexts {
2668
2701
  * types in Office 365 for Education (team types 1, 2, 3, and 4).
2669
2702
  */
2670
2703
  export enum TeamType {
2704
+ /** Represents a standard or classic team in host that is designed for ongoing collaboration and communication among a group of people. */
2671
2705
  Standard = 0,
2706
+ /** Represents an educational team in host that is designed for classroom collaboration and communication among students and teachers. */
2672
2707
  Edu = 1,
2708
+ /** Represents a class team in host that is designed for classroom collaboration and communication among students and teachers in a structured environment. */
2673
2709
  Class = 2,
2710
+ /** Represents a professional learning community (PLC) team in host that is designed for educators to collaborate and share resources and best practices. */
2674
2711
  Plc = 3,
2712
+ /** Represents a staff team in host that is designed for staff collaboration and communication among staff members.*/
2675
2713
  Staff = 4
2676
2714
  }
2677
2715
  /**
2678
2716
  * Indicates the various types of roles of a user in a team.
2679
2717
  */
2680
2718
  export enum UserTeamRole {
2719
+ /** Represents that the user is an owner or administrator of the team. */
2681
2720
  Admin = 0,
2721
+ /** Represents that the user is a standard member of the team. */
2682
2722
  User = 1,
2723
+ /** Represents that the user does not have any role in the team. */
2683
2724
  Guest = 2
2684
2725
  }
2685
2726
  /**
2686
2727
  * Dialog module dimension enum
2687
2728
  */
2688
2729
  export enum DialogDimension {
2730
+ /** Represents a large-sized dialog box, which is typically used for displaying large amounts of content or complex workflows that require more space. */
2689
2731
  Large = "large",
2732
+ /** Represents a medium-sized dialog box, which is typically used for displaying moderate amounts of content or workflows that require less space. */
2690
2733
  Medium = "medium",
2734
+ /** Represents a small-sized dialog box, which is typically used for displaying simple messages or workflows that require minimal space.*/
2691
2735
  Small = "small"
2692
2736
  }
2693
2737
  /**
@@ -2699,10 +2743,16 @@ export import TaskModuleDimension = DialogDimension;
2699
2743
  * The type of the channel with which the content is associated.
2700
2744
  */
2701
2745
  export enum ChannelType {
2746
+ /** The default channel type. Type of channel is used for general collaboration and communication within a team. */
2702
2747
  Regular = "Regular",
2748
+ /** Type of channel is used for sensitive or confidential communication within a team and is only accessible to members of the channel. */
2703
2749
  Private = "Private",
2750
+ /** Type of channel is used for collaboration between multiple teams or groups and is accessible to members of all the teams or groups. */
2704
2751
  Shared = "Shared"
2705
2752
  }
2753
+ /** An error object indicating that the requested operation or feature is not supported on the current platform or device.
2754
+ * @typedef {Object} SdkError
2755
+ */
2706
2756
  export const errorNotSupportedOnPlatform: SdkError;
2707
2757
  /**
2708
2758
  * @hidden
@@ -2715,6 +2765,7 @@ export const minAdaptiveCardVersion: AdaptiveCardVersion;
2715
2765
  * Represents information about tabs for an app
2716
2766
  */
2717
2767
  export interface TabInformation {
2768
+ /** Represents the tabs associated with a Microsoft Teams app */
2718
2769
  teamTabs: TabInstance[];
2719
2770
  }
2720
2771
  /**
@@ -2836,19 +2887,43 @@ export interface TeamInformation {
2836
2887
  * Represents OS locale info used for formatting date and time data
2837
2888
  */
2838
2889
  export interface LocaleInfo {
2839
- platform: 'windows' | 'macos';
2890
+ /** Represents the user's platform on which the app is running. */
2891
+ platform: HostClientType.android | HostClientType.ios | 'macos' | 'windows';
2892
+ /**
2893
+ * Represents the regional format used by the user's locale.
2894
+ * @example `en-us`.
2895
+ */
2840
2896
  regionalFormat: string;
2897
+ /**
2898
+ * Displays date values, as specified by the short date format MM/DD/YYYY in user's regional settings.
2899
+ * @example 4/21/2023 or 4-21-2023
2900
+ */
2841
2901
  shortDate: string;
2902
+ /**
2903
+ * Displays only date values, as specified by the Long Date format in user's regional settings.
2904
+ * @example Friday, April 21, 2023
2905
+ */
2842
2906
  longDate: string;
2907
+ /**
2908
+ * A string representing the short time format used by the user's locale.
2909
+ * @example 10:10
2910
+ */
2843
2911
  shortTime: string;
2912
+ /**
2913
+ * A string representing the long time format used by the user's locale.
2914
+ * @example 10:10:42 AM
2915
+ */
2844
2916
  longTime: string;
2845
2917
  }
2846
2918
  /**
2847
2919
  * Allowed user file open preferences
2848
2920
  */
2849
2921
  export enum FileOpenPreference {
2922
+ /** Indicates that the user should be prompted to open the file in inline. */
2850
2923
  Inline = "inline",
2924
+ /** Indicates that the user should be prompted to open the file in the native desktop application associated with the file type. */
2851
2925
  Desktop = "desktop",
2926
+ /** Indicates that the user should be prompted to open the file in a web browser. */
2852
2927
  Web = "web"
2853
2928
  }
2854
2929
  /**
@@ -2857,6 +2932,7 @@ export enum FileOpenPreference {
2857
2932
  * @beta
2858
2933
  */
2859
2934
  export enum ActionObjectType {
2935
+ /** Represents content within a Microsoft 365 application. */
2860
2936
  M365Content = "m365content"
2861
2937
  }
2862
2938
  /**
@@ -2867,6 +2943,7 @@ export enum ActionObjectType {
2867
2943
  * @beta
2868
2944
  */
2869
2945
  export interface BaseActionObject<T extends ActionObjectType> {
2946
+ /** Represents action type. */
2870
2947
  type: T;
2871
2948
  }
2872
2949
  /**
@@ -2881,6 +2958,7 @@ export interface M365ContentAction extends BaseActionObject<ActionObjectType.M36
2881
2958
  * to query the Microsoft graph for more details.
2882
2959
  */
2883
2960
  itemId: string;
2961
+ /** Represents an optional secondary identifier for an action in a Microsoft 365 content item. */
2884
2962
  secondaryId?: SecondaryId;
2885
2963
  }
2886
2964
  /**
@@ -2889,18 +2967,24 @@ export interface M365ContentAction extends BaseActionObject<ActionObjectType.M36
2889
2967
  * @beta
2890
2968
  */
2891
2969
  export interface SecondaryId {
2970
+ /** Name of the secondary id that should be used. */
2892
2971
  name: SecondaryM365ContentIdName;
2972
+ /** The secondary id value that can be used to retrieve M365 content. */
2893
2973
  value: string;
2894
2974
  }
2895
2975
  /**
2896
- * These correspond with field names in the MSGraph
2897
- *
2976
+ * These correspond with field names in the MSGraph.
2977
+ * See (commonly accessed resources)[https://learn.microsoft.com/en-us/graph/api/resources/onedrive?view=graph-rest-1.0#commonly-accessed-resources].
2898
2978
  * @beta
2899
2979
  */
2900
2980
  export enum SecondaryM365ContentIdName {
2981
+ /** OneDrive ID */
2901
2982
  DriveId = "driveId",
2983
+ /** Teams Group ID */
2902
2984
  GroupId = "groupId",
2985
+ /** SharePoint ID */
2903
2986
  SiteId = "siteId",
2987
+ /** User ID */
2904
2988
  UserId = "userId"
2905
2989
  }
2906
2990
  /**
@@ -3329,6 +3413,7 @@ export interface Context {
3329
3413
  */
3330
3414
  mySitePath?: string;
3331
3415
  }
3416
+ /** Represents the parameters used to share a deep link. */
3332
3417
  export interface ShareDeepLinkParameters {
3333
3418
  /**
3334
3419
  * The developer-defined unique ID for the sub-page to which this deep link points in the current page.
@@ -3370,6 +3455,9 @@ export interface DeepLinkParameters {
3370
3455
  * Shared Dialog Properties
3371
3456
  */
3372
3457
  export interface BaseDialogInfo {
3458
+ /**
3459
+ * The requested size of the dialog
3460
+ */
3373
3461
  size: DialogSize;
3374
3462
  /**
3375
3463
  * Title of the dialog module.
@@ -3481,10 +3569,6 @@ export interface DialogInfo {
3481
3569
  * As of 2.0.0, please use {@link DialogInfo} instead.
3482
3570
  */
3483
3571
  export type TaskInfo = DialogInfo;
3484
- export interface DialogSize {
3485
- height: DialogDimension | number;
3486
- width: DialogDimension | number;
3487
- }
3488
3572
  /**
3489
3573
  * @beta
3490
3574
  * Data structure to be used with the {@link teamsCore.registerOnLoadHandler teamsCore.registerOnLoadHandler(handler: (context: LoadContext) => void): void} to pass the context to the app.
@@ -3499,6 +3583,7 @@ export interface LoadContext {
3499
3583
  */
3500
3584
  contentUrl: string;
3501
3585
  }
3586
+ /** Represents information about a frame within a tab or dialog module. */
3502
3587
  export interface FrameInfo {
3503
3588
  /**
3504
3589
  * The current URL that needs to be used in the iframe if the tab is reloaded
@@ -3514,6 +3599,7 @@ export interface FrameInfo {
3514
3599
  * As of 2.0.0, please use {@link FrameInfo} instead.
3515
3600
  */
3516
3601
  export type FrameContext = FrameInfo;
3602
+ /** Represents an error that occurs during the execution of an app or integration. */
3517
3603
  export interface SdkError {
3518
3604
  /**
3519
3605
  error code
@@ -3526,6 +3612,7 @@ export interface SdkError {
3526
3612
  */
3527
3613
  message?: string;
3528
3614
  }
3615
+ /** Error codes used to identify different types of errors that can occur while developing apps. */
3529
3616
  export enum ErrorCode {
3530
3617
  /**
3531
3618
  * API not supported in the current platform.
@@ -3601,7 +3688,9 @@ export interface HostVersionsInfo {
3601
3688
  * Represents the major and minor versions of the Adaptive Card schema in the current host
3602
3689
  */
3603
3690
  export interface AdaptiveCardVersion {
3691
+ /** Represents the major version number. */
3604
3692
  majorVersion: number;
3693
+ /** Represents the minor version number. */
3605
3694
  minorVersion: number;
3606
3695
  }
3607
3696
 
@@ -3609,16 +3698,21 @@ export interface AdaptiveCardVersion {
3609
3698
  * Namespace to interact with app initialization and lifecycle.
3610
3699
  */
3611
3700
  export namespace app {
3612
- const Messages: {
3701
+ /** App Initialization Messages */
3702
+ export const Messages: {
3703
+ /** App loaded. */
3613
3704
  AppLoaded: string;
3705
+ /** App initialized successfully. */
3614
3706
  Success: string;
3707
+ /** App initialization failed. */
3615
3708
  Failure: string;
3709
+ /** App initialization expected failure. */
3616
3710
  ExpectedFailure: string;
3617
3711
  };
3618
3712
  /**
3619
3713
  * Describes errors that caused app initialization to fail
3620
3714
  */
3621
- enum FailedReason {
3715
+ export enum FailedReason {
3622
3716
  /**
3623
3717
  * Authentication failed
3624
3718
  */
@@ -3636,7 +3730,7 @@ export namespace app {
3636
3730
  * Describes expected errors that occurred during an otherwise successful
3637
3731
  * app initialization
3638
3732
  */
3639
- enum ExpectedFailureReason {
3733
+ export enum ExpectedFailureReason {
3640
3734
  /**
3641
3735
  * There was a permission error
3642
3736
  */
@@ -3661,7 +3755,7 @@ export namespace app {
3661
3755
  /**
3662
3756
  * Represents the failed request sent during a failed app initialization.
3663
3757
  */
3664
- interface IFailedRequest {
3758
+ export interface IFailedRequest {
3665
3759
  /**
3666
3760
  * The reason for the failure
3667
3761
  */
@@ -3674,7 +3768,7 @@ export namespace app {
3674
3768
  /**
3675
3769
  * Represents the failure request sent during an erroneous app initialization.
3676
3770
  */
3677
- interface IExpectedFailureRequest {
3771
+ export interface IExpectedFailureRequest {
3678
3772
  /**
3679
3773
  * The reason for the failure
3680
3774
  */
@@ -3687,7 +3781,7 @@ export namespace app {
3687
3781
  /**
3688
3782
  * Represents application information.
3689
3783
  */
3690
- interface AppInfo {
3784
+ export interface AppInfo {
3691
3785
  /**
3692
3786
  * The current locale that the user has configured for the app formatted as
3693
3787
  * languageId-countryId (for example, en-us).
@@ -3736,7 +3830,7 @@ export namespace app {
3736
3830
  /**
3737
3831
  * Represents information about the application's host.
3738
3832
  */
3739
- interface AppHostInfo {
3833
+ export interface AppHostInfo {
3740
3834
  /**
3741
3835
  * Identifies which host is running your app
3742
3836
  */
@@ -3757,7 +3851,7 @@ export namespace app {
3757
3851
  /**
3758
3852
  * Represents Channel information.
3759
3853
  */
3760
- interface ChannelInfo {
3854
+ export interface ChannelInfo {
3761
3855
  /**
3762
3856
  * The Microsoft Teams ID for the channel with which the content is associated.
3763
3857
  */
@@ -3790,7 +3884,7 @@ export namespace app {
3790
3884
  /**
3791
3885
  * Represents Chat information.
3792
3886
  */
3793
- interface ChatInfo {
3887
+ export interface ChatInfo {
3794
3888
  /**
3795
3889
  * The Microsoft Teams ID for the chat with which the content is associated.
3796
3890
  */
@@ -3799,7 +3893,7 @@ export namespace app {
3799
3893
  /**
3800
3894
  * Represents Meeting information.
3801
3895
  */
3802
- interface MeetingInfo {
3896
+ export interface MeetingInfo {
3803
3897
  /**
3804
3898
  * Meeting Id used by tab when running in meeting context
3805
3899
  */
@@ -3808,7 +3902,7 @@ export namespace app {
3808
3902
  /**
3809
3903
  * Represents Page information.
3810
3904
  */
3811
- interface PageInfo {
3905
+ export interface PageInfo {
3812
3906
  /**
3813
3907
  * The developer-defined unique ID for the page this content points to.
3814
3908
  */
@@ -3839,7 +3933,7 @@ export namespace app {
3839
3933
  /**
3840
3934
  * Represents Team information.
3841
3935
  */
3842
- interface TeamInfo {
3936
+ export interface TeamInfo {
3843
3937
  /**
3844
3938
  * The Microsoft Teams ID for the team with which the content is associated.
3845
3939
  */
@@ -3877,7 +3971,7 @@ export namespace app {
3877
3971
  /**
3878
3972
  * Represents User information.
3879
3973
  */
3880
- interface UserInfo {
3974
+ export interface UserInfo {
3881
3975
  /**
3882
3976
  * The Azure AD object id of the current user.
3883
3977
  *
@@ -3937,7 +4031,7 @@ export namespace app {
3937
4031
  /**
3938
4032
  * Represents Tenant information.
3939
4033
  */
3940
- interface TenantInfo {
4034
+ export interface TenantInfo {
3941
4035
  /**
3942
4036
  * The Azure AD tenant ID of the current user.
3943
4037
 
@@ -3953,7 +4047,8 @@ export namespace app {
3953
4047
  */
3954
4048
  teamsSku?: string;
3955
4049
  }
3956
- interface SharePointSiteInfo {
4050
+ /** Represents information about a SharePoint site */
4051
+ export interface SharePointSiteInfo {
3957
4052
  /**
3958
4053
  * The root SharePoint site associated with the team.
3959
4054
  */
@@ -3982,7 +4077,7 @@ export namespace app {
3982
4077
  /**
3983
4078
  * Represents structure of the received context message.
3984
4079
  */
3985
- interface Context {
4080
+ export interface Context {
3986
4081
  /**
3987
4082
  * Content Action Info
3988
4083
  *
@@ -4029,16 +4124,20 @@ export namespace app {
4029
4124
  */
4030
4125
  team?: TeamInfo;
4031
4126
  }
4127
+ /**
4128
+ * This function is passed to registerOnThemeHandler. It is called every time the user changes their theme.
4129
+ */
4130
+ type themeHandler = (theme: string) => void;
4032
4131
  /**
4033
4132
  * Checks whether the Teams client SDK has been initialized.
4034
4133
  * @returns whether the Teams client SDK has been initialized.
4035
4134
  */
4036
- function isInitialized(): boolean;
4135
+ export function isInitialized(): boolean;
4037
4136
  /**
4038
4137
  * Gets the Frame Context that the App is running in. See {@link FrameContexts} for the list of possible values.
4039
4138
  * @returns the Frame Context.
4040
4139
  */
4041
- function getFrameContext(): FrameContexts;
4140
+ export function getFrameContext(): FrameContexts;
4042
4141
  /**
4043
4142
  * Initializes the library.
4044
4143
  *
@@ -4049,7 +4148,7 @@ export namespace app {
4049
4148
  * https: protocol otherwise they will be ignored. Example: https://www.example.com
4050
4149
  * @returns Promise that will be fulfilled when initialization has completed, or rejected if the initialization fails or times out
4051
4150
  */
4052
- function initialize(validMessageOrigins?: string[]): Promise<void>;
4151
+ export function initialize(validMessageOrigins?: string[]): Promise<void>;
4053
4152
  /**
4054
4153
  * @hidden
4055
4154
  * Undocumented function used to set a mock window for unit tests
@@ -4057,7 +4156,7 @@ export namespace app {
4057
4156
  * @internal
4058
4157
  * Limited to Microsoft-internal use
4059
4158
  */
4060
- function _initialize(hostWindow: any): void;
4159
+ export function _initialize(hostWindow: any): void;
4061
4160
  /**
4062
4161
  * @hidden
4063
4162
  * Undocumented function used to clear state between unit tests
@@ -4065,34 +4164,34 @@ export namespace app {
4065
4164
  * @internal
4066
4165
  * Limited to Microsoft-internal use
4067
4166
  */
4068
- function _uninitialize(): void;
4167
+ export function _uninitialize(): void;
4069
4168
  /**
4070
4169
  * Retrieves the current context the frame is running in.
4071
4170
  *
4072
4171
  * @returns Promise that will resolve with the {@link app.Context} object.
4073
4172
  */
4074
- function getContext(): Promise<app.Context>;
4173
+ export function getContext(): Promise<app.Context>;
4075
4174
  /**
4076
4175
  * Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
4077
4176
  */
4078
- function notifyAppLoaded(): void;
4177
+ export function notifyAppLoaded(): void;
4079
4178
  /**
4080
4179
  * Notifies the frame that app initialization is successful and is ready for user interaction.
4081
4180
  */
4082
- function notifySuccess(): void;
4181
+ export function notifySuccess(): void;
4083
4182
  /**
4084
4183
  * Notifies the frame that app initialization has failed and to show an error page in its place.
4085
4184
  *
4086
4185
  * @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
4087
4186
  * during initialization as well as an optional message.
4088
4187
  */
4089
- function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
4188
+ export function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
4090
4189
  /**
4091
4190
  * Notifies the frame that app initialized with some expected errors.
4092
4191
  *
4093
4192
  * @param expectedFailureRequest - The expected failure request containing the reason and an optional message
4094
4193
  */
4095
- function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
4194
+ export function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
4096
4195
  /**
4097
4196
  * Registers a handler for theme changes.
4098
4197
  *
@@ -4101,28 +4200,36 @@ export namespace app {
4101
4200
  *
4102
4201
  * @param handler - The handler to invoke when the user changes their theme.
4103
4202
  */
4104
- function registerOnThemeChangeHandler(handler: (theme: string) => void): void;
4203
+ export function registerOnThemeChangeHandler(handler: themeHandler): void;
4105
4204
  /**
4106
4205
  * open link API.
4107
4206
  *
4108
4207
  * @param deepLink - deep link.
4109
4208
  * @returns Promise that will be fulfilled when the operation has completed
4110
4209
  */
4111
- function openLink(deepLink: string): Promise<void>;
4210
+ export function openLink(deepLink: string): Promise<void>;
4211
+ export {};
4112
4212
  }
4113
4213
 
4114
4214
  export namespace appInstallDialog {
4115
- interface OpenAppInstallDialogParams {
4116
- appId: string;
4117
- }
4118
- function openAppInstallDialog(openAPPInstallDialogParams: OpenAppInstallDialogParams): Promise<void>;
4119
- /**
4120
- * Checks if the appInstallDialog capability is supported by the host
4121
- * @returns boolean to represent whether the appInstallDialog capability is supported
4122
- *
4123
- * @throws Error if {@linkcode app.initialize} has not successfully completed
4124
- */
4125
- function isSupported(): boolean;
4215
+ /** Represents set of parameters needed to open the appInstallDialog. */
4216
+ interface OpenAppInstallDialogParams {
4217
+ /** A unique identifier for the app being installed. */
4218
+ appId: string;
4219
+ }
4220
+ /**
4221
+ * Displays a dialog box that allows users to install a specific app within the host environment.
4222
+ *
4223
+ * @param openAPPInstallDialogParams - See {@link OpenAppInstallDialogParams | OpenAppInstallDialogParams} for more information.
4224
+ */
4225
+ function openAppInstallDialog(openAPPInstallDialogParams: OpenAppInstallDialogParams): Promise<void>;
4226
+ /**
4227
+ * Checks if the appInstallDialog capability is supported by the host
4228
+ * @returns boolean to represent whether the appInstallDialog capability is supported
4229
+ *
4230
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4231
+ */
4232
+ function isSupported(): boolean;
4126
4233
  }
4127
4234
 
4128
4235
  /**
@@ -4668,6 +4775,16 @@ export function getAdaptiveCardSchemaVersion(): AdaptiveCardVersion | undefined;
4668
4775
  * Navigation-specific part of the SDK.
4669
4776
  */
4670
4777
  export namespace pages {
4778
+ /** Callback function */
4779
+ type handlerFunctionType = () => void;
4780
+ /** Full screen function */
4781
+ type fullScreenChangeFunctionType = (isFullScreen: boolean) => void;
4782
+ /** Back button handler function */
4783
+ type backButtonHandlerFunctionType = () => boolean;
4784
+ /** Save event function */
4785
+ type saveEventType = (evt: pages.config.SaveEvent) => void;
4786
+ /** Remove event function */
4787
+ type removeEventType = (evt: pages.config.RemoveEvent) => void;
4671
4788
  /**
4672
4789
  * Return focus to the host. Will move focus forward or backward based on where the application container falls in
4673
4790
  * the F6/tab order in the host.
@@ -4675,7 +4792,7 @@ export namespace pages {
4675
4792
  * effect and will be a no-op when called.
4676
4793
  * @param navigateForward - Determines the direction to focus in host.
4677
4794
  */
4678
- function returnFocus(navigateForward?: boolean): void;
4795
+ export function returnFocus(navigateForward?: boolean): void;
4679
4796
  /**
4680
4797
  * @hidden
4681
4798
  *
@@ -4688,14 +4805,14 @@ export namespace pages {
4688
4805
  * @internal
4689
4806
  * Limited to Microsoft-internal use
4690
4807
  */
4691
- function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void;
4808
+ export function registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void;
4692
4809
  /**
4693
4810
  * Sets/Updates the current frame with new information
4694
4811
  *
4695
4812
  * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
4696
4813
  * user clicks 'Go To Website'
4697
4814
  */
4698
- function setCurrentFrame(frameInfo: FrameInfo): void;
4815
+ export function setCurrentFrame(frameInfo: FrameInfo): void;
4699
4816
  /**
4700
4817
  * Initializes the library with context information for the frame
4701
4818
  *
@@ -4705,11 +4822,11 @@ export namespace pages {
4705
4822
  * @param validMessageOrigins - An optional list of cross-frame message origins. They must have
4706
4823
  * https: protocol otherwise they will be ignored. Example: https:www.example.com
4707
4824
  */
4708
- function initializeWithFrameContext(frameInfo: FrameInfo, callback?: () => void, validMessageOrigins?: string[]): void;
4825
+ export function initializeWithFrameContext(frameInfo: FrameInfo, callback?: handlerFunctionType, validMessageOrigins?: string[]): void;
4709
4826
  /**
4710
4827
  * Defines the configuration of the current or desired instance
4711
4828
  */
4712
- interface InstanceConfig {
4829
+ export interface InstanceConfig {
4713
4830
  /**
4714
4831
  * A suggested display name for the new content.
4715
4832
  * In the settings for an existing instance being updated, this call has no effect.
@@ -4736,7 +4853,7 @@ export namespace pages {
4736
4853
  * Gets the config for the current instance.
4737
4854
  * @returns Promise that resolves with the {@link InstanceConfig} object.
4738
4855
  */
4739
- function getConfig(): Promise<InstanceConfig>;
4856
+ export function getConfig(): Promise<InstanceConfig>;
4740
4857
  /**
4741
4858
  * Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the
4742
4859
  * valid domains specified in the validDomains block of the manifest; otherwise, an exception will be
@@ -4746,7 +4863,7 @@ export namespace pages {
4746
4863
  * @param url - The URL to navigate the frame to.
4747
4864
  * @returns Promise that resolves when the navigation has completed.
4748
4865
  */
4749
- function navigateCrossDomain(url: string): Promise<void>;
4866
+ export function navigateCrossDomain(url: string): Promise<void>;
4750
4867
  /**
4751
4868
  * Navigate to the given application ID and page ID, with optional parameters for a WebURL (if the application
4752
4869
  * cannot be navigated to, such as if it is not installed), Channel ID (for applications installed as a channel tab),
@@ -4756,14 +4873,14 @@ export namespace pages {
4756
4873
  * @param params - Parameters for the navigation
4757
4874
  * @returns a promise that will resolve if the navigation was successful
4758
4875
  */
4759
- function navigateToApp(params: NavigateToAppParams): Promise<void>;
4876
+ export function navigateToApp(params: NavigateToAppParams): Promise<void>;
4760
4877
  /**
4761
4878
  * Shares a deep link that a user can use to navigate back to a specific state in this page.
4762
4879
  * Please note that this method does yet work on mobile hosts.
4763
4880
  *
4764
4881
  * @param deepLinkParameters - ID and label for the link and fallback URL.
4765
4882
  */
4766
- function shareDeepLink(deepLinkParameters: ShareDeepLinkParameters): void;
4883
+ export function shareDeepLink(deepLinkParameters: ShareDeepLinkParameters): void;
4767
4884
  /**
4768
4885
  * Registers a handler for changes from or to full-screen view for a tab.
4769
4886
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
@@ -4771,18 +4888,18 @@ export namespace pages {
4771
4888
  * with this function will never be called.
4772
4889
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
4773
4890
  */
4774
- function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
4891
+ export function registerFullScreenHandler(handler: fullScreenChangeFunctionType): void;
4775
4892
  /**
4776
4893
  * Checks if the pages capability is supported by the host
4777
4894
  * @returns boolean to represent whether the appEntity capability is supported
4778
4895
  *
4779
4896
  * @throws Error if {@linkcode app.initialize} has not successfully completed
4780
4897
  */
4781
- function isSupported(): boolean;
4898
+ export function isSupported(): boolean;
4782
4899
  /**
4783
4900
  * Parameters for the NavigateToApp API
4784
4901
  */
4785
- interface NavigateToAppParams {
4902
+ export interface NavigateToAppParams {
4786
4903
  /**
4787
4904
  * ID of the application to navigate to
4788
4905
  */
@@ -4809,7 +4926,7 @@ export namespace pages {
4809
4926
  * Provides APIs for querying and navigating between contextual tabs of an application. Unlike personal tabs,
4810
4927
  * contextual tabs are pages associated with a specific context, such as channel or chat.
4811
4928
  */
4812
- namespace tabs {
4929
+ export namespace tabs {
4813
4930
  /**
4814
4931
  * Navigates the hosted application to the specified tab instance.
4815
4932
  * @param tabInstance - The destination tab instance.
@@ -4841,7 +4958,7 @@ export namespace pages {
4841
4958
  * Provides APIs to interact with the configuration-specific part of the SDK.
4842
4959
  * This object is usable only on the configuration frame.
4843
4960
  */
4844
- namespace config {
4961
+ export namespace config {
4845
4962
  /**
4846
4963
  * @hidden
4847
4964
  * Hide from docs because this function is only used during initialization
@@ -4871,7 +4988,7 @@ export namespace pages {
4871
4988
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
4872
4989
  * @param handler - The handler to invoke when the user selects the Save button.
4873
4990
  */
4874
- function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
4991
+ function registerOnSaveHandler(handler: saveEventType): void;
4875
4992
  /**
4876
4993
  * @hidden
4877
4994
  * Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
@@ -4890,7 +5007,7 @@ export namespace pages {
4890
5007
  * Only one handler may be registered at a time. Subsequent registrations will override the first.
4891
5008
  * @param handler - The handler to invoke when the user selects the Remove button.
4892
5009
  */
4893
- function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
5010
+ function registerOnRemoveHandler(handler: removeEventType): void;
4894
5011
  /**
4895
5012
  * @hidden
4896
5013
  * Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
@@ -4906,7 +5023,7 @@ export namespace pages {
4906
5023
  * Registers a handler for when the tab configuration is changed by the user
4907
5024
  * @param handler - The handler to invoke when the user clicks on Settings.
4908
5025
  */
4909
- function registerChangeConfigHandler(handler: () => void): void;
5026
+ function registerChangeConfigHandler(handler: handlerFunctionType): void;
4910
5027
  /**
4911
5028
  * Describes the results of the settings.save event. Includes result, notifySuccess, and notifyFailure
4912
5029
  * to indicate the return object (result) and the status of whether the settings.save call succeeded or not and why.
@@ -4961,7 +5078,14 @@ export namespace pages {
4961
5078
  /**
4962
5079
  * Provides APIs for handling the user's navigational history.
4963
5080
  */
4964
- namespace backStack {
5081
+ export namespace backStack {
5082
+ /**
5083
+ * @hidden
5084
+ * Register backButtonPress handler.
5085
+ *
5086
+ * @internal
5087
+ * Limited to Microsoft-internal use.
5088
+ */
4965
5089
  function _initialize(): void;
4966
5090
  /**
4967
5091
  * Navigates back in the hosted application. See {@link pages.backStack.registerBackButtonHandler} for notes on usage.
@@ -4975,7 +5099,7 @@ export namespace pages {
4975
5099
  * method to ask the host client to handle it instead.
4976
5100
  * @param handler - The handler to invoke when the user presses the host client's back button.
4977
5101
  */
4978
- function registerBackButtonHandler(handler: () => boolean): void;
5102
+ function registerBackButtonHandler(handler: backButtonHandlerFunctionType): void;
4979
5103
  /**
4980
5104
  * @hidden
4981
5105
  * Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
@@ -5001,7 +5125,7 @@ export namespace pages {
5001
5125
  * ------
5002
5126
  * Provides APIs to interact with the full-trust part of the SDK. Limited to 1P applications
5003
5127
  */
5004
- namespace fullTrust {
5128
+ export namespace fullTrust {
5005
5129
  /**
5006
5130
  * @hidden
5007
5131
  * Hide from docs
@@ -5029,25 +5153,25 @@ export namespace pages {
5029
5153
  /**
5030
5154
  * Provides APIs to interact with the app button part of the SDK.
5031
5155
  */
5032
- namespace appButton {
5156
+ export namespace appButton {
5033
5157
  /**
5034
5158
  * Registers a handler for clicking the app button.
5035
5159
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
5036
5160
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
5037
5161
  */
5038
- function onClick(handler: () => void): void;
5162
+ function onClick(handler: handlerFunctionType): void;
5039
5163
  /**
5040
5164
  * Registers a handler for entering hover of the app button.
5041
5165
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
5042
5166
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
5043
5167
  */
5044
- function onHoverEnter(handler: () => void): void;
5168
+ function onHoverEnter(handler: handlerFunctionType): void;
5045
5169
  /**
5046
5170
  * Registers a handler for exiting hover of the app button.
5047
5171
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
5048
5172
  * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
5049
5173
  */
5050
- function onHoverLeave(handler: () => void): void;
5174
+ function onHoverLeave(handler: handlerFunctionType): void;
5051
5175
  /**
5052
5176
  * Checks if pages.appButton capability is supported by the host
5053
5177
  * @returns boolean to represent whether the pages.appButton capability is supported
@@ -5061,7 +5185,7 @@ export namespace pages {
5061
5185
  *
5062
5186
  * @beta
5063
5187
  */
5064
- namespace currentApp {
5188
+ export namespace currentApp {
5065
5189
  /**
5066
5190
  * Parameters for the NavigateWithinApp
5067
5191
  *
@@ -5104,8 +5228,14 @@ export namespace pages {
5104
5228
  */
5105
5229
  function isSupported(): boolean;
5106
5230
  }
5231
+ export {};
5107
5232
  }
5108
5233
 
5234
+ /** onComplete function type */
5235
+ type onCompleteFunctionType = (status: boolean, reason?: string) => void;
5236
+ /** addEventListner function type */
5237
+ type addEventListnerFunctionType = (message: any) => void;
5238
+ /** Represents a window or frame within the host app. */
5109
5239
  export interface IAppWindow {
5110
5240
  /**
5111
5241
  * Send a message to the AppWindow.
@@ -5113,7 +5243,7 @@ export interface IAppWindow {
5113
5243
  * @param message - The message to send
5114
5244
  * @param onComplete - The callback to know if the postMessage has been success/failed.
5115
5245
  */
5116
- postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
5246
+ postMessage(message: any, onComplete?: onCompleteFunctionType): void;
5117
5247
  /**
5118
5248
  * Add a listener that will be called when an event is received from this AppWindow.
5119
5249
  *
@@ -5122,6 +5252,10 @@ export interface IAppWindow {
5122
5252
  */
5123
5253
  addEventListener(type: string, listener: Function): void;
5124
5254
  }
5255
+ /**
5256
+ * An object that application can utilize to establish communication
5257
+ * with the child window it opened, which contains the corresponding task.
5258
+ */
5125
5259
  export class ChildAppWindow implements IAppWindow {
5126
5260
  /**
5127
5261
  * Send a message to the ChildAppWindow.
@@ -5129,16 +5263,22 @@ export class ChildAppWindow implements IAppWindow {
5129
5263
  * @param message - The message to send
5130
5264
  * @param onComplete - The callback to know if the postMessage has been success/failed.
5131
5265
  */
5132
- postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
5266
+ postMessage(message: any, onComplete?: onCompleteFunctionType): void;
5133
5267
  /**
5134
5268
  * Add a listener that will be called when an event is received from the ChildAppWindow.
5135
5269
  *
5136
5270
  * @param type - The event to listen to. Currently the only supported type is 'message'.
5137
5271
  * @param listener - The listener that will be called
5138
5272
  */
5139
- addEventListener(type: string, listener: (message: any) => void): void;
5273
+ addEventListener(type: string, listener: addEventListnerFunctionType): void;
5140
5274
  }
5275
+ /**
5276
+ * An object that is utilized to facilitate communication with a parent window
5277
+ * that initiated the opening of current window. For instance, a dialog or task
5278
+ * module would utilize it to transmit messages to the application that launched it.
5279
+ */
5141
5280
  export class ParentAppWindow implements IAppWindow {
5281
+ /** Get the parent window instance. */
5142
5282
  static get Instance(): IAppWindow;
5143
5283
  /**
5144
5284
  * Send a message to the ParentAppWindow.
@@ -5146,15 +5286,16 @@ export class ParentAppWindow implements IAppWindow {
5146
5286
  * @param message - The message to send
5147
5287
  * @param onComplete - The callback to know if the postMessage has been success/failed.
5148
5288
  */
5149
- postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
5289
+ postMessage(message: any, onComplete?: onCompleteFunctionType): void;
5150
5290
  /**
5151
5291
  * Add a listener that will be called when an event is received from the ParentAppWindow.
5152
5292
  *
5153
5293
  * @param type - The event to listen to. Currently the only supported type is 'message'.
5154
5294
  * @param listener - The listener that will be called
5155
5295
  */
5156
- addEventListener(type: string, listener: (message: any) => void): void;
5296
+ addEventListener(type: string, listener: addEventListnerFunctionType): void;
5157
5297
  }
5298
+ export {};
5158
5299
 
5159
5300
  /**
5160
5301
  * Namespace to interact with the menu-specific part of the SDK.
@@ -5290,6 +5431,13 @@ export namespace menus {
5290
5431
  dropDown = "dropDown",
5291
5432
  popOver = "popOver"
5292
5433
  }
5434
+ /**
5435
+ * @hidden
5436
+ * Register navBarMenuItemPress, actionMenuItemPress, setModuleView handlers.
5437
+ *
5438
+ * @internal
5439
+ * Limited to Microsoft-internal use.
5440
+ */
5293
5441
  function initialize(): void;
5294
5442
  /**
5295
5443
  * @hidden
@@ -5308,6 +5456,7 @@ export namespace menus {
5308
5456
  * @param handler The handler to invoke when the user selects menu item.
5309
5457
  */
5310
5458
  function setNavBarMenu(items: MenuItem[], handler: (id: string) => boolean): void;
5459
+ /** Parameters used to create an action menu within an app */
5311
5460
  interface ActionMenuParameters {
5312
5461
  /**
5313
5462
  * @hidden
@@ -5337,12 +5486,27 @@ export namespace menus {
5337
5486
  function isSupported(): boolean;
5338
5487
  }
5339
5488
 
5489
+ /**
5490
+ * Interact with media, including capturing and viewing images.
5491
+ */
5340
5492
  export namespace media {
5493
+ /** Capture image callback function type. */
5494
+ type captureImageCallbackFunctionType = (error: SdkError, files: File[]) => void;
5495
+ /** Select media callback function type. */
5496
+ type selectMediaCallbackFunctionType = (error: SdkError, attachments: Media[]) => void;
5497
+ /** Error callback function type. */
5498
+ type errorCallbackFunctionType = (error?: SdkError) => void;
5499
+ /** Scan BarCode callback function type. */
5500
+ type scanBarCodeCallbackFunctionType = (error: SdkError, decodedText: string) => void;
5501
+ /** Get media callback function type. */
5502
+ type getMediaCallbackFunctionType = (error: SdkError, blob: Blob) => void;
5341
5503
  /**
5342
5504
  * Enum for file formats supported
5343
5505
  */
5344
5506
  export enum FileFormat {
5507
+ /** Base64 encoding */
5345
5508
  Base64 = "base64",
5509
+ /** File id */
5346
5510
  ID = "id"
5347
5511
  }
5348
5512
  /**
@@ -5382,7 +5546,7 @@ export namespace media {
5382
5546
  * Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
5383
5547
  *
5384
5548
  */
5385
- export function captureImage(callback: (error: SdkError, files: File[]) => void): void;
5549
+ export function captureImage(callback: captureImageCallbackFunctionType): void;
5386
5550
  /**
5387
5551
  * Media object returned by the select Media API
5388
5552
  */
@@ -5398,7 +5562,7 @@ export namespace media {
5398
5562
  * @param callback - callback is called with the @see SdkError if there is an error
5399
5563
  * If error is null or undefined, the callback will be called with @see Blob.
5400
5564
  */
5401
- getMedia(callback: (error: SdkError, blob: Blob) => void): void;
5565
+ getMedia(callback: getMediaCallbackFunctionType): void;
5402
5566
  }
5403
5567
  /**
5404
5568
  * Input parameter supplied to the select Media API
@@ -5528,6 +5692,7 @@ export namespace media {
5528
5692
  * Base class which holds the callback and notifies events to the host client
5529
5693
  */
5530
5694
  abstract class MediaController<T> {
5695
+ /** Callback that can be registered to handle events related to the playback and control of video content. */
5531
5696
  protected controllerCallback: T;
5532
5697
  constructor(controllerCallback?: T);
5533
5698
  protected abstract getMediaType(): MediaType;
@@ -5548,24 +5713,27 @@ export namespace media {
5548
5713
  * @param mediaEvent indicates what the event that needs to be signaled to the host client
5549
5714
  * Optional; @param callback is used to send app if host client has successfully handled the notification event or not
5550
5715
  */
5551
- protected notifyEventToHost(mediaEvent: MediaControllerEvent, callback?: (err?: SdkError) => void): void;
5716
+ protected notifyEventToHost(mediaEvent: MediaControllerEvent, callback?: errorCallbackFunctionType): void;
5552
5717
  /**
5553
5718
  * Function to programatically stop the ongoing media event
5554
5719
  * Optional; @param callback is used to send app if host client has successfully stopped the event or not
5555
5720
  */
5556
- stop(callback?: (err?: SdkError) => void): void;
5721
+ stop(callback?: errorCallbackFunctionType): void;
5557
5722
  }
5558
5723
  /**
5559
5724
  * Callback which will register your app to listen to lifecycle events during the video capture flow
5560
5725
  */
5561
5726
  export interface VideoControllerCallback {
5727
+ /** The event is a type of callback that can be enlisted to handle various events linked to `onRecordingStarted`, which helps with playback of video content. */
5562
5728
  onRecordingStarted?(): void;
5563
5729
  }
5564
5730
  /**
5565
5731
  * VideoController class is used to communicate between the app and the host client during the video capture flow
5566
5732
  */
5567
5733
  export class VideoController extends MediaController<VideoControllerCallback> {
5734
+ /** Gets media type video. */
5568
5735
  protected getMediaType(): MediaType;
5736
+ /** Notify or send an event related to the playback and control of video content to a registered application. */
5569
5737
  notifyEventToApp(mediaEvent: MediaControllerEvent): void;
5570
5738
  }
5571
5739
  /**
@@ -5573,53 +5741,71 @@ export namespace media {
5573
5741
  * Events which are used to communicate between the app and the host client during the media recording flow
5574
5742
  */
5575
5743
  export enum MediaControllerEvent {
5744
+ /** Start recording. */
5576
5745
  StartRecording = 1,
5746
+ /** Stop recording. */
5577
5747
  StopRecording = 2
5578
5748
  }
5579
5749
  /**
5580
5750
  * The modes in which camera can be launched in select Media API
5581
5751
  */
5582
5752
  export enum CameraStartMode {
5753
+ /** Photo mode. */
5583
5754
  Photo = 1,
5755
+ /** Document mode. */
5584
5756
  Document = 2,
5757
+ /** Whiteboard mode. */
5585
5758
  Whiteboard = 3,
5759
+ /** Business card mode. */
5586
5760
  BusinessCard = 4
5587
5761
  }
5588
5762
  /**
5589
5763
  * Specifies the image source
5590
5764
  */
5591
5765
  export enum Source {
5766
+ /** Image source is camera. */
5592
5767
  Camera = 1,
5768
+ /** Image source is gallery. */
5593
5769
  Gallery = 2
5594
5770
  }
5595
5771
  /**
5596
5772
  * Specifies the type of Media
5597
5773
  */
5598
5774
  export enum MediaType {
5775
+ /** Media type photo or image */
5599
5776
  Image = 1,
5777
+ /** Media type video. */
5600
5778
  Video = 2,
5779
+ /** Media type video and image. */
5601
5780
  VideoAndImage = 3,
5781
+ /** Media type audio. */
5602
5782
  Audio = 4
5603
5783
  }
5604
5784
  /**
5605
5785
  * Input for view images API
5606
5786
  */
5607
5787
  export interface ImageUri {
5788
+ /** Image location */
5608
5789
  value: string;
5790
+ /** Image Uri type */
5609
5791
  type: ImageUriType;
5610
5792
  }
5611
5793
  /**
5612
5794
  * ID contains a mapping for content uri on platform's side, URL is generic
5613
5795
  */
5614
5796
  export enum ImageUriType {
5797
+ /** Image Id. */
5615
5798
  ID = 1,
5799
+ /** Image URL. */
5616
5800
  URL = 2
5617
5801
  }
5618
5802
  /**
5619
5803
  * Specifies the image output formats.
5620
5804
  */
5621
5805
  export enum ImageOutputFormats {
5806
+ /** Outputs image. */
5622
5807
  IMAGE = 1,
5808
+ /** Outputs pdf. */
5623
5809
  PDF = 2
5624
5810
  }
5625
5811
  /**
@@ -5652,7 +5838,9 @@ export namespace media {
5652
5838
  * Helper object to assembled media chunks
5653
5839
  */
5654
5840
  export interface AssembleAttachment {
5841
+ /** A number representing the sequence of the attachment in the media chunks. */
5655
5842
  sequence: number;
5843
+ /** A Blob object representing the data of the media chunks. */
5656
5844
  file: Blob;
5657
5845
  }
5658
5846
  /**
@@ -5661,14 +5849,14 @@ export namespace media {
5661
5849
  * @param mediaInputs - The input params to customize the media to be selected
5662
5850
  * @param callback - The callback to invoke after fetching the media
5663
5851
  */
5664
- export function selectMedia(mediaInputs: MediaInputs, callback: (error: SdkError, attachments: Media[]) => void): void;
5852
+ export function selectMedia(mediaInputs: MediaInputs, callback: selectMediaCallbackFunctionType): void;
5665
5853
  /**
5666
5854
  * View images using native image viewer
5667
5855
  *
5668
5856
  * @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
5669
5857
  * @param callback - returns back error if encountered, returns null in case of success
5670
5858
  */
5671
- export function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): void;
5859
+ export function viewImages(uriList: ImageUri[], callback: errorCallbackFunctionType): void;
5672
5860
  /**
5673
5861
  * Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile
5674
5862
  * All properties in BarCodeConfig are optional and have default values in the platform
@@ -5692,7 +5880,7 @@ export namespace media {
5692
5880
  * @param callback - callback to invoke after scanning the barcode
5693
5881
  * @param config - optional input configuration to customize the barcode scanning experience
5694
5882
  */
5695
- export function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): void;
5883
+ export function scanBarCode(callback: scanBarCodeCallbackFunctionType, config?: BarCodeConfig): void;
5696
5884
  export {};
5697
5885
  }
5698
5886
 
@@ -5703,11 +5891,15 @@ export namespace media {
5703
5891
  * Namespace to interact with the location module-specific part of the SDK.
5704
5892
  */
5705
5893
  export namespace location {
5894
+ /** Get location callback function type */
5895
+ type getLocationCallbackFunctionType = (error: SdkError, location: Location) => void;
5896
+ /** Show location callback function type */
5897
+ type showLocationCallbackFunctionType = (error: SdkError, status: boolean) => void;
5706
5898
  /**
5707
5899
  * @deprecated
5708
5900
  * Data Structure to set the location properties in getLocation call.
5709
5901
  */
5710
- interface LocationProps {
5902
+ export interface LocationProps {
5711
5903
  /**
5712
5904
  whether user can alter location or not
5713
5905
  if false, user will be shown current location
@@ -5726,7 +5918,7 @@ export namespace location {
5726
5918
  * @deprecated
5727
5919
  * Data struture to represent the location information
5728
5920
  */
5729
- interface Location {
5921
+ export interface Location {
5730
5922
  /**
5731
5923
  Latitude of the location
5732
5924
  */
@@ -5754,7 +5946,7 @@ export namespace location {
5754
5946
  * @param props {@link LocationProps} - Specifying how the location request is handled
5755
5947
  * @param callback - Callback to invoke when current user location is fetched
5756
5948
  */
5757
- function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void;
5949
+ export function getLocation(props: LocationProps, callback: getLocationCallbackFunctionType): void;
5758
5950
  /**
5759
5951
  * @deprecated
5760
5952
  * As of 2.1.0, please use {@link geoLocation.map.showLocation geoLocation.map.showLocation(location: Location): Promise\<void\>} instead.
@@ -5764,7 +5956,7 @@ export namespace location {
5764
5956
  * @param location - Location to be shown on the map
5765
5957
  * @param callback - Callback to invoke when the location is opened on map
5766
5958
  */
5767
- function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
5959
+ export function showLocation(location: Location, callback: showLocationCallbackFunctionType): void;
5768
5960
  /**
5769
5961
  * @deprecated
5770
5962
  * As of 2.1.0, please use geoLocation namespace, and use {@link geoLocation.isSupported geoLocation.isSupported: boolean} to check if geoLocation is supported.
@@ -5775,10 +5967,30 @@ export namespace location {
5775
5967
  *
5776
5968
  * @returns boolean to represent whether Location is supported
5777
5969
  */
5778
- function isSupported(): boolean;
5970
+ export function isSupported(): boolean;
5971
+ export {};
5779
5972
  }
5780
5973
 
5974
+ /**
5975
+ * Interact with meetings, including retrieving meeting details, getting mic status, and sharing app content.
5976
+ * This namespace is used to handle meeting related functionality like
5977
+ * get meeting details, get/update state of mic, sharing app content and more.
5978
+ */
5781
5979
  export namespace meeting {
5980
+ /** Error callback function type */
5981
+ type errorCallbackFunctionType = (error: SdkError | null, result: boolean | null) => void;
5982
+ /** Get live stream state callback function type */
5983
+ type getLiveStreamStateCallbackFunctionType = (error: SdkError | null, liveStreamState: LiveStreamState | null) => void;
5984
+ /** Live stream error callback function type */
5985
+ type liveStreamErrorCallbackFunctionType = (error: SdkError | null) => void;
5986
+ /** Register live stream changed handler function type */
5987
+ type registerLiveStreamChangedHandlerFunctionType = (liveStreamState: LiveStreamState) => void;
5988
+ /** Get app content stage sharing capabilities callback function type */
5989
+ type getAppContentCallbackFunctionType = (error: SdkError | null, appContentStageSharingCapabilities: IAppContentStageSharingCapabilities | null) => void;
5990
+ /** Get app content stage sharing state callback function type */
5991
+ type getAppContentStageCallbackFunctionType = (error: SdkError | null, appContentStageSharingState: IAppContentStageSharingState | null) => void;
5992
+ /** Register speaking state change handler function type */
5993
+ type registerSpeakingStateChangeHandlerFunctionType = (speakingState: ISpeakingState) => void;
5782
5994
  /**
5783
5995
  * @hidden
5784
5996
  * Data structure to represent meeting details
@@ -5786,7 +5998,7 @@ export namespace meeting {
5786
5998
  * @internal
5787
5999
  * Limited to Microsoft-internal use
5788
6000
  */
5789
- interface IMeetingDetailsResponse {
6001
+ export interface IMeetingDetailsResponse {
5790
6002
  /**
5791
6003
  * @hidden
5792
6004
  * details object
@@ -5808,7 +6020,7 @@ export namespace meeting {
5808
6020
  * Hide from docs
5809
6021
  * Base data structure to represent a meeting or call detail
5810
6022
  */
5811
- interface IMeetingOrCallDetailsBase<T> {
6023
+ export interface IMeetingOrCallDetailsBase<T> {
5812
6024
  /**
5813
6025
  * @hidden
5814
6026
  * Scheduled start time of the meeting or start time of the call
@@ -5830,13 +6042,13 @@ export namespace meeting {
5830
6042
  * Hide from docs
5831
6043
  * Data structure to represent call details
5832
6044
  */
5833
- type ICallDetails = IMeetingOrCallDetailsBase<CallType>;
6045
+ export type ICallDetails = IMeetingOrCallDetailsBase<CallType>;
5834
6046
  /**
5835
6047
  * @hidden
5836
6048
  * Hide from docs
5837
6049
  * Data structure to represent meeting details.
5838
6050
  */
5839
- interface IMeetingDetails extends IMeetingOrCallDetailsBase<MeetingType> {
6051
+ export interface IMeetingDetails extends IMeetingOrCallDetailsBase<MeetingType> {
5840
6052
  /**
5841
6053
  * @hidden
5842
6054
  * Scheduled end time of the meeting
@@ -5855,7 +6067,7 @@ export namespace meeting {
5855
6067
  * @internal
5856
6068
  * Limited to Microsoft-internal use
5857
6069
  */
5858
- interface IConversation {
6070
+ export interface IConversation {
5859
6071
  /**
5860
6072
  * @hidden
5861
6073
  * conversation id of the meeting
@@ -5869,7 +6081,7 @@ export namespace meeting {
5869
6081
  * @internal
5870
6082
  * Limited to Microsoft-internal use
5871
6083
  */
5872
- interface IOrganizer {
6084
+ export interface IOrganizer {
5873
6085
  /**
5874
6086
  * @hidden
5875
6087
  * organizer id of the meeting
@@ -5881,7 +6093,8 @@ export namespace meeting {
5881
6093
  */
5882
6094
  tenantId?: string;
5883
6095
  }
5884
- interface LiveStreamState {
6096
+ /** Represents the current live streaming state of a meeting */
6097
+ export interface LiveStreamState {
5885
6098
  /**
5886
6099
  * indicates whether meeting is streaming
5887
6100
  */
@@ -5896,13 +6109,15 @@ export namespace meeting {
5896
6109
  message?: string;
5897
6110
  };
5898
6111
  }
5899
- interface IAppContentStageSharingCapabilities {
6112
+ /** Represents app permission to share contents to meeting. */
6113
+ export interface IAppContentStageSharingCapabilities {
5900
6114
  /**
5901
6115
  * indicates whether app has permission to share contents to meeting stage
5902
6116
  */
5903
6117
  doesAppHaveSharePermission: boolean;
5904
6118
  }
5905
- interface IAppContentStageSharingState {
6119
+ /** Represents app being shared to stage. */
6120
+ export interface IAppContentStageSharingState {
5906
6121
  /**
5907
6122
  * indicates whether app is currently being shared to stage
5908
6123
  */
@@ -5912,7 +6127,7 @@ export namespace meeting {
5912
6127
  * Property bag for the speakingState changed event
5913
6128
  *
5914
6129
  */
5915
- interface ISpeakingState {
6130
+ export interface ISpeakingState {
5916
6131
  /**
5917
6132
  * Indicates whether one or more participants in a meeting are speaking, or
5918
6133
  * if no participants are speaking
@@ -5934,7 +6149,7 @@ export namespace meeting {
5934
6149
  *
5935
6150
  * @beta
5936
6151
  */
5937
- interface MeetingReactionReceivedEventData {
6152
+ export interface MeetingReactionReceivedEventData {
5938
6153
  /**
5939
6154
  * Indicates the type of meeting reaction received
5940
6155
  *
@@ -5961,7 +6176,7 @@ export namespace meeting {
5961
6176
  *
5962
6177
  * @beta
5963
6178
  */
5964
- interface IRaiseHandState {
6179
+ export interface IRaiseHandState {
5965
6180
  /** Indicates whether the selfParticipant's hand is raised or not
5966
6181
  *
5967
6182
  * @hidden
@@ -5980,7 +6195,7 @@ export namespace meeting {
5980
6195
  *
5981
6196
  * @beta
5982
6197
  */
5983
- interface RaiseHandStateChangedEventData {
6198
+ export interface RaiseHandStateChangedEventData {
5984
6199
  /**
5985
6200
  * entire raiseHandState object for the selfParticipant
5986
6201
  *
@@ -6007,7 +6222,7 @@ export namespace meeting {
6007
6222
  *
6008
6223
  * @beta
6009
6224
  */
6010
- interface MicState {
6225
+ export interface MicState {
6011
6226
  /**
6012
6227
  * Indicates the mute status of the mic
6013
6228
  */
@@ -6024,7 +6239,7 @@ export namespace meeting {
6024
6239
  *
6025
6240
  * @beta
6026
6241
  */
6027
- interface RequestAppAudioHandlingParams {
6242
+ export interface RequestAppAudioHandlingParams {
6028
6243
  /**
6029
6244
  * Indicates whether the app is requesting to start handling audio, or if
6030
6245
  * it's giving audio back to the host
@@ -6048,23 +6263,33 @@ export namespace meeting {
6048
6263
  *
6049
6264
  * @beta
6050
6265
  */
6051
- enum MeetingReactionType {
6266
+ export enum MeetingReactionType {
6052
6267
  like = "like",
6053
6268
  heart = "heart",
6054
6269
  laugh = "laugh",
6055
6270
  surprised = "surprised",
6056
6271
  applause = "applause"
6057
6272
  }
6058
- enum MeetingType {
6273
+ /** Represents the type of a meeting */
6274
+ export enum MeetingType {
6275
+ /** Used when the meeting type is not known. */
6059
6276
  Unknown = "Unknown",
6277
+ /** Used for ad hoc meetings that are created on the fly. */
6060
6278
  Adhoc = "Adhoc",
6279
+ /** Used for meetings that have been scheduled in advance. */
6061
6280
  Scheduled = "Scheduled",
6281
+ /** Used for meetings that occur on a recurring basis. */
6062
6282
  Recurring = "Recurring",
6283
+ /** Used for live events or webinars. */
6063
6284
  Broadcast = "Broadcast",
6285
+ /** Used for meetings that are created on the fly, but with a more polished experience than ad hoc meetings. */
6064
6286
  MeetNow = "MeetNow"
6065
6287
  }
6066
- enum CallType {
6288
+ /** Represents the type of a call. */
6289
+ export enum CallType {
6290
+ /** Represents a call between two people. */
6067
6291
  OneOnOneCall = "oneOnOneCall",
6292
+ /** Represents a call between more than two people. */
6068
6293
  GroupCall = "groupCall"
6069
6294
  }
6070
6295
  /**
@@ -6076,7 +6301,7 @@ export namespace meeting {
6076
6301
  * result can either contain the true/false value, incase of a successful fetch or null when the fetching fails
6077
6302
  * result: True means incoming audio is muted and false means incoming audio is unmuted
6078
6303
  */
6079
- function getIncomingClientAudioState(callback: (error: SdkError | null, result: boolean | null) => void): void;
6304
+ export function getIncomingClientAudioState(callback: errorCallbackFunctionType): void;
6080
6305
  /**
6081
6306
  * Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
6082
6307
  *
@@ -6085,7 +6310,7 @@ export namespace meeting {
6085
6310
  * result can either contain the true/false value, incase of a successful toggle or null when the toggling fails
6086
6311
  * result: True means incoming audio is muted and false means incoming audio is unmuted
6087
6312
  */
6088
- function toggleIncomingClientAudio(callback: (error: SdkError | null, result: boolean | null) => void): void;
6313
+ export function toggleIncomingClientAudio(callback: errorCallbackFunctionType): void;
6089
6314
  /**
6090
6315
  * @hidden
6091
6316
  * Allows an app to get the meeting details for the meeting
@@ -6097,7 +6322,7 @@ export namespace meeting {
6097
6322
  * @internal
6098
6323
  * Limited to Microsoft-internal use
6099
6324
  */
6100
- function getMeetingDetails(callback: (error: SdkError | null, meetingDetails: IMeetingDetailsResponse | null) => void): void;
6325
+ export function getMeetingDetails(callback: (error: SdkError | null, meetingDetails: IMeetingDetailsResponse | null) => void): void;
6101
6326
  /**
6102
6327
  * @hidden
6103
6328
  * Allows an app to get the authentication token for the anonymous or guest user in the meeting
@@ -6109,7 +6334,7 @@ export namespace meeting {
6109
6334
  * @internal
6110
6335
  * Limited to Microsoft-internal use
6111
6336
  */
6112
- function getAuthenticationTokenForAnonymousUser(callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void): void;
6337
+ export function getAuthenticationTokenForAnonymousUser(callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void): void;
6113
6338
  /**
6114
6339
  * Allows an app to get the state of the live stream in the current meeting
6115
6340
  *
@@ -6117,7 +6342,7 @@ export namespace meeting {
6117
6342
  * error can either contain an error of type SdkError, in case of an error, or null when get is successful
6118
6343
  * liveStreamState can either contain a LiveStreamState value, or null when operation fails
6119
6344
  */
6120
- function getLiveStreamState(callback: (error: SdkError | null, liveStreamState: LiveStreamState | null) => void): void;
6345
+ export function getLiveStreamState(callback: getLiveStreamStateCallbackFunctionType): void;
6121
6346
  /**
6122
6347
  * Allows an app to request the live streaming be started at the given streaming url
6123
6348
  *
@@ -6128,7 +6353,7 @@ export namespace meeting {
6128
6353
  * @param streamKey - the key to the stream resource
6129
6354
  * @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
6130
6355
  */
6131
- function requestStartLiveStreaming(callback: (error: SdkError | null) => void, streamUrl: string, streamKey?: string): void;
6356
+ export function requestStartLiveStreaming(callback: liveStreamErrorCallbackFunctionType, streamUrl: string, streamKey?: string): void;
6132
6357
  /**
6133
6358
  * Allows an app to request the live streaming be stopped at the given streaming url
6134
6359
  *
@@ -6137,7 +6362,7 @@ export namespace meeting {
6137
6362
  *
6138
6363
  * @param callback - Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
6139
6364
  */
6140
- function requestStopLiveStreaming(callback: (error: SdkError | null) => void): void;
6365
+ export function requestStopLiveStreaming(callback: liveStreamErrorCallbackFunctionType): void;
6141
6366
  /**
6142
6367
  * Registers a handler for changes to the live stream.
6143
6368
  *
@@ -6146,7 +6371,7 @@ export namespace meeting {
6146
6371
  *
6147
6372
  * @param handler - The handler to invoke when the live stream state changes
6148
6373
  */
6149
- function registerLiveStreamChangedHandler(handler: (liveStreamState: LiveStreamState) => void): void;
6374
+ export function registerLiveStreamChangedHandler(handler: registerLiveStreamChangedHandlerFunctionType): void;
6150
6375
  /**
6151
6376
  * Allows an app to share contents in the meeting
6152
6377
  *
@@ -6155,7 +6380,7 @@ export namespace meeting {
6155
6380
  * result can either contain a true value, incase of a successful share or null when the share fails
6156
6381
  * @param appContentUrl - is the input URL which needs to be shared on to the stage
6157
6382
  */
6158
- function shareAppContentToStage(callback: (error: SdkError | null, result: boolean | null) => void, appContentUrl: string): void;
6383
+ export function shareAppContentToStage(callback: errorCallbackFunctionType, appContentUrl: string): void;
6159
6384
  /**
6160
6385
  * Provides information related app's in-meeting sharing capabilities
6161
6386
  *
@@ -6164,7 +6389,7 @@ export namespace meeting {
6164
6389
  * appContentStageSharingCapabilities can either contain an IAppContentStageSharingCapabilities object
6165
6390
  * (indication of successful retrieval), or null (indication of failed retrieval)
6166
6391
  */
6167
- function getAppContentStageSharingCapabilities(callback: (error: SdkError | null, appContentStageSharingCapabilities: IAppContentStageSharingCapabilities | null) => void): void;
6392
+ export function getAppContentStageSharingCapabilities(callback: getAppContentCallbackFunctionType): void;
6168
6393
  /**
6169
6394
  * @hidden
6170
6395
  * Hide from docs.
@@ -6174,7 +6399,7 @@ export namespace meeting {
6174
6399
  * error can either contain an error of type SdkError (error indication), or null (non-error indication)
6175
6400
  * result can either contain a true boolean value (successful termination), or null (unsuccessful fetch)
6176
6401
  */
6177
- function stopSharingAppContentToStage(callback: (error: SdkError | null, result: boolean | null) => void): void;
6402
+ export function stopSharingAppContentToStage(callback: errorCallbackFunctionType): void;
6178
6403
  /**
6179
6404
  * Provides information related to current stage sharing state for app
6180
6405
  *
@@ -6183,7 +6408,7 @@ export namespace meeting {
6183
6408
  * appContentStageSharingState can either contain an IAppContentStageSharingState object
6184
6409
  * (indication of successful retrieval), or null (indication of failed retrieval)
6185
6410
  */
6186
- function getAppContentStageSharingState(callback: (error: SdkError | null, appContentStageSharingState: IAppContentStageSharingState | null) => void): void;
6411
+ export function getAppContentStageSharingState(callback: getAppContentStageCallbackFunctionType): void;
6187
6412
  /**
6188
6413
  * Registers a handler for changes to paticipant speaking states. This API returns {@link ISpeakingState}, which will have isSpeakingDetected
6189
6414
  * and/or an error object. If any participant is speaking, isSpeakingDetected will be true. If no participants are speaking, isSpeakingDetected
@@ -6191,7 +6416,7 @@ export namespace meeting {
6191
6416
  *
6192
6417
  * @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).
6193
6418
  */
6194
- function registerSpeakingStateChangeHandler(handler: (speakingState: ISpeakingState) => void): void;
6419
+ export function registerSpeakingStateChangeHandler(handler: registerSpeakingStateChangeHandlerFunctionType): void;
6195
6420
  /**
6196
6421
  * Registers a handler for changes to the selfParticipant's (current user's) raiseHandState. If the selfParticipant raises their hand, isHandRaised
6197
6422
  * will be true. By default and if the selfParticipant hand is lowered, isHandRaised will be false. This API will return {@link RaiseHandStateChangedEventData}
@@ -6208,7 +6433,7 @@ export namespace meeting {
6208
6433
  *
6209
6434
  * @beta
6210
6435
  */
6211
- function registerRaiseHandStateChangedHandler(handler: (eventData: RaiseHandStateChangedEventData) => void): void;
6436
+ export function registerRaiseHandStateChangedHandler(handler: (eventData: RaiseHandStateChangedEventData) => void): void;
6212
6437
  /**
6213
6438
  * Registers a handler for receiving meeting reactions. When the selfParticipant (current user) successfully sends a meeting reaction and it is being rendered on the UI, the meetingReactionType will be populated. Only one handler can be registered
6214
6439
  * at a time. A subsequent registration replaces an existing registration.
@@ -6223,13 +6448,13 @@ export namespace meeting {
6223
6448
  *
6224
6449
  * @beta
6225
6450
  */
6226
- function registerMeetingReactionReceivedHandler(handler: (eventData: MeetingReactionReceivedEventData) => void): void;
6451
+ export function registerMeetingReactionReceivedHandler(handler: (eventData: MeetingReactionReceivedEventData) => void): void;
6227
6452
  /**
6228
6453
  * Nested namespace for functions to control behavior of the app share button
6229
6454
  *
6230
6455
  * @beta
6231
6456
  */
6232
- namespace appShareButton {
6457
+ export namespace appShareButton {
6233
6458
  /**
6234
6459
  * Property bag for the setVisibilityInfo
6235
6460
  *
@@ -6282,7 +6507,7 @@ export namespace meeting {
6282
6507
  *
6283
6508
  * @beta
6284
6509
  */
6285
- function requestAppAudioHandling(requestAppAudioHandlingParams: RequestAppAudioHandlingParams, callback: (isHostAudioless: boolean) => void): void;
6510
+ export function requestAppAudioHandling(requestAppAudioHandlingParams: RequestAppAudioHandlingParams, callback: (isHostAudioless: boolean) => void): void;
6286
6511
  /**
6287
6512
  * Notifies the host that the microphone state has changed in the app.
6288
6513
  * @param micState - The new state that the microphone is in
@@ -6296,7 +6521,8 @@ export namespace meeting {
6296
6521
  *
6297
6522
  * @beta
6298
6523
  */
6299
- function updateMicState(micState: MicState): void;
6524
+ export function updateMicState(micState: MicState): void;
6525
+ export {};
6300
6526
  }
6301
6527
 
6302
6528
  export namespace monetization {
@@ -6357,30 +6583,65 @@ export namespace monetization {
6357
6583
  function isSupported(): boolean;
6358
6584
  }
6359
6585
 
6586
+ /**
6587
+ * Interact with the user's calendar, including opening calendar items and composing meetings.
6588
+ */
6360
6589
  export namespace calendar {
6361
- function openCalendarItem(openCalendarItemParams: OpenCalendarItemParams): Promise<void>;
6362
- function composeMeeting(composeMeetingParams: ComposeMeetingParams): Promise<void>;
6363
- /**
6364
- * Checks if the calendar capability is supported by the host
6365
- * @returns boolean to represent whether the calendar capability is supported
6366
- *
6367
- * @throws Error if {@linkcode app.initialize} has not successfully completed
6368
- */
6369
- function isSupported(): boolean;
6370
- interface OpenCalendarItemParams {
6371
- itemId: string;
6372
- }
6373
- interface ComposeMeetingParams {
6374
- attendees?: string[];
6375
- startTime?: string;
6376
- endTime?: string;
6377
- subject?: string;
6378
- content?: string;
6379
- }
6590
+ /**
6591
+ * Opens a calendar item.
6592
+ *
6593
+ * @param openCalendarItemParams - object containing unique ID of the calendar item to be opened.
6594
+ */
6595
+ function openCalendarItem(openCalendarItemParams: OpenCalendarItemParams): Promise<void>;
6596
+ /**
6597
+ * Compose a new meeting in the user's calendar.
6598
+ *
6599
+ * @param composeMeetingParams - object containing various properties to set up the meeting details.
6600
+ */
6601
+ function composeMeeting(composeMeetingParams: ComposeMeetingParams): Promise<void>;
6602
+ /**
6603
+ * Checks if the calendar capability is supported by the host
6604
+ * @returns boolean to represent whether the calendar capability is supported
6605
+ *
6606
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
6607
+ */
6608
+ function isSupported(): boolean;
6609
+ /** Open calendar item parameters. */
6610
+ interface OpenCalendarItemParams {
6611
+ /** An unique base64-encoded string id that represents the event's unique identifier of the calendar item to be opened. */
6612
+ itemId: string;
6613
+ }
6614
+ /** Compose meeting parameters */
6615
+ interface ComposeMeetingParams {
6616
+ /** An array of email addresses, user name, or user id of the attendees to invite to the meeting. */
6617
+ attendees?: string[];
6618
+ /** The start time of the meeting in MM/DD/YYYY HH:MM:SS format. */
6619
+ startTime?: string;
6620
+ /** The end time of the meeting in MM/DD/YYYY HH:MM:SS format. */
6621
+ endTime?: string;
6622
+ /** The subject line of the meeting. */
6623
+ subject?: string;
6624
+ /** The body content of the meeting. */
6625
+ content?: string;
6626
+ }
6380
6627
  }
6381
6628
 
6629
+ /**
6630
+ * Used to interact with mail capability, including opening and composing mail.
6631
+ */
6382
6632
  export namespace mail {
6633
+ /**
6634
+ * Opens a mail message in the host.
6635
+ *
6636
+ * @param openMailItemParams - Object that specifies the ID of the mail message.
6637
+ */
6383
6638
  export function openMailItem(openMailItemParams: OpenMailItemParams): Promise<void>;
6639
+ /**
6640
+ * Compose a new email in the user's mailbox.
6641
+ *
6642
+ * @param composeMailParams - Object that specifies the type of mail item to compose and the details of the mail item.
6643
+ *
6644
+ */
6384
6645
  export function composeMail(composeMailParams: ComposeMailParams): Promise<void>;
6385
6646
  /**
6386
6647
  * Checks if the mail capability is supported by the host
@@ -6389,22 +6650,31 @@ export namespace mail {
6389
6650
  * @throws Error if {@linkcode app.initialize} has not successfully completed
6390
6651
  */
6391
6652
  export function isSupported(): boolean;
6653
+ /** Defines the parameters used to open a mail item in the user's mailbox */
6392
6654
  export interface OpenMailItemParams {
6655
+ /** An unique base64-encoded string id that represents the itemId or messageId. */
6393
6656
  itemId: string;
6394
6657
  }
6658
+ /** Defines compose mail types. */
6395
6659
  export enum ComposeMailType {
6660
+ /** Compose a new mail message. */
6396
6661
  New = "new",
6662
+ /** Compose a reply to the sender of an existing mail message. */
6397
6663
  Reply = "reply",
6664
+ /** Compose a reply to all recipients of an existing mail message. */
6398
6665
  ReplyAll = "replyAll",
6666
+ /** Compose a new mail message with the content of an existing mail message forwarded to a new recipient. */
6399
6667
  Forward = "forward"
6400
6668
  }
6401
6669
  /**
6402
6670
  * Foundational interface for all other mail compose interfaces
6403
6671
  * Used for holding the type of mail item being composed
6404
6672
  *
6405
- * @see {@link ComposeMailType}
6673
+ * @typeParam T - the identity type.
6674
+ * @see {@link mail.ComposeMailType}
6406
6675
  */
6407
6676
  interface ComposeMailBase<T extends ComposeMailType> {
6677
+ /** Type of the mail item being composed. */
6408
6678
  type: T;
6409
6679
  }
6410
6680
  /**
@@ -6438,6 +6708,7 @@ export namespace mail {
6438
6708
  * @see {@link ComposeMailType}
6439
6709
  */
6440
6710
  export interface ComposeReplyOrForwardParams<T extends ComposeMailType> extends ComposeMailBase<T> {
6711
+ /** An unique base64-encoded string id that represents the mail message. */
6441
6712
  itemid: string;
6442
6713
  }
6443
6714
  /**
@@ -6455,14 +6726,20 @@ export namespace mail {
6455
6726
  * Namespace containing the set of APIs that support Teams-specific functionalities.
6456
6727
  */
6457
6728
  export namespace teamsCore {
6729
+ /** Ready to unload function type */
6730
+ type readyToUnloadFunctionType = () => void;
6731
+ /** Register on load handler function type */
6732
+ type registerOnLoadHandlerFunctionType = (context: LoadContext) => void;
6733
+ /** Register before unload handler function type */
6734
+ type registerBeforeUnloadHandlerFunctionType = (readyToUnload: readyToUnloadFunctionType) => boolean;
6458
6735
  /**
6459
6736
  * Enable print capability to support printing page using Ctrl+P and cmd+P
6460
6737
  */
6461
- function enablePrintCapability(): void;
6738
+ export function enablePrintCapability(): void;
6462
6739
  /**
6463
6740
  * default print handler
6464
6741
  */
6465
- function print(): void;
6742
+ export function print(): void;
6466
6743
  /**
6467
6744
  * Registers a handler to be called when the page has been requested to load.
6468
6745
  *
@@ -6473,7 +6750,7 @@ export namespace teamsCore {
6473
6750
  *
6474
6751
  * @beta
6475
6752
  */
6476
- function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
6753
+ export function registerOnLoadHandler(handler: registerOnLoadHandlerFunctionType): void;
6477
6754
  /**
6478
6755
  * @hidden
6479
6756
  * Undocumented helper function with shared code between deprecated version and current version of the registerOnLoadHandler API.
@@ -6484,7 +6761,7 @@ export namespace teamsCore {
6484
6761
  * @param handler - The handler to invoke when the page is loaded.
6485
6762
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
6486
6763
  */
6487
- function registerOnLoadHandlerHelper(handler: (context: LoadContext) => void, versionSpecificHelper?: () => void): void;
6764
+ export function registerOnLoadHandlerHelper(handler: registerOnLoadHandlerFunctionType, versionSpecificHelper?: () => void): void;
6488
6765
  /**
6489
6766
  * Registers a handler to be called before the page is unloaded.
6490
6767
  *
@@ -6496,7 +6773,7 @@ export namespace teamsCore {
6496
6773
  *
6497
6774
  * @beta
6498
6775
  */
6499
- function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
6776
+ export function registerBeforeUnloadHandler(handler: registerBeforeUnloadHandlerFunctionType): void;
6500
6777
  /**
6501
6778
  * @hidden
6502
6779
  * Undocumented helper function with shared code between deprecated version and current version of the registerBeforeUnloadHandler API.
@@ -6508,7 +6785,7 @@ export namespace teamsCore {
6508
6785
  * invoke the readyToUnload function provided to it once it's ready to be unloaded.
6509
6786
  * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
6510
6787
  */
6511
- function registerBeforeUnloadHandlerHelper(handler: (readyToUnload: () => void) => boolean, versionSpecificHelper?: () => void): void;
6788
+ export function registerBeforeUnloadHandlerHelper(handler: registerBeforeUnloadHandlerFunctionType, versionSpecificHelper?: () => void): void;
6512
6789
  /**
6513
6790
  * Checks if teamsCore capability is supported by the host
6514
6791
  *
@@ -6517,10 +6794,13 @@ export namespace teamsCore {
6517
6794
  * @throws Error if {@linkcode app.initialize} has not successfully completed
6518
6795
  *
6519
6796
  */
6520
- function isSupported(): boolean;
6797
+ export function isSupported(): boolean;
6798
+ export {};
6521
6799
  }
6522
6800
 
6523
6801
  export namespace people {
6802
+ /** Select people callback function type */
6803
+ type selectPeopleCallbackFunctionType = (error: SdkError, people: PeoplePickerResult[]) => void;
6524
6804
  /**
6525
6805
  * Launches a people picker and allows the user to select one or more people from the list
6526
6806
  * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
@@ -6540,7 +6820,7 @@ export namespace people {
6540
6820
  * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users
6541
6821
  * @param peoplePickerInputs - Input parameters to launch customized people picker
6542
6822
  */
6543
- function selectPeople(callback: (error: SdkError, people: PeoplePickerResult[]) => void, peoplePickerInputs?: PeoplePickerInputs): void;
6823
+ function selectPeople(callback: selectPeopleCallbackFunctionType, peoplePickerInputs?: PeoplePickerInputs): void;
6544
6824
  /**
6545
6825
  * Input parameter supplied to the People Picker API
6546
6826
  */
@@ -6726,11 +7006,15 @@ export interface ShowProfileRequestInternal {
6726
7006
  * @beta
6727
7007
  */
6728
7008
  export namespace video {
7009
+ /** Notify video frame processed function type */
7010
+ type notifyVideoFrameProcessedFunctionType = () => void;
7011
+ /** Notify error function type */
7012
+ type notifyErrorFunctionType = (errorMessage: string) => void;
6729
7013
  /**
6730
7014
  * Represents a video frame
6731
7015
  * @beta
6732
7016
  */
6733
- interface VideoFrame {
7017
+ export interface VideoFrame {
6734
7018
  /**
6735
7019
  * Video frame width
6736
7020
  */
@@ -6764,14 +7048,15 @@ export namespace video {
6764
7048
  * Video frame format enum, currently only support NV12
6765
7049
  * @beta
6766
7050
  */
6767
- enum VideoFrameFormat {
7051
+ export enum VideoFrameFormat {
7052
+ /** Video format used for encoding and decoding YUV color data in video streaming and storage applications. */
6768
7053
  NV12 = 0
6769
7054
  }
6770
7055
  /**
6771
7056
  * Video frame configuration supplied to the host to customize the generated video frame parameters, like format
6772
7057
  * @beta
6773
7058
  */
6774
- interface VideoFrameConfig {
7059
+ export interface VideoFrameConfig {
6775
7060
  /**
6776
7061
  * Video format
6777
7062
  */
@@ -6781,7 +7066,7 @@ export namespace video {
6781
7066
  * Video effect change type enum
6782
7067
  * @beta
6783
7068
  */
6784
- enum EffectChangeType {
7069
+ export enum EffectChangeType {
6785
7070
  /**
6786
7071
  * Current video effect changed
6787
7072
  */
@@ -6795,12 +7080,12 @@ export namespace video {
6795
7080
  * Video frame call back function definition
6796
7081
  * @beta
6797
7082
  */
6798
- type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
7083
+ export type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: notifyVideoFrameProcessedFunctionType, notifyError: notifyErrorFunctionType) => void;
6799
7084
  /**
6800
7085
  * Predefined failure reasons for preparing the selected video effect
6801
7086
  * @beta
6802
7087
  */
6803
- enum EffectFailureReason {
7088
+ export enum EffectFailureReason {
6804
7089
  /**
6805
7090
  * A wrong effect id is provide.
6806
7091
  * Use this reason when the effect id is not found or empty, this may indicate a mismatch between the app and its manifest or a bug of the host.
@@ -6816,14 +7101,14 @@ export namespace video {
6816
7101
  * Return a Promise which will be resolved when the effect is prepared, or throw an {@link EffectFailureReason} on error.
6817
7102
  * @beta
6818
7103
  */
6819
- type VideoEffectCallback = (effectId: string | undefined) => Promise<void>;
7104
+ export type VideoEffectCallback = (effectId: string | undefined) => Promise<void>;
6820
7105
  /**
6821
7106
  * Register to read the video frames in Permissions section
6822
7107
  * @beta
6823
7108
  * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
6824
7109
  * @param config - VideoFrameConfig to customize generated video frame parameters
6825
7110
  */
6826
- function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
7111
+ export function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
6827
7112
  /**
6828
7113
  * Video extension should call this to notify host that the current selected effect parameter changed.
6829
7114
  * If it's pre-meeting, host will call videoEffectCallback immediately then use the videoEffect.
@@ -6832,13 +7117,13 @@ export namespace video {
6832
7117
  * @param effectChangeType - the effect change type.
6833
7118
  * @param effectId - Newly selected effect id.
6834
7119
  */
6835
- function notifySelectedVideoEffectChanged(effectChangeType: EffectChangeType, effectId: string | undefined): void;
7120
+ export function notifySelectedVideoEffectChanged(effectChangeType: EffectChangeType, effectId: string | undefined): void;
6836
7121
  /**
6837
7122
  * Register a callback to be notified when a new video effect is applied.
6838
7123
  * @beta
6839
7124
  * @param callback - Function to be called when new video effect is applied.
6840
7125
  */
6841
- function registerForVideoEffect(callback: VideoEffectCallback): void;
7126
+ export function registerForVideoEffect(callback: VideoEffectCallback): void;
6842
7127
  /**
6843
7128
  * Checks if video capability is supported by the host
6844
7129
  * @beta
@@ -6847,7 +7132,8 @@ export namespace video {
6847
7132
  * @throws Error if {@linkcode app.initialize} has not successfully completed
6848
7133
  *
6849
7134
  */
6850
- function isSupported(): boolean;
7135
+ export function isSupported(): boolean;
7136
+ export {};
6851
7137
  }
6852
7138
 
6853
7139
  /**
@@ -6941,18 +7227,34 @@ export namespace search {
6941
7227
  * 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)
6942
7228
  */
6943
7229
  export namespace sharing {
7230
+ /** shareWebContent callback function type */
7231
+ type shareWebContentCallbackFunctionType = (err?: SdkError) => void;
7232
+ /** Type of message that can be sent or received by the sharing APIs */
6944
7233
  export const SharingAPIMessages: {
7234
+ /**
7235
+ * Share web content message.
7236
+ * @internal
7237
+ */
6945
7238
  shareWebContent: string;
6946
7239
  };
6947
7240
  type ContentType = 'URL';
7241
+ /** Represents parameters for base shared content. */
6948
7242
  interface IBaseSharedContent {
7243
+ /** Shared content type */
6949
7244
  type: ContentType;
6950
7245
  }
7246
+ /** IShareRequestContentType defines share request type. */
6951
7247
  export type IShareRequestContentType = IURLContent;
7248
+ /** Represents IShareRequest parameters interface.
7249
+ * @typeparam T - The identity type
7250
+ */
6952
7251
  export interface IShareRequest<T> {
7252
+ /** Content of the share request. */
6953
7253
  content: T[];
6954
7254
  }
7255
+ /** Represents IURLContent parameters. */
6955
7256
  export interface IURLContent extends IBaseSharedContent {
7257
+ /** Type */
6956
7258
  type: 'URL';
6957
7259
  /**
6958
7260
  * Required URL
@@ -6985,7 +7287,7 @@ export namespace sharing {
6985
7287
  * @param shareWebContentRequest - web content info
6986
7288
  * @param callback - optional callback
6987
7289
  */
6988
- export function shareWebContent(shareWebContentRequest: IShareRequest<IShareRequestContentType>, callback: (err?: SdkError) => void): void;
7290
+ export function shareWebContent(shareWebContentRequest: IShareRequest<IShareRequestContentType>, callback: shareWebContentCallbackFunctionType): void;
6989
7291
  /**
6990
7292
  * Checks if the sharing capability is supported by the host
6991
7293
  * @returns boolean to represent whether the sharing capability is supported
@@ -7052,6 +7354,10 @@ export namespace stageView {
7052
7354
  function isSupported(): boolean;
7053
7355
  }
7054
7356
 
7357
+ /**
7358
+ * @hidden
7359
+ * Package version.
7360
+ */
7055
7361
  export const version = "ERROR: This value should be replaced by webpack!";
7056
7362
 
7057
7363
  /**
@@ -7079,14 +7385,24 @@ export namespace webStorage {
7079
7385
  function isSupported(): boolean;
7080
7386
  }
7081
7387
 
7388
+ /**
7389
+ * Used to interact with call functionality, including starting calls with other users.
7390
+ */
7082
7391
  export namespace call {
7392
+ /** Modalities that can be associated with a call. */
7083
7393
  enum CallModalities {
7394
+ /** Indicates that the modality is unknown or undefined. */
7084
7395
  Unknown = "unknown",
7396
+ /** Indicates that the call includes audio. */
7085
7397
  Audio = "audio",
7398
+ /** Indicates that the call includes video. */
7086
7399
  Video = "video",
7400
+ /** Indicates that the call includes video-based screen sharing. */
7087
7401
  VideoBasedScreenSharing = "videoBasedScreenSharing",
7402
+ /** Indicates that the call includes data sharing or messaging. */
7088
7403
  Data = "data"
7089
7404
  }
7405
+ /** Represents parameters for {@link startCall | StartCall}. */
7090
7406
  interface StartCallParams {
7091
7407
  /**
7092
7408
  * Comma-separated list of user IDs representing the participants of the call.
@@ -7185,6 +7501,20 @@ export namespace appInitialization {
7185
7501
  function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
7186
7502
  }
7187
7503
 
7504
+ /** Execute deep link on complete function type */
7505
+ type executeDeepLinkOnCompleteFunctionType = (status: boolean, reason?: string) => void;
7506
+ /** Callback function type */
7507
+ type callbackFunctionType = () => void;
7508
+ /** Get context callback function type */
7509
+ type getContextCallbackFunctionType = (context: Context) => void;
7510
+ /** Get tab instances callback function type */
7511
+ type getTabInstancesCallbackFunctionType = (tabInfo: TabInformation) => void;
7512
+ /** Register back button handler function type */
7513
+ type registerBackButtonHandlerFunctionType = () => boolean;
7514
+ /** Register full screen handler function type */
7515
+ type registerFullScreenHandlerFunctionType = (isFullScreen: boolean) => void;
7516
+ /** Register on theme change handler function type */
7517
+ type registerOnThemeChangeHandlerFunctionType = (theme: string) => void;
7188
7518
  /**
7189
7519
  * @deprecated
7190
7520
  * As of 2.0.0, please use {@link app.initialize app.initialize(validMessageOrigins?: string[]): Promise\<void\>} instead.
@@ -7195,7 +7525,7 @@ export namespace appInitialization {
7195
7525
  * @param validMessageOrigins - Optionally specify a list of cross frame message origins. There must have
7196
7526
  * https: protocol otherwise they will be ignored. Example: https://www.example.com
7197
7527
  */
7198
- export function initialize(callback?: () => void, validMessageOrigins?: string[]): void;
7528
+ export function initialize(callback?: callbackFunctionType, validMessageOrigins?: string[]): void;
7199
7529
  /**
7200
7530
  * @deprecated
7201
7531
  * As of 2.0.0, please use {@link teamsCore.enablePrintCapability teamsCore.enablePrintCapability(): void} instead.
@@ -7218,60 +7548,60 @@ export function print(): void;
7218
7548
  *
7219
7549
  * @param callback - The callback to invoke when the {@link Context} object is retrieved.
7220
7550
  */
7221
- export function getContext(callback: (context: Context) => void): void;
7551
+ export function getContext(callback: getContextCallbackFunctionType): void;
7222
7552
  /**
7223
7553
  * @deprecated
7224
- * As of 2.0.0, please use {@link app.registerOnThemeChangeHandler app.registerOnThemeChangeHandler(handler: (theme: string) => void): void} instead.
7554
+ * As of 2.0.0, please use {@link app.registerOnThemeChangeHandler app.registerOnThemeChangeHandler(handler: registerOnThemeChangeHandlerFunctionType): void} instead.
7225
7555
  *
7226
7556
  * Registers a handler for theme changes.
7227
7557
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7228
7558
  *
7229
7559
  * @param handler - The handler to invoke when the user changes their theme.
7230
7560
  */
7231
- export function registerOnThemeChangeHandler(handler: (theme: string) => void): void;
7561
+ export function registerOnThemeChangeHandler(handler: registerOnThemeChangeHandlerFunctionType): void;
7232
7562
  /**
7233
7563
  * @deprecated
7234
- * As of 2.0.0, please use {@link pages.registerFullScreenHandler pages.registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void} instead.
7564
+ * As of 2.0.0, please use {@link pages.registerFullScreenHandler pages.registerFullScreenHandler(handler: registerFullScreenHandlerFunctionType): void} instead.
7235
7565
  *
7236
7566
  * Registers a handler for changes from or to full-screen view for a tab.
7237
7567
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7238
7568
  *
7239
7569
  * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
7240
7570
  */
7241
- export function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
7571
+ export function registerFullScreenHandler(handler: registerFullScreenHandlerFunctionType): void;
7242
7572
  /**
7243
7573
  * @deprecated
7244
- * As of 2.0.0, please use {@link pages.appButton.onClick pages.appButton.onClick(handler: () => void): void} instead.
7574
+ * As of 2.0.0, please use {@link pages.appButton.onClick pages.appButton.onClick(handler: callbackFunctionType): void} instead.
7245
7575
  *
7246
7576
  * Registers a handler for clicking the app button.
7247
7577
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7248
7578
  *
7249
7579
  * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
7250
7580
  */
7251
- export function registerAppButtonClickHandler(handler: () => void): void;
7581
+ export function registerAppButtonClickHandler(handler: callbackFunctionType): void;
7252
7582
  /**
7253
7583
  * @deprecated
7254
- * As of 2.0.0, please use {@link pages.appButton.onHoverEnter pages.appButton.onHoverEnter(handler: () => void): void} instead.
7584
+ * As of 2.0.0, please use {@link pages.appButton.onHoverEnter pages.appButton.onHoverEnter(handler: callbackFunctionType): void} instead.
7255
7585
  *
7256
7586
  * Registers a handler for entering hover of the app button.
7257
7587
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7258
7588
  *
7259
7589
  * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
7260
7590
  */
7261
- export function registerAppButtonHoverEnterHandler(handler: () => void): void;
7591
+ export function registerAppButtonHoverEnterHandler(handler: callbackFunctionType): void;
7262
7592
  /**
7263
7593
  * @deprecated
7264
- * As of 2.0.0, please use {@link pages.appButton.onHoverLeave pages.appButton.onHoverLeave(handler: () => void): void} instead.
7594
+ * As of 2.0.0, please use {@link pages.appButton.onHoverLeave pages.appButton.onHoverLeave(handler: callbackFunctionType): void} instead.
7265
7595
  *
7266
7596
  * Registers a handler for exiting hover of the app button.
7267
7597
  * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
7268
7598
  * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
7269
7599
  *
7270
7600
  */
7271
- export function registerAppButtonHoverLeaveHandler(handler: () => void): void;
7601
+ export function registerAppButtonHoverLeaveHandler(handler: callbackFunctionType): void;
7272
7602
  /**
7273
7603
  * @deprecated
7274
- * As of 2.0.0, please use {@link pages.backStack.registerBackButtonHandler pages.backStack.registerBackButtonHandler(handler: () => boolean): void} instead.
7604
+ * As of 2.0.0, please use {@link pages.backStack.registerBackButtonHandler pages.backStack.registerBackButtonHandler(handler: registerBackButtonHandlerFunctionType): void} instead.
7275
7605
  *
7276
7606
  * Registers a handler for user presses of the Team client's back button. Experiences that maintain an internal
7277
7607
  * navigation stack should use this handler to navigate the user back within their frame. If an app finds
@@ -7280,7 +7610,7 @@ export function registerAppButtonHoverLeaveHandler(handler: () => void): void;
7280
7610
  *
7281
7611
  * @param handler - The handler to invoke when the user presses their Team client's back button.
7282
7612
  */
7283
- export function registerBackButtonHandler(handler: () => boolean): void;
7613
+ export function registerBackButtonHandler(handler: registerBackButtonHandlerFunctionType): void;
7284
7614
  /**
7285
7615
  * @deprecated
7286
7616
  * As of 2.0.0, please use {@link teamsCore.registerOnLoadHandler teamsCore.registerOnLoadHandler(handler: (context: LoadContext) => void): void} instead.
@@ -7293,7 +7623,7 @@ export function registerBackButtonHandler(handler: () => boolean): void;
7293
7623
  export function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
7294
7624
  /**
7295
7625
  * @deprecated
7296
- * As of 2.0.0, please use {@link teamsCore.registerBeforeUnloadHandler teamsCore.registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void} instead.
7626
+ * As of 2.0.0, please use {@link teamsCore.registerBeforeUnloadHandler teamsCore.registerBeforeUnloadHandler(handler: (readyToUnload: callbackFunctionType) => boolean): void} instead.
7297
7627
  *
7298
7628
  * @hidden
7299
7629
  * Registers a handler to be called before the page is unloaded.
@@ -7301,7 +7631,7 @@ export function registerOnLoadHandler(handler: (context: LoadContext) => void):
7301
7631
  * @param handler - The handler to invoke before the page is unloaded. If this handler returns true the page should
7302
7632
  * invoke the readyToUnload function provided to it once it's ready to be unloaded.
7303
7633
  */
7304
- export function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
7634
+ export function registerBeforeUnloadHandler(handler: (readyToUnload: callbackFunctionType) => boolean): void;
7305
7635
  /**
7306
7636
  * @deprecated
7307
7637
  * As of 2.0.0, please use {@link pages.registerFocusEnterHandler pages.registerFocusEnterHandler(handler: (navigateForward: boolean) => void): void} instead.
@@ -7314,13 +7644,13 @@ export function registerBeforeUnloadHandler(handler: (readyToUnload: () => void)
7314
7644
  export function registerFocusEnterHandler(handler: (navigateForward: boolean) => boolean): void;
7315
7645
  /**
7316
7646
  * @deprecated
7317
- * As of 2.0.0, please use {@link pages.config.registerChangeConfigHandler pages.config.registerChangeConfigHandler(handler: () => void): void} instead.
7647
+ * As of 2.0.0, please use {@link pages.config.registerChangeConfigHandler pages.config.registerChangeConfigHandler(handler: callbackFunctionType): void} instead.
7318
7648
  *
7319
7649
  * Registers a handler for when the user reconfigurated tab.
7320
7650
  *
7321
7651
  * @param handler - The handler to invoke when the user click on Settings.
7322
7652
  */
7323
- export function registerChangeSettingsHandler(handler: () => void): void;
7653
+ export function registerChangeSettingsHandler(handler: callbackFunctionType): void;
7324
7654
  /**
7325
7655
  * @deprecated
7326
7656
  * As of 2.0.0, please use {@link pages.tabs.getTabInstances pages.tabs.getTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise\<TabInformation\>} instead.
@@ -7331,7 +7661,7 @@ export function registerChangeSettingsHandler(handler: () => void): void;
7331
7661
  * @param callback - The callback to invoke when the {@link TabInstanceParameters} object is retrieved.
7332
7662
  * @param tabInstanceParameters - OPTIONAL Flags that specify whether to scope call to favorite teams or channels.
7333
7663
  */
7334
- export function getTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
7664
+ export function getTabInstances(callback: getTabInstancesCallbackFunctionType, tabInstanceParameters?: TabInstanceParameters): void;
7335
7665
  /**
7336
7666
  * @deprecated
7337
7667
  * As of 2.0.0, please use {@link pages.tabs.getMruTabInstances pages.tabs.getMruTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise\<TabInformation\>} instead.
@@ -7341,7 +7671,7 @@ export function getTabInstances(callback: (tabInfo: TabInformation) => void, tab
7341
7671
  * @param callback - The callback to invoke when the {@link TabInformation} object is retrieved.
7342
7672
  * @param tabInstanceParameters - OPTIONAL Ignored, kept for future use
7343
7673
  */
7344
- export function getMruTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
7674
+ export function getMruTabInstances(callback: getTabInstancesCallbackFunctionType, tabInstanceParameters?: TabInstanceParameters): void;
7345
7675
  /**
7346
7676
  * @deprecated
7347
7677
  * As of 2.0.0, please use {@link pages.shareDeepLink pages.shareDeepLink(deepLinkParameters: DeepLinkParameters): void} instead.
@@ -7359,7 +7689,7 @@ export function shareDeepLink(deepLinkParameters: DeepLinkParameters): void;
7359
7689
  *
7360
7690
  * @param deepLink - deep link.
7361
7691
  */
7362
- export function executeDeepLink(deepLink: string, onComplete?: (status: boolean, reason?: string) => void): void;
7692
+ export function executeDeepLink(deepLink: string, onComplete?: executeDeepLinkOnCompleteFunctionType): void;
7363
7693
  /**
7364
7694
  * @deprecated
7365
7695
  * As of 2.0.0, please use {@link pages.setCurrentFrame pages.setCurrentFrame(frameInfo: FrameInfo): void} instead.
@@ -7371,7 +7701,7 @@ export function executeDeepLink(deepLink: string, onComplete?: (status: boolean,
7371
7701
  export function setFrameContext(frameContext: FrameContext): void;
7372
7702
  /**
7373
7703
  * @deprecated
7374
- * As of 2.0.0, please use {@link pages.initializeWithFrameContext pages.initializeWithFrameContext(frameInfo: FrameInfo, callback?: () => void, validMessageOrigins?: string[],): void} instead.
7704
+ * As of 2.0.0, please use {@link pages.initializeWithFrameContext pages.initializeWithFrameContext(frameInfo: FrameInfo, callback?: callbackFunctionType, validMessageOrigins?: string[],): void} instead.
7375
7705
  *
7376
7706
  * Initialize with FrameContext
7377
7707
  *
@@ -7380,8 +7710,11 @@ export function setFrameContext(frameContext: FrameContext): void;
7380
7710
  * @param validMessageOrigins - Optionally specify a list of cross frame message origins.
7381
7711
  * They must have https: protocol otherwise they will be ignored. Example: https:www.example.com
7382
7712
  */
7383
- export function initializeWithFrameContext(frameContext: FrameContext, callback?: () => void, validMessageOrigins?: string[]): void;
7713
+ export function initializeWithFrameContext(frameContext: FrameContext, callback?: callbackFunctionType, validMessageOrigins?: string[]): void;
7714
+ export {};
7384
7715
 
7716
+ /** Navigation on complete handler function type */
7717
+ type onCompleteHandlerFunctionType = (status: boolean, reason?: string) => void;
7385
7718
  /**
7386
7719
  * @deprecated
7387
7720
  * As of 2.0.0, please use {@link pages.returnFocus pages.returnFocus(navigateForward?: boolean): void} instead.
@@ -7400,7 +7733,7 @@ export function returnFocus(navigateForward?: boolean): void;
7400
7733
  * @param tabInstance - The tab instance to navigate to.
7401
7734
  * @param onComplete - The callback to invoke when the action is complete.
7402
7735
  */
7403
- export function navigateToTab(tabInstance: TabInstance, onComplete?: (status: boolean, reason?: string) => void): void;
7736
+ export function navigateToTab(tabInstance: TabInstance, onComplete?: onCompleteHandlerFunctionType): void;
7404
7737
  /**
7405
7738
  * @deprecated
7406
7739
  * As of 2.0.0, please use {@link pages.navigateCrossDomain pages.navigateCrossDomain(url: string): Promise\<void\>} instead.
@@ -7414,7 +7747,7 @@ export function navigateToTab(tabInstance: TabInstance, onComplete?: (status: bo
7414
7747
  * @param url - The URL to navigate the frame to.
7415
7748
  * @param onComplete - The callback to invoke when the action is complete.
7416
7749
  */
7417
- export function navigateCrossDomain(url: string, onComplete?: (status: boolean, reason?: string) => void): void;
7750
+ export function navigateCrossDomain(url: string, onComplete?: onCompleteHandlerFunctionType): void;
7418
7751
  /**
7419
7752
  * @deprecated
7420
7753
  * As of 2.0.0, please use {@link pages.backStack.navigateBack pages.backStack.navigateBack(): Promise\<void\>} instead.
@@ -7424,7 +7757,8 @@ export function navigateCrossDomain(url: string, onComplete?: (status: boolean,
7424
7757
  *
7425
7758
  * @param onComplete - The callback to invoke when the action is complete.
7426
7759
  */
7427
- export function navigateBack(onComplete?: (status: boolean, reason?: string) => void): void;
7760
+ export function navigateBack(onComplete?: onCompleteHandlerFunctionType): void;
7761
+ export {};
7428
7762
 
7429
7763
  /**
7430
7764
  * @deprecated
@@ -7434,6 +7768,14 @@ export function navigateBack(onComplete?: (status: boolean, reason?: string) =>
7434
7768
  * This object is usable only on the settings frame.
7435
7769
  */
7436
7770
  export namespace settings {
7771
+ /** Register on remove handler function type */
7772
+ type registerOnRemoveHandlerFunctionType = (evt: RemoveEvent) => void;
7773
+ /** Register on save handler function type */
7774
+ type registerOnSaveHandlerFunctionType = (evt: SaveEvent) => void;
7775
+ /** Set settings on complete function type */
7776
+ type setSettingsOnCompleteFunctionType = (status: boolean, reason?: string) => void;
7777
+ /** Get settings callback function type */
7778
+ type getSettingsCallbackFunctionType = (instanceSettings: Settings) => void;
7437
7779
  /**
7438
7780
  * @deprecated
7439
7781
  * As of 2.0.0, please use {@link pages.config.Config} instead.
@@ -7471,7 +7813,7 @@ export namespace settings {
7471
7813
  *
7472
7814
  * @param validityState - Indicates whether the save or remove button is enabled for the user.
7473
7815
  */
7474
- function setValidityState(validityState: boolean): void;
7816
+ export function setValidityState(validityState: boolean): void;
7475
7817
  /**
7476
7818
  * @deprecated
7477
7819
  * As of 2.0.0, please use {@link pages.getConfig pages.getConfig(): Promise\<InstanceConfig\>} instead.
@@ -7480,7 +7822,7 @@ export namespace settings {
7480
7822
  *
7481
7823
  * @param callback - The callback to invoke when the {@link Settings} object is retrieved.
7482
7824
  */
7483
- function getSettings(callback: (instanceSettings: Settings) => void): void;
7825
+ export function getSettings(callback: getSettingsCallbackFunctionType): void;
7484
7826
  /**
7485
7827
  * @deprecated
7486
7828
  * As of 2.0.0, please use {@link pages.config.setConfig pages.config.setConfig(instanceSettings: Config): Promise\<void\>} instead.
@@ -7490,10 +7832,10 @@ export namespace settings {
7490
7832
  *
7491
7833
  * @param - Set the desired settings for this instance.
7492
7834
  */
7493
- function setSettings(instanceSettings: Settings, onComplete?: (status: boolean, reason?: string) => void): void;
7835
+ export function setSettings(instanceSettings: Settings, onComplete?: setSettingsOnCompleteFunctionType): void;
7494
7836
  /**
7495
7837
  * @deprecated
7496
- * As of 2.0.0, please use {@link pages.config.registerOnSaveHandler pages.config.registerOnSaveHandler(handler: (evt: SaveEvent) => void): void} instead.
7838
+ * As of 2.0.0, please use {@link pages.config.registerOnSaveHandler pages.config.registerOnSaveHandler(handler: registerOnSaveHandlerFunctionType): void} instead.
7497
7839
  *
7498
7840
  * Registers a handler for when the user attempts to save the settings. This handler should be used
7499
7841
  * to create or update the underlying resource powering the content.
@@ -7502,10 +7844,10 @@ export namespace settings {
7502
7844
  *
7503
7845
  * @param handler - The handler to invoke when the user selects the save button.
7504
7846
  */
7505
- function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
7847
+ export function registerOnSaveHandler(handler: registerOnSaveHandlerFunctionType): void;
7506
7848
  /**
7507
7849
  * @deprecated
7508
- * As of 2.0.0, please use {@link pages.config.registerOnRemoveHandler pages.config.registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void} instead.
7850
+ * As of 2.0.0, please use {@link pages.config.registerOnRemoveHandler pages.config.registerOnRemoveHandler(handler: registerOnRemoveHandlerFunctionType): void} instead.
7509
7851
  *
7510
7852
  * Registers a handler for user attempts to remove content. This handler should be used
7511
7853
  * to remove the underlying resource powering the content.
@@ -7514,7 +7856,8 @@ export namespace settings {
7514
7856
  *
7515
7857
  * @param handler - The handler to invoke when the user selects the remove button.
7516
7858
  */
7517
- function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
7859
+ export function registerOnRemoveHandler(handler: registerOnRemoveHandlerFunctionType): void;
7860
+ export {};
7518
7861
  }
7519
7862
 
7520
7863
  /**
@@ -7526,6 +7869,8 @@ export namespace settings {
7526
7869
  * The tasks namespace will be deprecated. Please use dialog for future developments.
7527
7870
  */
7528
7871
  export namespace tasks {
7872
+ /** Start task submit handler function type. */
7873
+ type startTaskSubmitHandlerFunctionType = (err: string, result: string | object) => void;
7529
7874
  /**
7530
7875
  * @deprecated
7531
7876
  * As of 2.8.0:
@@ -7541,7 +7886,7 @@ export namespace tasks {
7541
7886
  * @param taskInfo - An object containing the parameters of the task module
7542
7887
  * @param submitHandler - Handler to call when the task module is completed
7543
7888
  */
7544
- function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string | object) => void): IAppWindow;
7889
+ export function startTask(taskInfo: TaskInfo, submitHandler?: startTaskSubmitHandlerFunctionType): IAppWindow;
7545
7890
  /**
7546
7891
  * @deprecated
7547
7892
  * As of 2.0.0, please use {@link dialog.update.resize dialog.update.resize(dimensions: DialogSize): void} instead.
@@ -7550,7 +7895,7 @@ export namespace tasks {
7550
7895
  *
7551
7896
  * @param taskInfo - An object containing width and height properties
7552
7897
  */
7553
- function updateTask(taskInfo: TaskInfo): void;
7898
+ export function updateTask(taskInfo: TaskInfo): void;
7554
7899
  /**
7555
7900
  * @deprecated
7556
7901
  * As of 2.8.0, please use {@link dialog.url.submit} instead.
@@ -7560,14 +7905,15 @@ export namespace tasks {
7560
7905
  * @param result - Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
7561
7906
  * @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.
7562
7907
  */
7563
- function submitTask(result?: string | object, appIds?: string | string[]): void;
7908
+ export function submitTask(result?: string | object, appIds?: string | string[]): void;
7564
7909
  /**
7565
7910
  * Sets the height and width of the {@link TaskInfo} object to the original height and width, if initially specified,
7566
7911
  * otherwise uses the height and width values corresponding to {@link DialogDimension | TaskModuleDimension.Small}
7567
7912
  * @param taskInfo TaskInfo object from which to extract size info, if specified
7568
7913
  * @returns TaskInfo with height and width specified
7569
7914
  */
7570
- function getDefaultSizeIfNotProvided(taskInfo: TaskInfo): TaskInfo;
7915
+ export function getDefaultSizeIfNotProvided(taskInfo: TaskInfo): TaskInfo;
7916
+ export {};
7571
7917
  }
7572
7918
 
7573
7919
  /**
@@ -7673,6 +8019,19 @@ export interface IFluidTenantInfo {
7673
8019
  serviceEndpoint: string;
7674
8020
  }
7675
8021
  /**
8022
+ * @hidden
8023
+ * Returned from `LiveShareHost.getClientInfo()` to specify the client info for a
8024
+ * particular client in a Live Share session.
8025
+ *
8026
+ * @beta
8027
+ */
8028
+ export interface IClientInfo {
8029
+ userId: string;
8030
+ roles: UserMeetingRole[];
8031
+ displayName?: string;
8032
+ }
8033
+ /**
8034
+ * @hidden
7676
8035
  * Live Share host implementation for O365 and Teams clients.
7677
8036
  *
7678
8037
  * @beta
@@ -7742,6 +8101,16 @@ export class LiveShareHost {
7742
8101
  * @beta
7743
8102
  */
7744
8103
  getClientRoles(clientId: string): Promise<UserMeetingRole[] | undefined>;
8104
+ /**
8105
+ * @hidden
8106
+ * Returns the `IClientInfo` associated with a client ID.
8107
+ *
8108
+ * @param clientId The Client ID the message was received from.
8109
+ * @returns The info for a given client. Returns `undefined` if the client ID hasn't been registered yet.
8110
+ *
8111
+ * @beta
8112
+ */
8113
+ getClientInfo(clientId: string): Promise<IClientInfo | undefined>;
7745
8114
  /**
7746
8115
  * Returns a host instance for the client that can be passed to the `LiveShareClient` class.
7747
8116
  *
@@ -7752,4 +8121,16 @@ export class LiveShareHost {
7752
8121
  */
7753
8122
  static create(): LiveShareHost;
7754
8123
  }
8124
+ /**
8125
+ * @hidden
8126
+ *
8127
+ * Checks if the interactive capability is supported by the host
8128
+ * @returns boolean to represent whether the interactive capability is supported
8129
+ *
8130
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
8131
+ *
8132
+ * @internal
8133
+ * Limited to Microsoft-internal use
8134
+ */
8135
+ export function isSupported(): boolean;
7755
8136