@microsoft/teams-js 2.21.1-beta.1 → 2.22.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/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +357 -32
- package/dist/MicrosoftTeams.js +706 -953
- 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 +35 -1
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
|
|
|
24
24
|
|
|
25
25
|
### Production
|
|
26
26
|
|
|
27
|
-
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.
|
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.22.0/js/MicrosoftTeams.min.js) or point your package manager at them.
|
|
28
28
|
|
|
29
29
|
## Usage
|
|
30
30
|
|
|
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
|
|
|
45
45
|
```html
|
|
46
46
|
<!-- Microsoft Teams JavaScript API (via CDN) -->
|
|
47
47
|
<script
|
|
48
|
-
src="https://res.cdn.office.net/teams-js/2.
|
|
49
|
-
integrity="sha384-
|
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.22.0/js/MicrosoftTeams.min.js"
|
|
49
|
+
integrity="sha384-WSG/sWulIv7rel5TnFlH8JTpxl2OxzZh9Lux2mIzBFiTRLFvMBeFv9VURu/3vQdx"
|
|
50
50
|
crossorigin="anonymous"
|
|
51
51
|
></script>
|
|
52
52
|
|
|
53
53
|
<!-- Microsoft Teams JavaScript API (via npm) -->
|
|
54
|
-
<script src="node_modules/@microsoft/teams-js@2.
|
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.22.0/dist/MicrosoftTeams.min.js"></script>
|
|
55
55
|
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
package/dist/MicrosoftTeams.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export interface ThreadMember {
|
|
|
61
61
|
* @internal
|
|
62
62
|
* Limited to Microsoft-internal use
|
|
63
63
|
*/
|
|
64
|
-
export enum NotificationTypes {
|
|
64
|
+
export const enum NotificationTypes {
|
|
65
65
|
fileDownloadStart = "fileDownloadStart",
|
|
66
66
|
fileDownloadComplete = "fileDownloadComplete"
|
|
67
67
|
}
|
|
@@ -81,7 +81,7 @@ export interface ShowNotificationParameters {
|
|
|
81
81
|
* @internal
|
|
82
82
|
* Limited to Microsoft-internal use
|
|
83
83
|
*/
|
|
84
|
-
export enum ViewerActionTypes {
|
|
84
|
+
export const enum ViewerActionTypes {
|
|
85
85
|
view = "view",
|
|
86
86
|
edit = "edit",
|
|
87
87
|
editNew = "editNew"
|
|
@@ -91,7 +91,7 @@ export enum ViewerActionTypes {
|
|
|
91
91
|
*
|
|
92
92
|
* User setting changes that can be subscribed to
|
|
93
93
|
*/
|
|
94
|
-
export enum UserSettingTypes {
|
|
94
|
+
export const enum UserSettingTypes {
|
|
95
95
|
/**
|
|
96
96
|
* @hidden
|
|
97
97
|
* Use this key to subscribe to changes in user's file open preference
|
|
@@ -502,6 +502,31 @@ export namespace externalAppAuthentication {
|
|
|
502
502
|
* Limited to Microsoft-internal use
|
|
503
503
|
*/
|
|
504
504
|
type IOriginalRequestInfo = IQueryMessageExtensionRequest | IActionExecuteInvokeRequest;
|
|
505
|
+
/**
|
|
506
|
+
* @hidden
|
|
507
|
+
* Parameters OauthWindow
|
|
508
|
+
* @internal
|
|
509
|
+
* Limited to Microsoft-internal use
|
|
510
|
+
*/
|
|
511
|
+
type OauthWindowProperties = {
|
|
512
|
+
/**
|
|
513
|
+
* The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
|
|
514
|
+
*/
|
|
515
|
+
width?: number;
|
|
516
|
+
/**
|
|
517
|
+
* The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
|
|
518
|
+
*/
|
|
519
|
+
height?: number;
|
|
520
|
+
/**
|
|
521
|
+
* Some identity providers restrict their authentication pages from being displayed in embedded browsers (e.g., a web view inside of a native application)
|
|
522
|
+
* If the identity provider you are using prevents embedded browser usage, this flag should be set to `true` to enable the authentication page
|
|
523
|
+
* to be opened in an external browser. If this flag is `false`, the page will be opened directly within the current hosting application.
|
|
524
|
+
*
|
|
525
|
+
* This flag is ignored when the host for the application is a web app (as opposed to a native application) as the behavior is unnecessary in a web-only
|
|
526
|
+
* environment without an embedded browser.
|
|
527
|
+
*/
|
|
528
|
+
isExternal?: boolean;
|
|
529
|
+
};
|
|
505
530
|
/**
|
|
506
531
|
* @hidden
|
|
507
532
|
* Parameters for the authentication pop-up. This interface is used exclusively with the externalAppAuthentication APIs
|
|
@@ -585,7 +610,7 @@ export namespace externalAppAuthentication {
|
|
|
585
610
|
* @internal
|
|
586
611
|
* Limited to Microsoft-internal use
|
|
587
612
|
*/
|
|
588
|
-
enum OriginalRequestType {
|
|
613
|
+
const enum OriginalRequestType {
|
|
589
614
|
ActionExecuteInvokeRequest = "ActionExecuteInvokeRequest",
|
|
590
615
|
QueryMessageExtensionRequest = "QueryMessageExtensionRequest"
|
|
591
616
|
}
|
|
@@ -602,7 +627,7 @@ export namespace externalAppAuthentication {
|
|
|
602
627
|
* @internal
|
|
603
628
|
* Limited to Microsoft-internal use
|
|
604
629
|
*/
|
|
605
|
-
enum InvokeResponseType {
|
|
630
|
+
const enum InvokeResponseType {
|
|
606
631
|
ActionExecuteInvokeResponse = "ActionExecuteInvokeResponse",
|
|
607
632
|
QueryMessageExtensionResponse = "QueryMessageExtensionResponse"
|
|
608
633
|
}
|
|
@@ -708,7 +733,7 @@ export namespace externalAppAuthentication {
|
|
|
708
733
|
* @internal
|
|
709
734
|
* Limited to Microsoft-internal use
|
|
710
735
|
*/
|
|
711
|
-
enum InvokeErrorCode {
|
|
736
|
+
const enum InvokeErrorCode {
|
|
712
737
|
INTERNAL_ERROR = "INTERNAL_ERROR"
|
|
713
738
|
}
|
|
714
739
|
/**
|
|
@@ -746,6 +771,18 @@ export namespace externalAppAuthentication {
|
|
|
746
771
|
* @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
|
|
747
772
|
*/
|
|
748
773
|
function authenticateWithSSOAndResendRequest(appId: string, authTokenRequest: AuthTokenRequestParameters, originalRequestInfo: IOriginalRequestInfo): Promise<IInvokeResponse>;
|
|
774
|
+
/**
|
|
775
|
+
* @beta
|
|
776
|
+
* @hidden
|
|
777
|
+
* Signals to the host to perform Oauth2 authentication for the application specified by the title ID
|
|
778
|
+
* @internal
|
|
779
|
+
* Limited to Microsoft-internal use
|
|
780
|
+
* @param titleId ID of the acquisition
|
|
781
|
+
* @param oauthConfigId lookup ID in token store
|
|
782
|
+
* @param oauthWindowParameters parameters for the signIn window
|
|
783
|
+
* @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
|
|
784
|
+
*/
|
|
785
|
+
function authenticateWithOauth2(titleId: string, oauthConfigId: string, oauthWindowParameters: OauthWindowProperties): Promise<void>;
|
|
749
786
|
/**
|
|
750
787
|
* @hidden
|
|
751
788
|
* Checks if the externalAppAuthentication capability is supported by the host
|
|
@@ -772,7 +809,7 @@ export namespace externalAppCardActions {
|
|
|
772
809
|
* @internal
|
|
773
810
|
* Limited to Microsoft-internal use
|
|
774
811
|
*/
|
|
775
|
-
enum ActionOpenUrlType {
|
|
812
|
+
const enum ActionOpenUrlType {
|
|
776
813
|
DeepLinkDialog = "DeepLinkDialog",
|
|
777
814
|
DeepLinkOther = "DeepLinkOther",
|
|
778
815
|
DeepLinkStageView = "DeepLinkStageView",
|
|
@@ -795,7 +832,7 @@ export namespace externalAppCardActions {
|
|
|
795
832
|
* @internal
|
|
796
833
|
* Limited to Microsoft-internal use
|
|
797
834
|
*/
|
|
798
|
-
enum ActionOpenUrlErrorCode {
|
|
835
|
+
const enum ActionOpenUrlErrorCode {
|
|
799
836
|
INTERNAL_ERROR = "INTERNAL_ERROR",
|
|
800
837
|
INVALID_LINK = "INVALID_LINK",
|
|
801
838
|
NOT_SUPPORTED = "NOT_SUPPORTED"
|
|
@@ -819,18 +856,9 @@ export namespace externalAppCardActions {
|
|
|
819
856
|
* Limited to Microsoft-internal use
|
|
820
857
|
*/
|
|
821
858
|
interface ActionSubmitError {
|
|
822
|
-
errorCode:
|
|
859
|
+
errorCode: ExternalAppErrorCode;
|
|
823
860
|
message?: string;
|
|
824
861
|
}
|
|
825
|
-
/**
|
|
826
|
-
* @hidden
|
|
827
|
-
* Error codes that can be thrown from IExternalAppCardActionService.handleActionSubmit
|
|
828
|
-
* @internal
|
|
829
|
-
* Limited to Microsoft-internal use
|
|
830
|
-
*/
|
|
831
|
-
enum ActionSubmitErrorCode {
|
|
832
|
-
INTERNAL_ERROR = "INTERNAL_ERROR"
|
|
833
|
-
}
|
|
834
862
|
/**
|
|
835
863
|
* @beta
|
|
836
864
|
* @hidden
|
|
@@ -846,14 +874,19 @@ export namespace externalAppCardActions {
|
|
|
846
874
|
/**
|
|
847
875
|
* @beta
|
|
848
876
|
* @hidden
|
|
849
|
-
* Delegates an Adaptive Card Action.OpenUrl request to the host for the application with the provided app ID
|
|
877
|
+
* Delegates an Adaptive Card Action.OpenUrl request to the host for the application with the provided app ID.
|
|
878
|
+
* If `fromElement` is not provided, the information from the manifest is used to determine whether the URL can
|
|
879
|
+
* be processed by the host. Deep link URLs for plugins are not supported and will result in an error.
|
|
850
880
|
* @internal
|
|
851
881
|
* Limited to Microsoft-internal use
|
|
852
882
|
* @param appId ID of the application the request is intended for. This must be a UUID
|
|
853
883
|
* @param url The URL to open
|
|
884
|
+
* @param fromElement The element on behalf of which the M365 app is making the request.
|
|
854
885
|
* @returns Promise that resolves to ActionOpenUrlType indicating the type of URL that was opened on success and rejects with ActionOpenUrlError if the request fails
|
|
855
886
|
*/
|
|
856
|
-
function processActionOpenUrl(appId: string, url: URL
|
|
887
|
+
function processActionOpenUrl(appId: string, url: URL, fromElement?: {
|
|
888
|
+
name: 'composeExtensions' | 'plugins';
|
|
889
|
+
}): Promise<ActionOpenUrlType>;
|
|
857
890
|
/**
|
|
858
891
|
* @hidden
|
|
859
892
|
* Checks if the externalAppCardActions capability is supported by the host
|
|
@@ -867,6 +900,128 @@ export namespace externalAppCardActions {
|
|
|
867
900
|
function isSupported(): boolean;
|
|
868
901
|
}
|
|
869
902
|
|
|
903
|
+
/**
|
|
904
|
+
* @hidden
|
|
905
|
+
* Namespace to delegate the ActionCommand to the host
|
|
906
|
+
* @internal
|
|
907
|
+
* Limited to Microsoft-internal use
|
|
908
|
+
*
|
|
909
|
+
* @beta
|
|
910
|
+
*/
|
|
911
|
+
export namespace externalAppCommands {
|
|
912
|
+
/**
|
|
913
|
+
* @hidden
|
|
914
|
+
* The payload of IActionCommandResponse
|
|
915
|
+
*
|
|
916
|
+
* @internal
|
|
917
|
+
* Limited to Microsoft-internal use
|
|
918
|
+
*
|
|
919
|
+
* @beta
|
|
920
|
+
*/
|
|
921
|
+
type IActionCommandResponse = ITextActionCommandResponse | ICardActionCommandResponse;
|
|
922
|
+
/**
|
|
923
|
+
* @hidden
|
|
924
|
+
* The payload of IBaseActionCommandResponse
|
|
925
|
+
*
|
|
926
|
+
* @internal
|
|
927
|
+
* Limited to Microsoft-internal use
|
|
928
|
+
*
|
|
929
|
+
* @beta
|
|
930
|
+
*/
|
|
931
|
+
interface IBaseActionCommandResponse {
|
|
932
|
+
taskModuleClosedReason: TaskModuleClosedReason;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* @hidden
|
|
936
|
+
* The text result type
|
|
937
|
+
*
|
|
938
|
+
* @internal
|
|
939
|
+
* Limited to Microsoft-internal use
|
|
940
|
+
*
|
|
941
|
+
* @beta
|
|
942
|
+
*/
|
|
943
|
+
interface ITextActionCommandResponse extends IBaseActionCommandResponse {
|
|
944
|
+
resultType: 'text';
|
|
945
|
+
text: string | undefined;
|
|
946
|
+
}
|
|
947
|
+
/**
|
|
948
|
+
* @hidden
|
|
949
|
+
* The card result type
|
|
950
|
+
*
|
|
951
|
+
* @internal
|
|
952
|
+
* Limited to Microsoft-internal use
|
|
953
|
+
*
|
|
954
|
+
* @beta
|
|
955
|
+
*/
|
|
956
|
+
interface ICardActionCommandResponse extends IBaseActionCommandResponse {
|
|
957
|
+
resultType: 'card';
|
|
958
|
+
attachmentLayout: externalAppAuthentication.AttachmentLayout;
|
|
959
|
+
attachments: externalAppAuthentication.QueryMessageExtensionAttachment[];
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* @hidden
|
|
963
|
+
* The result type for the ActionCommandResultType
|
|
964
|
+
*
|
|
965
|
+
* @internal
|
|
966
|
+
* Limited to Microsoft-internal use
|
|
967
|
+
*
|
|
968
|
+
* @beta
|
|
969
|
+
*/
|
|
970
|
+
type ActionCommandResultType = 'card' | 'text';
|
|
971
|
+
/**
|
|
972
|
+
* @hidden
|
|
973
|
+
* The reason for the TaskModuleClosedReason
|
|
974
|
+
*
|
|
975
|
+
* @internal
|
|
976
|
+
* Limited to Microsoft-internal use
|
|
977
|
+
*
|
|
978
|
+
* @beta
|
|
979
|
+
*/
|
|
980
|
+
type TaskModuleClosedReason = 'Done' | 'CancelledByUser';
|
|
981
|
+
/**
|
|
982
|
+
*
|
|
983
|
+
* @hidden
|
|
984
|
+
* Error that can be thrown from IExternalAppCommandsService.processActionCommand
|
|
985
|
+
*
|
|
986
|
+
* @internal
|
|
987
|
+
* Limited to Microsoft-internal use
|
|
988
|
+
*
|
|
989
|
+
* @beta
|
|
990
|
+
*/
|
|
991
|
+
interface ActionCommandError {
|
|
992
|
+
errorCode: ExternalAppErrorCode;
|
|
993
|
+
message?: string;
|
|
994
|
+
}
|
|
995
|
+
/**
|
|
996
|
+
* @internal
|
|
997
|
+
* Limited to Microsoft-internal use
|
|
998
|
+
* @hidden
|
|
999
|
+
* This API delegates an ActionCommand request to the host for the application with the provided following parameters:
|
|
1000
|
+
*
|
|
1001
|
+
* @param appId ID of the application the request is intended for. This must be a UUID
|
|
1002
|
+
* @param commandId extensibilityProvider use this ID to look up the command declared by ActionME
|
|
1003
|
+
* @param extractedParameters are the key-value pairs that the dialog will be prepopulated with
|
|
1004
|
+
*
|
|
1005
|
+
* @returns Promise that resolves with the {@link IActionCommandResponse} when the request is completed and rejects with {@link ActionCommandError} if the request fails
|
|
1006
|
+
*
|
|
1007
|
+
* @beta
|
|
1008
|
+
*/
|
|
1009
|
+
function processActionCommand(appId: string, commandId: string, extractedParameters: Record<string, string>): Promise<IActionCommandResponse>;
|
|
1010
|
+
/**
|
|
1011
|
+
* @hidden
|
|
1012
|
+
* Checks if the externalAppCommands capability is supported by the host
|
|
1013
|
+
* @returns boolean to represent whether externalAppCommands capability is supported
|
|
1014
|
+
*
|
|
1015
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
1016
|
+
*
|
|
1017
|
+
* @internal
|
|
1018
|
+
* Limited to Microsoft-internal use
|
|
1019
|
+
*
|
|
1020
|
+
* @beta
|
|
1021
|
+
*/
|
|
1022
|
+
function isSupported(): boolean;
|
|
1023
|
+
}
|
|
1024
|
+
|
|
870
1025
|
export namespace files {
|
|
871
1026
|
/**
|
|
872
1027
|
* @hidden
|
|
@@ -876,7 +1031,7 @@ export namespace files {
|
|
|
876
1031
|
* @internal
|
|
877
1032
|
* Limited to Microsoft-internal use
|
|
878
1033
|
*/
|
|
879
|
-
export enum CloudStorageProvider {
|
|
1034
|
+
export const enum CloudStorageProvider {
|
|
880
1035
|
Dropbox = "DROPBOX",
|
|
881
1036
|
Box = "BOX",
|
|
882
1037
|
Sharefile = "SHAREFILE",
|
|
@@ -913,7 +1068,7 @@ export namespace files {
|
|
|
913
1068
|
* @internal
|
|
914
1069
|
* Limited to Microsoft-internal use
|
|
915
1070
|
*/
|
|
916
|
-
export enum CloudStorageProviderType {
|
|
1071
|
+
export const enum CloudStorageProviderType {
|
|
917
1072
|
Sharepoint = 0,
|
|
918
1073
|
WopiIntegration = 1,
|
|
919
1074
|
Google = 2,
|
|
@@ -1131,7 +1286,7 @@ export namespace files {
|
|
|
1131
1286
|
* @internal
|
|
1132
1287
|
* Limited to Microsoft-internal use
|
|
1133
1288
|
*/
|
|
1134
|
-
export enum SpecialDocumentLibraryType {
|
|
1289
|
+
export const enum SpecialDocumentLibraryType {
|
|
1135
1290
|
ClassMaterials = "classMaterials"
|
|
1136
1291
|
}
|
|
1137
1292
|
/**
|
|
@@ -1142,7 +1297,7 @@ export namespace files {
|
|
|
1142
1297
|
* @internal
|
|
1143
1298
|
* Limited to Microsoft-internal use
|
|
1144
1299
|
*/
|
|
1145
|
-
export enum DocumentLibraryAccessType {
|
|
1300
|
+
export const enum DocumentLibraryAccessType {
|
|
1146
1301
|
Readonly = "readonly"
|
|
1147
1302
|
}
|
|
1148
1303
|
/**
|
|
@@ -1184,7 +1339,7 @@ export namespace files {
|
|
|
1184
1339
|
* @internal
|
|
1185
1340
|
* Limited to Microsoft-internal use
|
|
1186
1341
|
*/
|
|
1187
|
-
export enum FileDownloadStatus {
|
|
1342
|
+
export const enum FileDownloadStatus {
|
|
1188
1343
|
Downloaded = "Downloaded",
|
|
1189
1344
|
Downloading = "Downloading",
|
|
1190
1345
|
Failed = "Failed"
|
|
@@ -1286,7 +1441,7 @@ export namespace files {
|
|
|
1286
1441
|
* @internal
|
|
1287
1442
|
* Limited to Microsoft-internal use
|
|
1288
1443
|
*/
|
|
1289
|
-
export enum CloudStorageProviderFileAction {
|
|
1444
|
+
export const enum CloudStorageProviderFileAction {
|
|
1290
1445
|
Download = "DOWNLOAD",
|
|
1291
1446
|
Upload = "UPLOAD",
|
|
1292
1447
|
Delete = "DELETE"
|
|
@@ -1906,6 +2061,88 @@ export namespace notifications {
|
|
|
1906
2061
|
function isSupported(): boolean;
|
|
1907
2062
|
}
|
|
1908
2063
|
|
|
2064
|
+
/**
|
|
2065
|
+
* @hidden
|
|
2066
|
+
* @internal
|
|
2067
|
+
* @beta
|
|
2068
|
+
* Limited to Microsoft-internal use
|
|
2069
|
+
*
|
|
2070
|
+
* This capability contains the APIs for handling events that happen to other applications on the host
|
|
2071
|
+
* *while* the developer's application is running. For example, if the developer wants to be notified
|
|
2072
|
+
* when another application has been installed.
|
|
2073
|
+
*/
|
|
2074
|
+
export namespace otherAppStateChange {
|
|
2075
|
+
/**
|
|
2076
|
+
* @hidden
|
|
2077
|
+
* @beta
|
|
2078
|
+
* @internal
|
|
2079
|
+
* Limited to Microsoft-internal use
|
|
2080
|
+
*
|
|
2081
|
+
* Represent an event that has happened with other number of applications installed on this host.
|
|
2082
|
+
* (e.g. a new app has been installed)
|
|
2083
|
+
*/
|
|
2084
|
+
interface OtherAppStateChangeEvent {
|
|
2085
|
+
/** An array of app ids that this event applies to */
|
|
2086
|
+
appIds: string[];
|
|
2087
|
+
}
|
|
2088
|
+
/**
|
|
2089
|
+
* @hidden
|
|
2090
|
+
* @beta
|
|
2091
|
+
* @internal
|
|
2092
|
+
* Limited to Microsoft-internal use
|
|
2093
|
+
*
|
|
2094
|
+
* A function handler that will be called whenever an event happens with some number of applications installed on this host.
|
|
2095
|
+
*/
|
|
2096
|
+
type OtherAppStateChangeEventHandler = (event: OtherAppStateChangeEvent) => void;
|
|
2097
|
+
/**
|
|
2098
|
+
* @hidden
|
|
2099
|
+
* @beta
|
|
2100
|
+
* @internal
|
|
2101
|
+
* Limited to Microsoft-internal use
|
|
2102
|
+
*
|
|
2103
|
+
* This function allows an app to register a handler that will receive whenever other applications are installed
|
|
2104
|
+
* on the host while the developer's application is running.
|
|
2105
|
+
*
|
|
2106
|
+
* @param appInstallHandler - This handler will be called whenever apps are installed on the host.
|
|
2107
|
+
*
|
|
2108
|
+
* @throws Error if {@link app.initialize} has not successfully completed, if the platform
|
|
2109
|
+
* does not support the otherAppStateChange capability, or if a valid handler is not passed to the function.
|
|
2110
|
+
*
|
|
2111
|
+
* @example
|
|
2112
|
+
* ``` ts
|
|
2113
|
+
* if (otherAppStateChange.isSupported()) {
|
|
2114
|
+
* otherAppStateChange.registerAppInstallationHandler((event: otherAppStateChange.OtherAppStateChangeEvent) => {
|
|
2115
|
+
* // code to handle the event goes here
|
|
2116
|
+
* });
|
|
2117
|
+
* }
|
|
2118
|
+
* ```
|
|
2119
|
+
*/
|
|
2120
|
+
function registerAppInstallationHandler(appInstallHandler: OtherAppStateChangeEventHandler): void;
|
|
2121
|
+
/**
|
|
2122
|
+
* @hidden
|
|
2123
|
+
* @beta
|
|
2124
|
+
* @internal
|
|
2125
|
+
* Limited to Microsoft-internal use
|
|
2126
|
+
*
|
|
2127
|
+
* This function can be called so that the handler passed to {@link registerAppInstallationHandler}
|
|
2128
|
+
* will no longer receive app installation events. If this is called before registering a handler
|
|
2129
|
+
* it will have no effect.
|
|
2130
|
+
*
|
|
2131
|
+
* @throws Error if {@link app.initialize} has not successfully completed or if the platform
|
|
2132
|
+
* does not support the otherAppStateChange capability.
|
|
2133
|
+
*/
|
|
2134
|
+
function unregisterAppInstallationHandler(): void;
|
|
2135
|
+
/**
|
|
2136
|
+
* Checks if the otherAppStateChange capability is supported by the host
|
|
2137
|
+
* @returns boolean to represent whether the otherAppStateChange capability is supported
|
|
2138
|
+
*
|
|
2139
|
+
* @throws Error if {@link app.initialize} has not successfully completed
|
|
2140
|
+
*
|
|
2141
|
+
* @beta
|
|
2142
|
+
*/
|
|
2143
|
+
function isSupported(): boolean;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
1909
2146
|
export namespace remoteCamera {
|
|
1910
2147
|
/**
|
|
1911
2148
|
* @hidden
|
|
@@ -2043,7 +2280,7 @@ export namespace remoteCamera {
|
|
|
2043
2280
|
* @internal
|
|
2044
2281
|
* Limited to Microsoft-internal use
|
|
2045
2282
|
*/
|
|
2046
|
-
enum ErrorReason {
|
|
2283
|
+
const enum ErrorReason {
|
|
2047
2284
|
CommandResetError = 0,
|
|
2048
2285
|
CommandZoomInError = 1,
|
|
2049
2286
|
CommandZoomOutError = 2,
|
|
@@ -2085,7 +2322,7 @@ export namespace remoteCamera {
|
|
|
2085
2322
|
* @internal
|
|
2086
2323
|
* Limited to Microsoft-internal use
|
|
2087
2324
|
*/
|
|
2088
|
-
enum SessionTerminatedReason {
|
|
2325
|
+
const enum SessionTerminatedReason {
|
|
2089
2326
|
None = 0,
|
|
2090
2327
|
ControlDenied = 1,
|
|
2091
2328
|
ControlNoResponse = 2,
|
|
@@ -2294,7 +2531,7 @@ export namespace appEntity {
|
|
|
2294
2531
|
}
|
|
2295
2532
|
|
|
2296
2533
|
export namespace teams {
|
|
2297
|
-
enum ChannelType {
|
|
2534
|
+
const enum ChannelType {
|
|
2298
2535
|
Regular = 0,
|
|
2299
2536
|
Private = 1,
|
|
2300
2537
|
Shared = 2
|
|
@@ -2418,7 +2655,7 @@ export namespace videoEffectsEx {
|
|
|
2418
2655
|
* @internal
|
|
2419
2656
|
* Limited to Microsoft-internal use
|
|
2420
2657
|
*/
|
|
2421
|
-
enum ErrorLevel {
|
|
2658
|
+
const enum ErrorLevel {
|
|
2422
2659
|
Fatal = "fatal",
|
|
2423
2660
|
Warn = "warn"
|
|
2424
2661
|
}
|
|
@@ -3867,6 +4104,15 @@ export interface Context {
|
|
|
3867
4104
|
* The SharePoint relative path to the current users mysite
|
|
3868
4105
|
*/
|
|
3869
4106
|
mySitePath?: string;
|
|
4107
|
+
/**
|
|
4108
|
+
* @deprecated
|
|
4109
|
+
* As of 2.0.0, please use {@link app.Context.dialogParameters} instead
|
|
4110
|
+
*
|
|
4111
|
+
* When `processActionCommand` activates a dialog, this dialog should automatically fill in some fields with information. This information comes from M365 and is given to `processActionCommand` as `extractedParameters`.
|
|
4112
|
+
* App developers need to use these `extractedParameters` in their dialog.
|
|
4113
|
+
* They help pre-fill the dialog with necessary information (`dialogParameters`) along with other details.
|
|
4114
|
+
*/
|
|
4115
|
+
dialogParameters?: Record<string, string>;
|
|
3870
4116
|
}
|
|
3871
4117
|
/** Represents the parameters used to share a deep link. */
|
|
3872
4118
|
export interface ShareDeepLinkParameters {
|
|
@@ -4609,6 +4855,13 @@ export namespace app {
|
|
|
4609
4855
|
* Will be `undefined` when not running in Teams.
|
|
4610
4856
|
*/
|
|
4611
4857
|
team?: TeamInfo;
|
|
4858
|
+
/**
|
|
4859
|
+
* When `processActionCommand` activates a dialog, this dialog should automatically fill in some fields with information. This information comes from M365 and is given to `processActionCommand` as `extractedParameters`.
|
|
4860
|
+
* App developers need to use these `extractedParameters` in their dialog.
|
|
4861
|
+
* They help pre-fill the dialog with necessary information (`dialogParameters`) along with other details.
|
|
4862
|
+
* If there's no key/value pairs passed, the object will be empty in the case
|
|
4863
|
+
*/
|
|
4864
|
+
dialogParameters: Record<string, string>;
|
|
4612
4865
|
}
|
|
4613
4866
|
/**
|
|
4614
4867
|
* This function is passed to registerOnThemeHandler. It is called every time the user changes their theme.
|
|
@@ -5204,6 +5457,22 @@ export namespace dialog {
|
|
|
5204
5457
|
}
|
|
5205
5458
|
}
|
|
5206
5459
|
|
|
5460
|
+
/**
|
|
5461
|
+
* @beta
|
|
5462
|
+
* Nested app auth capabilities
|
|
5463
|
+
*/
|
|
5464
|
+
export namespace nestedAppAuth {
|
|
5465
|
+
/**
|
|
5466
|
+
* Checks if MSAL-NAA channel recommended by the host
|
|
5467
|
+
* @returns true if host is recommending NAA channel and false otherwise
|
|
5468
|
+
*
|
|
5469
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
5470
|
+
*
|
|
5471
|
+
* @beta
|
|
5472
|
+
*/
|
|
5473
|
+
function isNAAChannelRecommended(): boolean;
|
|
5474
|
+
}
|
|
5475
|
+
|
|
5207
5476
|
/**
|
|
5208
5477
|
* Namespace to interact with the geoLocation module-specific part of the SDK. This is the newer version of location module.
|
|
5209
5478
|
*
|
|
@@ -8278,6 +8547,54 @@ export namespace sharing {
|
|
|
8278
8547
|
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
8279
8548
|
*/
|
|
8280
8549
|
export function isSupported(): boolean;
|
|
8550
|
+
/**
|
|
8551
|
+
* Namespace to get the list of content shared in a Teams meeting
|
|
8552
|
+
*
|
|
8553
|
+
* @beta
|
|
8554
|
+
*/
|
|
8555
|
+
export namespace history {
|
|
8556
|
+
/**
|
|
8557
|
+
* Represents the data returned when calling {@link sharing.history.getContent}
|
|
8558
|
+
*
|
|
8559
|
+
* @beta
|
|
8560
|
+
*/
|
|
8561
|
+
interface IContentResponse {
|
|
8562
|
+
/** Id of the app where the content was shared from */
|
|
8563
|
+
appId: string;
|
|
8564
|
+
/** Title of the shared content */
|
|
8565
|
+
title: string;
|
|
8566
|
+
/** Reference of the shared content */
|
|
8567
|
+
contentReference: string;
|
|
8568
|
+
/** Id of the thread where the content was shared. This is a UUID */
|
|
8569
|
+
threadId: string;
|
|
8570
|
+
/** Id of the user who shared the content. This is a UUID */
|
|
8571
|
+
author: string;
|
|
8572
|
+
/** Type of the shared content.
|
|
8573
|
+
* For sharing to Teams stage scenarios, this value would be `ShareToStage`
|
|
8574
|
+
* Other `contentType` values will be added and documented here over time
|
|
8575
|
+
*/
|
|
8576
|
+
contentType: string;
|
|
8577
|
+
}
|
|
8578
|
+
/**
|
|
8579
|
+
* Get the list of content shared in a Teams meeting
|
|
8580
|
+
*
|
|
8581
|
+
* @throws Error if call capability is not supported
|
|
8582
|
+
* @throws Error if returned content details are invalid
|
|
8583
|
+
* @returns Promise that will resolve with the {@link IContentResponse} objects array
|
|
8584
|
+
*
|
|
8585
|
+
* @beta
|
|
8586
|
+
*/
|
|
8587
|
+
function getContent(): Promise<IContentResponse[]>;
|
|
8588
|
+
/**
|
|
8589
|
+
* Checks if sharing.history capability is supported by the host
|
|
8590
|
+
* @returns boolean to represent whether the sharing.history capability is supported
|
|
8591
|
+
*
|
|
8592
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
|
8593
|
+
*
|
|
8594
|
+
* @beta
|
|
8595
|
+
*/
|
|
8596
|
+
function isSupported(): boolean;
|
|
8597
|
+
}
|
|
8281
8598
|
export {};
|
|
8282
8599
|
}
|
|
8283
8600
|
|
|
@@ -8340,8 +8657,6 @@ export namespace stageView {
|
|
|
8340
8657
|
popoutWithChat = "popoutWithChat"
|
|
8341
8658
|
}
|
|
8342
8659
|
/**
|
|
8343
|
-
* @hidden
|
|
8344
|
-
* Feature is under development
|
|
8345
8660
|
*
|
|
8346
8661
|
* Opens a stage view to display a Teams application
|
|
8347
8662
|
* @beta
|
|
@@ -9774,6 +10089,16 @@ export namespace marketplace {
|
|
|
9774
10089
|
export {};
|
|
9775
10090
|
}
|
|
9776
10091
|
|
|
10092
|
+
/**
|
|
10093
|
+
* @hidden
|
|
10094
|
+
* Error codes that can be thrown from externalAppCommands and externalAppCardCommands Action Submit specifically
|
|
10095
|
+
* @internal
|
|
10096
|
+
* Limited to Microsoft-internal use
|
|
10097
|
+
*/
|
|
10098
|
+
export const enum ExternalAppErrorCode {
|
|
10099
|
+
INTERNAL_ERROR = "INTERNAL_ERROR"
|
|
10100
|
+
}
|
|
10101
|
+
|
|
9777
10102
|
/**
|
|
9778
10103
|
* @hidden
|
|
9779
10104
|
* Create a MediaStreamTrack from the media stream with the given streamId and processed by videoFrameHandler.
|