@microsoft/teams-js 2.0.0-beta.6-dev.21 → 2.0.0-beta.6
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
@@ -24,7 +24,7 @@ To install the latest [2.0 preview version](https://docs.microsoft.com/en-us/jav
|
|
24
24
|
|
25
25
|
### Production
|
26
26
|
|
27
|
-
You can access [these files on unpkg](https://res.cdn.office.net/teams-js/2.0.0-beta.
|
27
|
+
You can access [these files on unpkg](https://res.cdn.office.net/teams-js/2.0.0-beta.6/js/MicrosoftTeams.min.js), download them, or point your package manager to them.
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
@@ -45,13 +45,13 @@ Reference the SDK inside of your `.html` page using:
|
|
45
45
|
```html
|
46
46
|
<!-- Microsoft Teams JavaScript API (via CDN) -->
|
47
47
|
<script
|
48
|
-
src="https://res.cdn.office.net/teams-js/2.0.0-beta.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.0.0-beta.6/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-zUXDMKhIVeFW07S2xPrtvwSCnfjFTHafmXXzxnNT0ONpSv4NOmekx15PEdsHDDf4"
|
50
50
|
crossorigin="anonymous"
|
51
51
|
></script>
|
52
52
|
|
53
53
|
<!-- Microsoft Teams JavaScript API (via npm) -->
|
54
|
-
<script src="node_modules/@microsoft/teams-js@2.0.0-beta.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.0.0-beta.6/dist/MicrosoftTeams.min.js"></script>
|
55
55
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -1760,11 +1760,6 @@ 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
|
-
*/
|
1768
1763
|
export interface Context {
|
1769
1764
|
/**
|
1770
1765
|
* @hidden
|
@@ -2302,78 +2297,26 @@ export namespace app {
|
|
2302
2297
|
Failure: string;
|
2303
2298
|
ExpectedFailure: string;
|
2304
2299
|
};
|
2305
|
-
/**
|
2306
|
-
* Describes errors that caused app initialization to fail
|
2307
|
-
*/
|
2308
2300
|
enum FailedReason {
|
2309
|
-
/**
|
2310
|
-
* Authentication failed
|
2311
|
-
*/
|
2312
2301
|
AuthFailed = "AuthFailed",
|
2313
|
-
/**
|
2314
|
-
* The application timed out
|
2315
|
-
*/
|
2316
2302
|
Timeout = "Timeout",
|
2317
|
-
/**
|
2318
|
-
* The app failed for a different reason
|
2319
|
-
*/
|
2320
2303
|
Other = "Other"
|
2321
2304
|
}
|
2322
|
-
/**
|
2323
|
-
* Describes expected errors that occurred during an otherwise successful
|
2324
|
-
* app initialization
|
2325
|
-
*/
|
2326
2305
|
enum ExpectedFailureReason {
|
2327
|
-
/**
|
2328
|
-
* There was a permission error
|
2329
|
-
*/
|
2330
2306
|
PermissionError = "PermissionError",
|
2331
|
-
/**
|
2332
|
-
* The item was not found
|
2333
|
-
*/
|
2334
2307
|
NotFound = "NotFound",
|
2335
|
-
/**
|
2336
|
-
* The network is currently throttled
|
2337
|
-
*/
|
2338
2308
|
Throttling = "Throttling",
|
2339
|
-
/**
|
2340
|
-
* The application is currently offline
|
2341
|
-
*/
|
2342
2309
|
Offline = "Offline",
|
2343
|
-
/**
|
2344
|
-
* The app failed for a different reason
|
2345
|
-
*/
|
2346
2310
|
Other = "Other"
|
2347
2311
|
}
|
2348
|
-
/**
|
2349
|
-
* Represents the failed request sent during a failed app initialization.
|
2350
|
-
*/
|
2351
2312
|
interface IFailedRequest {
|
2352
|
-
/**
|
2353
|
-
* The reason for the failure
|
2354
|
-
*/
|
2355
2313
|
reason: FailedReason;
|
2356
|
-
/**
|
2357
|
-
* A message that describes the failure
|
2358
|
-
*/
|
2359
2314
|
message?: string;
|
2360
2315
|
}
|
2361
|
-
/**
|
2362
|
-
* Represents the failure request sent during an erroneous app initialization.
|
2363
|
-
*/
|
2364
2316
|
interface IExpectedFailureRequest {
|
2365
|
-
/**
|
2366
|
-
* The reason for the failure
|
2367
|
-
*/
|
2368
2317
|
reason: ExpectedFailureReason;
|
2369
|
-
/**
|
2370
|
-
* A message that describes the failure
|
2371
|
-
*/
|
2372
2318
|
message?: string;
|
2373
2319
|
}
|
2374
|
-
/**
|
2375
|
-
* Represents application information.
|
2376
|
-
*/
|
2377
2320
|
interface AppInfo {
|
2378
2321
|
/**
|
2379
2322
|
* The current locale that the user has configured for the app formatted as
|
@@ -2420,9 +2363,6 @@ export namespace app {
|
|
2420
2363
|
*/
|
2421
2364
|
appLaunchId?: string;
|
2422
2365
|
}
|
2423
|
-
/**
|
2424
|
-
* Represents information about the application's host.
|
2425
|
-
*/
|
2426
2366
|
interface AppHostInfo {
|
2427
2367
|
/**
|
2428
2368
|
* The name of the host client. Possible values are: Office, Orange, Outlook, Teams
|
@@ -2441,9 +2381,6 @@ export namespace app {
|
|
2441
2381
|
*/
|
2442
2382
|
ringId?: string;
|
2443
2383
|
}
|
2444
|
-
/**
|
2445
|
-
* Represents Channel information.
|
2446
|
-
*/
|
2447
2384
|
interface ChannelInfo {
|
2448
2385
|
/**
|
2449
2386
|
* The Microsoft Teams ID for the channel with which the content is associated.
|
@@ -2474,27 +2411,18 @@ export namespace app {
|
|
2474
2411
|
*/
|
2475
2412
|
ownerGroupId?: string;
|
2476
2413
|
}
|
2477
|
-
/**
|
2478
|
-
* Represents Chat information.
|
2479
|
-
*/
|
2480
2414
|
interface ChatInfo {
|
2481
2415
|
/**
|
2482
2416
|
* The Microsoft Teams ID for the chat with which the content is associated.
|
2483
2417
|
*/
|
2484
2418
|
id: string;
|
2485
2419
|
}
|
2486
|
-
/**
|
2487
|
-
* Represents Meeting information.
|
2488
|
-
*/
|
2489
2420
|
interface MeetingInfo {
|
2490
2421
|
/**
|
2491
2422
|
* Meeting Id used by tab when running in meeting context
|
2492
2423
|
*/
|
2493
2424
|
id: string;
|
2494
2425
|
}
|
2495
|
-
/**
|
2496
|
-
* Represents Page information.
|
2497
|
-
*/
|
2498
2426
|
interface PageInfo {
|
2499
2427
|
/**
|
2500
2428
|
* The developer-defined unique ID for the page this content points to.
|
@@ -2523,9 +2451,6 @@ export namespace app {
|
|
2523
2451
|
*/
|
2524
2452
|
sourceOrigin?: string;
|
2525
2453
|
}
|
2526
|
-
/**
|
2527
|
-
* Represents Team information.
|
2528
|
-
*/
|
2529
2454
|
interface TeamInfo {
|
2530
2455
|
/**
|
2531
2456
|
* The Microsoft Teams ID for the team with which the content is associated.
|
@@ -2560,9 +2485,6 @@ export namespace app {
|
|
2560
2485
|
*/
|
2561
2486
|
userRole?: UserTeamRole;
|
2562
2487
|
}
|
2563
|
-
/**
|
2564
|
-
* Represents User information.
|
2565
|
-
*/
|
2566
2488
|
interface UserInfo {
|
2567
2489
|
/**
|
2568
2490
|
* The Azure AD object id of the current user.
|
@@ -2606,9 +2528,6 @@ export namespace app {
|
|
2606
2528
|
*/
|
2607
2529
|
tenant?: TenantInfo;
|
2608
2530
|
}
|
2609
|
-
/**
|
2610
|
-
* Represents Tenant information.
|
2611
|
-
*/
|
2612
2531
|
interface TenantInfo {
|
2613
2532
|
/**
|
2614
2533
|
* The Azure AD tenant ID of the current user.
|
@@ -2649,7 +2568,7 @@ export namespace app {
|
|
2649
2568
|
mySitePath?: string;
|
2650
2569
|
}
|
2651
2570
|
/**
|
2652
|
-
* Represents structure of the
|
2571
|
+
* Represents structure of the context message received
|
2653
2572
|
*/
|
2654
2573
|
interface Context {
|
2655
2574
|
/**
|
@@ -2695,7 +2614,7 @@ export namespace app {
|
|
2695
2614
|
*/
|
2696
2615
|
function isInitialized(): boolean;
|
2697
2616
|
/**
|
2698
|
-
* Gets the Frame Context that the App is running in.
|
2617
|
+
* Gets the Frame Context that the App is running in. {@see FrameContexts} for the list of possible values.
|
2699
2618
|
* @returns the Frame Context.
|
2700
2619
|
*/
|
2701
2620
|
function getFrameContext(): FrameContexts;
|
@@ -2732,7 +2651,7 @@ export namespace app {
|
|
2732
2651
|
/**
|
2733
2652
|
* Retrieves the current context the frame is running in.
|
2734
2653
|
*
|
2735
|
-
* @returns Promise that will resolve with the {@link
|
2654
|
+
* @returns Promise that will resolve with the {@link Context} object.
|
2736
2655
|
*/
|
2737
2656
|
function getContext(): Promise<app.Context>;
|
2738
2657
|
/**
|
@@ -2745,15 +2664,10 @@ export namespace app {
|
|
2745
2664
|
function notifySuccess(): void;
|
2746
2665
|
/**
|
2747
2666
|
* 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.
|
2751
2667
|
*/
|
2752
2668
|
function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
|
2753
2669
|
/**
|
2754
2670
|
* 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
|
2757
2671
|
*/
|
2758
2672
|
function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
|
2759
2673
|
/**
|
@@ -4652,32 +4566,25 @@ export namespace appInitialization {
|
|
4652
4566
|
/**
|
4653
4567
|
* @deprecated
|
4654
4568
|
* As of 2.0.0-beta.1, please use {@link app.notifyAppLoaded app.notifyAppLoaded(): void} instead.
|
4655
|
-
*
|
4656
4569
|
* Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
|
4657
4570
|
*/
|
4658
4571
|
function notifyAppLoaded(): void;
|
4659
4572
|
/**
|
4660
4573
|
* @deprecated
|
4661
4574
|
* As of 2.0.0-beta.1, please use {@link app.notifySuccess app.notifySuccess(): void} instead.
|
4662
|
-
*
|
4663
4575
|
* Notifies the frame that app initialization is successful and is ready for user interaction.
|
4664
4576
|
*/
|
4665
4577
|
function notifySuccess(): void;
|
4666
4578
|
/**
|
4667
4579
|
* @deprecated
|
4668
4580
|
* As of 2.0.0-beta.1, please use {@link app.notifyFailure app.notifyFailure(appInitializationFailedRequest: IFailedRequest): void} instead.
|
4669
|
-
*
|
4670
4581
|
* 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.
|
4673
4582
|
*/
|
4674
4583
|
function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
|
4675
4584
|
/**
|
4676
4585
|
* @deprecated
|
4677
4586
|
* As of 2.0.0-beta.1, please use {@link app.notifyExpectedFailure app.notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void} instead.
|
4678
|
-
*
|
4679
4587
|
* Notifies the frame that app initialized with some expected errors.
|
4680
|
-
* @param expectedFailureRequest - The expected failure request containing the reason and an optional message
|
4681
4588
|
*/
|
4682
4589
|
function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
|
4683
4590
|
}
|
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
|
1125
|
+
var version = "2.0.0-beta.6";
|
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,49 +3027,18 @@ 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
|
-
*/
|
3033
3030
|
var FailedReason;
|
3034
3031
|
(function (FailedReason) {
|
3035
|
-
/**
|
3036
|
-
* Authentication failed
|
3037
|
-
*/
|
3038
3032
|
FailedReason["AuthFailed"] = "AuthFailed";
|
3039
|
-
/**
|
3040
|
-
* The application timed out
|
3041
|
-
*/
|
3042
3033
|
FailedReason["Timeout"] = "Timeout";
|
3043
|
-
/**
|
3044
|
-
* The app failed for a different reason
|
3045
|
-
*/
|
3046
3034
|
FailedReason["Other"] = "Other";
|
3047
3035
|
})(FailedReason = app.FailedReason || (app.FailedReason = {}));
|
3048
|
-
/**
|
3049
|
-
* Describes expected errors that occurred during an otherwise successful
|
3050
|
-
* app initialization
|
3051
|
-
*/
|
3052
3036
|
var ExpectedFailureReason;
|
3053
3037
|
(function (ExpectedFailureReason) {
|
3054
|
-
/**
|
3055
|
-
* There was a permission error
|
3056
|
-
*/
|
3057
3038
|
ExpectedFailureReason["PermissionError"] = "PermissionError";
|
3058
|
-
/**
|
3059
|
-
* The item was not found
|
3060
|
-
*/
|
3061
3039
|
ExpectedFailureReason["NotFound"] = "NotFound";
|
3062
|
-
/**
|
3063
|
-
* The network is currently throttled
|
3064
|
-
*/
|
3065
3040
|
ExpectedFailureReason["Throttling"] = "Throttling";
|
3066
|
-
/**
|
3067
|
-
* The application is currently offline
|
3068
|
-
*/
|
3069
3041
|
ExpectedFailureReason["Offline"] = "Offline";
|
3070
|
-
/**
|
3071
|
-
* The app failed for a different reason
|
3072
|
-
*/
|
3073
3042
|
ExpectedFailureReason["Other"] = "Other";
|
3074
3043
|
})(ExpectedFailureReason = app.ExpectedFailureReason || (app.ExpectedFailureReason = {}));
|
3075
3044
|
/**
|
@@ -3081,7 +3050,7 @@ var app_app;
|
|
3081
3050
|
}
|
3082
3051
|
app.isInitialized = isInitialized;
|
3083
3052
|
/**
|
3084
|
-
* Gets the Frame Context that the App is running in.
|
3053
|
+
* Gets the Frame Context that the App is running in. {@see FrameContexts} for the list of possible values.
|
3085
3054
|
* @returns the Frame Context.
|
3086
3055
|
*/
|
3087
3056
|
function getFrameContext() {
|
@@ -3229,7 +3198,7 @@ var app_app;
|
|
3229
3198
|
/**
|
3230
3199
|
* Retrieves the current context the frame is running in.
|
3231
3200
|
*
|
3232
|
-
* @returns Promise that will resolve with the {@link
|
3201
|
+
* @returns Promise that will resolve with the {@link Context} object.
|
3233
3202
|
*/
|
3234
3203
|
function getContext() {
|
3235
3204
|
return new Promise(function (resolve) {
|
@@ -3256,9 +3225,6 @@ var app_app;
|
|
3256
3225
|
app.notifySuccess = notifySuccess;
|
3257
3226
|
/**
|
3258
3227
|
* 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.
|
3262
3228
|
*/
|
3263
3229
|
function notifyFailure(appInitializationFailedRequest) {
|
3264
3230
|
ensureInitialized();
|
@@ -3270,8 +3236,6 @@ var app_app;
|
|
3270
3236
|
app.notifyFailure = notifyFailure;
|
3271
3237
|
/**
|
3272
3238
|
* 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
|
3275
3239
|
*/
|
3276
3240
|
function notifyExpectedFailure(expectedFailureRequest) {
|
3277
3241
|
ensureInitialized();
|
@@ -6337,7 +6301,6 @@ var appInitialization;
|
|
6337
6301
|
/**
|
6338
6302
|
* @deprecated
|
6339
6303
|
* As of 2.0.0-beta.1, please use {@link app.notifyAppLoaded app.notifyAppLoaded(): void} instead.
|
6340
|
-
*
|
6341
6304
|
* Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
|
6342
6305
|
*/
|
6343
6306
|
function notifyAppLoaded() {
|
@@ -6347,7 +6310,6 @@ var appInitialization;
|
|
6347
6310
|
/**
|
6348
6311
|
* @deprecated
|
6349
6312
|
* As of 2.0.0-beta.1, please use {@link app.notifySuccess app.notifySuccess(): void} instead.
|
6350
|
-
*
|
6351
6313
|
* Notifies the frame that app initialization is successful and is ready for user interaction.
|
6352
6314
|
*/
|
6353
6315
|
function notifySuccess() {
|
@@ -6357,10 +6319,7 @@ var appInitialization;
|
|
6357
6319
|
/**
|
6358
6320
|
* @deprecated
|
6359
6321
|
* As of 2.0.0-beta.1, please use {@link app.notifyFailure app.notifyFailure(appInitializationFailedRequest: IFailedRequest): void} instead.
|
6360
|
-
*
|
6361
6322
|
* 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.
|
6364
6323
|
*/
|
6365
6324
|
function notifyFailure(appInitializationFailedRequest) {
|
6366
6325
|
app_app.notifyFailure(appInitializationFailedRequest);
|
@@ -6369,9 +6328,7 @@ var appInitialization;
|
|
6369
6328
|
/**
|
6370
6329
|
* @deprecated
|
6371
6330
|
* As of 2.0.0-beta.1, please use {@link app.notifyExpectedFailure app.notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void} instead.
|
6372
|
-
*
|
6373
6331
|
* Notifies the frame that app initialized with some expected errors.
|
6374
|
-
* @param expectedFailureRequest - The expected failure request containing the reason and an optional message
|
6375
6332
|
*/
|
6376
6333
|
function notifyExpectedFailure(expectedFailureRequest) {
|
6377
6334
|
app_app.notifyExpectedFailure(expectedFailureRequest);
|