@microsoft/teams-js 2.4.2-beta.1 → 2.5.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/README.md +8 -4
- package/dist/MicrosoftTeams.d.ts +83 -10
- package/dist/MicrosoftTeams.js +141 -61
- 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 -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.4.
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.4.2/js/MicrosoftTeams.min.js) or point your package manager at them.
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
@@ -45,13 +45,13 @@ Reference the SDK 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.4.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.4.2/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-M1BiuUWGXFEu6jscBr/dyRZl4uojmiT5eMSu50lpG3eUyacKjwXE0eWRa2ZIdOmQ"
|
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.4.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.4.2/dist/MicrosoftTeams.min.js"></script>
|
55
55
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
@@ -69,6 +69,10 @@ Stay tuned for examples coming soon.
|
|
69
69
|
|
70
70
|
The [Teams Test App](https://aka.ms/teams-test-app) is used to validate the Teams client SDK APIs.
|
71
71
|
|
72
|
+
## Troubleshooting
|
73
|
+
|
74
|
+
If the CDN hash value on the npm page is out of date please refer to [here] (https://github.com/OfficeDev/microsoft-teams-library-js/blob/main/packages/teams-js/README.md) for an up to date version. If you notice this problem, please report that issue to us in [GitHub Issues] (https://github.com/OfficeDev/microsoft-teams-library-js/issues)
|
75
|
+
|
72
76
|
## Contributing
|
73
77
|
|
74
78
|
Please be sure to check out the [Contributor's guide](../../CONTRIBUTING.md) for crucial steps.
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -2159,8 +2159,6 @@ export namespace videoEx {
|
|
2159
2159
|
* Namespace to interact with the authentication-specific part of the SDK.
|
2160
2160
|
*
|
2161
2161
|
* This object is used for starting or completing authentication flows.
|
2162
|
-
*
|
2163
|
-
* @beta
|
2164
2162
|
*/
|
2165
2163
|
export namespace authentication {
|
2166
2164
|
function initialize(): void;
|
@@ -3437,8 +3435,6 @@ export enum DevicePermission {
|
|
3437
3435
|
|
3438
3436
|
/**
|
3439
3437
|
* Namespace to interact with app initialization and lifecycle.
|
3440
|
-
*
|
3441
|
-
* @beta
|
3442
3438
|
*/
|
3443
3439
|
export namespace app {
|
3444
3440
|
const Messages: {
|
@@ -4042,6 +4038,8 @@ export namespace chat {
|
|
4042
4038
|
* @param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
|
4043
4039
|
*
|
4044
4040
|
* @returns Promise resolved upon completion
|
4041
|
+
*
|
4042
|
+
* @beta
|
4045
4043
|
*/
|
4046
4044
|
function openChat(openChatRequest: OpenSingleChatRequest): Promise<void>;
|
4047
4045
|
/**
|
@@ -4052,8 +4050,17 @@ export namespace chat {
|
|
4052
4050
|
* @param openChatRequest: {@link OpenGroupChatRequest} - a request object that contains a list of user emails as well as optional parameters for message and topic (display name for the group chat).
|
4053
4051
|
*
|
4054
4052
|
* @returns Promise resolved upon completion
|
4053
|
+
*
|
4054
|
+
* @beta
|
4055
4055
|
*/
|
4056
4056
|
function openGroupChat(openChatRequest: OpenGroupChatRequest): Promise<void>;
|
4057
|
+
/**
|
4058
|
+
* Checks if chat capability is supported by the host
|
4059
|
+
*
|
4060
|
+
* @returns boolean to represent whether the chat capability is supported
|
4061
|
+
*
|
4062
|
+
* @beta
|
4063
|
+
*/
|
4057
4064
|
function isSupported(): boolean;
|
4058
4065
|
}
|
4059
4066
|
export {};
|
@@ -4066,6 +4073,8 @@ export {};
|
|
4066
4073
|
export namespace dialog {
|
4067
4074
|
/**
|
4068
4075
|
* Data Structure to represent the SDK response when dialog closes
|
4076
|
+
*
|
4077
|
+
* @beta
|
4069
4078
|
*/
|
4070
4079
|
interface ISdkResponse {
|
4071
4080
|
/**
|
@@ -4080,7 +4089,16 @@ export namespace dialog {
|
|
4080
4089
|
*/
|
4081
4090
|
result?: string | object;
|
4082
4091
|
}
|
4092
|
+
/**
|
4093
|
+
* Handler used to receive and process messages sent between a dialog and the app that launched it
|
4094
|
+
* @beta
|
4095
|
+
*/
|
4083
4096
|
type PostMessageChannel = (message: any) => void;
|
4097
|
+
/**
|
4098
|
+
* Handler used for receiving results when a dialog closes, either the value passed by {@linkcode submit}
|
4099
|
+
* or an error if the dialog was closed by the user.
|
4100
|
+
* @beta
|
4101
|
+
*/
|
4084
4102
|
type DialogSubmitHandler = (result: ISdkResponse) => void;
|
4085
4103
|
/**
|
4086
4104
|
* @hidden
|
@@ -4090,6 +4108,8 @@ export namespace dialog {
|
|
4090
4108
|
* Function is called during app initialization
|
4091
4109
|
* @internal
|
4092
4110
|
* Limited to Microsoft-internal use
|
4111
|
+
*
|
4112
|
+
* @beta
|
4093
4113
|
*/
|
4094
4114
|
function initialize(): void;
|
4095
4115
|
/**
|
@@ -4103,13 +4123,19 @@ export namespace dialog {
|
|
4103
4123
|
* @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
|
4104
4124
|
*
|
4105
4125
|
* @returns a function that can be used to send messages to the dialog.
|
4126
|
+
*
|
4127
|
+
* @beta
|
4106
4128
|
*/
|
4107
4129
|
function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void;
|
4108
4130
|
/**
|
4109
4131
|
* Submit the dialog module and close the dialog
|
4110
4132
|
*
|
4111
|
-
* @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
|
4133
|
+
* @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
|
4134
|
+
* If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
|
4135
|
+
*
|
4112
4136
|
* @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
|
4137
|
+
*
|
4138
|
+
* @beta
|
4113
4139
|
*/
|
4114
4140
|
function submit(result?: string | object, appIds?: string | string[]): void;
|
4115
4141
|
/**
|
@@ -4119,12 +4145,16 @@ export namespace dialog {
|
|
4119
4145
|
* This function is only called from inside of a dialog
|
4120
4146
|
*
|
4121
4147
|
* @param message - The message to send to the parent
|
4148
|
+
*
|
4149
|
+
* @beta
|
4122
4150
|
*/
|
4123
4151
|
function sendMessageToParentFromDialog(message: any): void;
|
4124
4152
|
/**
|
4125
4153
|
* Send message to the dialog from the parent
|
4126
4154
|
*
|
4127
4155
|
* @param message - The message to send
|
4156
|
+
*
|
4157
|
+
* @beta
|
4128
4158
|
*/
|
4129
4159
|
function sendMessageToDialog(message: any): void;
|
4130
4160
|
/**
|
@@ -4134,33 +4164,45 @@ export namespace dialog {
|
|
4134
4164
|
* This function is only called from inside of a dialog.
|
4135
4165
|
*
|
4136
4166
|
* @param listener - The listener that will be triggered.
|
4167
|
+
*
|
4168
|
+
* @beta
|
4137
4169
|
*/
|
4138
4170
|
function registerOnMessageFromParent(listener: PostMessageChannel): void;
|
4139
4171
|
/**
|
4140
4172
|
* Checks if dialog module is supported by the host
|
4141
4173
|
*
|
4142
4174
|
* @returns boolean to represent whether dialog module is supported
|
4175
|
+
*
|
4176
|
+
* @beta
|
4143
4177
|
*/
|
4144
4178
|
function isSupported(): boolean;
|
4145
4179
|
/**
|
4146
4180
|
* Namespace to update the dialog
|
4181
|
+
*
|
4182
|
+
* @beta
|
4147
4183
|
*/
|
4148
4184
|
namespace update {
|
4149
4185
|
/**
|
4150
4186
|
* Update dimensions - height/width of a dialog.
|
4151
4187
|
*
|
4152
4188
|
* @param dimensions - An object containing width and height properties.
|
4189
|
+
*
|
4190
|
+
* @beta
|
4153
4191
|
*/
|
4154
4192
|
function resize(dimensions: DialogSize): void;
|
4155
4193
|
/**
|
4156
4194
|
* Checks if dialog.update capability is supported by the host
|
4157
4195
|
*
|
4158
4196
|
* @returns boolean to represent whether dialog.update is supported
|
4197
|
+
*
|
4198
|
+
* @beta
|
4159
4199
|
*/
|
4160
4200
|
function isSupported(): boolean;
|
4161
4201
|
}
|
4162
4202
|
/**
|
4163
4203
|
* Namespace to open a dialog that sends results to the bot framework
|
4204
|
+
*
|
4205
|
+
* @beta
|
4164
4206
|
*/
|
4165
4207
|
namespace bot {
|
4166
4208
|
/**
|
@@ -4171,12 +4213,16 @@ export namespace dialog {
|
|
4171
4213
|
* @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
|
4172
4214
|
*
|
4173
4215
|
* @returns a function that can be used to send messages to the dialog.
|
4216
|
+
*
|
4217
|
+
* @beta
|
4174
4218
|
*/
|
4175
4219
|
function open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void;
|
4176
4220
|
/**
|
4177
4221
|
* Checks if dialog.bot capability is supported by the host
|
4178
4222
|
*
|
4179
4223
|
* @returns boolean to represent whether dialog.bot is supported
|
4224
|
+
*
|
4225
|
+
* @beta
|
4180
4226
|
*/
|
4181
4227
|
function isSupported(): boolean;
|
4182
4228
|
}
|
@@ -4187,6 +4233,8 @@ export namespace dialog {
|
|
4187
4233
|
*
|
4188
4234
|
* @internal
|
4189
4235
|
* Limited to Microsoft-internal use
|
4236
|
+
*
|
4237
|
+
* @beta
|
4190
4238
|
*/
|
4191
4239
|
function getDialogInfoFromUrlDialogInfo(urlDialogInfo: UrlDialogInfo): DialogInfo;
|
4192
4240
|
/**
|
@@ -4196,6 +4244,8 @@ export namespace dialog {
|
|
4196
4244
|
*
|
4197
4245
|
* @internal
|
4198
4246
|
* Limited to Microsoft-internal use
|
4247
|
+
*
|
4248
|
+
* @beta
|
4199
4249
|
*/
|
4200
4250
|
function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo: BotUrlDialogInfo): DialogInfo;
|
4201
4251
|
}
|
@@ -4301,13 +4351,13 @@ export namespace geoLocation {
|
|
4301
4351
|
|
4302
4352
|
/**
|
4303
4353
|
* Navigation-specific part of the SDK.
|
4304
|
-
*
|
4305
|
-
* @beta
|
4306
4354
|
*/
|
4307
4355
|
export namespace pages {
|
4308
4356
|
/**
|
4309
4357
|
* Return focus to the host. Will move focus forward or backward based on where the application container falls in
|
4310
4358
|
* the F6/tab order in the host.
|
4359
|
+
* On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no
|
4360
|
+
* effect and will be a no-op when called.
|
4311
4361
|
* @param navigateForward - Determines the direction to focus in host.
|
4312
4362
|
*/
|
4313
4363
|
function returnFocus(navigateForward?: boolean): void;
|
@@ -4315,6 +4365,8 @@ export namespace pages {
|
|
4315
4365
|
* @hidden
|
4316
4366
|
*
|
4317
4367
|
* Registers a handler for specifying focus when it passes from the host to the application.
|
4368
|
+
* On mobile hosts or hosts where there is no UI notion of "focus" the handler registered with
|
4369
|
+
* this function will never be called.
|
4318
4370
|
*
|
4319
4371
|
* @param handler - The handler for placing focus within the application.
|
4320
4372
|
*
|
@@ -4392,6 +4444,7 @@ export namespace pages {
|
|
4392
4444
|
function navigateToApp(params: NavigateToAppParams): Promise<void>;
|
4393
4445
|
/**
|
4394
4446
|
* Shares a deep link that a user can use to navigate back to a specific state in this page.
|
4447
|
+
* Please note that this method does yet work on mobile hosts.
|
4395
4448
|
*
|
4396
4449
|
* @param deepLinkParameters - ID and label for the link and fallback URL.
|
4397
4450
|
*/
|
@@ -4399,6 +4452,8 @@ export namespace pages {
|
|
4399
4452
|
/**
|
4400
4453
|
* Registers a handler for changes from or to full-screen view for a tab.
|
4401
4454
|
* Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
|
4455
|
+
* On hosts where there is no support for making an app full screen, the handler registered
|
4456
|
+
* with this function will never be called.
|
4402
4457
|
* @param handler - The handler to invoke when the user toggles full-screen view for a tab.
|
4403
4458
|
*/
|
4404
4459
|
function registerFullScreenHandler(handler: (isFullScreen: boolean) => void): void;
|
@@ -5990,27 +6045,34 @@ export namespace profile {
|
|
5990
6045
|
* Opens a profile card at a specified position to show profile information about a persona.
|
5991
6046
|
* @param showProfileRequest The parameters to position the card and identify the target user.
|
5992
6047
|
* @returns Promise that will be fulfilled when the operation has completed
|
6048
|
+
*
|
6049
|
+
* @beta
|
5993
6050
|
*/
|
5994
6051
|
function showProfile(showProfileRequest: ShowProfileRequest): Promise<void>;
|
5995
6052
|
/**
|
5996
6053
|
* The type of modalities that are supported when showing a profile.
|
5997
6054
|
* Can be provided as an optional hint with the request and will be
|
5998
6055
|
* respected if the hosting M365 application supports it.
|
6056
|
+
*
|
6057
|
+
* @beta
|
5999
6058
|
*/
|
6000
6059
|
type Modality = 'Card' | 'Expanded';
|
6001
6060
|
/**
|
6002
6061
|
* The type of the profile trigger.
|
6003
6062
|
* - MouseHover: The user hovered a target.
|
6004
|
-
* -
|
6005
|
-
* - KeyboardPress: The user initiated the show profile request with their keyboard.
|
6063
|
+
* - Press: The target was pressed with either a mouse click or keyboard key press.
|
6006
6064
|
* - AppRequest: The show profile request is happening programmatically, without direct user interaction.
|
6065
|
+
*
|
6066
|
+
* @beta
|
6007
6067
|
*/
|
6008
|
-
type TriggerType = 'MouseHover' | '
|
6068
|
+
type TriggerType = 'MouseHover' | 'Press' | 'AppRequest';
|
6009
6069
|
/**
|
6010
6070
|
* The set of identifiers that are supported for resolving the persona.
|
6011
6071
|
*
|
6012
6072
|
* At least one is required, and if multiple are provided then only the highest
|
6013
6073
|
* priority one will be used (AadObjectId > Upn > Smtp).
|
6074
|
+
*
|
6075
|
+
* @beta
|
6014
6076
|
*/
|
6015
6077
|
type PersonaIdentifiers = {
|
6016
6078
|
/**
|
@@ -6033,6 +6095,8 @@ export namespace profile {
|
|
6033
6095
|
};
|
6034
6096
|
/**
|
6035
6097
|
* The persona to show the profile for.
|
6098
|
+
*
|
6099
|
+
* @beta
|
6036
6100
|
*/
|
6037
6101
|
interface Persona {
|
6038
6102
|
/**
|
@@ -6046,6 +6110,8 @@ export namespace profile {
|
|
6046
6110
|
}
|
6047
6111
|
/**
|
6048
6112
|
* Input parameters provided to the showProfile API.
|
6113
|
+
*
|
6114
|
+
* @beta
|
6049
6115
|
*/
|
6050
6116
|
interface ShowProfileRequest {
|
6051
6117
|
/**
|
@@ -6065,6 +6131,13 @@ export namespace profile {
|
|
6065
6131
|
*/
|
6066
6132
|
triggerType: TriggerType;
|
6067
6133
|
}
|
6134
|
+
/**
|
6135
|
+
* Checks if the profile capability is supported by the host
|
6136
|
+
*
|
6137
|
+
* @returns boolean to represent whether the profile capability is supported
|
6138
|
+
*
|
6139
|
+
* @beta
|
6140
|
+
*/
|
6068
6141
|
function isSupported(): boolean;
|
6069
6142
|
}
|
6070
6143
|
|