@microsoft/teams-js 2.0.0 → 2.1.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MicrosoftTeams.d.ts +332 -20
- package/dist/MicrosoftTeams.js +320 -1
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -33
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -645,6 +645,66 @@ export namespace files {
|
|
645
645
|
*/
|
646
646
|
extension: string;
|
647
647
|
}
|
648
|
+
/**
|
649
|
+
* @hidden
|
650
|
+
* Hide from docs
|
651
|
+
*
|
652
|
+
* Actions specific to 3P cloud storage provider file and / or account
|
653
|
+
*/
|
654
|
+
export enum CloudStorageProviderFileAction {
|
655
|
+
Download = "DOWNLOAD",
|
656
|
+
Upload = "UPLOAD",
|
657
|
+
Delete = "DELETE"
|
658
|
+
}
|
659
|
+
/**
|
660
|
+
* @hidden
|
661
|
+
* Hide from docs
|
662
|
+
*
|
663
|
+
* Interface for 3P cloud storage provider request content type
|
664
|
+
*/
|
665
|
+
export interface CloudStorageProviderRequest<T> {
|
666
|
+
content: T;
|
667
|
+
}
|
668
|
+
/**
|
669
|
+
* @hidden
|
670
|
+
* Hide from docs
|
671
|
+
*
|
672
|
+
* Base interface for 3P cloud storage provider action request content
|
673
|
+
*/
|
674
|
+
export interface CloudStorageProviderContent {
|
675
|
+
providerCode: CloudStorageProvider;
|
676
|
+
}
|
677
|
+
/**
|
678
|
+
* @hidden
|
679
|
+
* Hide from docs
|
680
|
+
*
|
681
|
+
* Interface representing 3P cloud storage provider add new file action.
|
682
|
+
* The file extension represents type of file e.g. docx, pptx etc. and need not be prefixed with dot(.)
|
683
|
+
*/
|
684
|
+
export interface CloudStorageProviderNewFileContent extends CloudStorageProviderContent {
|
685
|
+
newFileName: string;
|
686
|
+
newFileExtension: string;
|
687
|
+
}
|
688
|
+
/**
|
689
|
+
* @hidden
|
690
|
+
* Hide from docs
|
691
|
+
*
|
692
|
+
* Interface representing 3P cloud storage provider rename existing file action
|
693
|
+
*/
|
694
|
+
export interface CloudStorageProviderRenameFileContent extends CloudStorageProviderContent {
|
695
|
+
existingFile: CloudStorageFolderItem | ISharePointFile;
|
696
|
+
newFile: CloudStorageFolderItem | ISharePointFile;
|
697
|
+
}
|
698
|
+
/**
|
699
|
+
* @hidden
|
700
|
+
* Hide from docs
|
701
|
+
*
|
702
|
+
* Interface representing 3P cloud storage provider actions like Upload / Download / Delete file(s)
|
703
|
+
*/
|
704
|
+
export interface CloudStorageProviderActionContent extends CloudStorageProviderContent {
|
705
|
+
action: CloudStorageProviderFileAction;
|
706
|
+
itemList: CloudStorageFolderItem[] | ISharePointFile[];
|
707
|
+
}
|
648
708
|
/**
|
649
709
|
* @hidden
|
650
710
|
* Hide from docs
|
@@ -732,6 +792,85 @@ export namespace files {
|
|
732
792
|
* @param callback Callback that will be triggered post open download folder/path
|
733
793
|
*/
|
734
794
|
export function openDownloadFolder(fileObjectId: string, callback: (error?: SdkError) => void): void;
|
795
|
+
/**
|
796
|
+
* @hidden
|
797
|
+
* Hide from docs
|
798
|
+
*
|
799
|
+
* Initiates add 3P cloud storage provider flow, where a pop up window opens for user to select required
|
800
|
+
* 3P provider from the configured policy supported 3P provider list, following which user authentication
|
801
|
+
* for selected 3P provider is performed on success of which the selected 3P provider support is added for user
|
802
|
+
*
|
803
|
+
* @param callback Callback that will be triggered post add 3P cloud storage provider action
|
804
|
+
*/
|
805
|
+
export function addCloudStorageProvider(callback: (error?: SdkError) => void): void;
|
806
|
+
/**
|
807
|
+
* @hidden
|
808
|
+
* Hide from docs
|
809
|
+
*
|
810
|
+
* Initiates signout of 3P cloud storage provider flow, which will remove the selected
|
811
|
+
* 3P cloud storage provider from the list of added providers. No other user input and / or action
|
812
|
+
* is required except the 3P cloud storage provider to signout from
|
813
|
+
*
|
814
|
+
* @param logoutRequest 3P cloud storage provider remove action request content
|
815
|
+
* @param callback Callback that will be triggered post signout of 3P cloud storage provider action
|
816
|
+
*/
|
817
|
+
export function removeCloudStorageProvider(logoutRequest: CloudStorageProviderRequest<CloudStorageProviderContent>, callback: (error?: SdkError) => void): void;
|
818
|
+
/**
|
819
|
+
* @hidden
|
820
|
+
* Hide from docs
|
821
|
+
*
|
822
|
+
* Initiates the add 3P cloud storage file flow, which will add a new file for the given 3P provider
|
823
|
+
*
|
824
|
+
* @param addNewFileRequest 3P cloud storage provider add action request content
|
825
|
+
* @param callback Callback that will be triggered post adding a new file flow is finished
|
826
|
+
*/
|
827
|
+
export function addCloudStorageProviderFile(addNewFileRequest: CloudStorageProviderRequest<CloudStorageProviderNewFileContent>, callback: (error?: SdkError) => void): void;
|
828
|
+
/**
|
829
|
+
* @hidden
|
830
|
+
* Hide from docs
|
831
|
+
*
|
832
|
+
* Initiates the rename 3P cloud storage file flow, which will rename an existing file in the given 3P provider
|
833
|
+
*
|
834
|
+
* @param renameFileRequest 3P cloud storage provider rename action request content
|
835
|
+
* @param callback Callback that will be triggered post renaming an existing file flow is finished
|
836
|
+
*/
|
837
|
+
export function renameCloudStorageProviderFile(renameFileRequest: CloudStorageProviderRequest<CloudStorageProviderRenameFileContent>, callback: (error?: SdkError) => void): void;
|
838
|
+
/**
|
839
|
+
* @hidden
|
840
|
+
* Hide from docs
|
841
|
+
*
|
842
|
+
* Initiates the 3P cloud storage provider file action (Upload / Download / Delete) flow
|
843
|
+
*
|
844
|
+
* Upload Action : Allows uploading file(s) to the given 3P cloud storage provider
|
845
|
+
* Download Action : Allows downloading file(s) from the given 3P cloud storage provider
|
846
|
+
* Delete Action : Allows deleting file(s) from the given 3P cloud storage provider
|
847
|
+
*
|
848
|
+
* @param cloudStorageProviderFileActionRequest 3P cloud storage provider file action (Upload / Download / Delete) request content
|
849
|
+
* @param callback Callback that will be triggered post 3P cloud storage action
|
850
|
+
*/
|
851
|
+
export function performCloudStorageProviderFileAction(cloudStorageProviderFileActionRequest: CloudStorageProviderRequest<CloudStorageProviderActionContent>, callback: (error?: SdkError) => void): void;
|
852
|
+
/**
|
853
|
+
* @hidden
|
854
|
+
* Hide from docs
|
855
|
+
*
|
856
|
+
* Register a handler to be called when a user's 3P cloud storage provider list changes i.e.
|
857
|
+
* post adding / removing a 3P provider, list is updated
|
858
|
+
*
|
859
|
+
* @param handler - When 3P cloud storage provider list is updated this handler is called
|
860
|
+
*
|
861
|
+
*/
|
862
|
+
export function registerCloudStorageProviderListChangeHandler(handler: () => void): void;
|
863
|
+
/**
|
864
|
+
* @hidden
|
865
|
+
* Hide from docs
|
866
|
+
*
|
867
|
+
* Register a handler to be called when a user's 3P cloud storage provider content changes i.e.
|
868
|
+
* when file(s) is/are added / renamed / deleted / uploaded, the list of files is updated
|
869
|
+
*
|
870
|
+
* @param handler - When 3P cloud storage provider content is updated this handler is called
|
871
|
+
*
|
872
|
+
*/
|
873
|
+
export function registerCloudStorageProviderContentChangeHandler(handler: () => void): void;
|
735
874
|
export {};
|
736
875
|
}
|
737
876
|
|
@@ -4152,6 +4291,57 @@ export namespace meeting {
|
|
4152
4291
|
*/
|
4153
4292
|
isSpeakingDetected: boolean;
|
4154
4293
|
}
|
4294
|
+
/**
|
4295
|
+
* Property bag for the meeting reaction received event
|
4296
|
+
*
|
4297
|
+
* @beta
|
4298
|
+
*/
|
4299
|
+
interface MeetingReactionReceivedEventData {
|
4300
|
+
/**
|
4301
|
+
* Indicates the type of meeting reaction received
|
4302
|
+
*/
|
4303
|
+
meetingReactionType?: MeetingReactionType;
|
4304
|
+
/**
|
4305
|
+
* error object in case there is a failure
|
4306
|
+
*/
|
4307
|
+
error?: SdkError;
|
4308
|
+
}
|
4309
|
+
/**
|
4310
|
+
* Interface for raiseHandState properties
|
4311
|
+
*
|
4312
|
+
* @beta
|
4313
|
+
*/
|
4314
|
+
interface IRaiseHandState {
|
4315
|
+
/** Indicates whether the selfParticipant's hand is raised or not*/
|
4316
|
+
isHandRaised: boolean;
|
4317
|
+
}
|
4318
|
+
/**
|
4319
|
+
* Property bag for the raiseHandState changed event
|
4320
|
+
*
|
4321
|
+
* @beta
|
4322
|
+
*/
|
4323
|
+
interface RaiseHandStateChangedEventData {
|
4324
|
+
/**
|
4325
|
+
* entire raiseHandState object for the selfParticipant
|
4326
|
+
*/
|
4327
|
+
raiseHandState: IRaiseHandState;
|
4328
|
+
/**
|
4329
|
+
* error object in case there is a failure
|
4330
|
+
*/
|
4331
|
+
error?: SdkError;
|
4332
|
+
}
|
4333
|
+
/**
|
4334
|
+
* Different types of meeting reactions that can be sent/received
|
4335
|
+
*
|
4336
|
+
* @beta
|
4337
|
+
*/
|
4338
|
+
enum MeetingReactionType {
|
4339
|
+
like = "like",
|
4340
|
+
heart = "heart",
|
4341
|
+
laugh = "laugh",
|
4342
|
+
surprised = "surprised",
|
4343
|
+
applause = "applause"
|
4344
|
+
}
|
4155
4345
|
enum MeetingType {
|
4156
4346
|
Unknown = "Unknown",
|
4157
4347
|
Adhoc = "Adhoc",
|
@@ -4289,6 +4479,26 @@ export namespace meeting {
|
|
4289
4479
|
* @param handler The handler to invoke when the speaking state of any participant changes (start/stop speaking).
|
4290
4480
|
*/
|
4291
4481
|
function registerSpeakingStateChangeHandler(handler: (speakingState: ISpeakingState) => void): void;
|
4482
|
+
/**
|
4483
|
+
* Registers a handler for changes to the selfParticipant's (current user's) raiseHandState. If the selfParticipant raises their hand, isHandRaised
|
4484
|
+
* will be true. By default and if the selfParticipant hand is lowered, isHandRaised will be false. This API will return {@link RaiseHandStateChangedEvent}
|
4485
|
+
* that will have the raiseHandState or an error object. Only one handler can be registered at a time. A subsequent registration
|
4486
|
+
* replaces an existing registration.
|
4487
|
+
*
|
4488
|
+
* @param handler The handler to invoke when the selfParticipant's (current user's) raiseHandState changes.
|
4489
|
+
*
|
4490
|
+
* @beta
|
4491
|
+
*/
|
4492
|
+
function registerRaiseHandStateChangedHandler(handler: (eventData: RaiseHandStateChangedEventData) => void): void;
|
4493
|
+
/**
|
4494
|
+
* Registers a handler for receiving meeting reactions. When the selfParticipant (current user) successfully sends a meeting reaction and it is being rendered on the UI, the meetingReactionType will be populated. Only one handler can be registered
|
4495
|
+
* at a time. A subsequent registration replaces an existing registration.
|
4496
|
+
*
|
4497
|
+
* @param handler The handler to invoke when the selfParticipant (current user) successfully sends a meeting reaction
|
4498
|
+
*
|
4499
|
+
* @beta
|
4500
|
+
*/
|
4501
|
+
function registerMeetingReactionReceivedHandler(handler: (eventData: MeetingReactionReceivedEventData) => void): void;
|
4292
4502
|
}
|
4293
4503
|
|
4294
4504
|
export namespace monetization {
|
@@ -4499,6 +4709,94 @@ export namespace people {
|
|
4499
4709
|
function isSupported(): boolean;
|
4500
4710
|
}
|
4501
4711
|
|
4712
|
+
/**
|
4713
|
+
* Namespace for profile related APIs.
|
4714
|
+
*
|
4715
|
+
* @beta
|
4716
|
+
*/
|
4717
|
+
export namespace profile {
|
4718
|
+
/**
|
4719
|
+
* Opens a profile card at a specified position to show profile information about a persona.
|
4720
|
+
* @param showProfileRequest The parameters to position the card and identify the target user.
|
4721
|
+
* @returns Promise that will be fulfilled when the operation has completed
|
4722
|
+
*/
|
4723
|
+
function showProfile(showProfileRequest: ShowProfileRequest): Promise<void>;
|
4724
|
+
/**
|
4725
|
+
* The type of modalities that are supported when showing a profile.
|
4726
|
+
* Can be provided as an optional hint with the request and will be
|
4727
|
+
* respected if the hosting M365 application supports it.
|
4728
|
+
*/
|
4729
|
+
type Modality = 'Card' | 'Expanded';
|
4730
|
+
/**
|
4731
|
+
* The type of the profile trigger.
|
4732
|
+
* - MouseHover: The user hovered a target.
|
4733
|
+
* - MouseClick: The user clicked a target.
|
4734
|
+
* - KeyboardPress: The user initiated the show profile request with their keyboard.
|
4735
|
+
* - AppRequest: The show profile request is happening programmatically, without direct user interaction.
|
4736
|
+
*/
|
4737
|
+
type TriggerType = 'MouseHover' | 'MouseClick' | 'KeyboardPress' | 'AppRequest';
|
4738
|
+
/**
|
4739
|
+
* The set of identifiers that are supported for resolving the persona.
|
4740
|
+
*
|
4741
|
+
* At least one is required, and if multiple are provided then only the highest
|
4742
|
+
* priority one will be used (AadObjectId > Upn > Smtp).
|
4743
|
+
*/
|
4744
|
+
type PersonaIdentifiers = {
|
4745
|
+
/**
|
4746
|
+
* The object id in Azure Active Directory.
|
4747
|
+
*
|
4748
|
+
* This id is guaranteed to be unique for an object within a tenant,
|
4749
|
+
* and so if provided will lead to a more performant lookup. It can
|
4750
|
+
* be resolved via MS Graph (see https://docs.microsoft.com/en-us/graph/api/resources/users
|
4751
|
+
* for examples).
|
4752
|
+
*/
|
4753
|
+
readonly AadObjectId?: string;
|
4754
|
+
/**
|
4755
|
+
* The primary SMTP address.
|
4756
|
+
*/
|
4757
|
+
readonly Smtp?: string;
|
4758
|
+
/**
|
4759
|
+
* The user principle name.
|
4760
|
+
*/
|
4761
|
+
readonly Upn?: string;
|
4762
|
+
};
|
4763
|
+
/**
|
4764
|
+
* The persona to show the profile for.
|
4765
|
+
*/
|
4766
|
+
interface Persona {
|
4767
|
+
/**
|
4768
|
+
* The set of identifiers that are supported for resolving the persona.
|
4769
|
+
*/
|
4770
|
+
identifiers: PersonaIdentifiers;
|
4771
|
+
/**
|
4772
|
+
* Optional display name override. If not specified the user's display name will be resolved normally.
|
4773
|
+
*/
|
4774
|
+
displayName?: string;
|
4775
|
+
}
|
4776
|
+
/**
|
4777
|
+
* Input parameters provided to the showProfile API.
|
4778
|
+
*/
|
4779
|
+
interface ShowProfileRequest {
|
4780
|
+
/**
|
4781
|
+
* An optional hint to the hosting M365 application about which modality of the profile you want to show.
|
4782
|
+
*/
|
4783
|
+
modality?: Modality;
|
4784
|
+
/**
|
4785
|
+
* The information about the persona to show the profile for.
|
4786
|
+
*/
|
4787
|
+
persona: Persona;
|
4788
|
+
/**
|
4789
|
+
* The bounding rectangle of the target.
|
4790
|
+
*/
|
4791
|
+
targetElementBoundingRect: DOMRect;
|
4792
|
+
/**
|
4793
|
+
* Specifies which user interaction was used to trigger the API call.
|
4794
|
+
*/
|
4795
|
+
triggerType: TriggerType;
|
4796
|
+
}
|
4797
|
+
function isSupported(): boolean;
|
4798
|
+
}
|
4799
|
+
|
4502
4800
|
/**
|
4503
4801
|
* Namespace to video extensibility of the SDK
|
4504
4802
|
*/
|
@@ -4691,26 +4989,40 @@ export namespace stageView {
|
|
4691
4989
|
}
|
4692
4990
|
|
4693
4991
|
export namespace call {
|
4694
|
-
|
4695
|
-
|
4696
|
-
|
4697
|
-
|
4698
|
-
|
4699
|
-
|
4700
|
-
|
4701
|
-
|
4702
|
-
|
4703
|
-
|
4704
|
-
|
4705
|
-
|
4706
|
-
|
4707
|
-
|
4708
|
-
|
4709
|
-
|
4710
|
-
|
4711
|
-
|
4712
|
-
|
4713
|
-
|
4992
|
+
enum CallModalities {
|
4993
|
+
Unknown = "unknown",
|
4994
|
+
Audio = "audio",
|
4995
|
+
Video = "video",
|
4996
|
+
VideoBasedScreenSharing = "videoBasedScreenSharing",
|
4997
|
+
Data = "data"
|
4998
|
+
}
|
4999
|
+
interface StartCallParams {
|
5000
|
+
/**
|
5001
|
+
* Comma-separated list of user IDs representing the participants of the call.
|
5002
|
+
*
|
5003
|
+
* @remarks
|
5004
|
+
* Currently the User ID field supports the Azure AD UserPrincipalName,
|
5005
|
+
* typically an email address, or in case of a PSTN call, it supports a pstn
|
5006
|
+
* mri 4:<phonenumber>.
|
5007
|
+
*/
|
5008
|
+
targets: string[];
|
5009
|
+
/**
|
5010
|
+
* List of modalities for the call. Defaults to [“audio”].
|
5011
|
+
*/
|
5012
|
+
requestedModalities?: CallModalities[];
|
5013
|
+
/**
|
5014
|
+
* An optional parameter that informs about the source of the deep link
|
5015
|
+
*/
|
5016
|
+
source?: string;
|
5017
|
+
}
|
5018
|
+
/**
|
5019
|
+
* Starts a call with other users
|
5020
|
+
*
|
5021
|
+
* @param startCallParams - Parameters for the call
|
5022
|
+
* @returns If the call is accepted
|
5023
|
+
*/
|
5024
|
+
function startCall(startCallParams: StartCallParams): Promise<boolean>;
|
5025
|
+
function isSupported(): boolean;
|
4714
5026
|
}
|
4715
5027
|
|
4716
5028
|
/**
|