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