@microsoft/teams-js 2.1.0-beta.2 → 2.1.0-beta.5

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.
@@ -1943,65 +1943,85 @@ export enum FileOpenPreference {
1943
1943
  */
1944
1944
  export interface Context {
1945
1945
  /**
1946
- * @hidden
1946
+ * @deprecated
1947
+ * As of 2.0.0, please use {@link app.Context.team.groupId} instead
1948
+ *
1947
1949
  * The Office 365 group ID for the team with which the content is associated.
1948
1950
  * This field is available only when the identity permission is requested in the manifest.
1949
1951
  */
1950
1952
  groupId?: string;
1951
1953
  /**
1952
- * @hidden
1954
+ * @deprecated
1955
+ * As of 2.0.0, please use {@link app.Context.team.internalId} instead
1956
+ *
1953
1957
  * The Microsoft Teams ID for the team with which the content is associated.
1954
1958
  */
1955
1959
  teamId?: string;
1956
1960
  /**
1957
- * @hidden
1961
+ * @deprecated
1962
+ * As of 2.0.0, please use {@link app.Context.team.displayName} instead
1963
+ *
1958
1964
  * The name for the team with which the content is associated.
1959
1965
  */
1960
1966
  teamName?: string;
1961
1967
  /**
1962
- * @hidden
1968
+ * @deprecated
1969
+ * As of 2.0.0, please use {@link app.Context.channel.id} instead
1970
+ *
1963
1971
  * The Microsoft Teams ID for the channel with which the content is associated.
1964
1972
  */
1965
1973
  channelId?: string;
1966
1974
  /**
1967
- * @hidden
1975
+ * @deprecated
1976
+ * As of 2.0.0, please use {@link app.Context.channel.displayName} instead
1977
+ *
1968
1978
  * The name for the channel with which the content is associated.
1969
1979
  */
1970
1980
  channelName?: string;
1971
1981
  /**
1972
- * @hidden
1982
+ * @deprecated
1983
+ * As of 2.0.0, please use {@link app.Context.channel.membershipType} instead
1984
+ *
1973
1985
  * The type of the channel with which the content is associated.
1974
1986
  */
1975
1987
  channelType?: ChannelType;
1976
1988
  /**
1977
- * @hidden
1989
+ * @deprecated
1990
+ * As of 2.0.0, please use {@link app.Context.page.id} instead
1991
+ *
1978
1992
  * The developer-defined unique ID for the entity this content points to.
1979
1993
  */
1980
1994
  entityId: string;
1981
1995
  /**
1982
- * @hidden
1996
+ * @deprecated
1997
+ * As of 2.0.0, please use {@link app.Context.page.subPageId} instead
1998
+ *
1983
1999
  * The developer-defined unique ID for the sub-entity this content points to.
1984
2000
  * This field should be used to restore to a specific state within an entity,
1985
2001
  * such as scrolling to or activating a specific piece of content.
1986
2002
  */
1987
2003
  subEntityId?: string;
1988
2004
  /**
1989
- * @hidden
2005
+ * @deprecated
2006
+ * As of 2.0.0, please use {@link app.Context.app.locale} instead
2007
+ *
1990
2008
  * The current locale that the user has configured for the app formatted as
1991
2009
  * languageId-countryId (for example, en-us).
1992
2010
  */
1993
2011
  locale: string;
1994
2012
  /**
1995
- * @hidden
2013
+ * @deprecated
2014
+ * As of 2.0.0, please use {@link app.Context.app.osLocaleInfo} instead
2015
+ *
1996
2016
  * More detailed locale info from the user's OS if available. Can be used together with
1997
2017
  * the @microsoft/globe NPM package to ensure your app respects the user's OS date and
1998
2018
  * time format configuration
1999
2019
  */
2000
2020
  osLocaleInfo?: LocaleInfo;
2001
2021
  /**
2002
- * @hidden
2003
2022
  * @deprecated
2004
- * As of 2.0.0, please use {@link loginHint} or {@link userPrincipalName} instead.
2023
+ *
2024
+ * As of 2.0.0, please use {@link app.Context.user.loginHint} or {@link app.Context.user.userPrincipalName} instead.
2005
2025
  * The UPN of the current user.
2006
2026
  * Because a malicious party can run your content in a browser, this value should
2007
2027
  * be used only as a hint as to who the user is and never as proof of identity.
@@ -2009,7 +2029,9 @@ export interface Context {
2009
2029
  */
2010
2030
  upn?: string;
2011
2031
  /**
2012
- * @hidden
2032
+ * @deprecated
2033
+ * As of 2.0.0, please use {@link app.Context.user.tenant.id} instead
2034
+ *
2013
2035
  * The Azure AD tenant ID of the current user.
2014
2036
  * Because a malicious party can run your content in a browser, this value should
2015
2037
  * be used only as a hint as to who the user is and never as proof of identity.
@@ -2017,69 +2039,95 @@ export interface Context {
2017
2039
  */
2018
2040
  tid?: string;
2019
2041
  /**
2020
- * @hidden
2042
+ * @deprecated
2043
+ * As of 2.0.0, please use {@link app.Context.app.theme} instead
2044
+ *
2021
2045
  * The current UI theme.
2022
2046
  */
2023
2047
  theme?: string;
2024
2048
  /**
2025
- * @hidden
2049
+ * @deprecated
2050
+ * As of 2.0.0, please use {@link app.Context.page.isFullScreen} instead
2051
+ *
2026
2052
  * Indication whether the tab is in full-screen mode.
2027
2053
  */
2028
2054
  isFullScreen?: boolean;
2029
2055
  /**
2030
- * @hidden
2056
+ * @deprecated
2057
+ * As of 2.0.0, please use {@link app.Context.team.type} instead
2058
+ *
2031
2059
  * The type of the team.
2032
2060
  */
2033
2061
  teamType?: TeamType;
2034
2062
  /**
2035
- * @hidden
2063
+ * @deprecated
2064
+ * As of 2.0.0, please use {@link app.Context.sharePointSite.teamSiteUrl} instead
2065
+ *
2036
2066
  * The root SharePoint site associated with the team.
2037
2067
  */
2038
2068
  teamSiteUrl?: string;
2039
2069
  /**
2040
- * @hidden
2070
+ * @deprecated
2071
+ * As of 2.0.0, please use {@link app.Context.sharePointSite.teamSiteDomain} instead
2072
+ *
2041
2073
  * The domain of the root SharePoint site associated with the team.
2042
2074
  */
2043
2075
  teamSiteDomain?: string;
2044
2076
  /**
2045
- * @hidden
2077
+ * @deprecated
2078
+ * As of 2.0.0, please use {@link app.Context.sharePointSite.teamSitePath} instead
2079
+ *
2046
2080
  * The relative path to the SharePoint site associated with the team.
2047
2081
  */
2048
2082
  teamSitePath?: string;
2049
2083
  /**
2050
- * @hidden
2084
+ * @deprecated
2085
+ * As of 2.0.0, please use {@link app.Context.channel.ownerTeamTenantId} instead
2086
+ *
2051
2087
  * The tenant ID of the host team.
2052
2088
  */
2053
2089
  hostTeamTenantId?: string;
2054
2090
  /**
2055
- * @hidden
2091
+ * @deprecated
2092
+ * As of 2.0.0, please use {@link app.Context.channel.ownerGroupId} instead
2093
+ *
2056
2094
  * The AAD group ID of the host team.
2057
2095
  */
2058
2096
  hostTeamGroupId?: string;
2059
2097
  /**
2060
- * @hidden
2098
+ * @deprecated
2099
+ * As of 2.0.0, please use {@link app.Context.channel.relativeUrl} instead
2100
+ *
2061
2101
  * The relative path to the SharePoint folder associated with the channel.
2062
2102
  */
2063
2103
  channelRelativeUrl?: string;
2064
2104
  /**
2065
- * @hidden
2105
+ * @deprecated
2106
+ * As of 2.0.0, please use {@link app.Context.app.host.sessionId} instead
2107
+ *
2066
2108
  * Unique ID for the current Teams session for use in correlating telemetry data.
2067
2109
  */
2068
2110
  sessionId?: string;
2069
2111
  /**
2070
- * @hidden
2112
+ * @deprecated
2113
+ * As of 2.0.0, please use {@link app.Context.team.userRole} instead
2114
+ *
2071
2115
  * The user's role in the team.
2072
2116
  * Because a malicious party can run your content in a browser, this value should
2073
2117
  * be used only as a hint as to the user's role, and never as proof of her role.
2074
2118
  */
2075
2119
  userTeamRole?: UserTeamRole;
2076
2120
  /**
2077
- * @hidden
2121
+ * @deprecated
2122
+ * As of 2.0.0, please use {@link app.Context.chat.id} instead
2123
+ *
2078
2124
  * The Microsoft Teams ID for the chat with which the content is associated.
2079
2125
  */
2080
2126
  chatId?: string;
2081
2127
  /**
2082
- * @hidden
2128
+ * @deprecated
2129
+ * As of 2.0.0, please use {@link app.Context.user.loginHint} instead
2130
+ *
2083
2131
  * A value suitable for use as a login_hint when authenticating with Azure AD.
2084
2132
  * Because a malicious party can run your content in a browser, this value should
2085
2133
  * be used only as a hint as to who the user is and never as proof of identity.
@@ -2087,7 +2135,9 @@ export interface Context {
2087
2135
  */
2088
2136
  loginHint?: string;
2089
2137
  /**
2090
- * @hidden
2138
+ * @deprecated
2139
+ * As of 2.0.0, please use {@link app.Context.user.userPrincipalName} instead
2140
+ *
2091
2141
  * The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).
2092
2142
  * Because a malicious party run your content in a browser, this value should
2093
2143
  * be used only as a hint as to who the user is and never as proof of identity.
@@ -2095,7 +2145,9 @@ export interface Context {
2095
2145
  */
2096
2146
  userPrincipalName?: string;
2097
2147
  /**
2098
- * @hidden
2148
+ * @deprecated
2149
+ * As of 2.0.0, please use {@link app.Context.user.id} instead
2150
+ *
2099
2151
  * The Azure AD object id of the current user.
2100
2152
  * Because a malicious party run your content in a browser, this value should
2101
2153
  * be used only as a hint as to who the user is and never as proof of identity.
@@ -2103,130 +2155,180 @@ export interface Context {
2103
2155
  */
2104
2156
  userObjectId?: string;
2105
2157
  /**
2106
- * @hidden
2158
+ * @deprecated
2159
+ * As of 2.0.0, please use {@link app.Context.team.isArchived} instead
2160
+ *
2107
2161
  * Indicates whether team is archived.
2108
2162
  * Apps should use this as a signal to prevent any changes to content associated with archived teams.
2109
2163
  */
2110
2164
  isTeamArchived?: boolean;
2111
2165
  /**
2112
- * @hidden
2166
+ * @deprecated
2167
+ * As of 2.0.0, please use {@link app.Context.host.name} instead
2168
+ *
2113
2169
  * The name of the host client. Possible values are: Office, Orange, Outlook, Teams
2114
2170
  */
2115
2171
  hostName?: HostName;
2116
2172
  /**
2117
- * @hidden
2173
+ * @deprecated
2174
+ * As of 2.0.0, please use {@link app.Context.host.clientType} instead
2175
+ *
2118
2176
  * The type of the host client. Possible values are : android, ios, web, desktop, rigel(deprecated, use teamsRoomsWindows instead),
2119
2177
  * surfaceHub, teamsRoomsWindows, teamsRoomsAndroid, teamsPhones, teamsDisplays
2120
2178
  */
2121
2179
  hostClientType?: HostClientType;
2122
2180
  /**
2123
- * @hidden
2181
+ * @deprecated
2182
+ * As of 2.0.0, please use {@link app.Context.page.frameContext} instead
2183
+ *
2124
2184
  * The context where tab url is loaded (content, task, setting, remove, sidePanel)
2125
2185
  */
2126
2186
  frameContext?: FrameContexts;
2127
2187
  /**
2128
- * @hidden
2188
+ * @deprecated
2189
+ * As of 2.0.0, please use {@link app.Context.sharepoint} instead
2190
+ *
2129
2191
  * SharePoint context. This is only available when hosted in SharePoint.
2130
2192
  */
2131
2193
  sharepoint?: any;
2132
2194
  /**
2133
- * @hidden
2195
+ * @deprecated
2196
+ * As of 2.0.0, please use {@link app.Context.user.tenant.teamsSku} instead
2197
+ *
2134
2198
  * The type of license for the current users tenant.
2135
2199
  */
2136
2200
  tenantSKU?: string;
2137
2201
  /**
2138
- * @hidden
2202
+ * @deprecated
2203
+ * As of 2.0.0, please use {@link app.Context.user.licenseType} instead
2204
+ *
2139
2205
  * The license type for the current user.
2140
2206
  */
2141
2207
  userLicenseType?: string;
2142
2208
  /**
2143
- * @hidden
2209
+ * @deprecated
2210
+ * As of 2.0.0, please use {@link app.Context.app.parentMessageId} instead
2211
+ *
2144
2212
  * The ID of the parent message from which this task module was launched.
2145
2213
  * This is only available in task modules launched from bot cards.
2146
2214
  */
2147
2215
  parentMessageId?: string;
2148
2216
  /**
2149
- * @hidden
2217
+ * @deprecated
2218
+ * As of 2.0.0, please use {@link app.Context.app.host.ringId} instead
2219
+ *
2150
2220
  * Current ring ID
2151
2221
  */
2152
2222
  ringId?: string;
2153
2223
  /**
2154
- * @hidden
2224
+ * @deprecated
2225
+ * As of 2.0.0, please use {@link app.Context.app.sessionId} instead
2226
+ *
2155
2227
  * Unique ID for the current session for use in correlating telemetry data.
2156
2228
  */
2157
2229
  appSessionId?: string;
2158
2230
  /**
2159
- * @hidden
2231
+ * @deprecated
2232
+ * As of 2.0.0, please use {@link app.Context.app.appLaunchId} instead
2233
+ *
2160
2234
  * ID for the current visible app which is different for across cached sessions. Used for correlating telemetry data``
2161
2235
  */
2162
2236
  appLaunchId?: string;
2163
2237
  /**
2164
- * @hidden
2238
+ * @deprecated
2239
+ * As of 2.0.0, please use {@link app.Context.user.isCallingAllowed} instead
2240
+ *
2165
2241
  * Represents whether calling is allowed for the current logged in User
2166
2242
  */
2167
2243
  isCallingAllowed?: boolean;
2168
2244
  /**
2169
- * @hidden
2245
+ * @deprecated
2246
+ * As of 2.0.0, please use {@link app.Context.user.isPSTNCallingAllowed} instead
2247
+ *
2170
2248
  * Represents whether PSTN calling is allowed for the current logged in User
2171
2249
  */
2172
2250
  isPSTNCallingAllowed?: boolean;
2173
2251
  /**
2174
- * @hidden
2252
+ * @deprecated
2253
+ * As of 2.0.0, please use {@link app.Context.meeting.id} instead
2254
+ *
2175
2255
  * Meeting Id used by tab when running in meeting context
2176
2256
  */
2177
2257
  meetingId?: string;
2178
2258
  /**
2179
- * @hidden
2259
+ * @deprecated
2260
+ * As of 2.0.0, please use {@link app.Context.channel.defaultOneNoteSectionId} instead
2261
+ *
2180
2262
  * The OneNote section ID that is linked to the channel.
2181
2263
  */
2182
2264
  defaultOneNoteSectionId?: string;
2183
2265
  /**
2184
- * @hidden
2266
+ * @deprecated
2267
+ * As of 2.0.0, please use {@link app.Context.page.isMultiWindow} instead
2268
+ *
2185
2269
  * Indication whether the tab is in a pop out window
2186
2270
  */
2187
2271
  isMultiWindow?: boolean;
2188
2272
  /**
2189
- * @hidden
2273
+ * @deprecated
2274
+ * As of 2.0.0, please use {@link app.Context.app.iconPositionVertical} instead
2275
+ *
2190
2276
  * Personal app icon y coordinate position
2191
2277
  */
2192
2278
  appIconPosition?: number;
2193
2279
  /**
2194
- * @hidden
2280
+ * @deprecated
2281
+ * As of 2.0.0, please use {@link app.Context.page.sourceOrigin} instead
2282
+ *
2195
2283
  * Source origin from where the tab is opened
2196
2284
  */
2197
2285
  sourceOrigin?: string;
2198
2286
  /**
2199
- * @hidden
2287
+ * @deprecated
2288
+ * As of 2.0.0, please use {@link app.Context.app.userClickTime} instead
2289
+ *
2200
2290
  * Time when the user clicked on the tab
2201
2291
  */
2202
2292
  userClickTime?: number;
2203
2293
  /**
2204
- * @hidden
2294
+ * @deprecated
2295
+ * As of 2.0.0, please use {@link app.Context.team.templateId} instead
2296
+ *
2205
2297
  * Team Template ID if there was a Team Template associated with the creation of the team.
2206
2298
  */
2207
2299
  teamTemplateId?: string;
2208
2300
  /**
2209
- * @hidden
2301
+ * @deprecated
2302
+ * As of 2.0.0, please use {@link app.Context.app.userFileOpenPreference} instead
2303
+ *
2210
2304
  * Where the user prefers the file to be opened from by default during file open
2211
2305
  */
2212
2306
  userFileOpenPreference?: FileOpenPreference;
2213
2307
  /**
2214
- * @hidden
2308
+ * @deprecated
2309
+ * As of 2.0.0, please use {@link app.Context.user.displayName} instead
2310
+ *
2215
2311
  * The address book name of the current user.
2216
2312
  */
2217
2313
  userDisplayName?: string;
2218
2314
  /**
2219
- * @hidden
2315
+ * @deprecated
2316
+ * As of 2.0.0, please use {@link app.Context.sharePointSite.teamSiteId} instead
2317
+ *
2220
2318
  * Teamsite ID, aka sharepoint site id.
2221
2319
  */
2222
2320
  teamSiteId?: string;
2223
2321
  /**
2224
- * @hidden
2322
+ * @deprecated
2323
+ * As of 2.0.0, please use {@link app.Context.sharePointSite.mySiteDomain} instead
2324
+ *
2225
2325
  * The SharePoint my site domain associated with the user.
2226
2326
  */
2227
2327
  mySiteDomain?: string;
2228
2328
  /**
2229
- * @hidden
2329
+ * @deprecated
2330
+ * As of 2.0.0, please use {@link app.Context.sharePointSite.mySitePath} instead
2331
+ *
2230
2332
  * The SharePoint relative path to the current users mysite
2231
2333
  */
2232
2334
  mySitePath?: string;
@@ -2468,6 +2570,11 @@ export enum ErrorCode {
2468
2570
  */
2469
2571
  SIZE_EXCEEDED = 10000
2470
2572
  }
2573
+ /** @hidden */
2574
+ export enum DevicePermission {
2575
+ GeoLocation = "geolocation",
2576
+ Media = "media"
2577
+ }
2471
2578
 
2472
2579
  /**
2473
2580
  * Namespace to interact with app initialization and lifecycle.
@@ -2961,6 +3068,49 @@ export namespace appInstallDialog {
2961
3068
  function isSupported(): boolean;
2962
3069
  }
2963
3070
 
3071
+ /**
3072
+ * Namespace to interact with the barcode scanning-specific part of the SDK.
3073
+ */
3074
+ export namespace barCode {
3075
+ /**
3076
+ * Data structure to customize the barcode scanning experience in scanBarCode API.
3077
+ * All properties in BarCodeConfig are optional and have default values in the platform
3078
+ */
3079
+ interface BarCodeConfig {
3080
+ /**
3081
+ * Optional; designates the scan timeout interval in seconds.
3082
+ * Default value is 30 seconds, max allowed value is 60 seconds.
3083
+ */
3084
+ timeOutIntervalInSec?: number;
3085
+ }
3086
+ /**
3087
+ * Scan Barcode or QRcode using camera
3088
+ *
3089
+ * @param barCodeConfig - input configuration to customize the barcode scanning experience
3090
+ *
3091
+ * @returns a scanned code
3092
+ */
3093
+ function scanBarCode(barCodeConfig: BarCodeConfig): Promise<string>;
3094
+ /**
3095
+ * Checks whether or not media has user permission
3096
+ *
3097
+ * @returns true if the user has granted the app permission to media information, false otherwise
3098
+ */
3099
+ function hasPermission(): Promise<boolean>;
3100
+ /**
3101
+ * Requests user permission for media
3102
+ *
3103
+ * @returns true if the user has granted the app permission to the media, false otherwise
3104
+ */
3105
+ function requestPermission(): Promise<boolean>;
3106
+ /**
3107
+ * Checks if barCode capability is supported by the host
3108
+ *
3109
+ * @returns boolean to represent whether barCode is supported
3110
+ */
3111
+ function isSupported(): boolean;
3112
+ }
3113
+
2964
3114
  /**
2965
3115
  * Describes information needed to start a chat
2966
3116
  *
@@ -3170,6 +3320,103 @@ export namespace dialog {
3170
3320
  function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo: BotUrlDialogInfo): DialogInfo;
3171
3321
  }
3172
3322
 
3323
+ /**
3324
+ * Namespace to interact with the geoLocation module-specific part of the SDK. This is the newer version of location module.
3325
+ *
3326
+ * @beta
3327
+ */
3328
+ export namespace geoLocation {
3329
+ /**
3330
+ * Data struture to represent the location information
3331
+ *
3332
+ * @beta
3333
+ */
3334
+ interface Location {
3335
+ /**
3336
+ Latitude of the location
3337
+ */
3338
+ latitude: number;
3339
+ /**
3340
+ Longitude of the location
3341
+ */
3342
+ longitude: number;
3343
+ /**
3344
+ Accuracy of the coordinates captured
3345
+ */
3346
+ accuracy?: number;
3347
+ /**
3348
+ Time stamp when the location was captured
3349
+ */
3350
+ timestamp?: number;
3351
+ }
3352
+ /**
3353
+ * Fetches current user coordinates
3354
+ * @returns Promise that will resolve with {@link geoLocation.Location} object or reject with an error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
3355
+ *
3356
+ * @beta
3357
+ */
3358
+ function getCurrentLocation(): Promise<Location>;
3359
+ /**
3360
+ * Checks whether or not location has user permission
3361
+ *
3362
+ * @returns Promise that will resolve with true if the user had granted the app permission to location information, or with false otherwise,
3363
+ * In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
3364
+ *
3365
+ * @beta
3366
+ */
3367
+ function hasPermission(): Promise<boolean>;
3368
+ /**
3369
+ * Requests user permission for location
3370
+ *
3371
+ * @returns true if the user consented permission for location, false otherwise
3372
+ * @returns Promise that will resolve with true if the user consented permission for location, or with false otherwise,
3373
+ * In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
3374
+ *
3375
+ * @beta
3376
+ */
3377
+ function requestPermission(): Promise<boolean>;
3378
+ /**
3379
+ * Checks if geoLocation capability is supported by the host
3380
+ *
3381
+ * @returns boolean to represent whether geoLocation is supported
3382
+ *
3383
+ * @beta
3384
+ */
3385
+ function isSupported(): boolean;
3386
+ /**
3387
+ * Namespace to interact with the location on map module-specific part of the SDK.
3388
+ *
3389
+ * @beta
3390
+ */
3391
+ namespace map {
3392
+ /**
3393
+ * Allows user to choose location on map
3394
+ *
3395
+ * @returns Promise that will resolve with {@link geoLocation.Location} object chosen by the user or reject with an error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
3396
+ *
3397
+ * @beta
3398
+ */
3399
+ function chooseLocation(): Promise<Location>;
3400
+ /**
3401
+ * Shows the location on map corresponding to the given coordinates
3402
+ *
3403
+ * @param location - Location to be shown on the map
3404
+ * @returns Promise that resolves when the location dialog has been closed or reject with an error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
3405
+ *
3406
+ * @beta
3407
+ */
3408
+ function showLocation(location: Location): Promise<void>;
3409
+ /**
3410
+ * Checks if geoLocation.map capability is supported by the host
3411
+ *
3412
+ * @returns boolean to represent whether geoLocation.map is supported
3413
+ *
3414
+ * @beta
3415
+ */
3416
+ function isSupported(): boolean;
3417
+ }
3418
+ }
3419
+
3173
3420
  /**
3174
3421
  * Navigation-specific part of the SDK.
3175
3422
  *
@@ -4078,6 +4325,9 @@ export namespace media {
4078
4325
  timeOutIntervalInSec?: number;
4079
4326
  }
4080
4327
  /**
4328
+ * @deprecated
4329
+ * As of 2.1.0, please use {@link barCode.scanBarCode barCode.scanBarCode(config?: BarCodeConfig): Promise\<string\>} instead.
4330
+
4081
4331
  * Scan Barcode/QRcode using camera
4082
4332
  *
4083
4333
  * @remarks
@@ -4090,7 +4340,17 @@ export namespace media {
4090
4340
  export {};
4091
4341
  }
4092
4342
 
4343
+ /**
4344
+ * @deprecated
4345
+ * As of 2.1.0, please use geoLocation namespace.
4346
+ *
4347
+ * Namespace to interact with the location module-specific part of the SDK.
4348
+ */
4093
4349
  export namespace location {
4350
+ /**
4351
+ * @deprecated
4352
+ * Data Structure to set the location properties in getLocation call.
4353
+ */
4094
4354
  interface LocationProps {
4095
4355
  /**
4096
4356
  whether user can alter location or not
@@ -4106,6 +4366,10 @@ export namespace location {
4106
4366
  */
4107
4367
  showMap?: boolean;
4108
4368
  }
4369
+ /**
4370
+ * @deprecated
4371
+ * Data struture to represent the location information
4372
+ */
4109
4373
  interface Location {
4110
4374
  /**
4111
4375
  Latitude of the location
@@ -4124,36 +4388,35 @@ export namespace location {
4124
4388
  */
4125
4389
  timestamp?: number;
4126
4390
  }
4127
- /**
4128
- * Fetches current user coordinates or allows user to choose location on map
4129
- *
4130
- * @param props {@link LocationProps} - Specifying how the location request is handled
4131
- * @returns Promise that will be fulfilled when the operation has completed
4132
- */
4133
- function getLocation(props: LocationProps): Promise<Location>;
4134
4391
  /**
4135
4392
  * @deprecated
4136
- * As of 2.0.0, please use {@link location.getLocation location.getLocation(props: LocationProps): Promise\<Location\>} instead.
4393
+ * As of 2.1.0, please use one of the following functions:
4394
+ * - {@link geoLocation.getCurrentLocation geoLocation.getCurrentLocation(): Promise\<Location\>} to get the current location.
4395
+ * - {@link geoLocation.map.chooseLocation geoLocation.map.chooseLocation(): Promise\<Location\>} to choose location on map.
4396
+ *
4397
+ * Fetches user location
4137
4398
  * @param props {@link LocationProps} - Specifying how the location request is handled
4138
4399
  * @param callback - Callback to invoke when current user location is fetched
4139
4400
  */
4140
4401
  function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void;
4141
4402
  /**
4403
+ * @deprecated
4404
+ * As of 2.1.0, please use {@link geoLocation.map.showLocation geoLocation.map.showLocation(location: Location): Promise\<void\>} instead.
4405
+ *
4142
4406
  * Shows the location on map corresponding to the given coordinates
4143
4407
  *
4144
- * @param location {@link Location} - which needs to be shown on map
4145
- * @returns Promise that will be fulfilled when the operation has completed
4408
+ * @param location - Location to be shown on the map
4409
+ * @param callback - Callback to invoke when the location is opened on map
4146
4410
  */
4147
- function showLocation(location: Location): Promise<void>;
4411
+ function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
4148
4412
  /**
4149
4413
  * @deprecated
4150
- * As of 2.0.0, please use {@link location.showLocation location.showLocation(location: Location): Promise\<void\>} instead.
4151
- * Shows the location on map corresponding to the given coordinates
4152
- * @param location {@link Location} - which needs to be shown on map
4153
- * @param callback - Callback to invoke when the location is opened on map
4414
+ * As of 2.1.0, please use geoLocation namespace, and use {@link geoLocation.isSupported geoLocation.isSupported: boolean} to check if geoLocation is supported.
4415
+ *
4416
+ * Checks if Location capability is supported by the host
4417
+ *
4418
+ * @returns boolean to represent whether Location is supported
4154
4419
  */
4155
- function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
4156
- function showLocationHelper(location: Location): Promise<void>;
4157
4420
  function isSupported(): boolean;
4158
4421
  }
4159
4422
 
@@ -4802,10 +5065,12 @@ export namespace profile {
4802
5065
 
4803
5066
  /**
4804
5067
  * Namespace to video extensibility of the SDK
5068
+ * @beta
4805
5069
  */
4806
5070
  export namespace video {
4807
5071
  /**
4808
5072
  * Represents a video frame
5073
+ * @beta
4809
5074
  */
4810
5075
  interface VideoFrame {
4811
5076
  /**
@@ -4835,21 +5100,24 @@ export namespace video {
4835
5100
  }
4836
5101
  /**
4837
5102
  * Video frame format enum, currently only support NV12
5103
+ * @beta
4838
5104
  */
4839
5105
  enum VideoFrameFormat {
4840
5106
  NV12 = 0
4841
5107
  }
4842
5108
  /**
4843
5109
  * Video frame configuration supplied to the host to customize the generated video frame parameters, like format
5110
+ * @beta
4844
5111
  */
4845
5112
  interface VideoFrameConfig {
4846
5113
  /**
4847
- * video format
5114
+ * Video format
4848
5115
  */
4849
5116
  format: VideoFrameFormat;
4850
5117
  }
4851
5118
  /**
4852
- * Video effect change type enum
5119
+ * Video effect change type enum
5120
+ * @beta
4853
5121
  */
4854
5122
  enum EffectChangeType {
4855
5123
  /**
@@ -4862,35 +5130,40 @@ export namespace video {
4862
5130
  EffectDisabled = 1
4863
5131
  }
4864
5132
  /**
4865
- * Video frame call back function definition
5133
+ * Video frame call back function definition
5134
+ * @beta
4866
5135
  */
4867
5136
  type VideoFrameCallback = (frame: VideoFrame, notifyVideoFrameProcessed: () => void, notifyError: (errorMessage: string) => void) => void;
4868
5137
  /**
4869
- * Video effect change call back function definition
5138
+ * Video effect change call back function definition
5139
+ * @beta
4870
5140
  */
4871
5141
  type VideoEffectCallBack = (effectId: string | undefined) => void;
4872
5142
  /**
4873
5143
  * Register to read the video frames in Permissions section
5144
+ * @beta
4874
5145
  * @param frameCallback - The callback to invoke when registerForVideoFrame has completed
4875
5146
  * @param config - VideoFrameConfig to customize generated video frame parameters
4876
5147
  */
4877
5148
  function registerForVideoFrame(frameCallback: VideoFrameCallback, config: VideoFrameConfig): void;
4878
5149
  /**
4879
- * video extension should call this to notify host client that the current selected effect parameter changed.
5150
+ * Video extension should call this to notify host client that the current selected effect parameter changed.
4880
5151
  * If it's pre-meeting, host client will call videoEffectCallback immediately then use the videoEffect.
4881
5152
  * If it's the in-meeting scenario, we will call videoEffectCallback when apply button clicked.
4882
- *
5153
+ * @beta
4883
5154
  * @param effectChangeType - the effect change type.
4884
5155
  * @param effectId - Newly selected effect id.
4885
5156
  */
4886
5157
  function notifySelectedVideoEffectChanged(effectChangeType: EffectChangeType, effectId: string | undefined): void;
4887
5158
  /**
4888
5159
  * Register the video effect callback, host client uses this to notify the video extension the new video effect will by applied
5160
+ * @beta
4889
5161
  * @param callback - The VideoEffectCallback to invoke when registerForVideoEffect has completed
4890
5162
  */
4891
5163
  function registerForVideoEffect(callback: VideoEffectCallBack): void;
4892
5164
  /**
4893
5165
  * Checks if video capability is supported by the host
5166
+ * @beta
4894
5167
  * @returns true if the video capability is enabled in runtime.supports.video and
4895
5168
  * false if it is disabled
4896
5169
  */
@@ -4949,6 +5222,8 @@ export namespace sharing {
4949
5222
 
4950
5223
  /**
4951
5224
  * Namespace to interact with the stage view specific part of the SDK.
5225
+ *
5226
+ * @beta
4952
5227
  */
4953
5228
  export namespace stageView {
4954
5229
  /**
@@ -4985,10 +5260,42 @@ export namespace stageView {
4985
5260
  * Feature is under development
4986
5261
  *
4987
5262
  * Opens a stage view to display a Teams application
5263
+ * @beta
4988
5264
  * @param stageViewParams - The parameters to pass into the stage view.
4989
5265
  * @returns Promise that resolves or rejects with an error once the stage view is closed.
4990
5266
  */
4991
5267
  function open(stageViewParams: StageViewParams): Promise<void>;
5268
+ /**
5269
+ * Checks if stageView capability is supported by the host
5270
+ * @beta
5271
+ * @returns true if the stageView capability is enabled in runtime.supports.stageView and
5272
+ * false if it is disabled
5273
+ */
5274
+ function isSupported(): boolean;
5275
+ }
5276
+
5277
+ /**
5278
+ * Contains functionality to allow web apps to store data in webview cache
5279
+ *
5280
+ * @beta
5281
+ */
5282
+ export namespace webStorage {
5283
+ /**
5284
+ * Checks if web storage gets cleared when a user logs out from host client
5285
+ *
5286
+ * @returns true is web storage gets cleared on logout and false if it does not
5287
+ *
5288
+ * @beta
5289
+ */
5290
+ function isWebStorageClearedOnUserLogOut(): boolean;
5291
+ /**
5292
+ * Checks if webStorage capability is supported by the host
5293
+ * @returns true if the webStorage capability is enabled in runtime.supports.webStorage and
5294
+ * false if it is disabled
5295
+ *
5296
+ * @beta
5297
+ */
5298
+ function isSupported(): boolean;
4992
5299
  }
4993
5300
 
4994
5301
  export namespace call {
@@ -5459,7 +5766,9 @@ export namespace tasks {
5459
5766
  /**
5460
5767
  * @deprecated
5461
5768
  * As of 2.0.0, please use {@link dialog.open dialog.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
5462
- * and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs.
5769
+ * and {@link dialog.bot.open dialog.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot based dialogs. In Teams,
5770
+ * this function can be used for adaptive card based dialogs. Support for adaptive card based dialogs is coming to other hosts in the future.
5771
+ *
5463
5772
  * Allows an app to open the task module.
5464
5773
  *
5465
5774
  * @param taskInfo - An object containing the parameters of the task module