@microsoft/teams-js 2.0.0-beta.3-dev.55 → 2.0.0-beta.3-dev.59
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
CHANGED
|
@@ -17,7 +17,7 @@ export namespace bot {
|
|
|
17
17
|
* @param onSuccess - callback to invoke when data is retrieved from bot
|
|
18
18
|
* @param onError - callback to invoke should an error occur
|
|
19
19
|
*/
|
|
20
|
-
function sendQuery(botRequest: QueryRequest, onSuccess?: (data: QueryResponse) => void, onError?: (error: string) => void): void;
|
|
20
|
+
export function sendQuery(botRequest: QueryRequest, onSuccess?: (data: QueryResponse) => void, onError?: (error: string) => void): void;
|
|
21
21
|
/**
|
|
22
22
|
* @hidden
|
|
23
23
|
* Hide from docs until release.
|
|
@@ -27,7 +27,7 @@ export namespace bot {
|
|
|
27
27
|
* @param onSuccess - callback to invoke when data is retrieved from bot
|
|
28
28
|
* @param onError - callback to invoke should an error occur
|
|
29
29
|
*/
|
|
30
|
-
function getSupportedCommands(onSuccess?: (response: Command[]) => void, onError?: (error: string) => void): void;
|
|
30
|
+
export function getSupportedCommands(onSuccess?: (response: Command[]) => void, onError?: (error: string) => void): void;
|
|
31
31
|
/**
|
|
32
32
|
* @hidden
|
|
33
33
|
* Hide from docs until release.
|
|
@@ -38,8 +38,8 @@ export namespace bot {
|
|
|
38
38
|
* @param onSuccess - callback to invoke when user is authenticated
|
|
39
39
|
* @param onError - callback to invoke should an error occur
|
|
40
40
|
*/
|
|
41
|
-
function authenticate(authRequest: AuthQueryRequest, onSuccess?: (results: Results) => void, onError?: (error: string) => void): void;
|
|
42
|
-
interface QueryRequest {
|
|
41
|
+
export function authenticate(authRequest: AuthQueryRequest, onSuccess?: (results: Results) => void, onError?: (error: string) => void): void;
|
|
42
|
+
export interface QueryRequest {
|
|
43
43
|
/**
|
|
44
44
|
* @hidden
|
|
45
45
|
* Query to search for
|
|
@@ -51,38 +51,42 @@ export namespace bot {
|
|
|
51
51
|
count: number;
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
interface
|
|
55
|
-
data: Results | Auth;
|
|
56
|
-
type: ResponseType;
|
|
57
|
-
}
|
|
58
|
-
interface Results {
|
|
54
|
+
export interface Results {
|
|
59
55
|
attachments: Attachment[];
|
|
60
56
|
layout: any;
|
|
61
57
|
botId: string;
|
|
62
58
|
}
|
|
63
|
-
interface Auth {
|
|
59
|
+
export interface Auth {
|
|
64
60
|
url: string;
|
|
65
61
|
title: string;
|
|
66
62
|
}
|
|
67
|
-
|
|
63
|
+
export type ResponseType = 'Results' | 'Auth';
|
|
64
|
+
interface Response<T extends ResponseType> {
|
|
65
|
+
type: T;
|
|
66
|
+
}
|
|
67
|
+
export interface ResultResponse extends Response<'Results'> {
|
|
68
|
+
data: Results;
|
|
69
|
+
}
|
|
70
|
+
export interface AuthResponse extends Response<'Auth'> {
|
|
71
|
+
data: Auth;
|
|
72
|
+
}
|
|
73
|
+
export type QueryResponse = ResultResponse | AuthResponse;
|
|
74
|
+
export interface AuthQueryRequest extends QueryRequest {
|
|
68
75
|
url: string;
|
|
69
76
|
}
|
|
70
|
-
interface Attachment {
|
|
77
|
+
export interface Attachment {
|
|
71
78
|
card: any;
|
|
72
79
|
previewCard: any;
|
|
73
80
|
previewRawPayload: any;
|
|
74
81
|
rawPayload: any;
|
|
75
82
|
}
|
|
76
|
-
interface Command {
|
|
83
|
+
export interface Command {
|
|
77
84
|
title: string;
|
|
78
85
|
id: string;
|
|
79
86
|
initialRun: boolean;
|
|
80
87
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
Auth = "Auth"
|
|
84
|
-
}
|
|
85
|
-
function isSupported(): boolean;
|
|
88
|
+
export function isSupported(): boolean;
|
|
89
|
+
export {};
|
|
86
90
|
}
|
|
87
91
|
|
|
88
92
|
/**
|
|
@@ -2172,6 +2176,16 @@ export interface Context {
|
|
|
2172
2176
|
* Teamsite ID, aka sharepoint site id.
|
|
2173
2177
|
*/
|
|
2174
2178
|
teamSiteId?: string;
|
|
2179
|
+
/**
|
|
2180
|
+
* @hidden
|
|
2181
|
+
* The SharePoint my site domain associated with the user.
|
|
2182
|
+
*/
|
|
2183
|
+
mySiteDomain?: string;
|
|
2184
|
+
/**
|
|
2185
|
+
* @hidden
|
|
2186
|
+
* The SharePoint relative path to the current users mysite
|
|
2187
|
+
*/
|
|
2188
|
+
mySitePath?: string;
|
|
2175
2189
|
}
|
|
2176
2190
|
export interface DeepLinkParameters {
|
|
2177
2191
|
/**
|
|
@@ -2667,19 +2681,27 @@ export namespace app {
|
|
|
2667
2681
|
/**
|
|
2668
2682
|
* The root SharePoint site associated with the team.
|
|
2669
2683
|
*/
|
|
2670
|
-
|
|
2684
|
+
teamSiteUrl?: string;
|
|
2671
2685
|
/**
|
|
2672
2686
|
* The domain of the root SharePoint site associated with the team.
|
|
2673
2687
|
*/
|
|
2674
|
-
|
|
2688
|
+
teamSiteDomain?: string;
|
|
2675
2689
|
/**
|
|
2676
2690
|
* The relative path to the SharePoint site associated with the team.
|
|
2677
2691
|
*/
|
|
2678
|
-
|
|
2692
|
+
teamSitePath?: string;
|
|
2679
2693
|
/**
|
|
2680
2694
|
* Teamsite ID, aka sharepoint site id.
|
|
2681
2695
|
*/
|
|
2682
|
-
|
|
2696
|
+
teamSiteId?: string;
|
|
2697
|
+
/**
|
|
2698
|
+
* The SharePoint my site domain associated with the user.
|
|
2699
|
+
*/
|
|
2700
|
+
mySiteDomain?: string;
|
|
2701
|
+
/**
|
|
2702
|
+
* The SharePoint relative path to the current users mysite
|
|
2703
|
+
*/
|
|
2704
|
+
mySitePath?: string;
|
|
2683
2705
|
}
|
|
2684
2706
|
/**
|
|
2685
2707
|
* Represents structure of the context message received
|
package/dist/MicrosoftTeams.js
CHANGED
|
@@ -1120,7 +1120,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
|
|
1122
1122
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
|
1123
|
-
var version = "2.0.0-beta.3-dev.
|
|
1123
|
+
var version = "2.0.0-beta.3-dev.59";
|
|
1124
1124
|
/**
|
|
1125
1125
|
* @hidden
|
|
1126
1126
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
|
@@ -2974,12 +2974,18 @@ function transformLegacyContextToAppContext(legacyContext) {
|
|
|
2974
2974
|
userRole: legacyContext.userTeamRole,
|
|
2975
2975
|
}
|
|
2976
2976
|
: undefined,
|
|
2977
|
-
sharePointSite: legacyContext.teamSiteUrl ||
|
|
2977
|
+
sharePointSite: legacyContext.teamSiteUrl ||
|
|
2978
|
+
legacyContext.teamSiteDomain ||
|
|
2979
|
+
legacyContext.teamSitePath ||
|
|
2980
|
+
legacyContext.mySitePath ||
|
|
2981
|
+
legacyContext.mySiteDomain
|
|
2978
2982
|
? {
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
+
teamSiteUrl: legacyContext.teamSiteUrl,
|
|
2984
|
+
teamSiteDomain: legacyContext.teamSiteDomain,
|
|
2985
|
+
teamSitePath: legacyContext.teamSitePath,
|
|
2986
|
+
teamSiteId: legacyContext.teamSiteId,
|
|
2987
|
+
mySitePath: legacyContext.mySitePath,
|
|
2988
|
+
mySiteDomain: legacyContext.mySiteDomain,
|
|
2983
2989
|
}
|
|
2984
2990
|
: undefined,
|
|
2985
2991
|
};
|
|
@@ -4068,11 +4074,6 @@ var bot;
|
|
|
4068
4074
|
});
|
|
4069
4075
|
}
|
|
4070
4076
|
bot.authenticate = authenticate;
|
|
4071
|
-
var ResponseType;
|
|
4072
|
-
(function (ResponseType) {
|
|
4073
|
-
ResponseType["Results"] = "Results";
|
|
4074
|
-
ResponseType["Auth"] = "Auth";
|
|
4075
|
-
})(ResponseType = bot.ResponseType || (bot.ResponseType = {}));
|
|
4076
4077
|
function isSupported() {
|
|
4077
4078
|
return runtime.supports.bot ? true : false;
|
|
4078
4079
|
}
|
|
@@ -6102,10 +6103,12 @@ function transformAppContextToLegacyContext(appContext) {
|
|
|
6102
6103
|
isTeamArchived: appContext.team !== undefined ? appContext.team.isArchived : undefined,
|
|
6103
6104
|
userTeamRole: appContext.team !== undefined ? appContext.team.userRole : undefined,
|
|
6104
6105
|
// sharepointSite
|
|
6105
|
-
teamSiteUrl: appContext.sharePointSite !== undefined ? appContext.sharePointSite.
|
|
6106
|
-
teamSiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.
|
|
6107
|
-
teamSitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.
|
|
6108
|
-
teamSiteId: appContext.sharePointSite !== undefined ? appContext.sharePointSite.
|
|
6106
|
+
teamSiteUrl: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteUrl : undefined,
|
|
6107
|
+
teamSiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteDomain : undefined,
|
|
6108
|
+
teamSitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSitePath : undefined,
|
|
6109
|
+
teamSiteId: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteId : undefined,
|
|
6110
|
+
mySitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySitePath : undefined,
|
|
6111
|
+
mySiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySiteDomain : undefined,
|
|
6109
6112
|
};
|
|
6110
6113
|
return context;
|
|
6111
6114
|
}
|