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