@microsoft/teams-js 2.30.0-beta.0 → 2.31.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/dist/esm/_virtual/__polyfill-node.os.js +1 -0
- package/dist/esm/_virtual/_polyfill-node.os.js +1 -0
- package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/node.js +1 -1
- package/dist/esm/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +1 -0
- package/dist/esm/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +1 -0
- package/dist/esm/packages/teams-js/dts/index.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/internal/VideoFrameTypes.d.ts +78 -0
- package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +8 -0
- package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +16 -0
- package/dist/esm/packages/teams-js/dts/internal/communication.d.ts +162 -0
- package/dist/esm/packages/teams-js/dts/internal/constants.d.ts +146 -0
- package/dist/esm/packages/teams-js/dts/internal/deepLinkConstants.d.ts +26 -0
- package/dist/esm/packages/teams-js/dts/internal/deepLinkUtilities.d.ts +4 -0
- package/dist/esm/packages/teams-js/dts/internal/emailAddressValidation.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/internal/globalVars.d.ts +12 -0
- package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +80 -0
- package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +47 -0
- package/dist/esm/packages/teams-js/dts/internal/internalAPIs.d.ts +61 -0
- package/dist/esm/packages/teams-js/dts/internal/marketplaceUtils.d.ts +94 -0
- package/dist/esm/packages/teams-js/dts/internal/mediaUtil.d.ts +95 -0
- package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +73 -0
- package/dist/esm/packages/teams-js/dts/internal/nestedAppAuthUtils.d.ts +105 -0
- package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +11 -0
- package/dist/esm/packages/teams-js/dts/internal/responseHandler.d.ts +30 -0
- package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +344 -0
- package/dist/esm/packages/teams-js/dts/internal/typeCheckUtilities.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +200 -0
- package/dist/esm/packages/teams-js/dts/internal/uuidObject.d.ts +11 -0
- package/dist/esm/packages/teams-js/dts/internal/validOrigins.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +31 -0
- package/dist/esm/packages/teams-js/dts/internal/videoFrameTick.d.ts +10 -0
- package/dist/esm/packages/teams-js/dts/internal/videoPerformanceMonitor.d.ts +54 -0
- package/dist/esm/packages/teams-js/dts/internal/videoPerformanceStatistics.d.ts +49 -0
- package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +89 -0
- package/dist/esm/packages/teams-js/dts/private/constants.d.ts +9 -0
- package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +152 -0
- package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +39 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +378 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +75 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +112 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +49 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +123 -0
- package/dist/esm/packages/teams-js/dts/private/files.d.ts +758 -0
- package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +176 -0
- package/dist/esm/packages/teams-js/dts/private/index.d.ts +20 -0
- package/dist/esm/packages/teams-js/dts/private/interfaces.d.ts +250 -0
- package/dist/esm/packages/teams-js/dts/private/logs.d.ts +25 -0
- package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +203 -0
- package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +107 -0
- package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +26 -0
- package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +81 -0
- package/dist/esm/packages/teams-js/dts/private/privateAPIs.d.ts +60 -0
- package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +298 -0
- package/dist/esm/packages/teams-js/dts/private/teams.d.ts +116 -0
- package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +244 -0
- package/dist/esm/packages/teams-js/dts/public/adaptiveCards.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/public/app.d.ts +592 -0
- package/dist/esm/packages/teams-js/dts/public/appId.d.ts +33 -0
- package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +57 -0
- package/dist/esm/packages/teams-js/dts/public/appInstallDialog.d.ts +18 -0
- package/dist/esm/packages/teams-js/dts/public/appWindow.d.ts +66 -0
- package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +409 -0
- package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +53 -0
- package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +40 -0
- package/dist/esm/packages/teams-js/dts/public/call.d.ts +53 -0
- package/dist/esm/packages/teams-js/dts/public/chat.d.ts +66 -0
- package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +34 -0
- package/dist/esm/packages/teams-js/dts/public/constants.d.ts +179 -0
- package/dist/esm/packages/teams-js/dts/public/dialog.d.ts +286 -0
- package/dist/esm/packages/teams-js/dts/public/emailAddress.d.ts +12 -0
- package/dist/esm/packages/teams-js/dts/public/geoLocation.d.ts +100 -0
- package/dist/esm/packages/teams-js/dts/public/index.d.ts +44 -0
- package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +1133 -0
- package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +221 -0
- package/dist/esm/packages/teams-js/dts/public/location.d.ts +86 -0
- package/dist/esm/packages/teams-js/dts/public/mail.d.ts +95 -0
- package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +321 -0
- package/dist/esm/packages/teams-js/dts/public/media.d.ts +440 -0
- package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +906 -0
- package/dist/esm/packages/teams-js/dts/public/menus.d.ts +188 -0
- package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +58 -0
- package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +45 -0
- package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +15 -0
- package/dist/esm/packages/teams-js/dts/public/pages.d.ts +574 -0
- package/dist/esm/packages/teams-js/dts/public/people.d.ts +75 -0
- package/dist/esm/packages/teams-js/dts/public/profile.d.ts +127 -0
- package/dist/esm/packages/teams-js/dts/public/publicAPIs.d.ts +218 -0
- package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +207 -0
- package/dist/esm/packages/teams-js/dts/public/search.d.ts +91 -0
- package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +32 -0
- package/dist/esm/packages/teams-js/dts/public/serializable.interface.d.ts +17 -0
- package/dist/esm/packages/teams-js/dts/public/settings.d.ts +101 -0
- package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +124 -0
- package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +104 -0
- package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +62 -0
- package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +77 -0
- package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +119 -0
- package/dist/esm/packages/teams-js/dts/public/version.d.ts +5 -0
- package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +213 -0
- package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +192 -0
- package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +27 -0
- package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -1
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/responseHandler.js +1 -0
- package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
- package/dist/esm/packages/teams-js/src/private/hostEntity.js +1 -1
- package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
- package/dist/esm/packages/teams-js/src/public/app.js +1 -1
- package/dist/esm/packages/teams-js/src/public/appId.js +1 -1
- package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
- package/dist/esm/packages/teams-js/src/public/appInstallDialog.js +1 -1
- package/dist/esm/packages/teams-js/src/public/authentication.js +1 -1
- package/dist/esm/packages/teams-js/src/public/barCode.js +1 -1
- package/dist/esm/packages/teams-js/src/public/calendar.js +1 -1
- package/dist/esm/packages/teams-js/src/public/call.js +1 -1
- package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
- package/dist/esm/packages/teams-js/src/public/constants.js +1 -1
- package/dist/esm/packages/teams-js/src/public/pages.js +1 -1
- package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
- package/dist/esm/packages/teams-js/src/public/serializable.interface.js +1 -0
- package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
- package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
- package/dist/umd/MicrosoftTeams.d.ts +10740 -10768
- package/dist/umd/MicrosoftTeams.js +1572 -1360
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js +0 -1
@@ -0,0 +1,66 @@
|
|
1
|
+
/** onComplete function type */
|
2
|
+
export type onCompleteFunctionType = (status: boolean, reason?: string) => void;
|
3
|
+
/** addEventListner function type */
|
4
|
+
export type addEventListnerFunctionType = (message: any) => void;
|
5
|
+
/** Represents a window or frame within the host app. */
|
6
|
+
export interface IAppWindow {
|
7
|
+
/**
|
8
|
+
* Send a message to the AppWindow.
|
9
|
+
*
|
10
|
+
* @param message - The message to send
|
11
|
+
* @param onComplete - The callback to know if the postMessage has been success/failed.
|
12
|
+
*/
|
13
|
+
postMessage(message: any, onComplete?: onCompleteFunctionType): void;
|
14
|
+
/**
|
15
|
+
* Add a listener that will be called when an event is received from this AppWindow.
|
16
|
+
*
|
17
|
+
* @param type - The event to listen to. Currently the only supported type is 'message'.
|
18
|
+
* @param listener - The listener that will be called
|
19
|
+
*/
|
20
|
+
addEventListener(type: string, listener: Function): void;
|
21
|
+
}
|
22
|
+
/**
|
23
|
+
* An object that application can utilize to establish communication
|
24
|
+
* with the child window it opened, which contains the corresponding task.
|
25
|
+
*/
|
26
|
+
export declare class ChildAppWindow implements IAppWindow {
|
27
|
+
/**
|
28
|
+
* Send a message to the ChildAppWindow.
|
29
|
+
*
|
30
|
+
* @param message - The message to send
|
31
|
+
* @param onComplete - The callback to know if the postMessage has been success/failed.
|
32
|
+
*/
|
33
|
+
postMessage(message: any, onComplete?: onCompleteFunctionType): void;
|
34
|
+
/**
|
35
|
+
* Add a listener that will be called when an event is received from the ChildAppWindow.
|
36
|
+
*
|
37
|
+
* @param type - The event to listen to. Currently the only supported type is 'message'.
|
38
|
+
* @param listener - The listener that will be called
|
39
|
+
*/
|
40
|
+
addEventListener(type: string, listener: addEventListnerFunctionType): void;
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* An object that is utilized to facilitate communication with a parent window
|
44
|
+
* that initiated the opening of current window. For instance, a dialog or task
|
45
|
+
* module would utilize it to transmit messages to the application that launched it.
|
46
|
+
*/
|
47
|
+
export declare class ParentAppWindow implements IAppWindow {
|
48
|
+
/** Represents a parent window or frame. */
|
49
|
+
private static _instance;
|
50
|
+
/** Get the parent window instance. */
|
51
|
+
static get Instance(): IAppWindow;
|
52
|
+
/**
|
53
|
+
* Send a message to the ParentAppWindow.
|
54
|
+
*
|
55
|
+
* @param message - The message to send
|
56
|
+
* @param onComplete - The callback to know if the postMessage has been success/failed.
|
57
|
+
*/
|
58
|
+
postMessage(message: any, onComplete?: onCompleteFunctionType): void;
|
59
|
+
/**
|
60
|
+
* Add a listener that will be called when an event is received from the ParentAppWindow.
|
61
|
+
*
|
62
|
+
* @param type - The event to listen to. Currently the only supported type is 'message'.
|
63
|
+
* @param listener - The listener that will be called
|
64
|
+
*/
|
65
|
+
addEventListener(type: string, listener: addEventListnerFunctionType): void;
|
66
|
+
}
|
@@ -0,0 +1,409 @@
|
|
1
|
+
/**
|
2
|
+
* @hidden
|
3
|
+
* @internal
|
4
|
+
* Limited to Microsoft-internal use; automatically called when library is initialized
|
5
|
+
*/
|
6
|
+
export declare function initialize(): void;
|
7
|
+
/**
|
8
|
+
* @deprecated
|
9
|
+
* As of TeamsJS v2.0.0, this function has been deprecated in favor of a Promise-based pattern using {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>}
|
10
|
+
*
|
11
|
+
* Registers handlers to be called with the result of an authentication flow triggered using {@link authentication.authenticate authentication.authenticate(authenticateParameters?: AuthenticateParameters): void}
|
12
|
+
*
|
13
|
+
* @param authenticateParameters - Configuration for authentication flow pop-up result communication
|
14
|
+
*/
|
15
|
+
export declare function registerAuthenticationHandlers(authenticateParameters: AuthenticateParameters): void;
|
16
|
+
/**
|
17
|
+
* Initiates an authentication flow which requires a new window.
|
18
|
+
* There are two primary uses for this function:
|
19
|
+
* 1. When your app needs to authenticate using a 3rd-party identity provider (not Microsoft Entra ID)
|
20
|
+
* 2. When your app needs to show authentication UI that is blocked from being shown in an iframe (e.g., Microsoft Entra consent prompts)
|
21
|
+
*
|
22
|
+
* For more details, see [Enable authentication using third-party OAuth provider](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/auth-flow-tab)
|
23
|
+
*
|
24
|
+
* This function is *not* needed for "standard" Microsoft Entra SSO usage. Using {@link getAuthToken} is usually sufficient in that case. For more, see
|
25
|
+
* [Enable SSO for tab apps](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/tab-sso-overview))
|
26
|
+
*
|
27
|
+
* @remarks
|
28
|
+
* The authentication flow must start and end from the same domain, otherwise success and failure messages won't be returned to the window that initiated the call.
|
29
|
+
* The [Teams authentication flow](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/auth-flow-tab) starts and ends at an endpoint on
|
30
|
+
* your own service (with a redirect round-trip to the 3rd party identity provider in the middle).
|
31
|
+
*
|
32
|
+
* @param authenticateParameters - Parameters describing the authentication window used for executing the authentication flow
|
33
|
+
*
|
34
|
+
* @returns `Promise` that will be fulfilled with the result from the authentication pop-up, if successful. The string in this result is provided in the parameter
|
35
|
+
* passed by your app when it calls {@link authentication.notifySuccess authentication.notifySuccess(result?: string): void} in the pop-up window after returning from the identity provider redirect.
|
36
|
+
*
|
37
|
+
* @throws `Error` if the authentication request fails or is canceled by the user. This error is provided in the parameter passed by your app when it calls
|
38
|
+
* {@link authentication.notifyFailure authentication.notifyFailure(result?: string): void} in the pop-up window after returning from the identity provider redirect. However, in some cases it can also be provided by
|
39
|
+
* the infrastructure depending on the failure (e.g., a user cancelation)
|
40
|
+
*
|
41
|
+
*/
|
42
|
+
export declare function authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise<string>;
|
43
|
+
/**
|
44
|
+
* @deprecated
|
45
|
+
* As of TeamsJS v2.0.0, please use {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>} instead.
|
46
|
+
*
|
47
|
+
* The documentation for {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>} applies
|
48
|
+
* to this function.
|
49
|
+
* The one difference is that instead of the result being returned via the `Promise`, the result is returned to the callback functions provided in the
|
50
|
+
* `authenticateParameters` parameter.
|
51
|
+
*
|
52
|
+
* @param authenticateParameters - Parameters describing the authentication window used for executing the authentication flow and callbacks used for indicating the result
|
53
|
+
*
|
54
|
+
*/
|
55
|
+
export declare function authenticate(authenticateParameters?: AuthenticateParameters): void;
|
56
|
+
/**
|
57
|
+
* Requests an Microsoft Entra token to be issued on behalf of your app in an SSO flow.
|
58
|
+
* The token is acquired from the cache if it is not expired. Otherwise a request is sent to Microsoft Entra to
|
59
|
+
* obtain a new token.
|
60
|
+
* This function is used to enable SSO scenarios. See [Enable SSO for tab apps](https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/authentication/tab-sso-overview)
|
61
|
+
* for more details.
|
62
|
+
*
|
63
|
+
* @param authTokenRequest - An optional set of values that configure the token request.
|
64
|
+
*
|
65
|
+
* @returns `Promise` that will be resolved with the token, if successful.
|
66
|
+
*
|
67
|
+
* @throws `Error` if the request fails in some way
|
68
|
+
*/
|
69
|
+
export declare function getAuthToken(authTokenRequest?: AuthTokenRequestParameters): Promise<string>;
|
70
|
+
/**
|
71
|
+
* @deprecated
|
72
|
+
* As of TeamsJS v2.0.0, please use {@link authentication.getAuthToken authentication.getAuthToken(authTokenRequest: AuthTokenRequestParameters): Promise\<string\>} instead.
|
73
|
+
*
|
74
|
+
* The documentation {@link authentication.getAuthToken authentication.getAuthToken(authTokenRequest: AuthTokenRequestParameters): Promise\<string\>} applies to this
|
75
|
+
* function as well. The one difference when using this function is that the result is provided in the callbacks in the `authTokenRequest` parameter
|
76
|
+
* instead of as a `Promise`.
|
77
|
+
*
|
78
|
+
* @param authTokenRequest - An optional set of values that configure the token request.
|
79
|
+
* It contains callbacks to call in case of success/failure
|
80
|
+
*/
|
81
|
+
export declare function getAuthToken(authTokenRequest?: AuthTokenRequest): void;
|
82
|
+
/**
|
83
|
+
* @hidden
|
84
|
+
* Requests the decoded Microsoft Entra user identity on behalf of the app.
|
85
|
+
*
|
86
|
+
* @returns Promise that resolves with the {@link UserProfile}.
|
87
|
+
*
|
88
|
+
* @throws `Error` object in case of any problems, the most likely of which is that the calling app does not have appropriate permissions
|
89
|
+
* to call this method.
|
90
|
+
*
|
91
|
+
* @internal
|
92
|
+
* Limited to Microsoft-internal use
|
93
|
+
*/
|
94
|
+
export declare function getUser(): Promise<UserProfile>;
|
95
|
+
/**
|
96
|
+
* @deprecated
|
97
|
+
* As of TeamsJS v2.0.0, please use {@link authentication.getUser authentication.getUser(): Promise\<UserProfile\>} instead.
|
98
|
+
*
|
99
|
+
* @hidden
|
100
|
+
* Requests the decoded Microsoft Entra user identity on behalf of the app.
|
101
|
+
*
|
102
|
+
* @param userRequest - It passes success/failure callbacks in the userRequest object(deprecated)
|
103
|
+
*
|
104
|
+
* @throws `Error` object in case of any problems, the most likely of which is that the calling app does not have appropriate permissions
|
105
|
+
* to call this method.
|
106
|
+
*
|
107
|
+
* @internal
|
108
|
+
* Limited to Microsoft-internal use
|
109
|
+
*/
|
110
|
+
export declare function getUser(userRequest: UserRequest): void;
|
111
|
+
/**
|
112
|
+
* When using {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>}, the
|
113
|
+
* window that was opened to execute the authentication flow should call this method after authentiction to notify the caller of
|
114
|
+
* {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>} that the
|
115
|
+
* authentication request was successful.
|
116
|
+
*
|
117
|
+
* @remarks
|
118
|
+
* This function is usable only from the authentication window.
|
119
|
+
* This call causes the authentication window to be closed.
|
120
|
+
*
|
121
|
+
* @param result - Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives
|
122
|
+
* this value in its callback or via the `Promise` return value
|
123
|
+
*/
|
124
|
+
export declare function notifySuccess(result?: string): void;
|
125
|
+
/**
|
126
|
+
* When using {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>}, the
|
127
|
+
* window that was opened to execute the authentication flow should call this method after authentiction to notify the caller of
|
128
|
+
* {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>} that the
|
129
|
+
* authentication request failed.
|
130
|
+
|
131
|
+
*
|
132
|
+
* @remarks
|
133
|
+
* This function is usable only on the authentication window.
|
134
|
+
* This call causes the authentication window to be closed.
|
135
|
+
*
|
136
|
+
* @param result - Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives
|
137
|
+
* this value in its callback or via the `Promise` return value
|
138
|
+
* @param _callbackUrl - This parameter is deprecated and unused
|
139
|
+
*/
|
140
|
+
export declare function notifyFailure(result?: string): void;
|
141
|
+
/**
|
142
|
+
* @deprecated
|
143
|
+
* As of TeamsJS v2.0.0, this interface has been deprecated in favor of leveraging the `Promise` returned from {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>}
|
144
|
+
*-------------------------
|
145
|
+
* Used in {@link AuthenticateParameters} and {@link AuthTokenRequest}
|
146
|
+
*/
|
147
|
+
export interface LegacyCallBacks {
|
148
|
+
/**
|
149
|
+
* @deprecated
|
150
|
+
* As of TeamsJS v2.0.0, this property has been deprecated in favor of a Promise-based pattern.
|
151
|
+
*
|
152
|
+
* A function that is called if the request succeeds.
|
153
|
+
*/
|
154
|
+
successCallback?: (result: string) => void;
|
155
|
+
/**
|
156
|
+
* @deprecated
|
157
|
+
* As of TeamsJS v2.0.0, this property has been deprecated in favor of a Promise-based pattern.
|
158
|
+
*
|
159
|
+
* A function that is called if the request fails, with the reason for the failure.
|
160
|
+
*/
|
161
|
+
failureCallback?: (reason: string) => void;
|
162
|
+
}
|
163
|
+
/**
|
164
|
+
* Describes the authentication pop-up parameters
|
165
|
+
*/
|
166
|
+
export interface AuthenticatePopUpParameters {
|
167
|
+
/**
|
168
|
+
* The URL for the authentication pop-up.
|
169
|
+
*/
|
170
|
+
url: string;
|
171
|
+
/**
|
172
|
+
* The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
|
173
|
+
*/
|
174
|
+
width?: number;
|
175
|
+
/**
|
176
|
+
* The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
|
177
|
+
*/
|
178
|
+
height?: number;
|
179
|
+
/**
|
180
|
+
* Some identity providers restrict their authentication pages from being displayed in embedded browsers (e.g., a web view inside of a native application)
|
181
|
+
* If the identity provider you are using prevents embedded browser usage, this flag should be set to `true` to enable the authentication page specified in
|
182
|
+
* the {@link url} property to be opened in an external browser.
|
183
|
+
* If this flag is `false`, the page will be opened directly within the current hosting application.
|
184
|
+
*
|
185
|
+
* 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
|
186
|
+
* environment without an embedded browser.
|
187
|
+
*/
|
188
|
+
isExternal?: boolean;
|
189
|
+
}
|
190
|
+
/**
|
191
|
+
* @deprecated
|
192
|
+
* As of TeamsJS v2.0.0, please use {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>} and
|
193
|
+
* the associated {@link AuthenticatePopUpParameters} instead.
|
194
|
+
*
|
195
|
+
* @see {@link LegacyCallBacks}
|
196
|
+
*/
|
197
|
+
export type AuthenticateParameters = AuthenticatePopUpParameters & LegacyCallBacks;
|
198
|
+
/**
|
199
|
+
* Describes authentication token request parameters
|
200
|
+
*/
|
201
|
+
export interface AuthTokenRequestParameters {
|
202
|
+
/**
|
203
|
+
* @hidden
|
204
|
+
* @internal
|
205
|
+
* An list of resources for which to acquire the access token; only for internal Microsoft usage
|
206
|
+
*/
|
207
|
+
resources?: string[];
|
208
|
+
/**
|
209
|
+
* An optional list of claims which to pass to Microsoft Entra when requesting the access token.
|
210
|
+
*/
|
211
|
+
claims?: string[];
|
212
|
+
/**
|
213
|
+
* An optional flag indicating whether to attempt the token acquisition silently or allow a prompt to be shown.
|
214
|
+
*/
|
215
|
+
silent?: boolean;
|
216
|
+
/**
|
217
|
+
* An optional identifier of the home tenant for which to acquire the access token for (used in cross-tenant shared channels).
|
218
|
+
*/
|
219
|
+
tenantId?: string;
|
220
|
+
}
|
221
|
+
/**
|
222
|
+
* @deprecated
|
223
|
+
* As of TeamsJS v2.0.0, please use {@link AuthTokenRequestParameters} instead.
|
224
|
+
*/
|
225
|
+
export type AuthTokenRequest = AuthTokenRequestParameters & LegacyCallBacks;
|
226
|
+
/**
|
227
|
+
* @hidden
|
228
|
+
*
|
229
|
+
* @internal
|
230
|
+
* Limited to Microsoft-internal use
|
231
|
+
*/
|
232
|
+
export interface UserProfile {
|
233
|
+
/**
|
234
|
+
* @hidden
|
235
|
+
* The intended recipient of the token. The application that receives the token must verify that the audience
|
236
|
+
* value is correct and reject any tokens intended for a different audience.
|
237
|
+
*
|
238
|
+
* @internal
|
239
|
+
* Limited to Microsoft-internal use
|
240
|
+
*/
|
241
|
+
aud: string;
|
242
|
+
/**
|
243
|
+
* @hidden
|
244
|
+
* Identifies how the subject of the token was authenticated.
|
245
|
+
*
|
246
|
+
* @internal
|
247
|
+
* Limited to Microsoft-internal use
|
248
|
+
*/
|
249
|
+
amr: string[];
|
250
|
+
/**
|
251
|
+
* @hidden
|
252
|
+
* Stores the time at which the token was issued. It is often used to measure token freshness.
|
253
|
+
*
|
254
|
+
* @internal
|
255
|
+
* Limited to Microsoft-internal use
|
256
|
+
*/
|
257
|
+
iat: number;
|
258
|
+
/**
|
259
|
+
* @hidden
|
260
|
+
* Identifies the security token service (STS) that constructs and returns the token. In the tokens that Microsoft Entra
|
261
|
+
* returns, the issuer is sts.windows.net. The GUID in the issuer claim value is the tenant ID of the Microsoft Entra
|
262
|
+
* directory. The tenant ID is an immutable and reliable identifier of the directory.
|
263
|
+
*
|
264
|
+
* @internal
|
265
|
+
* Limited to Microsoft-internal use
|
266
|
+
*/
|
267
|
+
iss: string;
|
268
|
+
/**
|
269
|
+
* @hidden
|
270
|
+
* Provides the last name, surname, or family name of the user as defined in the Microsoft Entra user object.
|
271
|
+
*
|
272
|
+
* @internal
|
273
|
+
* Limited to Microsoft-internal use
|
274
|
+
*/
|
275
|
+
family_name: string;
|
276
|
+
/**
|
277
|
+
* @hidden
|
278
|
+
* Provides the first or "given" name of the user, as set on the Microsoft Entra user object.
|
279
|
+
*
|
280
|
+
* @internal
|
281
|
+
* Limited to Microsoft-internal use
|
282
|
+
*/
|
283
|
+
given_name: string;
|
284
|
+
/**
|
285
|
+
* @hidden
|
286
|
+
* Provides a human-readable value that identifies the subject of the token. This value is not guaranteed to
|
287
|
+
* be unique within a tenant and is designed to be used only for display purposes.
|
288
|
+
*
|
289
|
+
* @internal
|
290
|
+
* Limited to Microsoft-internal use
|
291
|
+
*/
|
292
|
+
unique_name: string;
|
293
|
+
/**
|
294
|
+
* @hidden
|
295
|
+
* Contains a unique identifier of an object in Microsoft Entra. This value is immutable and cannot be reassigned or
|
296
|
+
* reused. Use the object ID to identify an object in queries to Microsoft Entra.
|
297
|
+
*
|
298
|
+
* @internal
|
299
|
+
* Limited to Microsoft-internal use
|
300
|
+
*/
|
301
|
+
oid: string;
|
302
|
+
/**
|
303
|
+
* @hidden
|
304
|
+
* Identifies the principal about which the token asserts information, such as the user of an application.
|
305
|
+
* This value is immutable and cannot be reassigned or reused, so it can be used to perform authorization
|
306
|
+
* checks safely. Because the subject is always present in the tokens the Microsoft Entra issues, we recommended
|
307
|
+
* using this value in a general-purpose authorization system.
|
308
|
+
*
|
309
|
+
* @internal
|
310
|
+
* Limited to Microsoft-internal use
|
311
|
+
*/
|
312
|
+
sub: string;
|
313
|
+
/**
|
314
|
+
* @hidden
|
315
|
+
* An immutable, non-reusable identifier that identifies the directory tenant that issued the token. You can
|
316
|
+
* use this value to access tenant-specific directory resources in a multitenant application. For example,
|
317
|
+
* you can use this value to identify the tenant in a call to the Graph API.
|
318
|
+
*
|
319
|
+
* @internal
|
320
|
+
* Limited to Microsoft-internal use
|
321
|
+
*/
|
322
|
+
tid: string;
|
323
|
+
/**
|
324
|
+
* @hidden
|
325
|
+
* Defines the end of the time interval within which a token is valid. The service that validates the token
|
326
|
+
* should verify that the current date is within the token lifetime; otherwise it should reject the token. The
|
327
|
+
* service might allow for up to five minutes beyond the token lifetime to account for any differences in clock
|
328
|
+
* time ("time skew") between Microsoft Entra and the service.
|
329
|
+
*
|
330
|
+
* @internal
|
331
|
+
* Limited to Microsoft-internal use
|
332
|
+
*/
|
333
|
+
exp: number;
|
334
|
+
/**
|
335
|
+
* @hidden
|
336
|
+
* Defines the start of the time interval within which a token is valid. The service that validates the token
|
337
|
+
* should verify that the current date is within the token lifetime; otherwise it should reject the token. The
|
338
|
+
* service might allow for up to five minutes beyond the token lifetime to account for any differences in clock
|
339
|
+
* time ("time skew") between Microsoft Entra and the service.
|
340
|
+
*
|
341
|
+
* @internal
|
342
|
+
* Limited to Microsoft-internal use
|
343
|
+
*/
|
344
|
+
nbf: number;
|
345
|
+
/**
|
346
|
+
* @hidden
|
347
|
+
* Stores the user name of the user principal.
|
348
|
+
*
|
349
|
+
* @internal
|
350
|
+
* Limited to Microsoft-internal use
|
351
|
+
*/
|
352
|
+
upn: string;
|
353
|
+
/**
|
354
|
+
* @hidden
|
355
|
+
* Stores the version number of the token.
|
356
|
+
*
|
357
|
+
* @internal
|
358
|
+
* Limited to Microsoft-internal use
|
359
|
+
*/
|
360
|
+
ver: string;
|
361
|
+
/**
|
362
|
+
* @hidden
|
363
|
+
* Stores the data residency of the user.
|
364
|
+
*
|
365
|
+
* @internal
|
366
|
+
* Limited to Microsoft-internal use
|
367
|
+
*/
|
368
|
+
dataResidency?: DataResidency;
|
369
|
+
}
|
370
|
+
/**
|
371
|
+
* @hidden
|
372
|
+
* Limited set of data residencies information exposed to 1P application developers
|
373
|
+
*
|
374
|
+
* @internal
|
375
|
+
* Limited to Microsoft-internal use
|
376
|
+
*/
|
377
|
+
export declare enum DataResidency {
|
378
|
+
/**
|
379
|
+
* Public
|
380
|
+
*/
|
381
|
+
Public = "public",
|
382
|
+
/**
|
383
|
+
* European Union Data Boundary
|
384
|
+
*/
|
385
|
+
EUDB = "eudb",
|
386
|
+
/**
|
387
|
+
* Other, stored to cover fields that will not be exposed
|
388
|
+
*/
|
389
|
+
Other = "other"
|
390
|
+
}
|
391
|
+
/**
|
392
|
+
* @deprecated
|
393
|
+
* As of TeamsJS v2.0.0, this interface has been deprecated in favor of a Promise-based pattern.
|
394
|
+
* @hidden
|
395
|
+
* Describes the UserRequest. Success callback describes how a successful request is handled.
|
396
|
+
* Failure callback describes how a failed request is handled.
|
397
|
+
* @internal
|
398
|
+
* Limited to Microsoft-internal use
|
399
|
+
*/
|
400
|
+
export interface UserRequest {
|
401
|
+
/**
|
402
|
+
* A function that is called if the token request succeeds, with the resulting token.
|
403
|
+
*/
|
404
|
+
successCallback?: (user: UserProfile) => void;
|
405
|
+
/**
|
406
|
+
* A function that is called if the token request fails, with the reason for the failure.
|
407
|
+
*/
|
408
|
+
failureCallback?: (reason: string) => void;
|
409
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/**
|
2
|
+
* Namespace to interact with the barcode scanning-specific part of the SDK.
|
3
|
+
*
|
4
|
+
* @beta
|
5
|
+
*/
|
6
|
+
/**
|
7
|
+
* Data structure to customize the barcode scanning experience in scanBarCode API.
|
8
|
+
* All properties in BarCodeConfig are optional and have default values in the platform
|
9
|
+
*
|
10
|
+
* @beta
|
11
|
+
*/
|
12
|
+
export interface BarCodeConfig {
|
13
|
+
/**
|
14
|
+
* Optional; designates the scan timeout interval in seconds.
|
15
|
+
* Default value is 30 seconds, max allowed value is 60 seconds.
|
16
|
+
*/
|
17
|
+
timeOutIntervalInSec?: number;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Scan Barcode or QRcode using camera
|
21
|
+
*
|
22
|
+
* @param barCodeConfig - input configuration to customize the barcode scanning experience
|
23
|
+
*
|
24
|
+
* @returns a scanned code
|
25
|
+
*
|
26
|
+
* @beta
|
27
|
+
*/
|
28
|
+
export declare function scanBarCode(barCodeConfig: BarCodeConfig): Promise<string>;
|
29
|
+
/**
|
30
|
+
* Checks whether or not media has user permission
|
31
|
+
*
|
32
|
+
* @returns true if the user has granted the app permission to media information, false otherwise
|
33
|
+
*
|
34
|
+
* @beta
|
35
|
+
*/
|
36
|
+
export declare function hasPermission(): Promise<boolean>;
|
37
|
+
/**
|
38
|
+
* Requests user permission for media
|
39
|
+
*
|
40
|
+
* @returns true if the user has granted the app permission to the media, false otherwise
|
41
|
+
*
|
42
|
+
* @beta
|
43
|
+
*/
|
44
|
+
export declare function requestPermission(): Promise<boolean>;
|
45
|
+
/**
|
46
|
+
* Checks if barCode capability is supported by the host
|
47
|
+
* @returns boolean to represent whether the barCode capability is supported
|
48
|
+
*
|
49
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
50
|
+
*
|
51
|
+
* @beta
|
52
|
+
*/
|
53
|
+
export declare function isSupported(): boolean;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
/**
|
2
|
+
* Interact with the user's calendar, including opening calendar items and composing meetings.
|
3
|
+
*/
|
4
|
+
/**
|
5
|
+
* Opens a calendar item.
|
6
|
+
*
|
7
|
+
* @param openCalendarItemParams - object containing unique ID of the calendar item to be opened.
|
8
|
+
*/
|
9
|
+
export declare function openCalendarItem(openCalendarItemParams: OpenCalendarItemParams): Promise<void>;
|
10
|
+
/**
|
11
|
+
* Compose a new meeting in the user's calendar.
|
12
|
+
*
|
13
|
+
* @param composeMeetingParams - object containing various properties to set up the meeting details.
|
14
|
+
*/
|
15
|
+
export declare function composeMeeting(composeMeetingParams: ComposeMeetingParams): Promise<void>;
|
16
|
+
/**
|
17
|
+
* Checks if the calendar capability is supported by the host
|
18
|
+
* @returns boolean to represent whether the calendar capability is supported
|
19
|
+
*
|
20
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
21
|
+
*/
|
22
|
+
export declare function isSupported(): boolean;
|
23
|
+
/** Open calendar item parameters. */
|
24
|
+
export interface OpenCalendarItemParams {
|
25
|
+
/** An unique base64-encoded string id that represents the event's unique identifier of the calendar item to be opened. */
|
26
|
+
itemId: string;
|
27
|
+
}
|
28
|
+
/** Compose meeting parameters */
|
29
|
+
export interface ComposeMeetingParams {
|
30
|
+
/** An array of email addresses, user name, or user id of the attendees to invite to the meeting. */
|
31
|
+
attendees?: string[];
|
32
|
+
/** The start time of the meeting in MM/DD/YYYY HH:MM:SS format. */
|
33
|
+
startTime?: string;
|
34
|
+
/** The end time of the meeting in MM/DD/YYYY HH:MM:SS format. */
|
35
|
+
endTime?: string;
|
36
|
+
/** The subject line of the meeting. */
|
37
|
+
subject?: string;
|
38
|
+
/** The body content of the meeting. */
|
39
|
+
content?: string;
|
40
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/**
|
2
|
+
* Used to interact with call functionality, including starting calls with other users.
|
3
|
+
*/
|
4
|
+
/** Modalities that can be associated with a call. */
|
5
|
+
export declare enum CallModalities {
|
6
|
+
/** Indicates that the modality is unknown or undefined. */
|
7
|
+
Unknown = "unknown",
|
8
|
+
/** Indicates that the call includes audio. */
|
9
|
+
Audio = "audio",
|
10
|
+
/** Indicates that the call includes video. */
|
11
|
+
Video = "video",
|
12
|
+
/** Indicates that the call includes video-based screen sharing. */
|
13
|
+
VideoBasedScreenSharing = "videoBasedScreenSharing",
|
14
|
+
/** Indicates that the call includes data sharing or messaging. */
|
15
|
+
Data = "data"
|
16
|
+
}
|
17
|
+
/** Represents parameters for {@link startCall | StartCall}. */
|
18
|
+
export interface StartCallParams {
|
19
|
+
/**
|
20
|
+
* Comma-separated list of user IDs representing the participants of the call.
|
21
|
+
*
|
22
|
+
* @remarks
|
23
|
+
* Currently the User ID field supports the Microsoft Entra UserPrincipalName,
|
24
|
+
* typically an email address, or in case of a PSTN call, it supports a pstn
|
25
|
+
* mri 4:\<phonenumber>.
|
26
|
+
*/
|
27
|
+
targets: string[];
|
28
|
+
/**
|
29
|
+
* List of modalities for the call. Defaults to [“audio”].
|
30
|
+
*/
|
31
|
+
requestedModalities?: CallModalities[];
|
32
|
+
/**
|
33
|
+
* An optional parameter that informs about the source of the deep link
|
34
|
+
*/
|
35
|
+
source?: string;
|
36
|
+
}
|
37
|
+
/**
|
38
|
+
* Starts a call with other users
|
39
|
+
*
|
40
|
+
* @param startCallParams - Parameters for the call
|
41
|
+
*
|
42
|
+
* @throws Error if call capability is not supported
|
43
|
+
* @throws Error if host notifies of a failed start call attempt in a legacy Teams environment
|
44
|
+
* @returns always true if the host notifies of a successful call inititation
|
45
|
+
*/
|
46
|
+
export declare function startCall(startCallParams: StartCallParams): Promise<boolean>;
|
47
|
+
/**
|
48
|
+
* Checks if the call capability is supported by the host
|
49
|
+
* @returns boolean to represent whether the call capability is supported
|
50
|
+
*
|
51
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
52
|
+
*/
|
53
|
+
export declare function isSupported(): boolean;
|
@@ -0,0 +1,66 @@
|
|
1
|
+
interface OpenChatRequest {
|
2
|
+
/**
|
3
|
+
* An optional message used when initiating chat
|
4
|
+
*/
|
5
|
+
message?: string;
|
6
|
+
}
|
7
|
+
/**
|
8
|
+
* Used when starting a chat with one person
|
9
|
+
*
|
10
|
+
* @see OpenGroupChatRequest for use when a chat with more than one person
|
11
|
+
*/
|
12
|
+
export interface OpenSingleChatRequest extends OpenChatRequest {
|
13
|
+
/**
|
14
|
+
* The [Microsoft Entra UPN](https://learn.microsoft.com/entra/identity/hybrid/connect/plan-connect-userprincipalname) (usually but not always an e-mail address)
|
15
|
+
* of the user with whom to begin a chat
|
16
|
+
*/
|
17
|
+
user: string;
|
18
|
+
}
|
19
|
+
/**
|
20
|
+
* Used when starting a chat with more than one person
|
21
|
+
*
|
22
|
+
* @see OpenSingleChatRequest for use in a chat with only one person
|
23
|
+
*/
|
24
|
+
export interface OpenGroupChatRequest extends OpenChatRequest {
|
25
|
+
/**
|
26
|
+
* Array containing [Microsoft Entra UPNs](https://learn.microsoft.com/entra/identity/hybrid/connect/plan-connect-userprincipalname) (usually but not always an e-mail address)
|
27
|
+
* of users with whom to begin a chat
|
28
|
+
*/
|
29
|
+
users: string[];
|
30
|
+
/**
|
31
|
+
* The display name of a conversation for 3 or more users (chats with fewer than three users will ignore this field)
|
32
|
+
*/
|
33
|
+
topic?: string;
|
34
|
+
}
|
35
|
+
/**
|
36
|
+
* Contains functionality to start chat with others
|
37
|
+
*/
|
38
|
+
export declare namespace chat {
|
39
|
+
/**
|
40
|
+
* Allows the user to open a chat with a single user and allows
|
41
|
+
* for the user to specify the message they wish to send.
|
42
|
+
*
|
43
|
+
* @param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
|
44
|
+
*
|
45
|
+
* @returns Promise resolved upon completion
|
46
|
+
*/
|
47
|
+
function openChat(openChatRequest: OpenSingleChatRequest): Promise<void>;
|
48
|
+
/**
|
49
|
+
* Allows the user to create a chat with multiple users (2+) and allows
|
50
|
+
* for the user to specify a message and name the topic of the conversation. If
|
51
|
+
* only 1 user is provided into users array default back to origin openChat.
|
52
|
+
*
|
53
|
+
* @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).
|
54
|
+
*
|
55
|
+
* @returns Promise resolved upon completion
|
56
|
+
*/
|
57
|
+
function openGroupChat(openChatRequest: OpenGroupChatRequest): Promise<void>;
|
58
|
+
/**
|
59
|
+
* Checks if the chat capability is supported by the host
|
60
|
+
* @returns boolean to represent whether the chat capability is supported
|
61
|
+
*
|
62
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
63
|
+
*/
|
64
|
+
function isSupported(): boolean;
|
65
|
+
}
|
66
|
+
export {};
|