@microsoft/teams-js 2.4.0-beta.1 → 2.4.0-beta.3
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 +2 -2
- package/dist/MicrosoftTeams.d.ts +52 -290
- package/dist/MicrosoftTeams.js +326 -413
- 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
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Welcome to the Teams JavaScript client SDK! For breaking changes, please refer to our [changelog](./CHANGELOG.md) in the current `<root>/packages/teams-js` directory.
|
4
4
|
|
5
|
-
This JavaScript library is part of the [Microsoft Teams developer platform](https://
|
5
|
+
This JavaScript library is part of the [Microsoft Teams developer platform](https://learn.microsoft.com/microsoftteams/platform/). See full [SDK reference documentation](https://learn.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest).
|
6
6
|
|
7
7
|
## Getting Started
|
8
8
|
|
@@ -12,7 +12,7 @@ Whenever building or testing the Teams client SDK, you can run `yarn build` or `
|
|
12
12
|
|
13
13
|
## Installation
|
14
14
|
|
15
|
-
To install the stable [version](https://
|
15
|
+
To install the stable [version](https://learn.microsoft.com/javascript/api/overview/msteams-client?view=msteams-client-js-latest):
|
16
16
|
|
17
17
|
### npm
|
18
18
|
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -1,10 +1,4 @@
|
|
1
1
|
// Generated by dts-bundle v0.7.3
|
2
|
-
// Dependencies for this module:
|
3
|
-
// ../@fluidframework/azure-client
|
4
|
-
// ../@fluidframework/fluid-static
|
5
|
-
|
6
|
-
import type { AzureConnectionConfig, AzureContainerServices, ITelemetryBaseLogger } from '@fluidframework/azure-client';
|
7
|
-
import type { ContainerSchema, IFluidContainer } from '@fluidframework/fluid-static';
|
8
2
|
|
9
3
|
/**
|
10
4
|
* @hidden
|
@@ -2793,7 +2787,7 @@ export interface ActionInfo {
|
|
2793
2787
|
*
|
2794
2788
|
* @remarks
|
2795
2789
|
* For more details about the updated {@link app.Context} interface, visit the
|
2796
|
-
* [Teams JavaScript client SDK](https://
|
2790
|
+
* [Teams JavaScript client SDK](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/using-teams-client-sdk#updates-to-the-context-interface)
|
2797
2791
|
* overview article.
|
2798
2792
|
*
|
2799
2793
|
* Represents the structure of the received context message.
|
@@ -3863,8 +3857,7 @@ export namespace app {
|
|
3863
3857
|
* Initializes the library.
|
3864
3858
|
*
|
3865
3859
|
* @remarks
|
3866
|
-
*
|
3867
|
-
* but after the frame is loaded successfully.
|
3860
|
+
* Initialize must have completed successfully (as determined by the resolved Promise) before any other library calls are made
|
3868
3861
|
*
|
3869
3862
|
* @param validMessageOrigins - Optionally specify a list of cross frame message origins. They must have
|
3870
3863
|
* https: protocol otherwise they will be ignored. Example: https:www.example.com
|
@@ -4114,7 +4107,7 @@ export namespace dialog {
|
|
4114
4107
|
* Submit the dialog module and close the dialog
|
4115
4108
|
*
|
4116
4109
|
* @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
|
4117
|
-
* @param appIds -
|
4110
|
+
* @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.
|
4118
4111
|
*/
|
4119
4112
|
function submit(result?: string | object, appIds?: string | string[]): void;
|
4120
4113
|
/**
|
@@ -4686,6 +4679,53 @@ export namespace pages {
|
|
4686
4679
|
*/
|
4687
4680
|
function isSupported(): boolean;
|
4688
4681
|
}
|
4682
|
+
/**
|
4683
|
+
* Provides functions for navigating without needing to specify your application ID.
|
4684
|
+
*
|
4685
|
+
* @beta
|
4686
|
+
*/
|
4687
|
+
namespace currentApp {
|
4688
|
+
/**
|
4689
|
+
* Parameters for the NavigateWithinApp
|
4690
|
+
*
|
4691
|
+
* @beta
|
4692
|
+
*/
|
4693
|
+
interface NavigateWithinAppParams {
|
4694
|
+
/**
|
4695
|
+
* The developer-defined unique ID for the page defined in the manifest or when first configuring
|
4696
|
+
* the page. (Known as {entityId} prior to TeamsJS v.2.0.0)
|
4697
|
+
*/
|
4698
|
+
pageId: string;
|
4699
|
+
/**
|
4700
|
+
* Optional developer-defined unique ID describing the content to navigate to within the page. This
|
4701
|
+
* can be retrieved from the Context object {@link app.PageInfo.subPageId | app.Context.page.subPageId}
|
4702
|
+
*/
|
4703
|
+
subPageId?: string;
|
4704
|
+
}
|
4705
|
+
/**
|
4706
|
+
* Navigate within the currently running application with page ID, and sub-page ID (for navigating to
|
4707
|
+
* specific content within the page).
|
4708
|
+
* @param params - Parameters for the navigation
|
4709
|
+
* @returns a promise that will resolve if the navigation was successful
|
4710
|
+
*
|
4711
|
+
* @beta
|
4712
|
+
*/
|
4713
|
+
function navigateTo(params: NavigateWithinAppParams): Promise<void>;
|
4714
|
+
/**
|
4715
|
+
* Navigate to the currently running application's first static page defined in the application
|
4716
|
+
* manifest.
|
4717
|
+
* @beta
|
4718
|
+
*/
|
4719
|
+
function navigateToDefaultPage(): Promise<void>;
|
4720
|
+
/**
|
4721
|
+
* Checks if pages.currentApp capability is supported by the host
|
4722
|
+
* @returns true if the pages.currentApp capability is enabled in runtime.supports.pages.currentApp and
|
4723
|
+
* false if it is disabled
|
4724
|
+
*
|
4725
|
+
* @beta
|
4726
|
+
*/
|
4727
|
+
function isSupported(): boolean;
|
4728
|
+
}
|
4689
4729
|
}
|
4690
4730
|
|
4691
4731
|
export interface IAppWindow {
|
@@ -5976,7 +6016,7 @@ export namespace profile {
|
|
5976
6016
|
*
|
5977
6017
|
* This id is guaranteed to be unique for an object within a tenant,
|
5978
6018
|
* and so if provided will lead to a more performant lookup. It can
|
5979
|
-
* be resolved via MS Graph (see https://
|
6019
|
+
* be resolved via MS Graph (see https://learn.microsoft.com/graph/api/resources/users
|
5980
6020
|
* for examples).
|
5981
6021
|
*/
|
5982
6022
|
readonly AadObjectId?: string;
|
@@ -6843,7 +6883,7 @@ export namespace tasks {
|
|
6843
6883
|
* Submit the task module.
|
6844
6884
|
*
|
6845
6885
|
* @param result - Contains the result to be sent to the bot or the app. Typically a JSON object or a serialized version of it
|
6846
|
-
* @param appIds -
|
6886
|
+
* @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.
|
6847
6887
|
*/
|
6848
6888
|
function submitTask(result?: string | object, appIds?: string | string[]): void;
|
6849
6889
|
/**
|
@@ -6855,281 +6895,3 @@ export namespace tasks {
|
|
6855
6895
|
function getDefaultSizeIfNotProvided(taskInfo: TaskInfo): TaskInfo;
|
6856
6896
|
}
|
6857
6897
|
|
6858
|
-
/**
|
6859
|
-
* Namespace to interact with the Live Share module-specific part of the SDK.
|
6860
|
-
*
|
6861
|
-
* @beta
|
6862
|
-
*/
|
6863
|
-
export namespace liveShare {
|
6864
|
-
/**
|
6865
|
-
* Options used to configure the Live Share client.
|
6866
|
-
*
|
6867
|
-
* @beta
|
6868
|
-
*/
|
6869
|
-
interface LiveShareOptions {
|
6870
|
-
/**
|
6871
|
-
* Optional. Configuration to use when connecting to a custom Azure Fluid Relay instance.
|
6872
|
-
*/
|
6873
|
-
readonly connection?: AzureConnectionConfig;
|
6874
|
-
/**
|
6875
|
-
* Optional. A logger instance to receive diagnostic messages.
|
6876
|
-
*/
|
6877
|
-
readonly logger?: ITelemetryBaseLogger;
|
6878
|
-
/**
|
6879
|
-
* Optional. Function to lookup the ID of the container to use for local testing.
|
6880
|
-
*
|
6881
|
-
* @remarks
|
6882
|
-
* The default implementation attempts to retrieve the containerId from the `window.location.hash`.
|
6883
|
-
*
|
6884
|
-
* If the function returns 'undefined' a new container will be created.
|
6885
|
-
* @returns ID of the container to connect to or `undefined` if a new container should be created.
|
6886
|
-
*/
|
6887
|
-
readonly getLocalTestContainerId?: () => string | undefined;
|
6888
|
-
/**
|
6889
|
-
* Optional. Function to save the ID of a newly created local test container.
|
6890
|
-
*
|
6891
|
-
* @remarks
|
6892
|
-
* The default implementation updates `window.location.hash` with the ID of the newly created
|
6893
|
-
* container.
|
6894
|
-
* @param containerId The ID of the container that was created.
|
6895
|
-
*/
|
6896
|
-
readonly setLocalTestContainerId?: (containerId: string) => void;
|
6897
|
-
}
|
6898
|
-
/**
|
6899
|
-
* Initializes the Live Share client.
|
6900
|
-
* @param options Optional. Configuration options passed to the Live Share client.
|
6901
|
-
*
|
6902
|
-
* @beta
|
6903
|
-
*/
|
6904
|
-
function initialize(options?: LiveShareOptions): Promise<void>;
|
6905
|
-
/**
|
6906
|
-
* Connects to the fluid container for the current teams context.
|
6907
|
-
*
|
6908
|
-
* @remarks
|
6909
|
-
* The first client joining the container will create the container resulting in the
|
6910
|
-
* `onContainerFirstCreated` callback being called. This callback can be used to set the initial
|
6911
|
-
* state of of the containers object prior to the container being attached.
|
6912
|
-
* @param fluidContainerSchema Fluid objects to create.
|
6913
|
-
* @param onContainerFirstCreated Optional. Callback that's called when the container is first created.
|
6914
|
-
* @returns The fluid `container` and `services` objects to use along with a `created` flag that if true means the container had to be created.
|
6915
|
-
*
|
6916
|
-
* @beta
|
6917
|
-
*/
|
6918
|
-
function joinContainer(fluidContainerSchema: ContainerSchema, onContainerFirstCreated?: (container: IFluidContainer) => void): Promise<{
|
6919
|
-
container: IFluidContainer;
|
6920
|
-
services: AzureContainerServices;
|
6921
|
-
created: boolean;
|
6922
|
-
}>;
|
6923
|
-
/**
|
6924
|
-
* @hidden
|
6925
|
-
* Hide from docs
|
6926
|
-
* ------
|
6927
|
-
* Returns the LiveShareHost object. Called by existing apps that use the TeamsFluidClient
|
6928
|
-
* directly. This prevents existing apps from breaking and will be removed when Live Share
|
6929
|
-
* goes GA.
|
6930
|
-
*
|
6931
|
-
* @beta
|
6932
|
-
*/
|
6933
|
-
function getHost(): LiveShareHost;
|
6934
|
-
}
|
6935
|
-
|
6936
|
-
/**
|
6937
|
-
* @hidden
|
6938
|
-
* @internal
|
6939
|
-
* Limited to Microsoft-internal use
|
6940
|
-
* ------
|
6941
|
-
* Allowed roles during a meeting.
|
6942
|
-
*/
|
6943
|
-
export enum UserMeetingRole {
|
6944
|
-
guest = "Guest",
|
6945
|
-
attendee = "Attendee",
|
6946
|
-
presenter = "Presenter",
|
6947
|
-
organizer = "Organizer"
|
6948
|
-
}
|
6949
|
-
/**
|
6950
|
-
* @hidden
|
6951
|
-
* @internal
|
6952
|
-
* Limited to Microsoft-internal use
|
6953
|
-
* ------
|
6954
|
-
* State of the current Live Share sessions backing fluid container.
|
6955
|
-
*/
|
6956
|
-
export enum ContainerState {
|
6957
|
-
/**
|
6958
|
-
* The call to `LiveShareHost.setContainerId()` successfully created the container mapping
|
6959
|
-
* for the current Live Share session.
|
6960
|
-
*/
|
6961
|
-
added = "Added",
|
6962
|
-
/**
|
6963
|
-
* A container mapping for the current Live Share Session already exists and should be used
|
6964
|
-
* when joining the sessions Fluid container.
|
6965
|
-
*/
|
6966
|
-
alreadyExists = "AlreadyExists",
|
6967
|
-
/**
|
6968
|
-
* The call to `LiveShareHost.setContainerId()` failed to create the container mapping due to
|
6969
|
-
* another client having already set the container ID for the current Live Share session.
|
6970
|
-
*/
|
6971
|
-
conflict = "Conflict",
|
6972
|
-
/**
|
6973
|
-
* A container mapping for the current Live Share session doesn't exist yet.
|
6974
|
-
*/
|
6975
|
-
notFound = "NotFound"
|
6976
|
-
}
|
6977
|
-
/**
|
6978
|
-
* @hidden
|
6979
|
-
* @internal
|
6980
|
-
* Limited to Microsoft-internal use
|
6981
|
-
* ------
|
6982
|
-
* Returned from `LiveShareHost.get/setFluidContainerId()` to specify the container mapping for the
|
6983
|
-
* current Live Share session.
|
6984
|
-
*/
|
6985
|
-
export interface IFluidContainerInfo {
|
6986
|
-
/**
|
6987
|
-
* State of the containerId mapping.
|
6988
|
-
*/
|
6989
|
-
containerState: ContainerState;
|
6990
|
-
/**
|
6991
|
-
* ID of the container to join for the meeting. Undefined if the container hasn't been
|
6992
|
-
* created yet.
|
6993
|
-
*/
|
6994
|
-
containerId: string | undefined;
|
6995
|
-
/**
|
6996
|
-
* If true, the local client should create the container and then save the created containers
|
6997
|
-
* ID to the mapping service.
|
6998
|
-
*/
|
6999
|
-
shouldCreate: boolean;
|
7000
|
-
/**
|
7001
|
-
* If `containerId` is undefined and `shouldCreate` is false, the container isn't ready but
|
7002
|
-
* another client is creating it. The local client should wait the specified amount of time and
|
7003
|
-
* then ask for the container info again.
|
7004
|
-
*/
|
7005
|
-
retryAfter: number;
|
7006
|
-
}
|
7007
|
-
/**
|
7008
|
-
* @hidden
|
7009
|
-
* @internal
|
7010
|
-
* Limited to Microsoft-internal use
|
7011
|
-
* ------
|
7012
|
-
* Returned from `LiveShareHost.getNtpTime()` to specify the global timestamp for the current
|
7013
|
-
* Live Share session.
|
7014
|
-
*/
|
7015
|
-
export interface INtpTimeInfo {
|
7016
|
-
/**
|
7017
|
-
* ISO 8601 formatted server time. For example: '2019-09-07T15:50-04:00'
|
7018
|
-
*/
|
7019
|
-
ntpTime: string;
|
7020
|
-
/**
|
7021
|
-
* Server time expressed as the number of milliseconds since the ECMAScript epoch.
|
7022
|
-
*/
|
7023
|
-
ntpTimeInUTC: number;
|
7024
|
-
}
|
7025
|
-
/**
|
7026
|
-
* @hidden
|
7027
|
-
* @internal
|
7028
|
-
* Limited to Microsoft-internal use
|
7029
|
-
* ------
|
7030
|
-
* Returned from `LiveShareHost.getFluidTenantInfo()` to specify the Fluid service to use for the
|
7031
|
-
* current Live Share session.
|
7032
|
-
*/
|
7033
|
-
export interface IFluidTenantInfo {
|
7034
|
-
/**
|
7035
|
-
* The Fluid Tenant ID Live Share should use.
|
7036
|
-
*/
|
7037
|
-
tenantId: string;
|
7038
|
-
/**
|
7039
|
-
* The Fluid service endpoint Live Share should use.
|
7040
|
-
*/
|
7041
|
-
serviceEndpoint?: string;
|
7042
|
-
/**
|
7043
|
-
* @deprecated
|
7044
|
-
* As of Fluid 1.0 this configuration information has been deprecated in favor of
|
7045
|
-
* `serviceEndpoint`.
|
7046
|
-
*/
|
7047
|
-
ordererEndpoint: string;
|
7048
|
-
/**
|
7049
|
-
* @deprecated
|
7050
|
-
* As of Fluid 1.0 this configuration information has been deprecated in favor of
|
7051
|
-
* `serviceEndpoint`.
|
7052
|
-
*/
|
7053
|
-
storageEndpoint: string;
|
7054
|
-
}
|
7055
|
-
/**
|
7056
|
-
* @hidden
|
7057
|
-
* @internal
|
7058
|
-
* Limited to Microsoft-internal use
|
7059
|
-
* ------
|
7060
|
-
* Interface for hosting a Live Share session within a client like Teams.
|
7061
|
-
*/
|
7062
|
-
export class LiveShareHost {
|
7063
|
-
/**
|
7064
|
-
* @hidden
|
7065
|
-
* @internal
|
7066
|
-
* Limited to Microsoft-internal use
|
7067
|
-
* ------
|
7068
|
-
* Returns the Fluid Tenant connection info for user's current context.
|
7069
|
-
*/
|
7070
|
-
getFluidTenantInfo(): Promise<IFluidTenantInfo>;
|
7071
|
-
/**
|
7072
|
-
* @hidden
|
7073
|
-
* @internal
|
7074
|
-
* Limited to Microsoft-internal use
|
7075
|
-
* ------
|
7076
|
-
* Returns the fluid access token for mapped container Id.
|
7077
|
-
*
|
7078
|
-
* @param containerId Fluid's container Id for the request. Undefined for new containers.
|
7079
|
-
* @returns token for connecting to Fluid's session.
|
7080
|
-
*/
|
7081
|
-
getFluidToken(containerId?: string): Promise<string>;
|
7082
|
-
/**
|
7083
|
-
* @hidden
|
7084
|
-
* @internal
|
7085
|
-
* Limited to Microsoft-internal use
|
7086
|
-
* ------
|
7087
|
-
* Returns the ID of the fluid container associated with the user's current context.
|
7088
|
-
*/
|
7089
|
-
getFluidContainerId(): Promise<IFluidContainerInfo>;
|
7090
|
-
/**
|
7091
|
-
* @hidden
|
7092
|
-
* @internal
|
7093
|
-
* Limited to Microsoft-internal use
|
7094
|
-
* ------
|
7095
|
-
* Sets the ID of the fluid container associated with the current context.
|
7096
|
-
*
|
7097
|
-
* @remarks
|
7098
|
-
* If this returns false, the client should delete the container they created and then call
|
7099
|
-
* `getFluidContainerId()` to get the ID of the container being used.
|
7100
|
-
* @param containerId ID of the fluid container the client created.
|
7101
|
-
* @returns A data structure with a `containerState` indicating the success or failure of the request.
|
7102
|
-
*/
|
7103
|
-
setFluidContainerId(containerId: string): Promise<IFluidContainerInfo>;
|
7104
|
-
/**
|
7105
|
-
* @hidden
|
7106
|
-
* @internal
|
7107
|
-
* Limited to Microsoft-internal use
|
7108
|
-
* ------
|
7109
|
-
* Returns the shared clock server's current time.
|
7110
|
-
*/
|
7111
|
-
getNtpTime(): Promise<INtpTimeInfo>;
|
7112
|
-
/**
|
7113
|
-
* @hidden
|
7114
|
-
* @internal
|
7115
|
-
* Limited to Microsoft-internal use
|
7116
|
-
* ------
|
7117
|
-
* Associates the fluid client ID with a set of user roles.
|
7118
|
-
*
|
7119
|
-
* @param clientId The ID for the current user's Fluid client. Changes on reconnects.
|
7120
|
-
* @returns The roles for the current user.
|
7121
|
-
*/
|
7122
|
-
registerClientId(clientId: string): Promise<UserMeetingRole[]>;
|
7123
|
-
/**
|
7124
|
-
* @hidden
|
7125
|
-
* @internal
|
7126
|
-
* Limited to Microsoft-internal use
|
7127
|
-
* ------
|
7128
|
-
* Returns the roles associated with a client ID.
|
7129
|
-
*
|
7130
|
-
* @param clientId The Client ID the message was received from.
|
7131
|
-
* @returns The roles for a given client. Returns `undefined` if the client ID hasn't been registered yet.
|
7132
|
-
*/
|
7133
|
-
getClientRoles(clientId: string): Promise<UserMeetingRole[] | undefined>;
|
7134
|
-
}
|
7135
|
-
|