@microsoft/teams-js 1.10.1-dev.0 → 1.10.1-dev.1
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.js +1 -1
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/microsoftteams.d.ts +2834 -0
- package/dts/index.d.ts +2 -0
- package/dts/internal/communication.d.ts +23 -0
- package/dts/internal/constants.d.ts +42 -0
- package/dts/internal/globalVars.d.ts +15 -0
- package/dts/internal/handlers.d.ts +10 -0
- package/dts/internal/interfaces.d.ts +44 -0
- package/dts/internal/internalAPIs.d.ts +12 -0
- package/dts/internal/mediaUtil.d.ts +31 -0
- package/dts/internal/utils.d.ts +22 -0
- package/dts/private/appEntity.d.ts +49 -0
- package/dts/private/bot.d.ts +77 -0
- package/dts/private/conversations.d.ts +20 -0
- package/dts/private/files.d.ts +169 -0
- package/dts/private/index.d.ts +10 -0
- package/dts/private/interfaces.d.ts +141 -0
- package/dts/private/logs.d.ts +17 -0
- package/dts/private/meetingRoom.d.ts +157 -0
- package/dts/private/menus.d.ts +117 -0
- package/dts/private/privateAPIs.d.ts +104 -0
- package/dts/private/remoteCamera.d.ts +196 -0
- package/dts/public/appInitialization.d.ts +44 -0
- package/dts/public/appWindow.d.ts +14 -0
- package/dts/public/authentication.d.ts +177 -0
- package/dts/public/constants.d.ts +53 -0
- package/dts/public/index.d.ts +13 -0
- package/dts/public/interfaces.d.ts +557 -0
- package/dts/public/location.d.ts +47 -0
- package/dts/public/media.d.ts +219 -0
- package/dts/public/meeting.d.ts +158 -0
- package/dts/public/navigation.d.ts +28 -0
- package/dts/public/people.d.ts +53 -0
- package/dts/public/publicAPIs.d.ts +117 -0
- package/dts/public/settings.d.ts +95 -0
- package/dts/public/tasks.d.ts +25 -0
- package/package.json +1 -1
- package/dist/MicrosoftTeams.d.ts +0 -5
|
@@ -0,0 +1,2834 @@
|
|
|
1
|
+
import microsoftTeams = microsoftTeams;
|
|
2
|
+
|
|
3
|
+
declare module 'microsoftTeams' {
|
|
4
|
+
export = microsoftTeams;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
declare namespace microsoftTeams {
|
|
8
|
+
|
|
9
|
+
export class Communication {
|
|
10
|
+
static currentWindow: Window | any;
|
|
11
|
+
static parentOrigin: string;
|
|
12
|
+
static parentWindow: Window | any;
|
|
13
|
+
static childWindow: Window;
|
|
14
|
+
static childOrigin: string;
|
|
15
|
+
}
|
|
16
|
+
export function initializeCommunication(callback: Function, validMessageOrigins: string[] | undefined): void;
|
|
17
|
+
export function uninitializeCommunication(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Send a message to parent. Uses nativeInterface on mobile to communicate with parent context
|
|
20
|
+
*/
|
|
21
|
+
export function sendMessageToParent(actionName: string, callback?: Function): void;
|
|
22
|
+
/**
|
|
23
|
+
* Send a message to parent. Uses nativeInterface on mobile to communicate with parent context
|
|
24
|
+
*/
|
|
25
|
+
export function sendMessageToParent(actionName: string, args: any[], callback?: Function): void;
|
|
26
|
+
export function waitForMessageQueue(targetWindow: Window, callback: () => void): void;
|
|
27
|
+
/**
|
|
28
|
+
* Send a custom message object that can be sent to child window,
|
|
29
|
+
* instead of a response message to a child
|
|
30
|
+
*/
|
|
31
|
+
export function sendMessageEventToChild(actionName: string, args?: any[]): void;
|
|
32
|
+
|
|
33
|
+
export const version = "1.10.1-dev.1";
|
|
34
|
+
/**
|
|
35
|
+
* This is the SDK version when all SDK APIs started to check platform compatibility for the APIs.
|
|
36
|
+
*/
|
|
37
|
+
export const defaultSDKVersionForCompatCheck = "1.6.0";
|
|
38
|
+
/**
|
|
39
|
+
* Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
|
|
40
|
+
*/
|
|
41
|
+
export const getUserJoinedTeamsSupportedAndroidClientVersion = "2.0.1";
|
|
42
|
+
/**
|
|
43
|
+
* This is the SDK version when location APIs (getLocation and showLocation) are supported.
|
|
44
|
+
*/
|
|
45
|
+
export const locationAPIsRequiredVersion = "1.9.0";
|
|
46
|
+
/**
|
|
47
|
+
* This is the SDK version when people picker API is supported on mobile.
|
|
48
|
+
*/
|
|
49
|
+
export const peoplePickerRequiredVersion = "2.0.0";
|
|
50
|
+
/**
|
|
51
|
+
* This is the SDK version when captureImage API is supported on mobile.
|
|
52
|
+
*/
|
|
53
|
+
export const captureImageMobileSupportVersion = "1.7.0";
|
|
54
|
+
/**
|
|
55
|
+
* This is the SDK version when media APIs are supported on all three platforms ios, android and web.
|
|
56
|
+
*/
|
|
57
|
+
export const mediaAPISupportVersion = "1.8.0";
|
|
58
|
+
/**
|
|
59
|
+
* This is the SDK version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
|
|
60
|
+
*/
|
|
61
|
+
export const getMediaCallbackSupportVersion = "2.0.0";
|
|
62
|
+
/**
|
|
63
|
+
* This is the SDK version when scanBarCode API is supported on mobile.
|
|
64
|
+
*/
|
|
65
|
+
export const scanBarCodeAPIMobileSupportVersion = "1.9.0";
|
|
66
|
+
/**
|
|
67
|
+
* List of supported Host origins
|
|
68
|
+
*/
|
|
69
|
+
export const validOrigins: string[];
|
|
70
|
+
export const validOriginRegExp: RegExp;
|
|
71
|
+
/**
|
|
72
|
+
* USer specified message origins should satisfy this test
|
|
73
|
+
*/
|
|
74
|
+
export const userOriginUrlValidationRegExp: RegExp;
|
|
75
|
+
export class GlobalVars {
|
|
76
|
+
static initializeCalled: boolean;
|
|
77
|
+
static initializeCompleted: boolean;
|
|
78
|
+
static additionalValidOrigins: string[];
|
|
79
|
+
static additionalValidOriginsRegexp: RegExp;
|
|
80
|
+
static initializeCallbacks: {
|
|
81
|
+
(): void;
|
|
82
|
+
}[];
|
|
83
|
+
static isFramelessWindow: boolean;
|
|
84
|
+
static frameContext: FrameContexts;
|
|
85
|
+
static hostClientType: string;
|
|
86
|
+
static clientSupportedSDKVersion: string;
|
|
87
|
+
static printCapabilityEnabled: boolean;
|
|
88
|
+
}
|
|
89
|
+
export function initializeHandlers(): void;
|
|
90
|
+
export function callHandler(name: string, args?: any[]): [true, any] | [false, undefined];
|
|
91
|
+
export function registerHandler(name: string, handler: Function, sendMessage?: boolean, args?: any[]): void;
|
|
92
|
+
export function removeHandler(name: string): void;
|
|
93
|
+
export function registerOnThemeChangeHandler(handler: (theme: string) => void): void;
|
|
94
|
+
export function handleThemeChange(theme: string): void;
|
|
95
|
+
export function registerBackButtonHandler(handler: () => boolean): void;
|
|
96
|
+
export function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
|
|
97
|
+
export function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @private
|
|
101
|
+
* Hide from docs
|
|
102
|
+
* Shim in definitions used for browser-compat
|
|
103
|
+
*/
|
|
104
|
+
export interface DOMMessageEvent {
|
|
105
|
+
origin?: any;
|
|
106
|
+
source?: any;
|
|
107
|
+
data?: any;
|
|
108
|
+
originalEvent: DOMMessageEvent;
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* @private
|
|
112
|
+
* Hide from docs
|
|
113
|
+
*/
|
|
114
|
+
export interface TeamsNativeClient {
|
|
115
|
+
framelessPostMessage(msg: string): void;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @private
|
|
119
|
+
* Hide from docs
|
|
120
|
+
*/
|
|
121
|
+
export interface ExtendedWindow extends Window {
|
|
122
|
+
nativeInterface: TeamsNativeClient;
|
|
123
|
+
onNativeMessage(evt: DOMMessageEvent): void;
|
|
124
|
+
}
|
|
125
|
+
export interface MessageRequest {
|
|
126
|
+
id?: number;
|
|
127
|
+
func: string;
|
|
128
|
+
timestamp?: number;
|
|
129
|
+
args?: any[];
|
|
130
|
+
}
|
|
131
|
+
export interface MessageResponse {
|
|
132
|
+
id: number;
|
|
133
|
+
args?: any[];
|
|
134
|
+
isPartialResponse?: boolean;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Meant for Message objects that are sent to children without id
|
|
138
|
+
*/
|
|
139
|
+
export interface DOMMessageEvent {
|
|
140
|
+
func: string;
|
|
141
|
+
args?: any[];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export function ensureInitialized(...expectedFrameContexts: string[]): void;
|
|
145
|
+
/**
|
|
146
|
+
* Checks whether the platform has knowledge of this API by doing a comparison
|
|
147
|
+
* on API required version and platform supported version of the SDK
|
|
148
|
+
* @param requiredVersion SDK version required by the API
|
|
149
|
+
*/
|
|
150
|
+
export function isAPISupportedByPlatform(requiredVersion?: string): boolean;
|
|
151
|
+
/**
|
|
152
|
+
* Processes the valid origins specifuied by the user, de-duplicates and converts them into a regexp
|
|
153
|
+
* which is used later for message source/origin validation
|
|
154
|
+
*/
|
|
155
|
+
export function processAdditionalValidOrigins(validMessageOrigins: string[]): void;
|
|
156
|
+
/**
|
|
157
|
+
* Helper function to create a blob from media chunks based on their sequence
|
|
158
|
+
*/
|
|
159
|
+
export function createFile(assembleAttachment: media.AssembleAttachment[], mimeType: string): Blob;
|
|
160
|
+
/**
|
|
161
|
+
* Helper function to convert Media chunks into another object type which can be later assemebled
|
|
162
|
+
* Converts base 64 encoded string to byte array and then into an array of blobs
|
|
163
|
+
*/
|
|
164
|
+
export function decodeAttachment(attachment: media.MediaChunk, mimeType: string): media.AssembleAttachment;
|
|
165
|
+
/**
|
|
166
|
+
* Returns true if the mediaInput params are valid and false otherwise
|
|
167
|
+
*/
|
|
168
|
+
export function validateSelectMediaInputs(mediaInputs: media.MediaInputs): boolean;
|
|
169
|
+
/**
|
|
170
|
+
* Returns true if the get Media params are valid and false otherwise
|
|
171
|
+
*/
|
|
172
|
+
export function validateGetMediaInputs(mimeType: string, format: media.FileFormat, content: string): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Returns true if the view images param is valid and false otherwise
|
|
175
|
+
*/
|
|
176
|
+
export function validateViewImagesInput(uriList: media.ImageUri[]): boolean;
|
|
177
|
+
/**
|
|
178
|
+
* Returns true if the scan barcode param is valid and false otherwise
|
|
179
|
+
*/
|
|
180
|
+
export function validateScanBarCodeInput(barCodeConfig: media.BarCodeConfig): boolean;
|
|
181
|
+
/**
|
|
182
|
+
* Returns true if the people picker params are valid and false otherwise
|
|
183
|
+
*/
|
|
184
|
+
export function validatePeoplePickerInput(peoplePickerInputs: people.PeoplePickerInputs): boolean;
|
|
185
|
+
|
|
186
|
+
export function generateRegExpFromUrls(urls: string[]): RegExp;
|
|
187
|
+
export function getGenericOnCompleteHandler(errorMessage?: string): (success: boolean, reason?: string) => void;
|
|
188
|
+
/**
|
|
189
|
+
* Compares SDK versions.
|
|
190
|
+
* @param v1 first version
|
|
191
|
+
* @param v2 second version
|
|
192
|
+
* returns NaN in case inputs are not in right format
|
|
193
|
+
* -1 if v1 < v2
|
|
194
|
+
* 1 if v1 > v2
|
|
195
|
+
* 0 otherwise
|
|
196
|
+
* For example,
|
|
197
|
+
* compareSDKVersions('1.2', '1.2.0') returns 0
|
|
198
|
+
* compareSDKVersions('1.2a', '1.2b') returns NaN
|
|
199
|
+
* compareSDKVersions('1.2', '1.3') returns -1
|
|
200
|
+
* compareSDKVersions('2.0', '1.3.2') returns 1
|
|
201
|
+
* compareSDKVersions('2.0', 2.0) returns NaN
|
|
202
|
+
*/
|
|
203
|
+
export function compareSDKVersions(v1: string, v2: string): number;
|
|
204
|
+
/**
|
|
205
|
+
* Generates a GUID
|
|
206
|
+
*/
|
|
207
|
+
export function generateGUID(): string;
|
|
208
|
+
/**
|
|
209
|
+
* Namespace to interact with the application entities specific part of the SDK.
|
|
210
|
+
*
|
|
211
|
+
* @private
|
|
212
|
+
* Hide from docs
|
|
213
|
+
*/
|
|
214
|
+
export namespace appEntity {
|
|
215
|
+
/**
|
|
216
|
+
* @private
|
|
217
|
+
* Hide from docs
|
|
218
|
+
* --------
|
|
219
|
+
* Information on an app entity
|
|
220
|
+
*/
|
|
221
|
+
interface AppEntity {
|
|
222
|
+
/**
|
|
223
|
+
* App ID of the application
|
|
224
|
+
*/
|
|
225
|
+
appId: string;
|
|
226
|
+
/**
|
|
227
|
+
* URL for the application's icon
|
|
228
|
+
*/
|
|
229
|
+
appIconUrl: string;
|
|
230
|
+
/**
|
|
231
|
+
* Content URL for the app entity
|
|
232
|
+
*/
|
|
233
|
+
contentUrl: string;
|
|
234
|
+
/**
|
|
235
|
+
* The display name for the app entity
|
|
236
|
+
*/
|
|
237
|
+
displayName: string;
|
|
238
|
+
/**
|
|
239
|
+
* Website URL for the app entity. It is meant to be opened by the user in a browser.
|
|
240
|
+
*/
|
|
241
|
+
websiteUrl: string;
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* @private
|
|
245
|
+
* Hide from docs
|
|
246
|
+
*
|
|
247
|
+
* Open the Tab Gallery and retrieve the app entity
|
|
248
|
+
* @param threadId ID of the thread where the app entity will be created
|
|
249
|
+
* @param categories A list of app categories that will be displayed in the open tab gallery
|
|
250
|
+
* @param callback Callback that will be triggered once the app entity information is available.
|
|
251
|
+
* The callback takes two arguments: the app entity configuration, if available and
|
|
252
|
+
* an optional SdkError in case something happened (i.e. the window was closed)
|
|
253
|
+
*/
|
|
254
|
+
function selectAppEntity(threadId: string, categories: string[], callback: (appEntity: AppEntity, sdkError?: SdkError) => void): void;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* @private
|
|
259
|
+
* Namespace to interact with bots using the SDK.
|
|
260
|
+
*/
|
|
261
|
+
export namespace bot {
|
|
262
|
+
/**
|
|
263
|
+
* @private
|
|
264
|
+
* Hide from docs until release.
|
|
265
|
+
* ------
|
|
266
|
+
* Sends query to bot in order to retrieve data.
|
|
267
|
+
* @param botRequest query to send to bot.
|
|
268
|
+
* @param onSuccess callback to invoke when data is retrieved from bot
|
|
269
|
+
* @param onError callback to invoke should an error occur
|
|
270
|
+
*/
|
|
271
|
+
function sendQuery(botRequest: QueryRequest, onSuccess?: (data: QueryResponse) => void, onError?: (error: string) => void): void;
|
|
272
|
+
/**
|
|
273
|
+
* @private
|
|
274
|
+
* Hide from docs until release.
|
|
275
|
+
* -----
|
|
276
|
+
* Retrieves list of support commands from bot
|
|
277
|
+
* @param onSuccess callback to invoke when data is retrieved from bot
|
|
278
|
+
* @param onError callback to invoke should an error occur
|
|
279
|
+
*/
|
|
280
|
+
function getSupportedCommands(onSuccess?: (response: Command[]) => void, onError?: (error: string) => void): void;
|
|
281
|
+
/**
|
|
282
|
+
* @private
|
|
283
|
+
* Hide from docs until release.
|
|
284
|
+
* -----
|
|
285
|
+
* Authenticates a user for json tab
|
|
286
|
+
* @param authRequest callback to invoke when data is retrieved from bot
|
|
287
|
+
* @param onSuccess callback to invoke when user is authenticated
|
|
288
|
+
* @param onError callback to invoke should an error occur
|
|
289
|
+
*/
|
|
290
|
+
function authenticate(authRequest: AuthQueryRequest, onSuccess?: (results: Results) => void, onError?: (error: string) => void): void;
|
|
291
|
+
interface QueryRequest {
|
|
292
|
+
/**
|
|
293
|
+
* Query to search for
|
|
294
|
+
*/
|
|
295
|
+
query: string;
|
|
296
|
+
commandId?: string;
|
|
297
|
+
option?: {
|
|
298
|
+
skip: number;
|
|
299
|
+
count: number;
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
interface QueryResponse {
|
|
303
|
+
data: Results | Auth;
|
|
304
|
+
type: ResponseType;
|
|
305
|
+
}
|
|
306
|
+
interface Results {
|
|
307
|
+
attachments: Attachment[];
|
|
308
|
+
layout: any;
|
|
309
|
+
botId: string;
|
|
310
|
+
}
|
|
311
|
+
interface Auth {
|
|
312
|
+
url: string;
|
|
313
|
+
title: string;
|
|
314
|
+
}
|
|
315
|
+
interface AuthQueryRequest extends QueryRequest {
|
|
316
|
+
url: string;
|
|
317
|
+
}
|
|
318
|
+
interface Attachment {
|
|
319
|
+
card: any;
|
|
320
|
+
previewCard: any;
|
|
321
|
+
previewRawPayload: any;
|
|
322
|
+
rawPayload: any;
|
|
323
|
+
}
|
|
324
|
+
interface Command {
|
|
325
|
+
title: string;
|
|
326
|
+
id: string;
|
|
327
|
+
initialRun: boolean;
|
|
328
|
+
}
|
|
329
|
+
enum ResponseType {
|
|
330
|
+
Results = "Results",
|
|
331
|
+
Auth = "Auth"
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
/**
|
|
335
|
+
* Namespace to interact with the conversational subEntities inside the tab
|
|
336
|
+
*/
|
|
337
|
+
export namespace conversations {
|
|
338
|
+
/**
|
|
339
|
+
* @private
|
|
340
|
+
* Hide from docs
|
|
341
|
+
* --------------
|
|
342
|
+
* Allows the user to start or continue a conversation with each subentity inside the tab
|
|
343
|
+
*/
|
|
344
|
+
function openConversation(openConversationRequest: OpenConversationRequest): void;
|
|
345
|
+
/**
|
|
346
|
+
* @private
|
|
347
|
+
* Hide from docs
|
|
348
|
+
* --------------
|
|
349
|
+
* Allows the user to close the conversation in the right pane
|
|
350
|
+
*/
|
|
351
|
+
function closeConversation(): void;
|
|
352
|
+
}
|
|
353
|
+
/**
|
|
354
|
+
* Namespace to interact with the files specific part of the SDK.
|
|
355
|
+
*
|
|
356
|
+
* @private
|
|
357
|
+
* Hide from docs
|
|
358
|
+
*/
|
|
359
|
+
export namespace files {
|
|
360
|
+
/**
|
|
361
|
+
* @private
|
|
362
|
+
* Hide from docs
|
|
363
|
+
*
|
|
364
|
+
* Cloud storage providers registered with Microsoft Teams
|
|
365
|
+
*/
|
|
366
|
+
enum CloudStorageProvider {
|
|
367
|
+
Dropbox = "DROPBOX",
|
|
368
|
+
Box = "BOX",
|
|
369
|
+
Sharefile = "SHAREFILE",
|
|
370
|
+
GoogleDrive = "GOOGLEDRIVE",
|
|
371
|
+
Egnyte = "EGNYTE"
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* @private
|
|
375
|
+
* Hide from docs
|
|
376
|
+
*
|
|
377
|
+
* Cloud storage provider integration type
|
|
378
|
+
*/
|
|
379
|
+
enum CloudStorageProviderType {
|
|
380
|
+
Sharepoint = 0,
|
|
381
|
+
WopiIntegration = 1,
|
|
382
|
+
Google = 2
|
|
383
|
+
}
|
|
384
|
+
/**
|
|
385
|
+
* @private
|
|
386
|
+
* Hide from docs
|
|
387
|
+
*
|
|
388
|
+
* Cloud storage folder interface
|
|
389
|
+
*/
|
|
390
|
+
interface CloudStorageFolder {
|
|
391
|
+
/**
|
|
392
|
+
* ID of the cloud storage folder
|
|
393
|
+
*/
|
|
394
|
+
id: string;
|
|
395
|
+
/**
|
|
396
|
+
* Display Name/Title of the cloud storage folder
|
|
397
|
+
*/
|
|
398
|
+
title: string;
|
|
399
|
+
/**
|
|
400
|
+
* ID of the cloud storage folder in the provider
|
|
401
|
+
*/
|
|
402
|
+
folderId: string;
|
|
403
|
+
/**
|
|
404
|
+
* Type of the cloud storage folder provider integration
|
|
405
|
+
*/
|
|
406
|
+
providerType: CloudStorageProviderType;
|
|
407
|
+
/**
|
|
408
|
+
* Code of the supported cloud storage folder provider
|
|
409
|
+
*/
|
|
410
|
+
providerCode: CloudStorageProvider;
|
|
411
|
+
/**
|
|
412
|
+
* Display name of the owner of the cloud storage folder provider
|
|
413
|
+
*/
|
|
414
|
+
ownerDisplayName: string;
|
|
415
|
+
/**
|
|
416
|
+
* Sharepoint specific siteURL of the folder
|
|
417
|
+
*/
|
|
418
|
+
siteUrl?: string;
|
|
419
|
+
/**
|
|
420
|
+
* Sharepoint specific serverRelativeUrl of the folder
|
|
421
|
+
*/
|
|
422
|
+
serverRelativeUrl?: string;
|
|
423
|
+
/**
|
|
424
|
+
* Sharepoint specific libraryType of the folder
|
|
425
|
+
*/
|
|
426
|
+
libraryType?: string;
|
|
427
|
+
/**
|
|
428
|
+
* Sharepoint specific accessType of the folder
|
|
429
|
+
*/
|
|
430
|
+
accessType?: string;
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* @private
|
|
434
|
+
* Hide from docs
|
|
435
|
+
*
|
|
436
|
+
* Cloud storage item interface
|
|
437
|
+
*/
|
|
438
|
+
interface CloudStorageFolderItem {
|
|
439
|
+
/**
|
|
440
|
+
* ID of the item in the provider
|
|
441
|
+
*/
|
|
442
|
+
id: string;
|
|
443
|
+
/**
|
|
444
|
+
* Display name/title
|
|
445
|
+
*/
|
|
446
|
+
title: string;
|
|
447
|
+
/**
|
|
448
|
+
* Key to differentiate files and subdirectory
|
|
449
|
+
*/
|
|
450
|
+
isSubdirectory: boolean;
|
|
451
|
+
/**
|
|
452
|
+
* File extension
|
|
453
|
+
*/
|
|
454
|
+
type: string;
|
|
455
|
+
/**
|
|
456
|
+
* Last modifed time of the item
|
|
457
|
+
*/
|
|
458
|
+
lastModifiedTime: string;
|
|
459
|
+
/**
|
|
460
|
+
* Display size of the items in bytes
|
|
461
|
+
*/
|
|
462
|
+
size: number;
|
|
463
|
+
/**
|
|
464
|
+
* URL of the file
|
|
465
|
+
*/
|
|
466
|
+
objectUrl: string;
|
|
467
|
+
/**
|
|
468
|
+
* Temporary access token for the item
|
|
469
|
+
*/
|
|
470
|
+
accessToken?: string;
|
|
471
|
+
}
|
|
472
|
+
/**
|
|
473
|
+
* @private
|
|
474
|
+
* Hide from docs
|
|
475
|
+
*
|
|
476
|
+
* Gets a list of cloud storage folders added to the channel
|
|
477
|
+
* @param channelId ID of the channel whose cloud storage folders should be retrieved
|
|
478
|
+
* @param callback Callback that will be triggered post folders load
|
|
479
|
+
*/
|
|
480
|
+
function getCloudStorageFolders(channelId: string, callback: (error: SdkError, folders: CloudStorageFolder[]) => void): void;
|
|
481
|
+
/**
|
|
482
|
+
* @private
|
|
483
|
+
* Hide from docs
|
|
484
|
+
*
|
|
485
|
+
* Initiates the add cloud storage folder flow
|
|
486
|
+
* @param channelId ID of the channel to add cloud storage folder
|
|
487
|
+
* @param callback Callback that will be triggered post add folder flow is compelete
|
|
488
|
+
*/
|
|
489
|
+
function addCloudStorageFolder(channelId: string, callback: (error: SdkError, isFolderAdded: boolean, folders: CloudStorageFolder[]) => void): void;
|
|
490
|
+
/**
|
|
491
|
+
* @private
|
|
492
|
+
* Hide from docs
|
|
493
|
+
*
|
|
494
|
+
* Deletes a cloud storage folder from channel
|
|
495
|
+
* @param channelId ID of the channel where folder is to be deleted
|
|
496
|
+
* @param folderToDelete cloud storage folder to be deleted
|
|
497
|
+
* @param callback Callback that will be triggered post delete
|
|
498
|
+
*/
|
|
499
|
+
function deleteCloudStorageFolder(channelId: string, folderToDelete: CloudStorageFolder, callback: (error: SdkError, isFolderDeleted: boolean) => void): void;
|
|
500
|
+
/**
|
|
501
|
+
* @private
|
|
502
|
+
* Hide from docs
|
|
503
|
+
*
|
|
504
|
+
* Fetches the contents of a Cloud storage folder (CloudStorageFolder) / sub directory
|
|
505
|
+
* @param folder Cloud storage folder (CloudStorageFolder) / sub directory (CloudStorageFolderItem)
|
|
506
|
+
* @param providerCode Code of the cloud storage folder provider
|
|
507
|
+
* @param callback Callback that will be triggered post contents are loaded
|
|
508
|
+
*/
|
|
509
|
+
function getCloudStorageFolderContents(folder: CloudStorageFolder | CloudStorageFolderItem, providerCode: CloudStorageProvider, callback: (error: SdkError, items: CloudStorageFolderItem[]) => void): void;
|
|
510
|
+
/**
|
|
511
|
+
* @private
|
|
512
|
+
* Hide from docs
|
|
513
|
+
*
|
|
514
|
+
* Open a cloud storage file in teams
|
|
515
|
+
* @param file cloud storage file that should be opened
|
|
516
|
+
* @param providerCode Code of the cloud storage folder provider
|
|
517
|
+
* @param fileOpenPreference Whether file should be opened in web/inline
|
|
518
|
+
*/
|
|
519
|
+
function openCloudStorageFile(file: CloudStorageFolderItem, providerCode: CloudStorageProvider, fileOpenPreference?: FileOpenPreference.Web | FileOpenPreference.Inline): void;
|
|
520
|
+
}
|
|
521
|
+
/**
|
|
522
|
+
* @private
|
|
523
|
+
* Hide from docs
|
|
524
|
+
* --------
|
|
525
|
+
* Information about all members in a chat
|
|
526
|
+
*/
|
|
527
|
+
export interface ChatMembersInformation {
|
|
528
|
+
members: ThreadMember[];
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* @private
|
|
532
|
+
* Hide from docs
|
|
533
|
+
* --------
|
|
534
|
+
* Information about a chat member
|
|
535
|
+
*/
|
|
536
|
+
export interface ThreadMember {
|
|
537
|
+
/**
|
|
538
|
+
* The member's user principal name in the current tenant.
|
|
539
|
+
*/
|
|
540
|
+
upn: string;
|
|
541
|
+
}
|
|
542
|
+
export enum NotificationTypes {
|
|
543
|
+
fileDownloadStart = "fileDownloadStart",
|
|
544
|
+
fileDownloadComplete = "fileDownloadComplete"
|
|
545
|
+
}
|
|
546
|
+
export interface ShowNotificationParameters {
|
|
547
|
+
message: string;
|
|
548
|
+
notificationType: NotificationTypes;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* @private
|
|
552
|
+
* Hide from docs.
|
|
553
|
+
* ------
|
|
554
|
+
*/
|
|
555
|
+
export enum ViewerActionTypes {
|
|
556
|
+
view = "view",
|
|
557
|
+
edit = "edit",
|
|
558
|
+
editNew = "editNew"
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* * @private
|
|
562
|
+
* Hide from docs.
|
|
563
|
+
* ------
|
|
564
|
+
* User setting changes that can be subscribed to,
|
|
565
|
+
*/
|
|
566
|
+
export enum UserSettingTypes {
|
|
567
|
+
/**
|
|
568
|
+
* Use this key to subscribe to changes in user's file open preference
|
|
569
|
+
*/
|
|
570
|
+
fileOpenPreference = "fileOpenPreference",
|
|
571
|
+
/**
|
|
572
|
+
* Use this key to subscribe to theme changes
|
|
573
|
+
*/
|
|
574
|
+
theme = "theme"
|
|
575
|
+
}
|
|
576
|
+
/**
|
|
577
|
+
* @private
|
|
578
|
+
* Hide from docs.
|
|
579
|
+
* ------
|
|
580
|
+
*/
|
|
581
|
+
export interface FilePreviewParameters {
|
|
582
|
+
/**
|
|
583
|
+
* The developer-defined unique ID for the file.
|
|
584
|
+
*/
|
|
585
|
+
entityId: string;
|
|
586
|
+
/**
|
|
587
|
+
* The display name of the file.
|
|
588
|
+
*/
|
|
589
|
+
title: string;
|
|
590
|
+
/**
|
|
591
|
+
* An optional description of the file.
|
|
592
|
+
*/
|
|
593
|
+
description?: string;
|
|
594
|
+
/**
|
|
595
|
+
* The file extension; e.g. pptx, docx, etc.
|
|
596
|
+
*/
|
|
597
|
+
type: string;
|
|
598
|
+
/**
|
|
599
|
+
* A url to the source of the file, used to open the content in the user's default browser
|
|
600
|
+
*/
|
|
601
|
+
objectUrl: string;
|
|
602
|
+
/**
|
|
603
|
+
* Optional; an alternate self-authenticating url used to preview the file in Mobile clients and offer it for download by the user
|
|
604
|
+
*/
|
|
605
|
+
downloadUrl?: string;
|
|
606
|
+
/**
|
|
607
|
+
* Optional; an alternate url optimized for previewing the file in Teams web and desktop clients
|
|
608
|
+
*/
|
|
609
|
+
webPreviewUrl?: string;
|
|
610
|
+
/**
|
|
611
|
+
* Optional; an alternate url that allows editing of the file in Teams web and desktop clients
|
|
612
|
+
*/
|
|
613
|
+
webEditUrl?: string;
|
|
614
|
+
/**
|
|
615
|
+
* Optional; the base url of the site where the file is hosted
|
|
616
|
+
*/
|
|
617
|
+
baseUrl?: string;
|
|
618
|
+
/**
|
|
619
|
+
* Deprecated; prefer using viewerAction instead
|
|
620
|
+
* Optional; indicates whether the file should be opened in edit mode
|
|
621
|
+
*/
|
|
622
|
+
editFile?: boolean;
|
|
623
|
+
/**
|
|
624
|
+
* Optional; the developer-defined unique ID for the sub-entity to return to when the file stage closes.
|
|
625
|
+
* This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.
|
|
626
|
+
*/
|
|
627
|
+
subEntityId?: string;
|
|
628
|
+
/**
|
|
629
|
+
* Optional; indicates the mode in which file should be opened. Takes precedence over edit mode.
|
|
630
|
+
*/
|
|
631
|
+
viewerAction?: ViewerActionTypes;
|
|
632
|
+
/**
|
|
633
|
+
* Optional; indicates how user prefers to open the file
|
|
634
|
+
*/
|
|
635
|
+
fileOpenPreference?: FileOpenPreference;
|
|
636
|
+
}
|
|
637
|
+
/**
|
|
638
|
+
* @private
|
|
639
|
+
* Hide from docs
|
|
640
|
+
* --------
|
|
641
|
+
* Query parameters used when fetching team information
|
|
642
|
+
*/
|
|
643
|
+
export interface TeamInstanceParameters {
|
|
644
|
+
/**
|
|
645
|
+
* Flag allowing to select favorite teams only
|
|
646
|
+
*/
|
|
647
|
+
favoriteTeamsOnly?: boolean;
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* @private
|
|
651
|
+
* Hide from docs
|
|
652
|
+
* --------
|
|
653
|
+
* Information on userJoined Teams
|
|
654
|
+
*/
|
|
655
|
+
export interface UserJoinedTeamsInformation {
|
|
656
|
+
/**
|
|
657
|
+
* List of team information
|
|
658
|
+
*/
|
|
659
|
+
userJoinedTeams: TeamInformation[];
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
/**
|
|
663
|
+
* Namespace to interact with the logging part of the SDK.
|
|
664
|
+
* This object is used to send the app logs on demand to the host client
|
|
665
|
+
*
|
|
666
|
+
* @private
|
|
667
|
+
* Hide from docs
|
|
668
|
+
*/
|
|
669
|
+
export namespace logs {
|
|
670
|
+
/**
|
|
671
|
+
* @private
|
|
672
|
+
* Hide from docs
|
|
673
|
+
* ------
|
|
674
|
+
* Registers a handler for getting app log
|
|
675
|
+
* @param handler The handler to invoke to get the app log
|
|
676
|
+
*/
|
|
677
|
+
function registerGetLogHandler(handler: () => string): void;
|
|
678
|
+
}
|
|
679
|
+
export namespace meetingRoom {
|
|
680
|
+
/**
|
|
681
|
+
* @private
|
|
682
|
+
* Hide from docs
|
|
683
|
+
*
|
|
684
|
+
* Data structure to represent a meeting room.
|
|
685
|
+
*/
|
|
686
|
+
interface MeetingRoomInfo {
|
|
687
|
+
/**
|
|
688
|
+
* Endpoint id of the meeting room.
|
|
689
|
+
*/
|
|
690
|
+
endpointId: string;
|
|
691
|
+
/**
|
|
692
|
+
* Device name of the meeting room.
|
|
693
|
+
*/
|
|
694
|
+
deviceName: string;
|
|
695
|
+
/**
|
|
696
|
+
* Client type of the meeting room.
|
|
697
|
+
*/
|
|
698
|
+
clientType: string;
|
|
699
|
+
/**
|
|
700
|
+
* Client version of the meeting room.
|
|
701
|
+
*/
|
|
702
|
+
clientVersion: string;
|
|
703
|
+
}
|
|
704
|
+
/**
|
|
705
|
+
* @private
|
|
706
|
+
* Hide from docs
|
|
707
|
+
*
|
|
708
|
+
* Enum used to indicate meeting room capabilities.
|
|
709
|
+
*/
|
|
710
|
+
enum Capability {
|
|
711
|
+
/**
|
|
712
|
+
* Media control capability: toggle mute.
|
|
713
|
+
*/
|
|
714
|
+
toggleMute = "toggleMute",
|
|
715
|
+
/**
|
|
716
|
+
* Media control capability: toggle camera.
|
|
717
|
+
*/
|
|
718
|
+
toggleCamera = "toggleCamera",
|
|
719
|
+
/**
|
|
720
|
+
* Media control capability: toggle captions.
|
|
721
|
+
*/
|
|
722
|
+
toggleCaptions = "toggleCaptions",
|
|
723
|
+
/**
|
|
724
|
+
* Media control capability: volume ajustion.
|
|
725
|
+
*/
|
|
726
|
+
volume = "volume",
|
|
727
|
+
/**
|
|
728
|
+
* Stage layout control capability: show gallery mode.
|
|
729
|
+
*/
|
|
730
|
+
showVideoGallery = "showVideoGallery",
|
|
731
|
+
/**
|
|
732
|
+
* Stage layout control capability: show content mode.
|
|
733
|
+
*/
|
|
734
|
+
showContent = "showContent",
|
|
735
|
+
/**
|
|
736
|
+
* Stage layout control capability: show content + gallery mode.
|
|
737
|
+
*/
|
|
738
|
+
showVideoGalleryAndContent = "showVideoGalleryAndContent",
|
|
739
|
+
/**
|
|
740
|
+
* Stage layout control capability: show laryge gallery mode.
|
|
741
|
+
*/
|
|
742
|
+
showLargeGallery = "showLargeGallery",
|
|
743
|
+
/**
|
|
744
|
+
* Stage layout control capability: show together mode.
|
|
745
|
+
*/
|
|
746
|
+
showTogether = "showTogether",
|
|
747
|
+
/**
|
|
748
|
+
* Meeting control capability: leave meeting.
|
|
749
|
+
*/
|
|
750
|
+
leaveMeeting = "leaveMeeting"
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* @private
|
|
754
|
+
* Hide from docs
|
|
755
|
+
*
|
|
756
|
+
* Data structure to represent capabilities of a meeting room.
|
|
757
|
+
*/
|
|
758
|
+
interface MeetingRoomCapability {
|
|
759
|
+
/**
|
|
760
|
+
* Media control capabilities, value can be "toggleMute", "toggleCamera", "toggleCaptions", "volume".
|
|
761
|
+
*/
|
|
762
|
+
mediaControls: string[];
|
|
763
|
+
/**
|
|
764
|
+
* Main stage layout control capabilities, value can be "showVideoGallery", "showContent", "showVideoGalleryAndContent", "showLargeGallery", "showTogether".
|
|
765
|
+
*/
|
|
766
|
+
stageLayoutControls: string[];
|
|
767
|
+
/**
|
|
768
|
+
* Meeting control capabilities, value can be "leaveMeeting".
|
|
769
|
+
*/
|
|
770
|
+
meetingControls: string[];
|
|
771
|
+
}
|
|
772
|
+
/**
|
|
773
|
+
* @private
|
|
774
|
+
* Hide from docs
|
|
775
|
+
*
|
|
776
|
+
* Data structure to represent states of a meeting room.
|
|
777
|
+
*/
|
|
778
|
+
interface MeetingRoomState {
|
|
779
|
+
/**
|
|
780
|
+
* Current mute state, true: mute, false: unmute.
|
|
781
|
+
*/
|
|
782
|
+
toggleMute: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* Current camera state, true: camera on, false: camera off.
|
|
785
|
+
*/
|
|
786
|
+
toggleCamera: boolean;
|
|
787
|
+
/**
|
|
788
|
+
* Current captions state, true: captions on, false: captions off.
|
|
789
|
+
*/
|
|
790
|
+
toggleCaptions: boolean;
|
|
791
|
+
/**
|
|
792
|
+
* Current main stage layout state, value can be one of "Gallery", "Content + gallery", "Content", "Large gallery" and "Together mode".
|
|
793
|
+
*/
|
|
794
|
+
stageLayout: string;
|
|
795
|
+
/**
|
|
796
|
+
* Current leaveMeeting state, true: leave, false: no-op.
|
|
797
|
+
*/
|
|
798
|
+
leaveMeeting: boolean;
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* @private
|
|
802
|
+
* Hide from docs
|
|
803
|
+
*
|
|
804
|
+
* Fetch the meeting room info that paired with current client.
|
|
805
|
+
* @param callback Callback to invoke when the meeting room info is fetched.
|
|
806
|
+
*/
|
|
807
|
+
function getPairedMeetingRoomInfo(callback: (sdkError: SdkError, meetingRoomInfo: MeetingRoomInfo) => void): void;
|
|
808
|
+
/**
|
|
809
|
+
* @private
|
|
810
|
+
* Hide from docs
|
|
811
|
+
*
|
|
812
|
+
* Send a command to paired meeting room.
|
|
813
|
+
* @param commandName The command name.
|
|
814
|
+
* @param callback Callback to invoke when the command response returns.
|
|
815
|
+
*/
|
|
816
|
+
function sendCommandToPairedMeetingRoom(commandName: string, callback: (sdkError: SdkError) => void): void;
|
|
817
|
+
/**
|
|
818
|
+
* @private
|
|
819
|
+
* Hide from docs
|
|
820
|
+
*
|
|
821
|
+
* Registers a handler for meeting room capabilities update.
|
|
822
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
823
|
+
* @param handler The handler to invoke when the capabilities of meeting room update.
|
|
824
|
+
*/
|
|
825
|
+
function registerMeetingRoomCapabilitiesUpdateHandler(handler: (capabilities: MeetingRoomCapability) => void): void;
|
|
826
|
+
/**
|
|
827
|
+
* @private
|
|
828
|
+
* Hide from docs
|
|
829
|
+
* Registers a handler for meeting room states update.
|
|
830
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
831
|
+
* @param handler The handler to invoke when the states of meeting room update.
|
|
832
|
+
*/
|
|
833
|
+
function registerMeetingRoomStatesUpdateHandler(handler: (states: MeetingRoomState) => void): void;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/**
|
|
837
|
+
* Namespace to interact with the menu-specific part of the SDK.
|
|
838
|
+
* This object is used to show View Configuration, Action Menu and Navigation Bar Menu.
|
|
839
|
+
*
|
|
840
|
+
* @private
|
|
841
|
+
* Hide from docs until feature is complete
|
|
842
|
+
*/
|
|
843
|
+
export namespace menus {
|
|
844
|
+
/**
|
|
845
|
+
* Represents information about item in View Configuration.
|
|
846
|
+
*/
|
|
847
|
+
interface ViewConfiguration {
|
|
848
|
+
/**
|
|
849
|
+
* Unique identifier of view.
|
|
850
|
+
*/
|
|
851
|
+
id: string;
|
|
852
|
+
/**
|
|
853
|
+
* Display title of the view.
|
|
854
|
+
*/
|
|
855
|
+
title: string;
|
|
856
|
+
/**
|
|
857
|
+
* Additional information for accessibility.
|
|
858
|
+
*/
|
|
859
|
+
contentDescription?: string;
|
|
860
|
+
}
|
|
861
|
+
/**
|
|
862
|
+
* Represents information about menu item for Action Menu and Navigation Bar Menu.
|
|
863
|
+
*/
|
|
864
|
+
class MenuItem {
|
|
865
|
+
/**
|
|
866
|
+
* Unique identifier for the menu item.
|
|
867
|
+
*/
|
|
868
|
+
id: string;
|
|
869
|
+
/**
|
|
870
|
+
* Display title of the menu item.
|
|
871
|
+
*/
|
|
872
|
+
title: string;
|
|
873
|
+
/**
|
|
874
|
+
* Display icon of the menu item. The icon value must be a string having SVG icon content.
|
|
875
|
+
*/
|
|
876
|
+
icon: string;
|
|
877
|
+
/**
|
|
878
|
+
* Selected state display icon of the menu item. The icon value must be a string having SVG icon content.
|
|
879
|
+
*/
|
|
880
|
+
iconSelected?: string;
|
|
881
|
+
/**
|
|
882
|
+
* Additional information for accessibility.
|
|
883
|
+
*/
|
|
884
|
+
contentDescription?: string;
|
|
885
|
+
/**
|
|
886
|
+
* State of the menu item
|
|
887
|
+
*/
|
|
888
|
+
enabled: boolean;
|
|
889
|
+
/**
|
|
890
|
+
* Interface to show list of items on selection of menu item.
|
|
891
|
+
*/
|
|
892
|
+
viewData: ViewData;
|
|
893
|
+
/**
|
|
894
|
+
* Whether the menu item is selected or not
|
|
895
|
+
*/
|
|
896
|
+
selected: boolean;
|
|
897
|
+
}
|
|
898
|
+
/**
|
|
899
|
+
* Represents information about view to show on Navigation Bar Menu item selection
|
|
900
|
+
*/
|
|
901
|
+
interface ViewData {
|
|
902
|
+
/**
|
|
903
|
+
* Display header title of the item list.
|
|
904
|
+
*/
|
|
905
|
+
listTitle?: string;
|
|
906
|
+
/**
|
|
907
|
+
* Type of the menu item.
|
|
908
|
+
*/
|
|
909
|
+
listType: MenuListType;
|
|
910
|
+
/**
|
|
911
|
+
* Array of MenuItem. Icon value will be required for all items in the list.
|
|
912
|
+
*/
|
|
913
|
+
listItems: MenuItem[];
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Represents information about type of list to display in Navigation Bar Menu.
|
|
917
|
+
*/
|
|
918
|
+
enum MenuListType {
|
|
919
|
+
dropDown = "dropDown",
|
|
920
|
+
popOver = "popOver"
|
|
921
|
+
}
|
|
922
|
+
function initialize(): void;
|
|
923
|
+
/**
|
|
924
|
+
* Registers list of view configurations and it's handler.
|
|
925
|
+
* Handler is responsible for listening selection of View Configuration.
|
|
926
|
+
* @param viewConfig List of view configurations. Minimum 1 value is required.
|
|
927
|
+
* @param handler The handler to invoke when the user selects view configuration.
|
|
928
|
+
*/
|
|
929
|
+
function setUpViews(viewConfig: ViewConfiguration[], handler: (id: string) => boolean): void;
|
|
930
|
+
/**
|
|
931
|
+
* Used to set menu items on the Navigation Bar. If icon is available, icon will be shown, otherwise title will be shown.
|
|
932
|
+
* @param items List of MenuItems for Navigation Bar Menu.
|
|
933
|
+
* @param handler The handler to invoke when the user selects menu item.
|
|
934
|
+
*/
|
|
935
|
+
function setNavBarMenu(items: MenuItem[], handler: (id: string) => boolean): void;
|
|
936
|
+
interface ActionMenuParameters {
|
|
937
|
+
/**
|
|
938
|
+
* Display title for Action Menu
|
|
939
|
+
*/
|
|
940
|
+
title: string;
|
|
941
|
+
/**
|
|
942
|
+
* List of MenuItems for Action Menu
|
|
943
|
+
*/
|
|
944
|
+
items: MenuItem[];
|
|
945
|
+
}
|
|
946
|
+
/**
|
|
947
|
+
* Used to show Action Menu.
|
|
948
|
+
* @param params Parameters for Menu Parameters
|
|
949
|
+
* @param handler The handler to invoke when the user selects menu item.
|
|
950
|
+
*/
|
|
951
|
+
function showActionMenu(params: ActionMenuParameters, handler: (id: string) => boolean): void;
|
|
952
|
+
}
|
|
953
|
+
export function initializePrivateApis(): void;
|
|
954
|
+
/**
|
|
955
|
+
* @private
|
|
956
|
+
* Hide from docs
|
|
957
|
+
* ------
|
|
958
|
+
* Allows an app to retrieve information of all user joined teams
|
|
959
|
+
* @param callback The callback to invoke when the {@link TeamInstanceParameters} object is retrieved.
|
|
960
|
+
* @param teamInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams
|
|
961
|
+
*/
|
|
962
|
+
export function getUserJoinedTeams(callback: (userJoinedTeamsInformation: UserJoinedTeamsInformation) => void, teamInstanceParameters?: TeamInstanceParameters): void;
|
|
963
|
+
/**
|
|
964
|
+
* @private
|
|
965
|
+
* Hide from docs
|
|
966
|
+
* ------
|
|
967
|
+
* Place the tab into full-screen mode.
|
|
968
|
+
*/
|
|
969
|
+
export function enterFullscreen(): void;
|
|
970
|
+
/**
|
|
971
|
+
* @private
|
|
972
|
+
* Hide from docs
|
|
973
|
+
* ------
|
|
974
|
+
* Reverts the tab into normal-screen mode.
|
|
975
|
+
*/
|
|
976
|
+
export function exitFullscreen(): void;
|
|
977
|
+
/**
|
|
978
|
+
* @private
|
|
979
|
+
* Hide from docs.
|
|
980
|
+
* ------
|
|
981
|
+
* Opens a client-friendly preview of the specified file.
|
|
982
|
+
* @param file The file to preview.
|
|
983
|
+
*/
|
|
984
|
+
export function openFilePreview(filePreviewParameters: FilePreviewParameters): void;
|
|
985
|
+
/**
|
|
986
|
+
* @private
|
|
987
|
+
* Hide from docs.
|
|
988
|
+
* ------
|
|
989
|
+
* display notification API.
|
|
990
|
+
* @param message Notification message.
|
|
991
|
+
* @param notificationType Notification type
|
|
992
|
+
*/
|
|
993
|
+
export function showNotification(showNotificationParameters: ShowNotificationParameters): void;
|
|
994
|
+
/**
|
|
995
|
+
* @private
|
|
996
|
+
* Hide from docs.
|
|
997
|
+
* ------
|
|
998
|
+
* Upload a custom App manifest directly to both team and personal scopes.
|
|
999
|
+
* This method works just for the first party Apps.
|
|
1000
|
+
*/
|
|
1001
|
+
export function uploadCustomApp(manifestBlob: Blob, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
1002
|
+
/**
|
|
1003
|
+
* @private
|
|
1004
|
+
* Internal use only
|
|
1005
|
+
* Sends a custom action MessageRequest to Teams or parent window
|
|
1006
|
+
* @param actionName Specifies name of the custom action to be sent
|
|
1007
|
+
* @param args Specifies additional arguments passed to the action
|
|
1008
|
+
* @param callback Optionally specify a callback to receive response parameters from the parent
|
|
1009
|
+
* @returns id of sent message
|
|
1010
|
+
*/
|
|
1011
|
+
export function sendCustomMessage(actionName: string, args?: any[], callback?: (...args: any[]) => void): void;
|
|
1012
|
+
/**
|
|
1013
|
+
* @private
|
|
1014
|
+
* Internal use only
|
|
1015
|
+
* Sends a custom action MessageEvent to a child iframe/window, only if you are not using auth popup.
|
|
1016
|
+
* Otherwise it will go to the auth popup (which becomes the child)
|
|
1017
|
+
* @param actionName Specifies name of the custom action to be sent
|
|
1018
|
+
* @param args Specifies additional arguments passed to the action
|
|
1019
|
+
* @returns id of sent message
|
|
1020
|
+
*/
|
|
1021
|
+
export function sendCustomEvent(actionName: string, args?: any[]): void;
|
|
1022
|
+
/**
|
|
1023
|
+
* @private
|
|
1024
|
+
* Internal use only
|
|
1025
|
+
* Adds a handler for an action sent by a child window or parent window
|
|
1026
|
+
* @param actionName Specifies name of the action message to handle
|
|
1027
|
+
* @param customHandler The callback to invoke when the action message is received. The return value is sent to the child
|
|
1028
|
+
*/
|
|
1029
|
+
export function registerCustomHandler(actionName: string, customHandler: (...args: any[]) => any[]): void;
|
|
1030
|
+
/**
|
|
1031
|
+
* @private
|
|
1032
|
+
* Hide from docs
|
|
1033
|
+
* ------
|
|
1034
|
+
* Allows an app to retrieve information of all chat members
|
|
1035
|
+
* Because a malicious party run your content in a browser, this value should
|
|
1036
|
+
* be used only as a hint as to who the members are and never as proof of membership.
|
|
1037
|
+
* @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.
|
|
1038
|
+
*/
|
|
1039
|
+
export function getChatMembers(callback: (chatMembersInformation: ChatMembersInformation) => void): void;
|
|
1040
|
+
/**
|
|
1041
|
+
* @private
|
|
1042
|
+
* Hide from docs
|
|
1043
|
+
* ------
|
|
1044
|
+
* Allows an app to get the configuration setting value
|
|
1045
|
+
* @param callback The callback to invoke when the value is retrieved.
|
|
1046
|
+
* @param key The key for the config setting
|
|
1047
|
+
*/
|
|
1048
|
+
export function getConfigSetting(callback: (value: string) => void, key: string): void;
|
|
1049
|
+
/**
|
|
1050
|
+
* @private
|
|
1051
|
+
* register a handler to be called when a user setting changes. The changed setting type & value is provided in the callback.
|
|
1052
|
+
* @param settingTypes List of user setting changes to subscribe
|
|
1053
|
+
* @param handler When a subscribed setting is updated this handler is called
|
|
1054
|
+
*/
|
|
1055
|
+
export function registerUserSettingsChangeHandler(settingTypes: UserSettingTypes[], handler: (settingType: UserSettingTypes, value: any) => void): void;
|
|
1056
|
+
export namespace remoteCamera {
|
|
1057
|
+
/**
|
|
1058
|
+
* @private
|
|
1059
|
+
* Hide from docs
|
|
1060
|
+
*
|
|
1061
|
+
* Data structure to represent patricipant details needed to request control of camera.
|
|
1062
|
+
*/
|
|
1063
|
+
interface Participant {
|
|
1064
|
+
/**
|
|
1065
|
+
* Id of participant.
|
|
1066
|
+
*/
|
|
1067
|
+
id: string;
|
|
1068
|
+
/**
|
|
1069
|
+
* Display name of participant.
|
|
1070
|
+
*/
|
|
1071
|
+
displayName?: string;
|
|
1072
|
+
/**
|
|
1073
|
+
* Active indicates whether the participant's device is actively being controlled.
|
|
1074
|
+
*/
|
|
1075
|
+
active?: boolean;
|
|
1076
|
+
}
|
|
1077
|
+
/**
|
|
1078
|
+
* @private
|
|
1079
|
+
* Hide from docs
|
|
1080
|
+
*
|
|
1081
|
+
* Enum used to indicate possible camera control commands.
|
|
1082
|
+
*/
|
|
1083
|
+
enum ControlCommand {
|
|
1084
|
+
Reset = "Reset",
|
|
1085
|
+
ZoomIn = "ZoomIn",
|
|
1086
|
+
ZoomOut = "ZoomOut",
|
|
1087
|
+
PanLeft = "PanLeft",
|
|
1088
|
+
PanRight = "PanRight",
|
|
1089
|
+
TiltUp = "TiltUp",
|
|
1090
|
+
TiltDown = "TiltDown"
|
|
1091
|
+
}
|
|
1092
|
+
/**
|
|
1093
|
+
* @private
|
|
1094
|
+
* Hide from docs
|
|
1095
|
+
*
|
|
1096
|
+
* Data structure to indicate the current state of the device.
|
|
1097
|
+
*/
|
|
1098
|
+
interface DeviceState {
|
|
1099
|
+
/**
|
|
1100
|
+
* All operation are available to apply.
|
|
1101
|
+
*/
|
|
1102
|
+
available: boolean;
|
|
1103
|
+
/**
|
|
1104
|
+
* Either camera doesnt support to get state or It unable to apply command.
|
|
1105
|
+
*/
|
|
1106
|
+
error: boolean;
|
|
1107
|
+
/**
|
|
1108
|
+
* Reset max out or already applied. Client Disable Reset.
|
|
1109
|
+
*/
|
|
1110
|
+
reset: boolean;
|
|
1111
|
+
/**
|
|
1112
|
+
* ZoomIn maxed out.
|
|
1113
|
+
*/
|
|
1114
|
+
zoomIn: boolean;
|
|
1115
|
+
/**
|
|
1116
|
+
* ZoomOut maxed out.
|
|
1117
|
+
*/
|
|
1118
|
+
zoomOut: boolean;
|
|
1119
|
+
/**
|
|
1120
|
+
* PanLeft reached max left.
|
|
1121
|
+
*/
|
|
1122
|
+
panLeft: boolean;
|
|
1123
|
+
/**
|
|
1124
|
+
* PanRight reached max right.
|
|
1125
|
+
*/
|
|
1126
|
+
panRight: boolean;
|
|
1127
|
+
/**
|
|
1128
|
+
* TiltUp reached top.
|
|
1129
|
+
*/
|
|
1130
|
+
tiltUp: boolean;
|
|
1131
|
+
/**
|
|
1132
|
+
* TiltDown reached bottom.
|
|
1133
|
+
*/
|
|
1134
|
+
tiltDown: boolean;
|
|
1135
|
+
}
|
|
1136
|
+
/**
|
|
1137
|
+
* @private
|
|
1138
|
+
* Hide from docs
|
|
1139
|
+
*
|
|
1140
|
+
* Enum used to indicate the reason for the error.
|
|
1141
|
+
*/
|
|
1142
|
+
enum ErrorReason {
|
|
1143
|
+
CommandResetError = 0,
|
|
1144
|
+
CommandZoomInError = 1,
|
|
1145
|
+
CommandZoomOutError = 2,
|
|
1146
|
+
CommandPanLeftError = 3,
|
|
1147
|
+
CommandPanRightError = 4,
|
|
1148
|
+
CommandTiltUpError = 5,
|
|
1149
|
+
CommandTiltDownError = 6,
|
|
1150
|
+
SendDataError = 7
|
|
1151
|
+
}
|
|
1152
|
+
/**
|
|
1153
|
+
* @private
|
|
1154
|
+
* Hide from docs
|
|
1155
|
+
*
|
|
1156
|
+
* Data structure to indicate the status of the current session.
|
|
1157
|
+
*/
|
|
1158
|
+
interface SessionStatus {
|
|
1159
|
+
/**
|
|
1160
|
+
* Whether the far-end user is controlling a device.
|
|
1161
|
+
*/
|
|
1162
|
+
inControl: boolean;
|
|
1163
|
+
/**
|
|
1164
|
+
* Reason the control session was terminated.
|
|
1165
|
+
*/
|
|
1166
|
+
terminatedReason?: SessionTerminatedReason;
|
|
1167
|
+
}
|
|
1168
|
+
/**
|
|
1169
|
+
* @private
|
|
1170
|
+
* Hide from docs
|
|
1171
|
+
*
|
|
1172
|
+
* Enum used to indicate the reason the session was terminated.
|
|
1173
|
+
*/
|
|
1174
|
+
enum SessionTerminatedReason {
|
|
1175
|
+
None = 0,
|
|
1176
|
+
ControlDenied = 1,
|
|
1177
|
+
ControlNoResponse = 2,
|
|
1178
|
+
ControlBusy = 3,
|
|
1179
|
+
AckTimeout = 4,
|
|
1180
|
+
ControlTerminated = 5,
|
|
1181
|
+
ControllerTerminated = 6,
|
|
1182
|
+
DataChannelError = 7,
|
|
1183
|
+
ControllerCancelled = 8,
|
|
1184
|
+
ControlDisabled = 9
|
|
1185
|
+
}
|
|
1186
|
+
/**
|
|
1187
|
+
* @private
|
|
1188
|
+
* Hide from docs
|
|
1189
|
+
*
|
|
1190
|
+
* Fetch a list of the participants with controllable-cameras in a meeting.
|
|
1191
|
+
* @param callback Callback contains 2 parameters, error and participants.
|
|
1192
|
+
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
|
1193
|
+
* participants can either contain an array of Participant objects, incase of a successful fetch or null when it fails
|
|
1194
|
+
* participants: object that contains an array of participants with controllable-cameras
|
|
1195
|
+
*/
|
|
1196
|
+
function getCapableParticipants(callback: (error: SdkError | null, participants: Participant[] | null) => void): void;
|
|
1197
|
+
/**
|
|
1198
|
+
* @private
|
|
1199
|
+
* Hide from docs
|
|
1200
|
+
*
|
|
1201
|
+
* Request control of a participant's camera.
|
|
1202
|
+
* @param participant Participant specifies the participant to send the request for camera control.
|
|
1203
|
+
* @param callback Callback contains 2 parameters, error and requestResponse.
|
|
1204
|
+
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
|
1205
|
+
* requestResponse can either contain the true/false value, incase of a successful request or null when it fails
|
|
1206
|
+
* requestResponse: True means request was accepted and false means request was denied
|
|
1207
|
+
*/
|
|
1208
|
+
function requestControl(participant: Participant, callback: (error: SdkError | null, requestResponse: boolean | null) => void): void;
|
|
1209
|
+
/**
|
|
1210
|
+
* @private
|
|
1211
|
+
* Hide from docs
|
|
1212
|
+
*
|
|
1213
|
+
* Send control command to the participant's camera.
|
|
1214
|
+
* @param ControlCommand ControlCommand specifies the command for controling the camera.
|
|
1215
|
+
* @param callback Callback to invoke when the command response returns.
|
|
1216
|
+
*/
|
|
1217
|
+
function sendControlCommand(ControlCommand: ControlCommand, callback: (error: SdkError | null) => void): void;
|
|
1218
|
+
/**
|
|
1219
|
+
* @private
|
|
1220
|
+
* Hide from docs
|
|
1221
|
+
*
|
|
1222
|
+
* Terminate the remote session
|
|
1223
|
+
* @param callback Callback to invoke when the command response returns.
|
|
1224
|
+
*/
|
|
1225
|
+
function terminateSession(callback: (error: SdkError | null) => void): void;
|
|
1226
|
+
/**
|
|
1227
|
+
* Registers a handler for change in participants with controllable-cameras.
|
|
1228
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
1229
|
+
* @param handler The handler to invoke when the list of participants with controllable-cameras changes.
|
|
1230
|
+
*/
|
|
1231
|
+
function registerOnCapableParticipantsChangeHandler(handler: (participantChange: Participant[]) => void): void;
|
|
1232
|
+
/**
|
|
1233
|
+
* Registers a handler for error.
|
|
1234
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
1235
|
+
* @param handler The handler to invoke when there is an error from the camera handler.
|
|
1236
|
+
*/
|
|
1237
|
+
function registerOnErrorHandler(handler: (error: ErrorReason) => void): void;
|
|
1238
|
+
/**
|
|
1239
|
+
* Registers a handler for device state change.
|
|
1240
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
1241
|
+
* @param handler The handler to invoke when the controlled device changes state.
|
|
1242
|
+
*/
|
|
1243
|
+
function registerOnDeviceStateChangeHandler(handler: (deviceStateChange: DeviceState) => void): void;
|
|
1244
|
+
/**
|
|
1245
|
+
* Registers a handler for session status change.
|
|
1246
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
1247
|
+
* @param handler The handler to invoke when the current session status changes.
|
|
1248
|
+
*/
|
|
1249
|
+
function registerOnSessionStatusChangeHandler(handler: (sessionStatusChange: SessionStatus) => void): void;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
export namespace appInitialization {
|
|
1253
|
+
const Messages: {
|
|
1254
|
+
AppLoaded: string;
|
|
1255
|
+
Success: string;
|
|
1256
|
+
Failure: string;
|
|
1257
|
+
ExpectedFailure: string;
|
|
1258
|
+
};
|
|
1259
|
+
enum FailedReason {
|
|
1260
|
+
AuthFailed = "AuthFailed",
|
|
1261
|
+
Timeout = "Timeout",
|
|
1262
|
+
Other = "Other"
|
|
1263
|
+
}
|
|
1264
|
+
enum ExpectedFailureReason {
|
|
1265
|
+
PermissionError = "PermissionError",
|
|
1266
|
+
NotFound = "NotFound",
|
|
1267
|
+
Throttling = "Throttling",
|
|
1268
|
+
Offline = "Offline",
|
|
1269
|
+
Other = "Other"
|
|
1270
|
+
}
|
|
1271
|
+
interface IFailedRequest {
|
|
1272
|
+
reason: FailedReason;
|
|
1273
|
+
message?: string;
|
|
1274
|
+
}
|
|
1275
|
+
interface IExpectedFailureRequest {
|
|
1276
|
+
reason: ExpectedFailureReason;
|
|
1277
|
+
message?: string;
|
|
1278
|
+
}
|
|
1279
|
+
/**
|
|
1280
|
+
* Notifies the frame that app has loaded and to hide the loading indicator if one is shown.
|
|
1281
|
+
*/
|
|
1282
|
+
function notifyAppLoaded(): void;
|
|
1283
|
+
/**
|
|
1284
|
+
* Notifies the frame that app initialization is successful and is ready for user interaction.
|
|
1285
|
+
*/
|
|
1286
|
+
function notifySuccess(): void;
|
|
1287
|
+
/**
|
|
1288
|
+
* Notifies the frame that app initialization has failed and to show an error page in its place.
|
|
1289
|
+
*/
|
|
1290
|
+
function notifyFailure(appInitializationFailedRequest: IFailedRequest): void;
|
|
1291
|
+
/**
|
|
1292
|
+
* Notifies the frame that app initialized with some expected errors.
|
|
1293
|
+
*/
|
|
1294
|
+
function notifyExpectedFailure(expectedFailureRequest: IExpectedFailureRequest): void;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
export interface IAppWindow {
|
|
1298
|
+
postMessage(message: any): void;
|
|
1299
|
+
addEventListener(type: string, listener: Function): void;
|
|
1300
|
+
}
|
|
1301
|
+
export class ChildAppWindow implements IAppWindow {
|
|
1302
|
+
postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
1303
|
+
addEventListener(type: string, listener: (message: any) => void): void;
|
|
1304
|
+
}
|
|
1305
|
+
export class ParentAppWindow implements IAppWindow {
|
|
1306
|
+
private static _instance;
|
|
1307
|
+
static readonly Instance: IAppWindow;
|
|
1308
|
+
postMessage(message: any, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
1309
|
+
addEventListener(type: string, listener: (message: any) => void): void;
|
|
1310
|
+
}
|
|
1311
|
+
|
|
1312
|
+
/**
|
|
1313
|
+
* Namespace to interact with the authentication-specific part of the SDK.
|
|
1314
|
+
* This object is used for starting or completing authentication flows.
|
|
1315
|
+
*/
|
|
1316
|
+
export namespace authentication {
|
|
1317
|
+
function initialize(): void;
|
|
1318
|
+
/**
|
|
1319
|
+
* Registers the authentication Communication.handlers
|
|
1320
|
+
* @param authenticateParameters A set of values that configure the authentication pop-up.
|
|
1321
|
+
*/
|
|
1322
|
+
function registerAuthenticationHandlers(authenticateParameters: AuthenticateParameters): void;
|
|
1323
|
+
/**
|
|
1324
|
+
* Initiates an authentication request, which opens a new window with the specified settings.
|
|
1325
|
+
*/
|
|
1326
|
+
function authenticate(authenticateParameters?: AuthenticateParameters): void;
|
|
1327
|
+
/**
|
|
1328
|
+
* Requests an Azure AD token to be issued on behalf of the app. The token is acquired from the cache
|
|
1329
|
+
* if it is not expired. Otherwise a request is sent to Azure AD to obtain a new token.
|
|
1330
|
+
* @param authTokenRequest A set of values that configure the token request.
|
|
1331
|
+
*/
|
|
1332
|
+
function getAuthToken(authTokenRequest: AuthTokenRequest): void;
|
|
1333
|
+
/**
|
|
1334
|
+
* @private
|
|
1335
|
+
* Hide from docs.
|
|
1336
|
+
* ------
|
|
1337
|
+
* Requests the decoded Azure AD user identity on behalf of the app.
|
|
1338
|
+
*/
|
|
1339
|
+
function getUser(userRequest: UserRequest): void;
|
|
1340
|
+
/**
|
|
1341
|
+
* Notifies the frame that initiated this authentication request that the request was successful.
|
|
1342
|
+
* This function is usable only on the authentication window.
|
|
1343
|
+
* This call causes the authentication window to be closed.
|
|
1344
|
+
* @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.
|
|
1345
|
+
* @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.
|
|
1346
|
+
*/
|
|
1347
|
+
function notifySuccess(result?: string, callbackUrl?: string): void;
|
|
1348
|
+
/**
|
|
1349
|
+
* Notifies the frame that initiated this authentication request that the request failed.
|
|
1350
|
+
* This function is usable only on the authentication window.
|
|
1351
|
+
* This call causes the authentication window to be closed.
|
|
1352
|
+
* @param result Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives this value in its callback.
|
|
1353
|
+
* @param callbackUrl Specifies the url to redirect back to if the client is Win32 Outlook.
|
|
1354
|
+
*/
|
|
1355
|
+
function notifyFailure(reason?: string, callbackUrl?: string): void;
|
|
1356
|
+
interface AuthenticateParameters {
|
|
1357
|
+
/**
|
|
1358
|
+
* The URL for the authentication pop-up.
|
|
1359
|
+
*/
|
|
1360
|
+
url: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
|
|
1363
|
+
*/
|
|
1364
|
+
width?: number;
|
|
1365
|
+
/**
|
|
1366
|
+
* The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
|
|
1367
|
+
*/
|
|
1368
|
+
height?: number;
|
|
1369
|
+
/**
|
|
1370
|
+
* A function that is called if the authentication succeeds, with the result returned from the authentication pop-up.
|
|
1371
|
+
*/
|
|
1372
|
+
successCallback?: (result?: string) => void;
|
|
1373
|
+
/**
|
|
1374
|
+
* A function that is called if the authentication fails, with the reason for the failure returned from the authentication pop-up.
|
|
1375
|
+
*/
|
|
1376
|
+
failureCallback?: (reason?: string) => void;
|
|
1377
|
+
}
|
|
1378
|
+
interface AuthTokenRequest {
|
|
1379
|
+
/**
|
|
1380
|
+
* An optional list of resource for which to acquire the access token; only used for full trust apps.
|
|
1381
|
+
*/
|
|
1382
|
+
resources?: string[];
|
|
1383
|
+
/**
|
|
1384
|
+
* An optional list of claims which to pass to AAD when requesting the access token.
|
|
1385
|
+
*/
|
|
1386
|
+
claims?: string[];
|
|
1387
|
+
/**
|
|
1388
|
+
* An optional flag indicating whether to attempt the token acquisition silently or allow a prompt to be shown.
|
|
1389
|
+
*/
|
|
1390
|
+
silent?: boolean;
|
|
1391
|
+
/**
|
|
1392
|
+
* A function that is called if the token request succeeds, with the resulting token.
|
|
1393
|
+
*/
|
|
1394
|
+
successCallback?: (token: string) => void;
|
|
1395
|
+
/**
|
|
1396
|
+
* A function that is called if the token request fails, with the reason for the failure.
|
|
1397
|
+
*/
|
|
1398
|
+
failureCallback?: (reason: string) => void;
|
|
1399
|
+
}
|
|
1400
|
+
/**
|
|
1401
|
+
* @private
|
|
1402
|
+
* Hide from docs.
|
|
1403
|
+
* ------
|
|
1404
|
+
*/
|
|
1405
|
+
interface UserRequest {
|
|
1406
|
+
/**
|
|
1407
|
+
* A function that is called if the token request succeeds, with the resulting token.
|
|
1408
|
+
*/
|
|
1409
|
+
successCallback?: (user: UserProfile) => void;
|
|
1410
|
+
/**
|
|
1411
|
+
* A function that is called if the token request fails, with the reason for the failure.
|
|
1412
|
+
*/
|
|
1413
|
+
failureCallback?: (reason: string) => void;
|
|
1414
|
+
}
|
|
1415
|
+
/**
|
|
1416
|
+
* @private
|
|
1417
|
+
* Hide from docs.
|
|
1418
|
+
* ------
|
|
1419
|
+
*/
|
|
1420
|
+
interface UserProfile {
|
|
1421
|
+
/**
|
|
1422
|
+
* The intended recipient of the token. The application that receives the token must verify that the audience
|
|
1423
|
+
* value is correct and reject any tokens intended for a different audience.
|
|
1424
|
+
*/
|
|
1425
|
+
aud: string;
|
|
1426
|
+
/**
|
|
1427
|
+
* Identifies how the subject of the token was authenticated.
|
|
1428
|
+
*/
|
|
1429
|
+
amr: string[];
|
|
1430
|
+
/**
|
|
1431
|
+
* Stores the time at which the token was issued. It is often used to measure token freshness.
|
|
1432
|
+
*/
|
|
1433
|
+
iat: number;
|
|
1434
|
+
/**
|
|
1435
|
+
* Identifies the security token service (STS) that constructs and returns the token. In the tokens that Azure AD
|
|
1436
|
+
* returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Azure AD
|
|
1437
|
+
* directory. The tenant ID is an immutable and reliable identifier of the directory.
|
|
1438
|
+
*/
|
|
1439
|
+
iss: string;
|
|
1440
|
+
/**
|
|
1441
|
+
* Provides the last name, surname, or family name of the user as defined in the Azure AD user object.
|
|
1442
|
+
*/
|
|
1443
|
+
family_name: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* Provides the first or "given" name of the user, as set on the Azure AD user object.
|
|
1446
|
+
*/
|
|
1447
|
+
given_name: string;
|
|
1448
|
+
/**
|
|
1449
|
+
* Provides a human-readable value that identifies the subject of the token. This value is not guaranteed to
|
|
1450
|
+
* be unique within a tenant and is designed to be used only for display purposes.
|
|
1451
|
+
*/
|
|
1452
|
+
unique_name: string;
|
|
1453
|
+
/**
|
|
1454
|
+
* Contains a unique identifier of an object in Azure AD. This value is immutable and cannot be reassigned or
|
|
1455
|
+
* reused. Use the object ID to identify an object in queries to Azure AD.
|
|
1456
|
+
*/
|
|
1457
|
+
oid: string;
|
|
1458
|
+
/**
|
|
1459
|
+
* Identifies the principal about which the token asserts information, such as the user of an application.
|
|
1460
|
+
* This value is immutable and cannot be reassigned or reused, so it can be used to perform authorization
|
|
1461
|
+
* checks safely. Because the subject is always present in the tokens the Azure AD issues, we recommended
|
|
1462
|
+
* using this value in a general-purpose authorization system.
|
|
1463
|
+
*/
|
|
1464
|
+
sub: string;
|
|
1465
|
+
/**
|
|
1466
|
+
* An immutable, non-reusable identifier that identifies the directory tenant that issued the token. You can
|
|
1467
|
+
* use this value to access tenant-specific directory resources in a multitenant application. For example,
|
|
1468
|
+
* you can use this value to identify the tenant in a call to the Graph API.
|
|
1469
|
+
*/
|
|
1470
|
+
tid: string;
|
|
1471
|
+
/**
|
|
1472
|
+
* Defines the time interval within which a token is valid. The service that validates the token should verify
|
|
1473
|
+
* that the current date is within the token lifetime; otherwise it should reject the token. The service might
|
|
1474
|
+
* allow for up to five minutes beyond the token lifetime to account for any differences in clock time ("time
|
|
1475
|
+
* skew") between Azure AD and the service.
|
|
1476
|
+
*/
|
|
1477
|
+
exp: number;
|
|
1478
|
+
nbf: number;
|
|
1479
|
+
/**
|
|
1480
|
+
* Stores the user name of the user principal.
|
|
1481
|
+
*/
|
|
1482
|
+
upn: string;
|
|
1483
|
+
/**
|
|
1484
|
+
* Stores the version number of the token.
|
|
1485
|
+
*/
|
|
1486
|
+
ver: string;
|
|
1487
|
+
}
|
|
1488
|
+
}
|
|
1489
|
+
|
|
1490
|
+
export enum HostClientType {
|
|
1491
|
+
desktop = "desktop",
|
|
1492
|
+
web = "web",
|
|
1493
|
+
android = "android",
|
|
1494
|
+
ios = "ios",
|
|
1495
|
+
rigel = "rigel",
|
|
1496
|
+
surfaceHub = "surfaceHub"
|
|
1497
|
+
}
|
|
1498
|
+
export enum FrameContexts {
|
|
1499
|
+
settings = "settings",
|
|
1500
|
+
content = "content",
|
|
1501
|
+
authentication = "authentication",
|
|
1502
|
+
remove = "remove",
|
|
1503
|
+
task = "task",
|
|
1504
|
+
sidePanel = "sidePanel",
|
|
1505
|
+
stage = "stage",
|
|
1506
|
+
meetingStage = "meetingStage"
|
|
1507
|
+
}
|
|
1508
|
+
/**
|
|
1509
|
+
* Indicates the team type, currently used to distinguish between different team
|
|
1510
|
+
* types in Office 365 for Education (team types 1, 2, 3, and 4).
|
|
1511
|
+
*/
|
|
1512
|
+
export enum TeamType {
|
|
1513
|
+
Standard = 0,
|
|
1514
|
+
Edu = 1,
|
|
1515
|
+
Class = 2,
|
|
1516
|
+
Plc = 3,
|
|
1517
|
+
Staff = 4
|
|
1518
|
+
}
|
|
1519
|
+
/**
|
|
1520
|
+
* Indicates the various types of roles of a user in a team.
|
|
1521
|
+
*/
|
|
1522
|
+
export enum UserTeamRole {
|
|
1523
|
+
Admin = 0,
|
|
1524
|
+
User = 1,
|
|
1525
|
+
Guest = 2
|
|
1526
|
+
}
|
|
1527
|
+
/**
|
|
1528
|
+
* Task module dimension enum
|
|
1529
|
+
*/
|
|
1530
|
+
export enum TaskModuleDimension {
|
|
1531
|
+
Large = "large",
|
|
1532
|
+
Medium = "medium",
|
|
1533
|
+
Small = "small"
|
|
1534
|
+
}
|
|
1535
|
+
/**
|
|
1536
|
+
* The type of the channel with which the content is associated.
|
|
1537
|
+
*/
|
|
1538
|
+
export enum ChannelType {
|
|
1539
|
+
Regular = "Regular",
|
|
1540
|
+
Private = "Private",
|
|
1541
|
+
Shared = "Shared"
|
|
1542
|
+
}
|
|
1543
|
+
/**
|
|
1544
|
+
* Represents information about tabs for an app
|
|
1545
|
+
*/
|
|
1546
|
+
export interface TabInformation {
|
|
1547
|
+
teamTabs: TabInstance[];
|
|
1548
|
+
}
|
|
1549
|
+
/**
|
|
1550
|
+
* Represents information about a tab instance
|
|
1551
|
+
*/
|
|
1552
|
+
export interface TabInstance {
|
|
1553
|
+
/**
|
|
1554
|
+
* The name of the tab
|
|
1555
|
+
*/
|
|
1556
|
+
tabName: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* Internal: do not use
|
|
1559
|
+
* @protected
|
|
1560
|
+
*/
|
|
1561
|
+
internalTabInstanceId?: string;
|
|
1562
|
+
/**
|
|
1563
|
+
* Last viewed time of this tab. null means unknown
|
|
1564
|
+
*/
|
|
1565
|
+
lastViewUnixEpochTime?: string;
|
|
1566
|
+
/**
|
|
1567
|
+
* The developer-defined unique ID for the entity this content points to.
|
|
1568
|
+
*/
|
|
1569
|
+
entityId?: string;
|
|
1570
|
+
/**
|
|
1571
|
+
* The Microsoft Teams ID for the channel with which the content is associated.
|
|
1572
|
+
*/
|
|
1573
|
+
channelId?: string;
|
|
1574
|
+
/**
|
|
1575
|
+
* The name for the channel with which the content is associated.
|
|
1576
|
+
*/
|
|
1577
|
+
channelName?: string;
|
|
1578
|
+
/**
|
|
1579
|
+
* Is this tab in a favorite channel?
|
|
1580
|
+
*/
|
|
1581
|
+
channelIsFavorite?: boolean;
|
|
1582
|
+
/**
|
|
1583
|
+
* The Microsoft Teams ID for the team with which the content is associated.
|
|
1584
|
+
*/
|
|
1585
|
+
teamId?: string;
|
|
1586
|
+
/**
|
|
1587
|
+
* The name for the team with which the content is associated.
|
|
1588
|
+
*/
|
|
1589
|
+
teamName?: string;
|
|
1590
|
+
/**
|
|
1591
|
+
* Is this tab in a favorite team?
|
|
1592
|
+
*/
|
|
1593
|
+
teamIsFavorite?: boolean;
|
|
1594
|
+
/**
|
|
1595
|
+
* The Office 365 group ID for the team with which the content is associated.
|
|
1596
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1597
|
+
*/
|
|
1598
|
+
groupId?: string;
|
|
1599
|
+
/**
|
|
1600
|
+
* Content URL of this tab
|
|
1601
|
+
*/
|
|
1602
|
+
url?: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* Website URL of this tab
|
|
1605
|
+
*/
|
|
1606
|
+
websiteUrl?: string;
|
|
1607
|
+
}
|
|
1608
|
+
/**
|
|
1609
|
+
* Indicates information about the tab instance for filtering purposes.
|
|
1610
|
+
*/
|
|
1611
|
+
export interface TabInstanceParameters {
|
|
1612
|
+
/**
|
|
1613
|
+
* Flag allowing to select favorite channels only
|
|
1614
|
+
*/
|
|
1615
|
+
favoriteChannelsOnly?: boolean;
|
|
1616
|
+
/**
|
|
1617
|
+
* Flag allowing to select favorite teams only
|
|
1618
|
+
*/
|
|
1619
|
+
favoriteTeamsOnly?: boolean;
|
|
1620
|
+
}
|
|
1621
|
+
/**
|
|
1622
|
+
* Represents Team Information
|
|
1623
|
+
*/
|
|
1624
|
+
export interface TeamInformation {
|
|
1625
|
+
/**
|
|
1626
|
+
* Id of the team
|
|
1627
|
+
*/
|
|
1628
|
+
teamId: string;
|
|
1629
|
+
/**
|
|
1630
|
+
* Team display name
|
|
1631
|
+
*/
|
|
1632
|
+
teamName: string;
|
|
1633
|
+
/**
|
|
1634
|
+
* Team description
|
|
1635
|
+
*/
|
|
1636
|
+
teamDescription?: string;
|
|
1637
|
+
/**
|
|
1638
|
+
* Thumbnail Uri
|
|
1639
|
+
*/
|
|
1640
|
+
thumbnailUri?: string;
|
|
1641
|
+
/**
|
|
1642
|
+
* The Office 365 group ID for the team with which the content is associated.
|
|
1643
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1644
|
+
*/
|
|
1645
|
+
groupId?: string;
|
|
1646
|
+
/**
|
|
1647
|
+
* Role of current user in the team
|
|
1648
|
+
*/
|
|
1649
|
+
userTeamRole?: UserTeamRole;
|
|
1650
|
+
/**
|
|
1651
|
+
* The type of the team.
|
|
1652
|
+
*/
|
|
1653
|
+
teamType?: TeamType;
|
|
1654
|
+
/**
|
|
1655
|
+
* The locked status of the team
|
|
1656
|
+
*/
|
|
1657
|
+
isTeamLocked?: boolean;
|
|
1658
|
+
/**
|
|
1659
|
+
* The archived status of the team
|
|
1660
|
+
*/
|
|
1661
|
+
isTeamArchived?: boolean;
|
|
1662
|
+
}
|
|
1663
|
+
/**
|
|
1664
|
+
* Represents OS locale info used for formatting date and time data
|
|
1665
|
+
*/
|
|
1666
|
+
export interface LocaleInfo {
|
|
1667
|
+
platform: 'windows' | 'macos';
|
|
1668
|
+
regionalFormat: string;
|
|
1669
|
+
shortDate: string;
|
|
1670
|
+
longDate: string;
|
|
1671
|
+
shortTime: string;
|
|
1672
|
+
longTime: string;
|
|
1673
|
+
}
|
|
1674
|
+
/**
|
|
1675
|
+
* Allowed user file open preferences
|
|
1676
|
+
*/
|
|
1677
|
+
export enum FileOpenPreference {
|
|
1678
|
+
Inline = "inline",
|
|
1679
|
+
Desktop = "desktop",
|
|
1680
|
+
Web = "web"
|
|
1681
|
+
}
|
|
1682
|
+
export interface Context {
|
|
1683
|
+
/**
|
|
1684
|
+
* The Office 365 group ID for the team with which the content is associated.
|
|
1685
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1686
|
+
*/
|
|
1687
|
+
groupId?: string;
|
|
1688
|
+
/**
|
|
1689
|
+
* The Microsoft Teams ID for the team with which the content is associated.
|
|
1690
|
+
*/
|
|
1691
|
+
teamId?: string;
|
|
1692
|
+
/**
|
|
1693
|
+
* The name for the team with which the content is associated.
|
|
1694
|
+
*/
|
|
1695
|
+
teamName?: string;
|
|
1696
|
+
/**
|
|
1697
|
+
* The Microsoft Teams ID for the channel with which the content is associated.
|
|
1698
|
+
*/
|
|
1699
|
+
channelId?: string;
|
|
1700
|
+
/**
|
|
1701
|
+
* The name for the channel with which the content is associated.
|
|
1702
|
+
*/
|
|
1703
|
+
channelName?: string;
|
|
1704
|
+
/**
|
|
1705
|
+
* The type of the channel with which the content is associated.
|
|
1706
|
+
*/
|
|
1707
|
+
channelType?: ChannelType;
|
|
1708
|
+
/**
|
|
1709
|
+
* The developer-defined unique ID for the entity this content points to.
|
|
1710
|
+
*/
|
|
1711
|
+
entityId: string;
|
|
1712
|
+
/**
|
|
1713
|
+
* The developer-defined unique ID for the sub-entity this content points to.
|
|
1714
|
+
* This field should be used to restore to a specific state within an entity,
|
|
1715
|
+
* such as scrolling to or activating a specific piece of content.
|
|
1716
|
+
*/
|
|
1717
|
+
subEntityId?: string;
|
|
1718
|
+
/**
|
|
1719
|
+
* The current locale that the user has configured for the app formatted as
|
|
1720
|
+
* languageId-countryId (for example, en-us).
|
|
1721
|
+
*/
|
|
1722
|
+
locale: string;
|
|
1723
|
+
/**
|
|
1724
|
+
* More detailed locale info from the user's OS if available. Can be used together with
|
|
1725
|
+
* the @microsoft/globe NPM package to ensure your app respects the user's OS date and
|
|
1726
|
+
* time format configuration
|
|
1727
|
+
*/
|
|
1728
|
+
osLocaleInfo?: LocaleInfo;
|
|
1729
|
+
/**
|
|
1730
|
+
* @deprecated Use loginHint or userPrincipalName.
|
|
1731
|
+
* The UPN of the current user.
|
|
1732
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
1733
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
1734
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1735
|
+
*/
|
|
1736
|
+
upn?: string;
|
|
1737
|
+
/**
|
|
1738
|
+
* The Azure AD tenant ID of the current user.
|
|
1739
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
1740
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
1741
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1742
|
+
*/
|
|
1743
|
+
tid?: string;
|
|
1744
|
+
/**
|
|
1745
|
+
* The current UI theme.
|
|
1746
|
+
*/
|
|
1747
|
+
theme?: string;
|
|
1748
|
+
/**
|
|
1749
|
+
* Indication whether the tab is in full-screen mode.
|
|
1750
|
+
*/
|
|
1751
|
+
isFullScreen?: boolean;
|
|
1752
|
+
/**
|
|
1753
|
+
* The type of the team.
|
|
1754
|
+
*/
|
|
1755
|
+
teamType?: TeamType;
|
|
1756
|
+
/**
|
|
1757
|
+
* The root SharePoint site associated with the team.
|
|
1758
|
+
*/
|
|
1759
|
+
teamSiteUrl?: string;
|
|
1760
|
+
/**
|
|
1761
|
+
* The domain of the root SharePoint site associated with the team.
|
|
1762
|
+
*/
|
|
1763
|
+
teamSiteDomain?: string;
|
|
1764
|
+
/**
|
|
1765
|
+
* The relative path to the SharePoint site associated with the team.
|
|
1766
|
+
*/
|
|
1767
|
+
teamSitePath?: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* The tenant ID of the host team.
|
|
1770
|
+
*/
|
|
1771
|
+
hostTeamTenantId?: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* The AAD group ID of the host team.
|
|
1774
|
+
*/
|
|
1775
|
+
hostTeamGroupId?: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* The relative path to the SharePoint folder associated with the channel.
|
|
1778
|
+
*/
|
|
1779
|
+
channelRelativeUrl?: string;
|
|
1780
|
+
/**
|
|
1781
|
+
* Unique ID for the current Teams session for use in correlating telemetry data.
|
|
1782
|
+
*/
|
|
1783
|
+
sessionId?: string;
|
|
1784
|
+
/**
|
|
1785
|
+
* The user's role in the team.
|
|
1786
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
1787
|
+
* be used only as a hint as to the user's role, and never as proof of her role.
|
|
1788
|
+
*/
|
|
1789
|
+
userTeamRole?: UserTeamRole;
|
|
1790
|
+
/**
|
|
1791
|
+
* The Microsoft Teams ID for the chat with which the content is associated.
|
|
1792
|
+
*/
|
|
1793
|
+
chatId?: string;
|
|
1794
|
+
/**
|
|
1795
|
+
* A value suitable for use as a login_hint when authenticating with Azure AD.
|
|
1796
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
1797
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
1798
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1799
|
+
*/
|
|
1800
|
+
loginHint?: string;
|
|
1801
|
+
/**
|
|
1802
|
+
* The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).
|
|
1803
|
+
* Because a malicious party run your content in a browser, this value should
|
|
1804
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
1805
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1806
|
+
*/
|
|
1807
|
+
userPrincipalName?: string;
|
|
1808
|
+
/**
|
|
1809
|
+
* The Azure AD object id of the current user.
|
|
1810
|
+
* Because a malicious party run your content in a browser, this value should
|
|
1811
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
1812
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
1813
|
+
*/
|
|
1814
|
+
userObjectId?: string;
|
|
1815
|
+
/**
|
|
1816
|
+
* Indicates whether team is archived.
|
|
1817
|
+
* Apps should use this as a signal to prevent any changes to content associated with archived teams.
|
|
1818
|
+
*/
|
|
1819
|
+
isTeamArchived?: boolean;
|
|
1820
|
+
/**
|
|
1821
|
+
* The type of the host client. Possible values are : android, ios, web, desktop, rigel
|
|
1822
|
+
*/
|
|
1823
|
+
hostClientType?: HostClientType;
|
|
1824
|
+
/**
|
|
1825
|
+
* The context where tab url is loaded (content, task, setting, remove, sidePanel)
|
|
1826
|
+
*/
|
|
1827
|
+
frameContext?: FrameContexts;
|
|
1828
|
+
/**
|
|
1829
|
+
* SharePoint context. This is only available when hosted in SharePoint.
|
|
1830
|
+
*/
|
|
1831
|
+
sharepoint?: any;
|
|
1832
|
+
/**
|
|
1833
|
+
* The type of license for the current users tenant.
|
|
1834
|
+
*/
|
|
1835
|
+
tenantSKU?: string;
|
|
1836
|
+
/**
|
|
1837
|
+
* The license type for the current user.
|
|
1838
|
+
*/
|
|
1839
|
+
userLicenseType?: string;
|
|
1840
|
+
/**
|
|
1841
|
+
* The ID of the parent message from which this task module was launched.
|
|
1842
|
+
* This is only available in task modules launched from bot cards.
|
|
1843
|
+
*/
|
|
1844
|
+
parentMessageId?: string;
|
|
1845
|
+
/**
|
|
1846
|
+
* Current ring ID
|
|
1847
|
+
*/
|
|
1848
|
+
ringId?: string;
|
|
1849
|
+
/**
|
|
1850
|
+
* Unique ID for the current session for use in correlating telemetry data.
|
|
1851
|
+
*/
|
|
1852
|
+
appSessionId?: string;
|
|
1853
|
+
/**
|
|
1854
|
+
* Represents whether calling is allowed for the current logged in User
|
|
1855
|
+
*/
|
|
1856
|
+
isCallingAllowed?: boolean;
|
|
1857
|
+
/**
|
|
1858
|
+
* Represents whether PSTN calling is allowed for the current logged in User
|
|
1859
|
+
*/
|
|
1860
|
+
isPSTNCallingAllowed?: boolean;
|
|
1861
|
+
/**
|
|
1862
|
+
* Meeting Id used by tab when running in meeting context
|
|
1863
|
+
*/
|
|
1864
|
+
meetingId?: string;
|
|
1865
|
+
/**
|
|
1866
|
+
* The OneNote section ID that is linked to the channel.
|
|
1867
|
+
*/
|
|
1868
|
+
defaultOneNoteSectionId?: string;
|
|
1869
|
+
/**
|
|
1870
|
+
* Indication whether the tab is in a pop out window
|
|
1871
|
+
*/
|
|
1872
|
+
isMultiWindow?: boolean;
|
|
1873
|
+
/**
|
|
1874
|
+
* Personal app icon y coordinate position
|
|
1875
|
+
*/
|
|
1876
|
+
appIconPosition?: number;
|
|
1877
|
+
/**
|
|
1878
|
+
* Source origin from where the tab is opened
|
|
1879
|
+
*/
|
|
1880
|
+
sourceOrigin?: string;
|
|
1881
|
+
/**
|
|
1882
|
+
* Time when the user clicked on the tab
|
|
1883
|
+
*/
|
|
1884
|
+
userClickTime?: number;
|
|
1885
|
+
/**
|
|
1886
|
+
* Team Template ID if there was a Team Template associated with the creation of the team.
|
|
1887
|
+
*/
|
|
1888
|
+
teamTemplateId?: string;
|
|
1889
|
+
/**
|
|
1890
|
+
* Where the user prefers the file to be opened from by default during file open
|
|
1891
|
+
*/
|
|
1892
|
+
userFileOpenPreference?: FileOpenPreference;
|
|
1893
|
+
}
|
|
1894
|
+
export interface DeepLinkParameters {
|
|
1895
|
+
/**
|
|
1896
|
+
* The developer-defined unique ID for the sub-entity to which this deep link points in the current entity.
|
|
1897
|
+
* This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.
|
|
1898
|
+
*/
|
|
1899
|
+
subEntityId: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* The label for the sub-entity that should be displayed when the deep link is rendered in a client.
|
|
1902
|
+
*/
|
|
1903
|
+
subEntityLabel: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* The fallback URL to which to navigate the user if the client cannot render the page.
|
|
1906
|
+
* This URL should lead directly to the sub-entity.
|
|
1907
|
+
*/
|
|
1908
|
+
subEntityWebUrl?: string;
|
|
1909
|
+
}
|
|
1910
|
+
export interface TaskInfo {
|
|
1911
|
+
/**
|
|
1912
|
+
* The url to be rendered in the webview/iframe.
|
|
1913
|
+
*/
|
|
1914
|
+
url?: string;
|
|
1915
|
+
/**
|
|
1916
|
+
* JSON defining an adaptive card.
|
|
1917
|
+
*/
|
|
1918
|
+
card?: string;
|
|
1919
|
+
/**
|
|
1920
|
+
* The requested height of the webview/iframe.
|
|
1921
|
+
*/
|
|
1922
|
+
height?: TaskModuleDimension | number;
|
|
1923
|
+
/**
|
|
1924
|
+
* The requested width of the webview/iframe.
|
|
1925
|
+
*/
|
|
1926
|
+
width?: TaskModuleDimension | number;
|
|
1927
|
+
/**
|
|
1928
|
+
* Title of the task module.
|
|
1929
|
+
*/
|
|
1930
|
+
title?: string;
|
|
1931
|
+
/**
|
|
1932
|
+
* If client doesnt support the URL, the URL that needs to be opened in the browser.
|
|
1933
|
+
*/
|
|
1934
|
+
fallbackUrl?: string;
|
|
1935
|
+
/**
|
|
1936
|
+
* Specifies a bot ID to send the result of the user's interaction with the task module.
|
|
1937
|
+
* If specified, the bot will receive a task/complete invoke event with a JSON object
|
|
1938
|
+
* in the event payload.
|
|
1939
|
+
*/
|
|
1940
|
+
completionBotId?: string;
|
|
1941
|
+
}
|
|
1942
|
+
/**
|
|
1943
|
+
* @private
|
|
1944
|
+
* Hide from docs.
|
|
1945
|
+
* ------
|
|
1946
|
+
*/
|
|
1947
|
+
export interface OpenConversationRequest {
|
|
1948
|
+
/**
|
|
1949
|
+
* The Id of the subEntity where the conversation is taking place
|
|
1950
|
+
*/
|
|
1951
|
+
subEntityId: string;
|
|
1952
|
+
/**
|
|
1953
|
+
* The title of the conversation
|
|
1954
|
+
*/
|
|
1955
|
+
title: string;
|
|
1956
|
+
/**
|
|
1957
|
+
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
1958
|
+
*/
|
|
1959
|
+
conversationId?: string;
|
|
1960
|
+
/**
|
|
1961
|
+
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
1962
|
+
*/
|
|
1963
|
+
channelId?: string;
|
|
1964
|
+
/**
|
|
1965
|
+
* The entity Id of the tab
|
|
1966
|
+
*/
|
|
1967
|
+
entityId: string;
|
|
1968
|
+
/**
|
|
1969
|
+
* A function that is called once the conversation Id has been created
|
|
1970
|
+
*/
|
|
1971
|
+
onStartConversation?: (conversationResponse: ConversationResponse) => void;
|
|
1972
|
+
/**
|
|
1973
|
+
* A function that is called if the pane is closed
|
|
1974
|
+
*/
|
|
1975
|
+
onCloseConversation?: (conversationResponse: ConversationResponse) => void;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* @private
|
|
1979
|
+
* Hide from docs.
|
|
1980
|
+
* ------
|
|
1981
|
+
*/
|
|
1982
|
+
export interface ConversationResponse {
|
|
1983
|
+
/**
|
|
1984
|
+
* The Id of the subEntity where the conversation is taking place
|
|
1985
|
+
*/
|
|
1986
|
+
subEntityId: string;
|
|
1987
|
+
/**
|
|
1988
|
+
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
1989
|
+
*/
|
|
1990
|
+
conversationId?: string;
|
|
1991
|
+
/**
|
|
1992
|
+
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
1993
|
+
*/
|
|
1994
|
+
channelId?: string;
|
|
1995
|
+
/**
|
|
1996
|
+
* The entity Id of the tab
|
|
1997
|
+
*/
|
|
1998
|
+
entityId?: string;
|
|
1999
|
+
}
|
|
2000
|
+
/**
|
|
2001
|
+
* @private
|
|
2002
|
+
* Hide from docs.
|
|
2003
|
+
*/
|
|
2004
|
+
export interface LoadContext {
|
|
2005
|
+
/**
|
|
2006
|
+
* The enitity that is requested to be loaded
|
|
2007
|
+
*/
|
|
2008
|
+
entityId: string;
|
|
2009
|
+
/**
|
|
2010
|
+
* The content URL that is requested to be loaded
|
|
2011
|
+
*/
|
|
2012
|
+
contentUrl: string;
|
|
2013
|
+
}
|
|
2014
|
+
export interface FrameContext {
|
|
2015
|
+
/**
|
|
2016
|
+
* The current URL that needs to be used in the iframe if the tab is reloaded
|
|
2017
|
+
*/
|
|
2018
|
+
contentUrl: string;
|
|
2019
|
+
/**
|
|
2020
|
+
* The current URL that needs to be used for opening the website when the user clicks on 'Go to website'
|
|
2021
|
+
*/
|
|
2022
|
+
websiteUrl: string;
|
|
2023
|
+
}
|
|
2024
|
+
export interface SdkError {
|
|
2025
|
+
/**
|
|
2026
|
+
error code
|
|
2027
|
+
*/
|
|
2028
|
+
errorCode: ErrorCode;
|
|
2029
|
+
/**
|
|
2030
|
+
Optional description for the error. This may contain useful information for web-app developers.
|
|
2031
|
+
This string will not be localized and is not for end-user consumption.
|
|
2032
|
+
App should not depend on the string content. The exact value may change. This is only for debugging purposes.
|
|
2033
|
+
*/
|
|
2034
|
+
message?: string;
|
|
2035
|
+
}
|
|
2036
|
+
export enum ErrorCode {
|
|
2037
|
+
/**
|
|
2038
|
+
* API not supported in the current platform.
|
|
2039
|
+
*/
|
|
2040
|
+
NOT_SUPPORTED_ON_PLATFORM = 100,
|
|
2041
|
+
/**
|
|
2042
|
+
* Internal error encountered while performing the required operation.
|
|
2043
|
+
*/
|
|
2044
|
+
INTERNAL_ERROR = 500,
|
|
2045
|
+
/**
|
|
2046
|
+
* API is not supported in the current context
|
|
2047
|
+
*/
|
|
2048
|
+
NOT_SUPPORTED_IN_CURRENT_CONTEXT = 501,
|
|
2049
|
+
/**
|
|
2050
|
+
Permissions denied by user
|
|
2051
|
+
*/
|
|
2052
|
+
PERMISSION_DENIED = 1000,
|
|
2053
|
+
/**
|
|
2054
|
+
* Network issue
|
|
2055
|
+
*/
|
|
2056
|
+
NETWORK_ERROR = 2000,
|
|
2057
|
+
/**
|
|
2058
|
+
* Underlying hardware doesn't support the capability
|
|
2059
|
+
*/
|
|
2060
|
+
NO_HW_SUPPORT = 3000,
|
|
2061
|
+
/**
|
|
2062
|
+
* One or more arguments are invalid
|
|
2063
|
+
*/
|
|
2064
|
+
INVALID_ARGUMENTS = 4000,
|
|
2065
|
+
/**
|
|
2066
|
+
* User is not authorized for this operation
|
|
2067
|
+
*/
|
|
2068
|
+
UNAUTHORIZED_USER_OPERATION = 5000,
|
|
2069
|
+
/**
|
|
2070
|
+
* Could not complete the operation due to insufficient resources
|
|
2071
|
+
*/
|
|
2072
|
+
INSUFFICIENT_RESOURCES = 6000,
|
|
2073
|
+
/**
|
|
2074
|
+
* Platform throttled the request because of API was invoked too frequently
|
|
2075
|
+
*/
|
|
2076
|
+
THROTTLE = 7000,
|
|
2077
|
+
/**
|
|
2078
|
+
* User aborted the operation
|
|
2079
|
+
*/
|
|
2080
|
+
USER_ABORT = 8000,
|
|
2081
|
+
/**
|
|
2082
|
+
* Could not complete the operation in the given time interval
|
|
2083
|
+
*/
|
|
2084
|
+
OPERATION_TIMED_OUT = 8001,
|
|
2085
|
+
/**
|
|
2086
|
+
* Platform code is old and doesn't implement this API
|
|
2087
|
+
*/
|
|
2088
|
+
OLD_PLATFORM = 9000,
|
|
2089
|
+
/**
|
|
2090
|
+
* The file specified was not found on the given location
|
|
2091
|
+
*/
|
|
2092
|
+
FILE_NOT_FOUND = 404,
|
|
2093
|
+
/**
|
|
2094
|
+
* The return value is too big and has exceeded our size boundries
|
|
2095
|
+
*/
|
|
2096
|
+
SIZE_EXCEEDED = 10000
|
|
2097
|
+
}
|
|
2098
|
+
export namespace location {
|
|
2099
|
+
interface LocationProps {
|
|
2100
|
+
/**
|
|
2101
|
+
whether user can alter location or not
|
|
2102
|
+
if false, user will be shown current location
|
|
2103
|
+
and wouldn't be allowed to alter it
|
|
2104
|
+
*/
|
|
2105
|
+
allowChooseLocation: boolean;
|
|
2106
|
+
/**
|
|
2107
|
+
whether selected location should be shown to user on map or not.
|
|
2108
|
+
If allowChooseLocation is true, this parameter will be ignored by platform.
|
|
2109
|
+
If allowChooseLocation is false, and this paramater is not provided, default
|
|
2110
|
+
value will be false.
|
|
2111
|
+
*/
|
|
2112
|
+
showMap?: boolean;
|
|
2113
|
+
}
|
|
2114
|
+
interface Location {
|
|
2115
|
+
/**
|
|
2116
|
+
Latitude of the location
|
|
2117
|
+
*/
|
|
2118
|
+
latitude: number;
|
|
2119
|
+
/**
|
|
2120
|
+
Longitude of the location
|
|
2121
|
+
*/
|
|
2122
|
+
longitude: number;
|
|
2123
|
+
/**
|
|
2124
|
+
Accuracy of the coordinates captured
|
|
2125
|
+
*/
|
|
2126
|
+
accuracy?: number;
|
|
2127
|
+
/**
|
|
2128
|
+
Time stamp when the location was captured
|
|
2129
|
+
*/
|
|
2130
|
+
timestamp?: number;
|
|
2131
|
+
}
|
|
2132
|
+
/**
|
|
2133
|
+
* Fetches current user coordinates or allows user to choose location on map
|
|
2134
|
+
* @param callback Callback to invoke when current user location is fetched
|
|
2135
|
+
*/
|
|
2136
|
+
function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void;
|
|
2137
|
+
/**
|
|
2138
|
+
* Shows the location on map corresponding to the given coordinates
|
|
2139
|
+
* @param location {@link Location} which needs to be shown on map
|
|
2140
|
+
* @param callback Callback to invoke when the location is opened on map
|
|
2141
|
+
*/
|
|
2142
|
+
function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
|
|
2143
|
+
}
|
|
2144
|
+
export namespace media {
|
|
2145
|
+
/**
|
|
2146
|
+
* Enum for file formats supported
|
|
2147
|
+
*/
|
|
2148
|
+
enum FileFormat {
|
|
2149
|
+
Base64 = "base64",
|
|
2150
|
+
ID = "id"
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* File object that can be used to represent image or video or audio
|
|
2154
|
+
*/
|
|
2155
|
+
class File {
|
|
2156
|
+
/**
|
|
2157
|
+
* Content of the file. When format is Base64, this is the base64 content
|
|
2158
|
+
* When format is ID, this is id mapping to the URI
|
|
2159
|
+
* When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.
|
|
2160
|
+
*/
|
|
2161
|
+
content: string;
|
|
2162
|
+
/**
|
|
2163
|
+
* Format of the content
|
|
2164
|
+
*/
|
|
2165
|
+
format: FileFormat;
|
|
2166
|
+
/**
|
|
2167
|
+
* Size of the file in KB
|
|
2168
|
+
*/
|
|
2169
|
+
size: number;
|
|
2170
|
+
/**
|
|
2171
|
+
* MIME type. This can be used for constructing a dataUrl, if needed.
|
|
2172
|
+
*/
|
|
2173
|
+
mimeType: string;
|
|
2174
|
+
/**
|
|
2175
|
+
* Optional: Name of the file
|
|
2176
|
+
*/
|
|
2177
|
+
name?: string;
|
|
2178
|
+
}
|
|
2179
|
+
/**
|
|
2180
|
+
* Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.
|
|
2181
|
+
* Callback will be called with an error, if there are any. App should first check the error.
|
|
2182
|
+
* If it is present the user can be updated with appropriate error message.
|
|
2183
|
+
* If error is null or undefined, then files will have the required result.
|
|
2184
|
+
* Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.
|
|
2185
|
+
* Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
|
|
2186
|
+
* @see File
|
|
2187
|
+
* @see SdkError
|
|
2188
|
+
*/
|
|
2189
|
+
function captureImage(callback: (error: SdkError, files: File[]) => void): void;
|
|
2190
|
+
/**
|
|
2191
|
+
* Media object returned by the select Media API
|
|
2192
|
+
*/
|
|
2193
|
+
class Media extends File {
|
|
2194
|
+
constructor(that?: Media);
|
|
2195
|
+
/**
|
|
2196
|
+
* A preview of the file which is a lightweight representation.
|
|
2197
|
+
* In case of images this will be a thumbnail/compressed image in base64 encoding.
|
|
2198
|
+
*/
|
|
2199
|
+
preview: string;
|
|
2200
|
+
/**
|
|
2201
|
+
* Gets the media in chunks irrespecitve of size, these chunks are assembled and sent back to the webapp as file/blob
|
|
2202
|
+
* @param callback returns blob of media
|
|
2203
|
+
*/
|
|
2204
|
+
getMedia(callback: (error: SdkError, blob: Blob) => void): void;
|
|
2205
|
+
private getMediaViaCallback;
|
|
2206
|
+
private getMediaViaHandler;
|
|
2207
|
+
}
|
|
2208
|
+
/**
|
|
2209
|
+
* Input parameter supplied to the select Media API
|
|
2210
|
+
*/
|
|
2211
|
+
interface MediaInputs {
|
|
2212
|
+
/**
|
|
2213
|
+
* Only one media type can be selected at a time
|
|
2214
|
+
*/
|
|
2215
|
+
mediaType: MediaType;
|
|
2216
|
+
/**
|
|
2217
|
+
* max limit of media allowed to be selected in one go, current max limit is 10 set by office lens.
|
|
2218
|
+
*/
|
|
2219
|
+
maxMediaCount: number;
|
|
2220
|
+
/**
|
|
2221
|
+
* Additional properties for customization of select media in mobile devices
|
|
2222
|
+
*/
|
|
2223
|
+
imageProps?: ImageProps;
|
|
2224
|
+
/**
|
|
2225
|
+
* Additional properties for audio capture flows.
|
|
2226
|
+
*/
|
|
2227
|
+
audioProps?: AudioProps;
|
|
2228
|
+
}
|
|
2229
|
+
/**
|
|
2230
|
+
* All properties in ImageProps are optional and have default values in the platform
|
|
2231
|
+
*/
|
|
2232
|
+
interface ImageProps {
|
|
2233
|
+
/**
|
|
2234
|
+
* Optional; Lets the developer specify the image source, more than one can be specified.
|
|
2235
|
+
* Default value is both camera and gallery
|
|
2236
|
+
*/
|
|
2237
|
+
sources?: Source[];
|
|
2238
|
+
/**
|
|
2239
|
+
* Optional; Specify in which mode the camera will be opened.
|
|
2240
|
+
* Default value is Photo
|
|
2241
|
+
*/
|
|
2242
|
+
startMode?: CameraStartMode;
|
|
2243
|
+
/**
|
|
2244
|
+
* Optional; indicate if inking on the selected Image is allowed or not
|
|
2245
|
+
* Default value is true
|
|
2246
|
+
*/
|
|
2247
|
+
ink?: boolean;
|
|
2248
|
+
/**
|
|
2249
|
+
* Optional; indicate if user is allowed to move between front and back camera
|
|
2250
|
+
* Default value is true
|
|
2251
|
+
*/
|
|
2252
|
+
cameraSwitcher?: boolean;
|
|
2253
|
+
/**
|
|
2254
|
+
* Optional; indicate if putting text stickers on the selected Image is allowed or not
|
|
2255
|
+
* Default value is true
|
|
2256
|
+
*/
|
|
2257
|
+
textSticker?: boolean;
|
|
2258
|
+
/**
|
|
2259
|
+
* Optional; indicate if image filtering mode is enabled on the selected image
|
|
2260
|
+
* Default value is false
|
|
2261
|
+
*/
|
|
2262
|
+
enableFilter?: boolean;
|
|
2263
|
+
}
|
|
2264
|
+
/**
|
|
2265
|
+
* All properties in AudioProps are optional and have default values in the platform
|
|
2266
|
+
*/
|
|
2267
|
+
interface AudioProps {
|
|
2268
|
+
/**
|
|
2269
|
+
* Optional; the maximum duration in minutes after which the recording should terminate automatically.
|
|
2270
|
+
* Default value is defined by the platform serving the API.
|
|
2271
|
+
*/
|
|
2272
|
+
maxDuration?: number;
|
|
2273
|
+
}
|
|
2274
|
+
/**
|
|
2275
|
+
* The modes in which camera can be launched in select Media API
|
|
2276
|
+
*/
|
|
2277
|
+
enum CameraStartMode {
|
|
2278
|
+
Photo = 1,
|
|
2279
|
+
Document = 2,
|
|
2280
|
+
Whiteboard = 3,
|
|
2281
|
+
BusinessCard = 4
|
|
2282
|
+
}
|
|
2283
|
+
/**
|
|
2284
|
+
* Specifies the image source
|
|
2285
|
+
*/
|
|
2286
|
+
enum Source {
|
|
2287
|
+
Camera = 1,
|
|
2288
|
+
Gallery = 2
|
|
2289
|
+
}
|
|
2290
|
+
/**
|
|
2291
|
+
* Specifies the type of Media
|
|
2292
|
+
*/
|
|
2293
|
+
enum MediaType {
|
|
2294
|
+
Image = 1,
|
|
2295
|
+
Audio = 4
|
|
2296
|
+
}
|
|
2297
|
+
/**
|
|
2298
|
+
* Input for view images API
|
|
2299
|
+
*/
|
|
2300
|
+
interface ImageUri {
|
|
2301
|
+
value: string;
|
|
2302
|
+
type: ImageUriType;
|
|
2303
|
+
}
|
|
2304
|
+
/**
|
|
2305
|
+
* ID contains a mapping for content uri on platform's side, URL is generic
|
|
2306
|
+
*/
|
|
2307
|
+
enum ImageUriType {
|
|
2308
|
+
ID = 1,
|
|
2309
|
+
URL = 2
|
|
2310
|
+
}
|
|
2311
|
+
/**
|
|
2312
|
+
* Media chunks an output of getMedia API from platform
|
|
2313
|
+
*/
|
|
2314
|
+
interface MediaChunk {
|
|
2315
|
+
/**
|
|
2316
|
+
* Base 64 data for the requested uri
|
|
2317
|
+
*/
|
|
2318
|
+
chunk: string;
|
|
2319
|
+
/**
|
|
2320
|
+
* chunk sequence number
|
|
2321
|
+
*/
|
|
2322
|
+
chunkSequence: number;
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Helper object to assembled media chunks
|
|
2326
|
+
*/
|
|
2327
|
+
interface AssembleAttachment {
|
|
2328
|
+
sequence: number;
|
|
2329
|
+
file: Blob;
|
|
2330
|
+
}
|
|
2331
|
+
/**
|
|
2332
|
+
* Select an attachment using camera/gallery
|
|
2333
|
+
* @param mediaInputs The input params to customize the media to be selected
|
|
2334
|
+
* @param callback The callback to invoke after fetching the media
|
|
2335
|
+
*/
|
|
2336
|
+
function selectMedia(mediaInputs: MediaInputs, callback: (error: SdkError, attachments: Media[]) => void): void;
|
|
2337
|
+
/**
|
|
2338
|
+
* View images using native image viewer
|
|
2339
|
+
* @param uriList urilist of images to be viewed - can be content uri or server url. supports upto 10 Images in one go
|
|
2340
|
+
* @param callback returns back error if encountered, returns null in case of success
|
|
2341
|
+
*/
|
|
2342
|
+
function viewImages(uriList: ImageUri[], callback: (error?: SdkError) => void): void;
|
|
2343
|
+
/**
|
|
2344
|
+
* Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile
|
|
2345
|
+
* All properties in BarCodeConfig are optional and have default values in the platform
|
|
2346
|
+
*/
|
|
2347
|
+
interface BarCodeConfig {
|
|
2348
|
+
/**
|
|
2349
|
+
* Optional; Lets the developer specify the scan timeout interval in seconds
|
|
2350
|
+
* Default value is 30 seconds and max allowed value is 60 seconds
|
|
2351
|
+
*/
|
|
2352
|
+
timeOutIntervalInSec?: number;
|
|
2353
|
+
}
|
|
2354
|
+
/**
|
|
2355
|
+
* Scan Barcode/QRcode using camera
|
|
2356
|
+
* Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
|
|
2357
|
+
* @param callback callback to invoke after scanning the barcode
|
|
2358
|
+
* @param config optional input configuration to customize the barcode scanning experience
|
|
2359
|
+
*/
|
|
2360
|
+
function scanBarCode(callback: (error: SdkError, decodedText: string) => void, config?: BarCodeConfig): void;
|
|
2361
|
+
}
|
|
2362
|
+
export namespace meeting {
|
|
2363
|
+
/**
|
|
2364
|
+
* @private
|
|
2365
|
+
* Hide from docs
|
|
2366
|
+
* Data structure to represent a meeting details.
|
|
2367
|
+
*/
|
|
2368
|
+
interface IMeetingDetails {
|
|
2369
|
+
/**
|
|
2370
|
+
* details object
|
|
2371
|
+
*/
|
|
2372
|
+
details: IDetails;
|
|
2373
|
+
/**
|
|
2374
|
+
* conversation object
|
|
2375
|
+
*/
|
|
2376
|
+
conversation: IConversation;
|
|
2377
|
+
/**
|
|
2378
|
+
* organizer object
|
|
2379
|
+
*/
|
|
2380
|
+
organizer: IOrganizer;
|
|
2381
|
+
}
|
|
2382
|
+
/**
|
|
2383
|
+
* @private
|
|
2384
|
+
* Hide from docs
|
|
2385
|
+
* Data structure to represent details.
|
|
2386
|
+
*/
|
|
2387
|
+
interface IDetails {
|
|
2388
|
+
/**
|
|
2389
|
+
* Scheduled start time of the meeting
|
|
2390
|
+
*/
|
|
2391
|
+
scheduledStartTime: string;
|
|
2392
|
+
/**
|
|
2393
|
+
* Scheduled end time of the meeting
|
|
2394
|
+
*/
|
|
2395
|
+
scheduledEndTime: string;
|
|
2396
|
+
/**
|
|
2397
|
+
* url to join the current meeting
|
|
2398
|
+
*/
|
|
2399
|
+
joinUrl?: string;
|
|
2400
|
+
/**
|
|
2401
|
+
* meeting title name of the meeting
|
|
2402
|
+
*/
|
|
2403
|
+
title?: string;
|
|
2404
|
+
/**
|
|
2405
|
+
* type of the meeting
|
|
2406
|
+
*/
|
|
2407
|
+
type?: MeetingType;
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* @private
|
|
2411
|
+
* Hide from docs
|
|
2412
|
+
* Data structure to represent a conversation object.
|
|
2413
|
+
*/
|
|
2414
|
+
interface IConversation {
|
|
2415
|
+
/**
|
|
2416
|
+
* conversation id of the meeting
|
|
2417
|
+
*/
|
|
2418
|
+
id: string;
|
|
2419
|
+
}
|
|
2420
|
+
/**
|
|
2421
|
+
* @private
|
|
2422
|
+
* Hide from docs
|
|
2423
|
+
* Data structure to represent an organizer object.
|
|
2424
|
+
*/
|
|
2425
|
+
interface IOrganizer {
|
|
2426
|
+
/**
|
|
2427
|
+
* organizer id of the meeting
|
|
2428
|
+
*/
|
|
2429
|
+
id?: string;
|
|
2430
|
+
/**
|
|
2431
|
+
* tenant id of the meeting
|
|
2432
|
+
*/
|
|
2433
|
+
tenantId?: string;
|
|
2434
|
+
}
|
|
2435
|
+
interface LiveStreamState {
|
|
2436
|
+
/**
|
|
2437
|
+
* indicates whether meeting is streaming
|
|
2438
|
+
*/
|
|
2439
|
+
isStreaming: boolean;
|
|
2440
|
+
/**
|
|
2441
|
+
* error object in case there is a failure
|
|
2442
|
+
*/
|
|
2443
|
+
error?: {
|
|
2444
|
+
/** error code from the streaming service, e.g. IngestionFailure */
|
|
2445
|
+
code: string;
|
|
2446
|
+
/** detailed error message string */
|
|
2447
|
+
message?: string;
|
|
2448
|
+
};
|
|
2449
|
+
}
|
|
2450
|
+
enum MeetingType {
|
|
2451
|
+
Unknown = "Unknown",
|
|
2452
|
+
Adhoc = "Adhoc",
|
|
2453
|
+
Scheduled = "Scheduled",
|
|
2454
|
+
Recurring = "Recurring",
|
|
2455
|
+
Broadcast = "Broadcast",
|
|
2456
|
+
MeetNow = "MeetNow"
|
|
2457
|
+
}
|
|
2458
|
+
/**
|
|
2459
|
+
* Allows an app to get the incoming audio speaker setting for the meeting user
|
|
2460
|
+
* @param callback Callback contains 2 parameters, error and result.
|
|
2461
|
+
* error can either contain an error of type SdkError, incase of an error, or null when fetch is successful
|
|
2462
|
+
* result can either contain the true/false value, incase of a successful fetch or null when the fetching fails
|
|
2463
|
+
* result: True means incoming audio is muted and false means incoming audio is unmuted
|
|
2464
|
+
*/
|
|
2465
|
+
function getIncomingClientAudioState(callback: (error: SdkError | null, result: boolean | null) => void): void;
|
|
2466
|
+
/**
|
|
2467
|
+
* Allows an app to toggle the incoming audio speaker setting for the meeting user from mute to unmute or vice-versa
|
|
2468
|
+
* @param callback Callback contains 2 parameters, error and result.
|
|
2469
|
+
* error can either contain an error of type SdkError, incase of an error, or null when toggle is successful
|
|
2470
|
+
* result can either contain the true/false value, incase of a successful toggle or null when the toggling fails
|
|
2471
|
+
* result: True means incoming audio is muted and false means incoming audio is unmuted
|
|
2472
|
+
*/
|
|
2473
|
+
function toggleIncomingClientAudio(callback: (error: SdkError | null, result: boolean | null) => void): void;
|
|
2474
|
+
/**
|
|
2475
|
+
* @private
|
|
2476
|
+
* Hide from docs
|
|
2477
|
+
* Allows an app to get the meeting details for the meeting
|
|
2478
|
+
* @param callback Callback contains 2 parameters, error and meetingDetails.
|
|
2479
|
+
* error can either contain an error of type SdkError, incase of an error, or null when get is successful
|
|
2480
|
+
* result can either contain a IMeetingDetails value, incase of a successful get or null when the get fails
|
|
2481
|
+
*/
|
|
2482
|
+
function getMeetingDetails(callback: (error: SdkError | null, meetingDetails: IMeetingDetails | null) => void): void;
|
|
2483
|
+
/**
|
|
2484
|
+
* @private
|
|
2485
|
+
* Allows an app to get the authentication token for the anonymous or guest user in the meeting
|
|
2486
|
+
* @param callback Callback contains 2 parameters, error and authenticationTokenOfAnonymousUser.
|
|
2487
|
+
* error can either contain an error of type SdkError, incase of an error, or null when get is successful
|
|
2488
|
+
* authenticationTokenOfAnonymousUser can either contain a string value, incase of a successful get or null when the get fails
|
|
2489
|
+
*/
|
|
2490
|
+
function getAuthenticationTokenForAnonymousUser(callback: (error: SdkError | null, authenticationTokenOfAnonymousUser: string | null) => void): void;
|
|
2491
|
+
/**
|
|
2492
|
+
* Allows an app to get the state of the live stream in the current meeting
|
|
2493
|
+
* @param callback Callback contains 2 parameters: error and liveStreamState.
|
|
2494
|
+
* error can either contain an error of type SdkError, in case of an error, or null when get is successful
|
|
2495
|
+
* liveStreamState can either contain a LiveStreamState value, or null when operation fails
|
|
2496
|
+
*/
|
|
2497
|
+
function getLiveStreamState(callback: (error: SdkError | null, liveStreamState: LiveStreamState | null) => void): void;
|
|
2498
|
+
/**
|
|
2499
|
+
* Allows an app to request the live streaming be started at the given streaming url
|
|
2500
|
+
* @param streamUrl the url to the stream resource
|
|
2501
|
+
* @param streamKey the key to the stream resource
|
|
2502
|
+
* @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
|
|
2503
|
+
* Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
|
|
2504
|
+
*/
|
|
2505
|
+
function requestStartLiveStreaming(callback: (error: SdkError | null) => void, streamUrl: string, streamKey?: string): void;
|
|
2506
|
+
/**
|
|
2507
|
+
* Allows an app to request the live streaming be stopped at the given streaming url
|
|
2508
|
+
* @param callback Callback contains error parameter which can be of type SdkError in case of an error, or null when operation is successful
|
|
2509
|
+
* Use getLiveStreamState or registerLiveStreamChangedHandler to get updates on the live stream state
|
|
2510
|
+
*/
|
|
2511
|
+
function requestStopLiveStreaming(callback: (error: SdkError | null) => void): void;
|
|
2512
|
+
/**
|
|
2513
|
+
* Registers a handler for changes to the live stream.
|
|
2514
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2515
|
+
* @param handler The handler to invoke when the live stream state changes
|
|
2516
|
+
*/
|
|
2517
|
+
function registerLiveStreamChangedHandler(handler: (liveStreamState: LiveStreamState) => void): void;
|
|
2518
|
+
}
|
|
2519
|
+
/**
|
|
2520
|
+
* Navigation specific part of the SDK.
|
|
2521
|
+
*/
|
|
2522
|
+
/**
|
|
2523
|
+
* Return focus to the main Teams app. Will focus search bar if navigating foward and app bar if navigating back.
|
|
2524
|
+
* @param navigateForward Determines the direction to focus in teams app.
|
|
2525
|
+
*/
|
|
2526
|
+
export function returnFocus(navigateForward?: boolean): void;
|
|
2527
|
+
/**
|
|
2528
|
+
* Navigates the Microsoft Teams app to the specified tab instance.
|
|
2529
|
+
* @param tabInstance The tab instance to navigate to.
|
|
2530
|
+
*/
|
|
2531
|
+
export function navigateToTab(tabInstance: TabInstance, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
2532
|
+
/**
|
|
2533
|
+
* Navigates the frame to a new cross-domain URL. The domain of this URL must match at least one of the
|
|
2534
|
+
* valid domains specified in the validDomains block of the manifest; otherwise, an exception will be
|
|
2535
|
+
* thrown. This function needs to be used only when navigating the frame to a URL in a different domain
|
|
2536
|
+
* than the current one in a way that keeps the app informed of the change and allows the SDK to
|
|
2537
|
+
* continue working.
|
|
2538
|
+
* @param url The URL to navigate the frame to.
|
|
2539
|
+
*/
|
|
2540
|
+
export function navigateCrossDomain(url: string, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
2541
|
+
/**
|
|
2542
|
+
* Navigates back in the Teams client. See registerBackButtonHandler for more information on when
|
|
2543
|
+
* it's appropriate to use this method.
|
|
2544
|
+
*/
|
|
2545
|
+
export function navigateBack(onComplete?: (status: boolean, reason?: string) => void): void;
|
|
2546
|
+
export namespace people {
|
|
2547
|
+
/**
|
|
2548
|
+
* Launches a people picker and allows the user to select one or more people from the list
|
|
2549
|
+
* If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
|
|
2550
|
+
* @param callback Returns list of JSON object of type PeoplePickerResult which consists of AAD IDs, display names and emails of the selected users
|
|
2551
|
+
* @param peoplePickerInputs Input parameters to launch customized people picker
|
|
2552
|
+
*/
|
|
2553
|
+
function selectPeople(callback: (error: SdkError, people: PeoplePickerResult[]) => void, peoplePickerInputs?: PeoplePickerInputs): void;
|
|
2554
|
+
/**
|
|
2555
|
+
* Input parameter supplied to the People Picker API
|
|
2556
|
+
*/
|
|
2557
|
+
interface PeoplePickerInputs {
|
|
2558
|
+
/**
|
|
2559
|
+
* Optional; Set title for the people picker
|
|
2560
|
+
* Default value is "Select people" for multiselect and "Select a person" for single select
|
|
2561
|
+
*/
|
|
2562
|
+
title?: string;
|
|
2563
|
+
/**
|
|
2564
|
+
* Optional; AAD ids of the users to be pre-populated in the search box of people picker control
|
|
2565
|
+
* If single select is enabled this value, only the first user in the list will be pre-populated
|
|
2566
|
+
* Default value is null
|
|
2567
|
+
*/
|
|
2568
|
+
setSelected?: string[];
|
|
2569
|
+
/**
|
|
2570
|
+
* Optional; launches the people picker in org wide scope even if the app is added to a chat or channel
|
|
2571
|
+
* Default value is false
|
|
2572
|
+
*/
|
|
2573
|
+
openOrgWideSearchInChatOrChannel?: boolean;
|
|
2574
|
+
/**
|
|
2575
|
+
* Optional; launches the people picker for which only 1 person can be selected
|
|
2576
|
+
* Default value is false
|
|
2577
|
+
*/
|
|
2578
|
+
singleSelect?: boolean;
|
|
2579
|
+
}
|
|
2580
|
+
/**
|
|
2581
|
+
* Output user object of people picker API
|
|
2582
|
+
*/
|
|
2583
|
+
interface PeoplePickerResult {
|
|
2584
|
+
/**
|
|
2585
|
+
* user object Id (also known as aad id) of the selected user
|
|
2586
|
+
*/
|
|
2587
|
+
objectId: string;
|
|
2588
|
+
/**
|
|
2589
|
+
* Optional; display name of the selected user
|
|
2590
|
+
*/
|
|
2591
|
+
displayName?: string;
|
|
2592
|
+
/**
|
|
2593
|
+
* Optional; email of the selected user
|
|
2594
|
+
*/
|
|
2595
|
+
email?: string;
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
/**
|
|
2599
|
+
* Initializes the library. This must be called before any other SDK calls
|
|
2600
|
+
* but after the frame is loaded successfully.
|
|
2601
|
+
* @param callback Optionally specify a callback to invoke when Teams SDK has successfully initialized
|
|
2602
|
+
* @param validMessageOrigins Optionally specify a list of cross frame message origins. There must have
|
|
2603
|
+
* https: protocol otherwise they will be ignored. Example: https://www.example.com
|
|
2604
|
+
*/
|
|
2605
|
+
export function initialize(callback?: () => void, validMessageOrigins?: string[]): void;
|
|
2606
|
+
/**
|
|
2607
|
+
* @private
|
|
2608
|
+
* Hide from docs.
|
|
2609
|
+
* ------
|
|
2610
|
+
* Undocumented function used to set a mock window for unit tests
|
|
2611
|
+
*/
|
|
2612
|
+
export function _initialize(hostWindow: any): void;
|
|
2613
|
+
/**
|
|
2614
|
+
* @private
|
|
2615
|
+
* Hide from docs.
|
|
2616
|
+
* ------
|
|
2617
|
+
* Undocumented function used to clear state between unit tests
|
|
2618
|
+
*/
|
|
2619
|
+
export function _uninitialize(): void;
|
|
2620
|
+
/**
|
|
2621
|
+
* Enable print capability to support printing page using Ctrl+P and cmd+P
|
|
2622
|
+
*/
|
|
2623
|
+
export function enablePrintCapability(): void;
|
|
2624
|
+
/**
|
|
2625
|
+
* default print handler
|
|
2626
|
+
*/
|
|
2627
|
+
export function print(): void;
|
|
2628
|
+
/**
|
|
2629
|
+
* Retrieves the current context the frame is running in.
|
|
2630
|
+
* @param callback The callback to invoke when the {@link Context} object is retrieved.
|
|
2631
|
+
*/
|
|
2632
|
+
export function getContext(callback: (context: Context) => void): void;
|
|
2633
|
+
/**
|
|
2634
|
+
* Registers a handler for theme changes.
|
|
2635
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2636
|
+
* @param handler The handler to invoke when the user changes their theme.
|
|
2637
|
+
*/
|
|
2638
|
+
export function registerOnThemeChangeHandler(handler: (theme: string) => void): void;
|
|
2639
|
+
/**
|
|
2640
|
+
* Registers a handler for changes from or to full-screen view for a tab.
|
|
2641
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2642
|
+
* @param handler The handler to invoke when the user toggles full-screen view for a tab.
|
|
2643
|
+
*/
|
|
2644
|
+
export function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
|
|
2645
|
+
/**
|
|
2646
|
+
* Registers a handler for clicking the app button.
|
|
2647
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2648
|
+
* @param handler The handler to invoke when the personal app button is clicked in the app bar.
|
|
2649
|
+
*/
|
|
2650
|
+
export function registerAppButtonClickHandler(handler: () => void): void;
|
|
2651
|
+
/**
|
|
2652
|
+
* Registers a handler for entering hover of the app button.
|
|
2653
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2654
|
+
* @param handler The handler to invoke when entering hover of the personal app button in the app bar.
|
|
2655
|
+
*/
|
|
2656
|
+
export function registerAppButtonHoverEnterHandler(handler: () => void): void;
|
|
2657
|
+
/**
|
|
2658
|
+
* Registers a handler for exiting hover of the app button.
|
|
2659
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2660
|
+
* @param handler The handler to invoke when exiting hover of the personal app button in the app bar.
|
|
2661
|
+
*/
|
|
2662
|
+
export function registerAppButtonHoverLeaveHandler(handler: () => void): void;
|
|
2663
|
+
/**
|
|
2664
|
+
* Registers a handler for user presses of the Team client's back button. Experiences that maintain an internal
|
|
2665
|
+
* navigation stack should use this handler to navigate the user back within their frame. If an app finds
|
|
2666
|
+
* that after running its back button handler it cannot handle the event it should call the navigateBack
|
|
2667
|
+
* method to ask the Teams client to handle it instead.
|
|
2668
|
+
* @param handler The handler to invoke when the user presses their Team client's back button.
|
|
2669
|
+
*/
|
|
2670
|
+
export function registerBackButtonHandler(handler: () => boolean): void;
|
|
2671
|
+
/**
|
|
2672
|
+
* @private
|
|
2673
|
+
* Registers a handler to be called when the page has been requested to load.
|
|
2674
|
+
* @param handler The handler to invoke when the page is loaded.
|
|
2675
|
+
*/
|
|
2676
|
+
export function registerOnLoadHandler(handler: (context: LoadContext) => void): void;
|
|
2677
|
+
/**
|
|
2678
|
+
* @private
|
|
2679
|
+
* Registers a handler to be called before the page is unloaded.
|
|
2680
|
+
* @param handler The handler to invoke before the page is unloaded. If this handler returns true the page should
|
|
2681
|
+
* invoke the readyToUnload function provided to it once it's ready to be unloaded.
|
|
2682
|
+
*/
|
|
2683
|
+
export function registerBeforeUnloadHandler(handler: (readyToUnload: () => void) => boolean): void;
|
|
2684
|
+
/**
|
|
2685
|
+
* Registers a handler for when the user reconfigurated tab
|
|
2686
|
+
* @param handler The handler to invoke when the user click on Settings.
|
|
2687
|
+
*/
|
|
2688
|
+
export function registerChangeSettingsHandler(handler: () => void): void;
|
|
2689
|
+
/**
|
|
2690
|
+
* Allows an app to retrieve for this user tabs that are owned by this app.
|
|
2691
|
+
* If no TabInstanceParameters are passed, the app defaults to favorite teams and favorite channels.
|
|
2692
|
+
* @param callback The callback to invoke when the {@link TabInstanceParameters} object is retrieved.
|
|
2693
|
+
* @param tabInstanceParameters OPTIONAL Flags that specify whether to scope call to favorite teams or channels.
|
|
2694
|
+
*/
|
|
2695
|
+
export function getTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
|
|
2696
|
+
/**
|
|
2697
|
+
* Allows an app to retrieve the most recently used tabs for this user.
|
|
2698
|
+
* @param callback The callback to invoke when the {@link TabInformation} object is retrieved.
|
|
2699
|
+
* @param tabInstanceParameters OPTIONAL Ignored, kept for future use
|
|
2700
|
+
*/
|
|
2701
|
+
export function getMruTabInstances(callback: (tabInfo: TabInformation) => void, tabInstanceParameters?: TabInstanceParameters): void;
|
|
2702
|
+
/**
|
|
2703
|
+
* Shares a deep link that a user can use to navigate back to a specific state in this page.
|
|
2704
|
+
* @param deepLinkParameters ID and label for the link and fallback URL.
|
|
2705
|
+
*/
|
|
2706
|
+
export function shareDeepLink(deepLinkParameters: DeepLinkParameters): void;
|
|
2707
|
+
/**
|
|
2708
|
+
* execute deep link API.
|
|
2709
|
+
* @param deepLink deep link.
|
|
2710
|
+
*/
|
|
2711
|
+
export function executeDeepLink(deepLink: string, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
2712
|
+
export function setFrameContext(frameContext: FrameContext): void;
|
|
2713
|
+
export function initializeWithFrameContext(frameContext: FrameContext, callback?: () => void, validMessageOrigins?: string[]): void;
|
|
2714
|
+
|
|
2715
|
+
/**
|
|
2716
|
+
* Namespace to interact with the settings-specific part of the SDK.
|
|
2717
|
+
* This object is usable only on the settings frame.
|
|
2718
|
+
*/
|
|
2719
|
+
export namespace settings {
|
|
2720
|
+
function initialize(): void;
|
|
2721
|
+
/**
|
|
2722
|
+
* Sets the validity state for the settings.
|
|
2723
|
+
* The initial value is false, so the user cannot save the settings until this is called with true.
|
|
2724
|
+
* @param validityState Indicates whether the save or remove button is enabled for the user.
|
|
2725
|
+
*/
|
|
2726
|
+
function setValidityState(validityState: boolean): void;
|
|
2727
|
+
/**
|
|
2728
|
+
* Gets the settings for the current instance.
|
|
2729
|
+
* @param callback The callback to invoke when the {@link Settings} object is retrieved.
|
|
2730
|
+
*/
|
|
2731
|
+
function getSettings(callback: (instanceSettings: Settings) => void): void;
|
|
2732
|
+
/**
|
|
2733
|
+
* Sets the settings for the current instance.
|
|
2734
|
+
* This is an asynchronous operation; calls to getSettings are not guaranteed to reflect the changed state.
|
|
2735
|
+
* @param settings The desired settings for this instance.
|
|
2736
|
+
*/
|
|
2737
|
+
function setSettings(instanceSettings: Settings, onComplete?: (status: boolean, reason?: string) => void): void;
|
|
2738
|
+
/**
|
|
2739
|
+
* Registers a handler for when the user attempts to save the settings. This handler should be used
|
|
2740
|
+
* to create or update the underlying resource powering the content.
|
|
2741
|
+
* The object passed to the handler must be used to notify whether to proceed with the save.
|
|
2742
|
+
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
|
2743
|
+
* @param handler The handler to invoke when the user selects the save button.
|
|
2744
|
+
*/
|
|
2745
|
+
function registerOnSaveHandler(handler: (evt: SaveEvent) => void): void;
|
|
2746
|
+
/**
|
|
2747
|
+
* Registers a handler for user attempts to remove content. This handler should be used
|
|
2748
|
+
* to remove the underlying resource powering the content.
|
|
2749
|
+
* The object passed to the handler must be used to indicate whether to proceed with the removal.
|
|
2750
|
+
* Only one handler may be registered at a time. Subsequent registrations will override the first.
|
|
2751
|
+
* @param handler The handler to invoke when the user selects the remove button.
|
|
2752
|
+
*/
|
|
2753
|
+
function registerOnRemoveHandler(handler: (evt: RemoveEvent) => void): void;
|
|
2754
|
+
interface Settings {
|
|
2755
|
+
/**
|
|
2756
|
+
* A suggested display name for the new content.
|
|
2757
|
+
* In the settings for an existing instance being updated, this call has no effect.
|
|
2758
|
+
*/
|
|
2759
|
+
suggestedDisplayName?: string;
|
|
2760
|
+
/**
|
|
2761
|
+
* Sets the URL to use for the content of this instance.
|
|
2762
|
+
*/
|
|
2763
|
+
contentUrl: string;
|
|
2764
|
+
/**
|
|
2765
|
+
* Sets the URL for the removal configuration experience.
|
|
2766
|
+
*/
|
|
2767
|
+
removeUrl?: string;
|
|
2768
|
+
/**
|
|
2769
|
+
* Sets the URL to use for the external link to view the underlying resource in a browser.
|
|
2770
|
+
*/
|
|
2771
|
+
websiteUrl?: string;
|
|
2772
|
+
/**
|
|
2773
|
+
* The developer-defined unique ID for the entity to which this content points.
|
|
2774
|
+
*/
|
|
2775
|
+
entityId?: string;
|
|
2776
|
+
}
|
|
2777
|
+
interface SaveEvent {
|
|
2778
|
+
/**
|
|
2779
|
+
* Object containing properties passed as arguments to the settings.save event.
|
|
2780
|
+
*/
|
|
2781
|
+
result: SaveParameters;
|
|
2782
|
+
/**
|
|
2783
|
+
* Indicates that the underlying resource has been created and the settings can be saved.
|
|
2784
|
+
*/
|
|
2785
|
+
notifySuccess(): void;
|
|
2786
|
+
/**
|
|
2787
|
+
* Indicates that creation of the underlying resource failed and that the settings cannot be saved.
|
|
2788
|
+
* @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
|
|
2789
|
+
*/
|
|
2790
|
+
notifyFailure(reason?: string): void;
|
|
2791
|
+
}
|
|
2792
|
+
interface RemoveEvent {
|
|
2793
|
+
/**
|
|
2794
|
+
* Indicates that the underlying resource has been removed and the content can be removed.
|
|
2795
|
+
*/
|
|
2796
|
+
notifySuccess(): void;
|
|
2797
|
+
/**
|
|
2798
|
+
* Indicates that removal of the underlying resource failed and that the content cannot be removed.
|
|
2799
|
+
* @param reason Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
|
|
2800
|
+
*/
|
|
2801
|
+
notifyFailure(reason?: string): void;
|
|
2802
|
+
}
|
|
2803
|
+
interface SaveParameters {
|
|
2804
|
+
/**
|
|
2805
|
+
* Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save
|
|
2806
|
+
*/
|
|
2807
|
+
webhookUrl?: string;
|
|
2808
|
+
}
|
|
2809
|
+
}
|
|
2810
|
+
/**
|
|
2811
|
+
* Namespace to interact with the task module-specific part of the SDK.
|
|
2812
|
+
* This object is usable only on the content frame.
|
|
2813
|
+
*/
|
|
2814
|
+
export namespace tasks {
|
|
2815
|
+
/**
|
|
2816
|
+
* Allows an app to open the task module.
|
|
2817
|
+
* @param taskInfo An object containing the parameters of the task module
|
|
2818
|
+
* @param submitHandler Handler to call when the task module is completed
|
|
2819
|
+
*/
|
|
2820
|
+
function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string) => void): IAppWindow;
|
|
2821
|
+
/**
|
|
2822
|
+
* Update height/width task info properties.
|
|
2823
|
+
* @param taskInfo An object containing width and height properties
|
|
2824
|
+
*/
|
|
2825
|
+
function updateTask(taskInfo: TaskInfo): void;
|
|
2826
|
+
/**
|
|
2827
|
+
* Submit the task module.
|
|
2828
|
+
* @param result Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
|
|
2829
|
+
* @param appIds Helps to validate that the call originates from the same appId as the one that invoked the task module
|
|
2830
|
+
*/
|
|
2831
|
+
function submitTask(result?: string | object, appIds?: string | string[]): void;
|
|
2832
|
+
}
|
|
2833
|
+
|
|
2834
|
+
}
|