@microsoft/teams-js 2.0.0-beta.6-dev.18 → 2.0.0-beta.6-dev.21
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/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Microsoft Teams JavaScript client SDK
|
2
2
|
|
3
|
-
Welcome to the Teams JavaScript client SDK! For breaking changes, please refer to our [changelog](./CHANGELOG.md) in the current `<root>/packages/teams-js` directory of the `
|
3
|
+
Welcome to the Teams JavaScript client SDK! For breaking changes, please refer to our [changelog](./CHANGELOG.md) in the current `<root>/packages/teams-js` directory of the `main` branch.
|
4
4
|
|
5
5
|
This JavaScript library is part of the [Microsoft Teams developer platform](https://docs.microsoft.com/en-us/microsoftteams/platform/overview?view=msteams-client-js-beta). See full [SDK reference documentation](https://docs.microsoft.com/en-us/javascript/api/overview/msteams-client?view=msteams-client-js-beta).
|
6
6
|
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -1760,6 +1760,11 @@ export enum FileOpenPreference {
|
|
1760
1760
|
Desktop = "desktop",
|
1761
1761
|
Web = "web"
|
1762
1762
|
}
|
1763
|
+
/**
|
1764
|
+
* @deprecated
|
1765
|
+
* As of 2.0.0-beta.1, please use {@link app.Context} instead.
|
1766
|
+
* Represents structure of the received context message.
|
1767
|
+
*/
|
1763
1768
|
export interface Context {
|
1764
1769
|
/**
|
1765
1770
|
* @hidden
|
@@ -2297,26 +2302,78 @@ export namespace app {
|
|
2297
2302
|
Failure: string;
|
2298
2303
|
ExpectedFailure: string;
|
2299
2304
|
};
|
2305
|
+
/**
|
2306
|
+
* Describes errors that caused app initialization to fail
|
2307
|
+
*/
|
2300
2308
|
enum FailedReason {
|
2309
|
+
/**
|
2310
|
+
* Authentication failed
|
2311
|
+
*/
|
2301
2312
|
AuthFailed = "AuthFailed",
|
2313
|
+
/**
|
2314
|
+
* The application timed out
|
2315
|
+
*/
|
2302
2316
|
Timeout = "Timeout",
|
2317
|
+
/**
|
2318
|
+
* The app failed for a different reason
|
2319
|
+
*/
|
2303
2320
|
Other = "Other"
|
2304
2321
|
}
|
2322
|
+
/**
|
2323
|
+
* Describes expected errors that occurred during an otherwise successful
|
2324
|
+
* app initialization
|
2325
|
+
*/
|
2305
2326
|
enum ExpectedFailureReason {
|
2327
|
+
/**
|
2328
|
+
* There was a permission error
|
2329
|
+
*/
|
2306
2330
|
PermissionError = "PermissionError",
|
2331
|
+
/**
|
2332
|
+
* The item was not found
|
2333
|
+
*/
|
2307
2334
|
NotFound = "NotFound",
|
2335
|
+
/**
|
2336
|
+
* The network is currently throttled
|
2337
|
+
*/
|
2308
2338
|
Throttling = "Throttling",
|
2339
|
+
/**
|
2340
|
+
* The application is currently offline
|
2341
|
+
*/
|
2309
2342
|
Offline = "Offline",
|
2343
|
+
/**
|
2344
|
+
* The app failed for a different reason
|
2345
|
+
*/
|
2310
2346
|
Other = "Other"
|
2311
2347
|
}
|
2348
|
+
/**
|
2349
|
+
* Represents the failed request sent during a failed app initialization.
|
2350
|
+
*/
|
2312
2351
|
interface IFailedRequest {
|
2352
|
+
/**
|
2353
|
+
* The reason for the failure
|
2354
|
+
*/
|
2313
2355
|
reason: FailedReason;
|
2356
|
+
/**
|
2357
|
+
* A message that describes the failure
|
2358
|
+
*/
|
2314
2359
|
message?: string;
|
2315
2360
|
}
|
2361
|
+
/**
|
2362
|
+
* Represents the failure request sent during an erroneous app initialization.
|
2363
|
+
*/
|
2316
2364
|
interface IExpectedFailureRequest {
|
2365
|
+
/**
|
2366
|
+
* The reason for the failure
|
2367
|
+
*/
|
2317
2368
|
reason: ExpectedFailureReason;
|
2369
|
+
/**
|
2370
|
+
* A message that describes the failure
|
2371
|
+
*/
|
2318
2372
|
message?: string;
|
2319
2373
|
}
|
2374
|
+
/**
|
2375
|
+
* Represents application information.
|
2376
|
+
*/
|
2320
2377
|
interface AppInfo {
|
2321
2378
|
/**
|
2322
2379
|
* The current locale that the user has configured for the app formatted as
|
@@ -2363,6 +2420,9 @@ export namespace app {
|
|
2363
2420
|
*/
|
2364
2421
|
appLaunchId?: string;
|
2365
2422
|
}
|
2423
|
+
/**
|
2424
|
+
* Represents information about the application's host.
|
2425
|
+
*/
|
2366
2426
|
interface AppHostInfo {
|
2367
2427
|
/**
|
2368
2428
|
* The name of the host client. Possible values are: Office, Orange, Outlook, Teams
|
@@ -2381,6 +2441,9 @@ export namespace app {
|
|
2381
2441
|
*/
|
2382
2442
|
ringId?: string;
|
2383
2443
|
}
|
2444
|
+
/**
|
2445
|
+
* Represents Channel information.
|
2446
|
+
*/
|
2384
2447
|
interface ChannelInfo {
|
2385
2448
|
/**
|
2386
2449
|
* The Microsoft Teams ID for the channel with which the content is associated.
|
@@ -2411,18 +2474,27 @@ export namespace app {
|
|
2411
2474
|
*/
|
2412
2475
|
ownerGroupId?: string;
|
2413
2476
|
}
|
2477
|
+
/**
|
2478
|
+
* Represents Chat information.
|
2479
|
+
*/
|
2414
2480
|
interface ChatInfo {
|
2415
2481
|
/**
|
2416
2482
|
* The Microsoft Teams ID for the chat with which the content is associated.
|
2417
2483
|
*/
|
2418
2484
|
id: string;
|
2419
2485
|
}
|
2486
|
+
/**
|
2487
|
+
* Represents Meeting information.
|
2488
|
+
*/
|
2420
2489
|
interface MeetingInfo {
|
2421
2490
|
/**
|
2422
2491
|
* Meeting Id used by tab when running in meeting context
|
2423
2492
|
*/
|
2424
2493
|
id: string;
|
2425
2494
|
}
|
2495
|
+
/**
|
2496
|
+
* Represents Page information.
|
2497
|
+
*/
|
2426
2498
|
interface PageInfo {
|
2427
2499
|
/**
|
2428
2500
|
* The developer-defined unique ID for the page this content points to.
|
@@ -2451,6 +2523,9 @@ export namespace app {
|
|
2451
2523
|
*/
|
2452
2524
|
sourceOrigin?: string;
|
2453
2525
|
}
|
2526
|
+
/**
|
2527
|
+
* Represents Team information.
|
2528
|
+
*/
|
2454
2529
|
interface TeamInfo {
|
2455
2530
|
/**
|
2456
2531
|
* The Microsoft Teams ID for the team with which the content is associated.
|
@@ -2485,6 +2560,9 @@ export namespace app {
|
|
2485
2560
|
*/
|
2486
2561
|
userRole?: UserTeamRole;
|
2487
2562
|
}
|
2563
|
+
/**
|
2564
|
+
* Represents User information.
|
2565
|
+
*/
|
2488
2566
|
interface UserInfo {
|
2489
2567
|
/**
|
2490
2568
|
* The Azure AD object id of the current user.
|
@@ -2528,6 +2606,9 @@ export namespace app {
|
|
2528
2606
|
*/
|
2529
2607
|
tenant?: TenantInfo;
|
2530
2608
|
}
|
2609
|
+
/**
|
2610
|
+
* Represents Tenant information.
|
2611
|
+
*/
|
2531
2612
|
interface TenantInfo {
|
2532
2613
|
/**
|
2533
2614
|
* The Azure AD tenant ID of the current user.
|
@@ -2568,7 +2649,7 @@ export namespace app {
|
|
2568
2649
|
mySitePath?: string;
|
2569
2650
|
}
|
2570
2651
|
/**
|
2571
|
-
* Represents structure of the context message
|
2652
|
+
* Represents structure of the received context message.
|
2572
2653
|
*/
|
2573
2654
|
interface Context {
|
2574
2655
|
/**
|
@@ -2614,7 +2695,7 @@ export namespace app {
|
|
2614
2695
|
*/
|
2615
2696
|
function isInitialized(): boolean;
|
2616
2697
|
/**
|
2617
|
-
* Gets the Frame Context that the App is running in. {@
|
2698
|
+
* Gets the Frame Context that the App is running in. See {@link FrameContexts} for the list of possible values.
|
2618
2699
|
* @returns the Frame Context.
|
2619
2700
|
*/
|
2620
2701
|
function getFrameContext(): FrameContexts;
|
@@ -2651,7 +2732,7 @@ export namespace app {
|
|
2651
2732
|
/**
|
2652
2733
|
* Retrieves the current context the frame is running in.
|
2653
2734
|
*
|
2654
|
-
* @returns Promise that will resolve with the {@link Context} object.
|
2735
|
+
* @returns Promise that will resolve with the {@link app.Context} object.
|
2655
2736
|
*/
|
2656
2737
|
function getContext(): Promise<app.Context>;
|
2657
2738
|
/**
|
@@ -2664,10 +2745,15 @@ export namespace app {
|
|
2664
2745
|
function notifySuccess(): void;
|
2665
2746
|
/**
|
2666
2747
|
* Notifies the frame that app initialization has failed and to show an error page in its place.
|
2748
|
+
*
|
2749
|
+
* @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
|
2750
|
+
* during initialization as well as an optional message.
|
2667
2751
|
*/
|
2668
2752
|
function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
|
2669
2753
|
/**
|
2670
2754
|
* Notifies the frame that app initialized with some expected errors.
|
2755
|
+
*
|
2756
|
+
* @param expectedFailureRequest - The expected failure request containing the reason and an optional message
|
2671
2757
|
*/
|
2672
2758
|
function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
|
2673
2759
|
/**
|
@@ -4566,25 +4652,32 @@ export namespace appInitialization {
|
|
4566
4652
|
/**
|
4567
4653
|
* @deprecated
|
4568
4654
|
* As of 2.0.0-beta.1, please use {@link app.notifyAppLoaded app.notifyAppLoaded(): void} instead.
|
4655
|
+
*
|
4569
4656
|
* Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
|
4570
4657
|
*/
|
4571
4658
|
function notifyAppLoaded(): void;
|
4572
4659
|
/**
|
4573
4660
|
* @deprecated
|
4574
4661
|
* As of 2.0.0-beta.1, please use {@link app.notifySuccess app.notifySuccess(): void} instead.
|
4662
|
+
*
|
4575
4663
|
* Notifies the frame that app initialization is successful and is ready for user interaction.
|
4576
4664
|
*/
|
4577
4665
|
function notifySuccess(): void;
|
4578
4666
|
/**
|
4579
4667
|
* @deprecated
|
4580
4668
|
* As of 2.0.0-beta.1, please use {@link app.notifyFailure app.notifyFailure(appInitializationFailedRequest: IFailedRequest): void} instead.
|
4669
|
+
*
|
4581
4670
|
* Notifies the frame that app initialization has failed and to show an error page in its place.
|
4671
|
+
* @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
|
4672
|
+
* during initialization as well as an optional message.
|
4582
4673
|
*/
|
4583
4674
|
function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
|
4584
4675
|
/**
|
4585
4676
|
* @deprecated
|
4586
4677
|
* As of 2.0.0-beta.1, please use {@link app.notifyExpectedFailure app.notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void} instead.
|
4678
|
+
*
|
4587
4679
|
* Notifies the frame that app initialized with some expected errors.
|
4680
|
+
* @param expectedFailureRequest - The expected failure request containing the reason and an optional message
|
4588
4681
|
*/
|
4589
4682
|
function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
|
4590
4683
|
}
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -1122,7 +1122,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
1122
1122
|
});
|
1123
1123
|
|
1124
1124
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1125
|
-
var version = "2.0.0-beta.6-dev.
|
1125
|
+
var version = "2.0.0-beta.6-dev.21";
|
1126
1126
|
/**
|
1127
1127
|
* @hidden
|
1128
1128
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
@@ -3027,18 +3027,49 @@ var app_app;
|
|
3027
3027
|
Failure: 'appInitialization.failure',
|
3028
3028
|
ExpectedFailure: 'appInitialization.expectedFailure',
|
3029
3029
|
};
|
3030
|
+
/**
|
3031
|
+
* Describes errors that caused app initialization to fail
|
3032
|
+
*/
|
3030
3033
|
var FailedReason;
|
3031
3034
|
(function (FailedReason) {
|
3035
|
+
/**
|
3036
|
+
* Authentication failed
|
3037
|
+
*/
|
3032
3038
|
FailedReason["AuthFailed"] = "AuthFailed";
|
3039
|
+
/**
|
3040
|
+
* The application timed out
|
3041
|
+
*/
|
3033
3042
|
FailedReason["Timeout"] = "Timeout";
|
3043
|
+
/**
|
3044
|
+
* The app failed for a different reason
|
3045
|
+
*/
|
3034
3046
|
FailedReason["Other"] = "Other";
|
3035
3047
|
})(FailedReason = app.FailedReason || (app.FailedReason = {}));
|
3048
|
+
/**
|
3049
|
+
* Describes expected errors that occurred during an otherwise successful
|
3050
|
+
* app initialization
|
3051
|
+
*/
|
3036
3052
|
var ExpectedFailureReason;
|
3037
3053
|
(function (ExpectedFailureReason) {
|
3054
|
+
/**
|
3055
|
+
* There was a permission error
|
3056
|
+
*/
|
3038
3057
|
ExpectedFailureReason["PermissionError"] = "PermissionError";
|
3058
|
+
/**
|
3059
|
+
* The item was not found
|
3060
|
+
*/
|
3039
3061
|
ExpectedFailureReason["NotFound"] = "NotFound";
|
3062
|
+
/**
|
3063
|
+
* The network is currently throttled
|
3064
|
+
*/
|
3040
3065
|
ExpectedFailureReason["Throttling"] = "Throttling";
|
3066
|
+
/**
|
3067
|
+
* The application is currently offline
|
3068
|
+
*/
|
3041
3069
|
ExpectedFailureReason["Offline"] = "Offline";
|
3070
|
+
/**
|
3071
|
+
* The app failed for a different reason
|
3072
|
+
*/
|
3042
3073
|
ExpectedFailureReason["Other"] = "Other";
|
3043
3074
|
})(ExpectedFailureReason = app.ExpectedFailureReason || (app.ExpectedFailureReason = {}));
|
3044
3075
|
/**
|
@@ -3050,7 +3081,7 @@ var app_app;
|
|
3050
3081
|
}
|
3051
3082
|
app.isInitialized = isInitialized;
|
3052
3083
|
/**
|
3053
|
-
* Gets the Frame Context that the App is running in. {@
|
3084
|
+
* Gets the Frame Context that the App is running in. See {@link FrameContexts} for the list of possible values.
|
3054
3085
|
* @returns the Frame Context.
|
3055
3086
|
*/
|
3056
3087
|
function getFrameContext() {
|
@@ -3198,7 +3229,7 @@ var app_app;
|
|
3198
3229
|
/**
|
3199
3230
|
* Retrieves the current context the frame is running in.
|
3200
3231
|
*
|
3201
|
-
* @returns Promise that will resolve with the {@link Context} object.
|
3232
|
+
* @returns Promise that will resolve with the {@link app.Context} object.
|
3202
3233
|
*/
|
3203
3234
|
function getContext() {
|
3204
3235
|
return new Promise(function (resolve) {
|
@@ -3225,6 +3256,9 @@ var app_app;
|
|
3225
3256
|
app.notifySuccess = notifySuccess;
|
3226
3257
|
/**
|
3227
3258
|
* Notifies the frame that app initialization has failed and to show an error page in its place.
|
3259
|
+
*
|
3260
|
+
* @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
|
3261
|
+
* during initialization as well as an optional message.
|
3228
3262
|
*/
|
3229
3263
|
function notifyFailure(appInitializationFailedRequest) {
|
3230
3264
|
ensureInitialized();
|
@@ -3236,6 +3270,8 @@ var app_app;
|
|
3236
3270
|
app.notifyFailure = notifyFailure;
|
3237
3271
|
/**
|
3238
3272
|
* Notifies the frame that app initialized with some expected errors.
|
3273
|
+
*
|
3274
|
+
* @param expectedFailureRequest - The expected failure request containing the reason and an optional message
|
3239
3275
|
*/
|
3240
3276
|
function notifyExpectedFailure(expectedFailureRequest) {
|
3241
3277
|
ensureInitialized();
|
@@ -6301,6 +6337,7 @@ var appInitialization;
|
|
6301
6337
|
/**
|
6302
6338
|
* @deprecated
|
6303
6339
|
* As of 2.0.0-beta.1, please use {@link app.notifyAppLoaded app.notifyAppLoaded(): void} instead.
|
6340
|
+
*
|
6304
6341
|
* Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
|
6305
6342
|
*/
|
6306
6343
|
function notifyAppLoaded() {
|
@@ -6310,6 +6347,7 @@ var appInitialization;
|
|
6310
6347
|
/**
|
6311
6348
|
* @deprecated
|
6312
6349
|
* As of 2.0.0-beta.1, please use {@link app.notifySuccess app.notifySuccess(): void} instead.
|
6350
|
+
*
|
6313
6351
|
* Notifies the frame that app initialization is successful and is ready for user interaction.
|
6314
6352
|
*/
|
6315
6353
|
function notifySuccess() {
|
@@ -6319,7 +6357,10 @@ var appInitialization;
|
|
6319
6357
|
/**
|
6320
6358
|
* @deprecated
|
6321
6359
|
* As of 2.0.0-beta.1, please use {@link app.notifyFailure app.notifyFailure(appInitializationFailedRequest: IFailedRequest): void} instead.
|
6360
|
+
*
|
6322
6361
|
* Notifies the frame that app initialization has failed and to show an error page in its place.
|
6362
|
+
* @param appInitializationFailedRequest - The failure request containing the reason for why the app failed
|
6363
|
+
* during initialization as well as an optional message.
|
6323
6364
|
*/
|
6324
6365
|
function notifyFailure(appInitializationFailedRequest) {
|
6325
6366
|
app_app.notifyFailure(appInitializationFailedRequest);
|
@@ -6328,7 +6369,9 @@ var appInitialization;
|
|
6328
6369
|
/**
|
6329
6370
|
* @deprecated
|
6330
6371
|
* As of 2.0.0-beta.1, please use {@link app.notifyExpectedFailure app.notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void} instead.
|
6372
|
+
*
|
6331
6373
|
* Notifies the frame that app initialized with some expected errors.
|
6374
|
+
* @param expectedFailureRequest - The expected failure request containing the reason and an optional message
|
6332
6375
|
*/
|
6333
6376
|
function notifyExpectedFailure(expectedFailureRequest) {
|
6334
6377
|
app_app.notifyExpectedFailure(expectedFailureRequest);
|
@@ -7764,6 +7807,7 @@ var remoteCamera;
|
|
7764
7807
|
|
7765
7808
|
|
7766
7809
|
|
7810
|
+
|
7767
7811
|
/**
|
7768
7812
|
* @hidden
|
7769
7813
|
* Namespace to interact with the application entities specific part of the SDK.
|
@@ -7785,6 +7829,9 @@ var appEntity;
|
|
7785
7829
|
*/
|
7786
7830
|
function selectAppEntity(threadId, categories, subEntityId, callback) {
|
7787
7831
|
ensureInitialized(FrameContexts.content);
|
7832
|
+
if (!isSupported()) {
|
7833
|
+
throw errorNotSupportedOnPlatform;
|
7834
|
+
}
|
7788
7835
|
if (!threadId || threadId.length == 0) {
|
7789
7836
|
throw new Error('[appEntity.selectAppEntity] threadId name cannot be null or empty');
|
7790
7837
|
}
|