@microsoft/teams-js 2.1.0-beta.4 → 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.
- package/dist/MicrosoftTeams.d.ts +188 -17
- package/dist/MicrosoftTeams.js +822 -542
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -2570,6 +2570,11 @@ export enum ErrorCode {
|
|
2570
2570
|
*/
|
2571
2571
|
SIZE_EXCEEDED = 10000
|
2572
2572
|
}
|
2573
|
+
/** @hidden */
|
2574
|
+
export enum DevicePermission {
|
2575
|
+
GeoLocation = "geolocation",
|
2576
|
+
Media = "media"
|
2577
|
+
}
|
2573
2578
|
|
2574
2579
|
/**
|
2575
2580
|
* Namespace to interact with app initialization and lifecycle.
|
@@ -3063,6 +3068,49 @@ export namespace appInstallDialog {
|
|
3063
3068
|
function isSupported(): boolean;
|
3064
3069
|
}
|
3065
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
|
+
|
3066
3114
|
/**
|
3067
3115
|
* Describes information needed to start a chat
|
3068
3116
|
*
|
@@ -3272,6 +3320,103 @@ export namespace dialog {
|
|
3272
3320
|
function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo: BotUrlDialogInfo): DialogInfo;
|
3273
3321
|
}
|
3274
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
|
+
|
3275
3420
|
/**
|
3276
3421
|
* Navigation-specific part of the SDK.
|
3277
3422
|
*
|
@@ -4180,6 +4325,9 @@ export namespace media {
|
|
4180
4325
|
timeOutIntervalInSec?: number;
|
4181
4326
|
}
|
4182
4327
|
/**
|
4328
|
+
* @deprecated
|
4329
|
+
* As of 2.1.0, please use {@link barCode.scanBarCode barCode.scanBarCode(config?: BarCodeConfig): Promise\<string\>} instead.
|
4330
|
+
|
4183
4331
|
* Scan Barcode/QRcode using camera
|
4184
4332
|
*
|
4185
4333
|
* @remarks
|
@@ -4192,7 +4340,17 @@ export namespace media {
|
|
4192
4340
|
export {};
|
4193
4341
|
}
|
4194
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
|
+
*/
|
4195
4349
|
export namespace location {
|
4350
|
+
/**
|
4351
|
+
* @deprecated
|
4352
|
+
* Data Structure to set the location properties in getLocation call.
|
4353
|
+
*/
|
4196
4354
|
interface LocationProps {
|
4197
4355
|
/**
|
4198
4356
|
whether user can alter location or not
|
@@ -4208,6 +4366,10 @@ export namespace location {
|
|
4208
4366
|
*/
|
4209
4367
|
showMap?: boolean;
|
4210
4368
|
}
|
4369
|
+
/**
|
4370
|
+
* @deprecated
|
4371
|
+
* Data struture to represent the location information
|
4372
|
+
*/
|
4211
4373
|
interface Location {
|
4212
4374
|
/**
|
4213
4375
|
Latitude of the location
|
@@ -4226,36 +4388,35 @@ export namespace location {
|
|
4226
4388
|
*/
|
4227
4389
|
timestamp?: number;
|
4228
4390
|
}
|
4229
|
-
/**
|
4230
|
-
* Fetches current user coordinates or allows user to choose location on map
|
4231
|
-
*
|
4232
|
-
* @param props {@link LocationProps} - Specifying how the location request is handled
|
4233
|
-
* @returns Promise that will be fulfilled when the operation has completed
|
4234
|
-
*/
|
4235
|
-
function getLocation(props: LocationProps): Promise<Location>;
|
4236
4391
|
/**
|
4237
4392
|
* @deprecated
|
4238
|
-
* As of 2.
|
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
|
4239
4398
|
* @param props {@link LocationProps} - Specifying how the location request is handled
|
4240
4399
|
* @param callback - Callback to invoke when current user location is fetched
|
4241
4400
|
*/
|
4242
4401
|
function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void;
|
4243
4402
|
/**
|
4403
|
+
* @deprecated
|
4404
|
+
* As of 2.1.0, please use {@link geoLocation.map.showLocation geoLocation.map.showLocation(location: Location): Promise\<void\>} instead.
|
4405
|
+
*
|
4244
4406
|
* Shows the location on map corresponding to the given coordinates
|
4245
4407
|
*
|
4246
|
-
* @param location
|
4247
|
-
* @
|
4408
|
+
* @param location - Location to be shown on the map
|
4409
|
+
* @param callback - Callback to invoke when the location is opened on map
|
4248
4410
|
*/
|
4249
|
-
function showLocation(location: Location):
|
4411
|
+
function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
|
4250
4412
|
/**
|
4251
4413
|
* @deprecated
|
4252
|
-
* As of 2.
|
4253
|
-
*
|
4254
|
-
*
|
4255
|
-
*
|
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
|
4256
4419
|
*/
|
4257
|
-
function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
|
4258
|
-
function showLocationHelper(location: Location): Promise<void>;
|
4259
4420
|
function isSupported(): boolean;
|
4260
4421
|
}
|
4261
4422
|
|
@@ -5061,6 +5222,8 @@ export namespace sharing {
|
|
5061
5222
|
|
5062
5223
|
/**
|
5063
5224
|
* Namespace to interact with the stage view specific part of the SDK.
|
5225
|
+
*
|
5226
|
+
* @beta
|
5064
5227
|
*/
|
5065
5228
|
export namespace stageView {
|
5066
5229
|
/**
|
@@ -5097,10 +5260,18 @@ export namespace stageView {
|
|
5097
5260
|
* Feature is under development
|
5098
5261
|
*
|
5099
5262
|
* Opens a stage view to display a Teams application
|
5263
|
+
* @beta
|
5100
5264
|
* @param stageViewParams - The parameters to pass into the stage view.
|
5101
5265
|
* @returns Promise that resolves or rejects with an error once the stage view is closed.
|
5102
5266
|
*/
|
5103
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;
|
5104
5275
|
}
|
5105
5276
|
|
5106
5277
|
/**
|