@microsoft/teams-js 2.31.0-beta.1 → 2.31.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/packages/teams-js/dts/internal/appHelpers.d.ts +11 -1
- package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +10 -0
- package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +11 -1
- package/dist/esm/packages/teams-js/dts/internal/hostToAppTelemetry.d.ts +51 -0
- package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +11 -0
- package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +5 -0
- package/dist/esm/packages/teams-js/dts/internal/pagesHelpers.d.ts +24 -0
- package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +23 -1
- package/dist/esm/packages/teams-js/dts/internal/uint8array-extras/uint8array-extras.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +20 -1
- package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +2 -2
- package/dist/esm/packages/teams-js/dts/internal/visualMediaHelpers.d.ts +14 -0
- package/dist/esm/packages/teams-js/dts/internal/webStorageHelpers.d.ts +4 -0
- package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +61 -61
- package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +48 -48
- package/dist/esm/packages/teams-js/dts/private/copilot/copilot.d.ts +2 -0
- package/dist/esm/packages/teams-js/dts/private/copilot/eligibility.d.ts +29 -0
- package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +355 -349
- package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +70 -68
- package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +104 -105
- package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +41 -42
- package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +113 -114
- package/dist/esm/packages/teams-js/dts/private/files.d.ts +590 -582
- package/dist/esm/packages/teams-js/dts/private/hostEntity/hostEntity.d.ts +42 -0
- package/dist/esm/packages/teams-js/dts/private/hostEntity/tab.d.ts +134 -0
- package/dist/esm/packages/teams-js/dts/private/index.d.ts +19 -18
- package/dist/esm/packages/teams-js/dts/private/logs.d.ts +31 -25
- package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +147 -142
- package/dist/esm/packages/teams-js/dts/private/messageChannels/dataLayer.d.ts +39 -0
- package/dist/esm/packages/teams-js/dts/private/messageChannels/messageChannels.d.ts +28 -0
- package/dist/esm/packages/teams-js/dts/private/messageChannels/telemetry.d.ts +39 -0
- package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +31 -25
- package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +69 -70
- package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +219 -214
- package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/fullTrust.d.ts +31 -0
- package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/joinedTeams.d.ts +30 -0
- package/dist/esm/packages/teams-js/dts/private/teams/teams.d.ts +63 -0
- package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +192 -186
- package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +21 -2
- package/dist/esm/packages/teams-js/dts/public/app/lifecycle.d.ts +3 -2
- package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +2 -1
- package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/call.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/chat.d.ts +4 -0
- package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +0 -4
- package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +3 -2
- package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +0 -13
- package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +2 -1
- package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +3 -2
- package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +2 -1
- package/dist/esm/packages/teams-js/dts/public/geoLocation/geoLocation.d.ts +3 -2
- package/dist/esm/packages/teams-js/dts/public/geoLocation/map.d.ts +6 -0
- package/dist/esm/packages/teams-js/dts/public/index.d.ts +9 -9
- package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +11 -0
- package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/location.d.ts +4 -3
- package/dist/esm/packages/teams-js/dts/public/mail.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/media.d.ts +0 -3
- package/dist/esm/packages/teams-js/dts/public/meeting/appShareButton.d.ts +51 -0
- package/dist/esm/packages/teams-js/dts/public/meeting/meeting.d.ts +854 -0
- package/dist/esm/packages/teams-js/dts/public/menus.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +8 -0
- package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +2 -1
- package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/pages/appButton.d.ts +30 -0
- package/dist/esm/packages/teams-js/dts/public/pages/backStack.d.ts +44 -0
- package/dist/esm/packages/teams-js/dts/public/pages/config.d.ts +123 -0
- package/dist/esm/packages/teams-js/dts/public/pages/currentApp.d.ts +46 -0
- package/dist/esm/packages/teams-js/dts/public/pages/fullTrust.d.ts +33 -0
- package/dist/esm/packages/teams-js/dts/public/pages/pages.d.ts +253 -0
- package/dist/esm/packages/teams-js/dts/public/pages/tabs.d.ts +32 -0
- package/dist/esm/packages/teams-js/dts/public/profile.d.ts +81 -103
- package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +3 -0
- package/dist/esm/packages/teams-js/dts/public/search.d.ts +9 -0
- package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +1 -0
- package/dist/esm/packages/teams-js/dts/public/settings.d.ts +4 -3
- package/dist/esm/packages/teams-js/dts/public/sharing/history.d.ts +47 -0
- package/dist/esm/packages/teams-js/dts/public/sharing/sharing.d.ts +76 -0
- package/dist/esm/packages/teams-js/dts/public/stageView/self.d.ts +23 -0
- package/dist/esm/packages/teams-js/dts/public/stageView/stageView.d.ts +81 -0
- package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +0 -8
- package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +4 -0
- package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +2 -1
- package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +209 -210
- package/dist/esm/packages/teams-js/dts/public/visualMedia/image.d.ts +64 -0
- package/dist/esm/packages/teams-js/dts/public/visualMedia/visualMedia.d.ts +116 -0
- package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +20 -22
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/hostToAppTelemetry.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/pagesHelpers.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/uint8array-extras/uint8array-extras.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/visualMediaHelpers.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/webStorageHelpers.js +1 -0
- package/dist/esm/packages/teams-js/src/private/appEntity.js +1 -1
- package/dist/esm/packages/teams-js/src/private/conversations.js +1 -1
- package/dist/esm/packages/teams-js/src/private/copilot/copilot.js +1 -0
- package/dist/esm/packages/teams-js/src/private/copilot/eligibility.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/externalAppCardActions.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
- package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
- package/dist/esm/packages/teams-js/src/private/files.js +1 -1
- package/dist/esm/packages/teams-js/src/private/hostEntity/hostEntity.js +1 -0
- package/dist/esm/packages/teams-js/src/private/hostEntity/tab.js +1 -0
- package/dist/esm/packages/teams-js/src/private/logs.js +1 -1
- package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -1
- package/dist/esm/packages/teams-js/src/private/messageChannels/dataLayer.js +1 -0
- package/dist/esm/packages/teams-js/src/private/messageChannels/messageChannels.js +1 -0
- package/dist/esm/packages/teams-js/src/private/messageChannels/telemetry.js +1 -0
- package/dist/esm/packages/teams-js/src/private/notifications.js +1 -1
- package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -1
- package/dist/esm/packages/teams-js/src/private/remoteCamera.js +1 -1
- package/dist/esm/packages/teams-js/src/private/teams/fullTrust/fullTrust.js +1 -0
- package/dist/esm/packages/teams-js/src/private/teams/fullTrust/joinedTeams.js +1 -0
- package/dist/esm/packages/teams-js/src/private/teams/teams.js +1 -0
- package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
- package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
- package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
- package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
- package/dist/esm/packages/teams-js/src/public/meeting/appShareButton.js +1 -0
- package/dist/esm/packages/teams-js/src/public/meeting/meeting.js +1 -0
- package/dist/esm/packages/teams-js/src/public/navigation.js +1 -1
- package/dist/esm/packages/teams-js/src/public/pages/appButton.js +1 -0
- package/dist/esm/packages/teams-js/src/public/pages/backStack.js +1 -0
- package/dist/esm/packages/teams-js/src/public/pages/config.js +1 -0
- package/dist/esm/packages/teams-js/src/public/pages/currentApp.js +1 -0
- package/dist/esm/packages/teams-js/src/public/pages/fullTrust.js +1 -0
- package/dist/esm/packages/teams-js/src/public/pages/pages.js +1 -0
- package/dist/esm/packages/teams-js/src/public/pages/tabs.js +1 -0
- package/dist/esm/packages/teams-js/src/public/profile.js +1 -1
- package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
- package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
- package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
- package/dist/esm/packages/teams-js/src/public/sharing/history.js +1 -0
- package/dist/esm/packages/teams-js/src/public/sharing/sharing.js +1 -0
- package/dist/esm/packages/teams-js/src/public/stageView/self.js +1 -0
- package/dist/esm/packages/teams-js/src/public/stageView/stageView.js +1 -0
- 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/videoEffects.js +1 -1
- package/dist/esm/packages/teams-js/src/public/visualMedia/image.js +1 -0
- package/dist/esm/packages/teams-js/src/public/visualMedia/visualMedia.js +1 -0
- package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
- package/dist/umd/MicrosoftTeams.d.ts +5755 -5161
- package/dist/umd/MicrosoftTeams.js +6258 -6439
- 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 +50 -1
- package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +0 -39
- package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +0 -176
- package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +0 -107
- package/dist/esm/packages/teams-js/dts/private/teams.d.ts +0 -116
- package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +0 -906
- package/dist/esm/packages/teams-js/dts/public/pages.d.ts +0 -574
- package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +0 -124
- package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +0 -104
- package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +0 -192
- package/dist/esm/packages/teams-js/src/private/copilot.js +0 -1
- package/dist/esm/packages/teams-js/src/private/hostEntity.js +0 -1
- package/dist/esm/packages/teams-js/src/private/messageChannels.js +0 -1
- package/dist/esm/packages/teams-js/src/private/teams.js +0 -1
- package/dist/esm/packages/teams-js/src/public/meeting.js +0 -1
- package/dist/esm/packages/teams-js/src/public/pages.js +0 -1
- package/dist/esm/packages/teams-js/src/public/sharing.js +0 -1
- package/dist/esm/packages/teams-js/src/public/stageView.js +0 -1
- package/dist/esm/packages/teams-js/src/public/visualMedia.js +0 -1
- /package/dist/esm/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5 → @rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5}/node_modules/tslib/tslib.es6.js +0 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
/**
|
2
|
+
* @hidden
|
3
|
+
* Module to request message ports from the host application.
|
4
|
+
*
|
5
|
+
* @beta
|
6
|
+
*
|
7
|
+
* @internal
|
8
|
+
* Limited to Microsoft-internal use
|
9
|
+
*
|
10
|
+
* @module
|
11
|
+
*/
|
12
|
+
import * as dataLayer from './dataLayer';
|
13
|
+
import * as telemetry from './telemetry';
|
14
|
+
/**
|
15
|
+
* @hidden
|
16
|
+
*
|
17
|
+
* @beta
|
18
|
+
*
|
19
|
+
* Checks if the messageChannels capability is supported by the host
|
20
|
+
* @returns boolean to represent whether the messageChannels capability is supported
|
21
|
+
*
|
22
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
23
|
+
*
|
24
|
+
* @internal
|
25
|
+
* Limited to Microsoft-internal use
|
26
|
+
*/
|
27
|
+
export declare function isSupported(): boolean;
|
28
|
+
export { dataLayer, telemetry };
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/**
|
2
|
+
* @hidden
|
3
|
+
* @beta
|
4
|
+
*
|
5
|
+
* Fetches a MessagePort to batch telemetry through the host's telemetry worker.
|
6
|
+
* The port is cached once received, so subsequent calls return the same port.
|
7
|
+
* @returns MessagePort.
|
8
|
+
*
|
9
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed,
|
10
|
+
* if the host does not support the feature, or if the port request is rejected.
|
11
|
+
*
|
12
|
+
* @internal
|
13
|
+
* Limited to Microsoft-internal use
|
14
|
+
*/
|
15
|
+
export declare function getTelemetryPort(): Promise<MessagePort>;
|
16
|
+
/**
|
17
|
+
* @hidden
|
18
|
+
*
|
19
|
+
* @beta
|
20
|
+
*
|
21
|
+
* Checks if the messageChannels.telemetry capability is supported by the host
|
22
|
+
* @returns boolean to represent whether the messageChannels.telemetry capability is supported
|
23
|
+
*
|
24
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
25
|
+
*
|
26
|
+
* @internal
|
27
|
+
* Limited to Microsoft-internal use
|
28
|
+
*/
|
29
|
+
export declare function isSupported(): boolean;
|
30
|
+
/**
|
31
|
+
* @hidden
|
32
|
+
* Undocumented function used to clear state between unit tests
|
33
|
+
*
|
34
|
+
* @beta
|
35
|
+
*
|
36
|
+
* @internal
|
37
|
+
* Limited to Microsoft-internal use
|
38
|
+
*/
|
39
|
+
export declare function _clearTelemetryPort(): void;
|
@@ -1,26 +1,32 @@
|
|
1
|
+
/**
|
2
|
+
* @hidden
|
3
|
+
* Hidden from Docs
|
4
|
+
*
|
5
|
+
* @internal
|
6
|
+
* Limited to Microsoft-internal use
|
7
|
+
* @module
|
8
|
+
*/
|
1
9
|
import { ShowNotificationParameters } from './interfaces';
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
function isSupported(): boolean;
|
26
|
-
}
|
10
|
+
/**
|
11
|
+
* @hidden
|
12
|
+
* display notification API.
|
13
|
+
*
|
14
|
+
* @param message - Notification message.
|
15
|
+
* @param notificationType - Notification type
|
16
|
+
*
|
17
|
+
* @internal
|
18
|
+
* Limited to Microsoft-internal use
|
19
|
+
*/
|
20
|
+
export declare function showNotification(showNotificationParameters: ShowNotificationParameters): void;
|
21
|
+
/**
|
22
|
+
* @hidden
|
23
|
+
*
|
24
|
+
* Checks if the notifications capability is supported by the host
|
25
|
+
* @returns boolean to represent whether the notifications capability is supported
|
26
|
+
*
|
27
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
28
|
+
*
|
29
|
+
* @internal
|
30
|
+
* Limited to Microsoft-internal use
|
31
|
+
*/
|
32
|
+
export declare function isSupported(): boolean;
|
@@ -1,4 +1,5 @@
|
|
1
1
|
/**
|
2
|
+
* @module
|
2
3
|
* @hidden
|
3
4
|
* @internal
|
4
5
|
* @beta
|
@@ -8,74 +9,72 @@
|
|
8
9
|
* *while* the developer's application is running. For example, if the developer wants to be notified
|
9
10
|
* when another application has been installed.
|
10
11
|
*/
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
appIds: string[];
|
24
|
-
}
|
25
|
-
/**
|
26
|
-
* @hidden
|
27
|
-
* @beta
|
28
|
-
* @internal
|
29
|
-
* Limited to Microsoft-internal use
|
30
|
-
*
|
31
|
-
* A function handler that will be called whenever an event happens with some number of applications installed on this host.
|
32
|
-
*/
|
33
|
-
type OtherAppStateChangeEventHandler = (event: OtherAppStateChangeEvent) => void;
|
34
|
-
/**
|
35
|
-
* @hidden
|
36
|
-
* @beta
|
37
|
-
* @internal
|
38
|
-
* Limited to Microsoft-internal use
|
39
|
-
*
|
40
|
-
* This function allows an app to register a handler that will receive whenever other applications are installed
|
41
|
-
* on the host while the developer's application is running.
|
42
|
-
*
|
43
|
-
* @param appInstallHandler - This handler will be called whenever apps are installed on the host.
|
44
|
-
*
|
45
|
-
* @throws Error if {@link app.initialize} has not successfully completed, if the platform
|
46
|
-
* does not support the otherAppStateChange capability, or if a valid handler is not passed to the function.
|
47
|
-
*
|
48
|
-
* @example
|
49
|
-
* ``` ts
|
50
|
-
* if (otherAppStateChange.isSupported()) {
|
51
|
-
* otherAppStateChange.registerAppInstallationHandler((event: otherAppStateChange.OtherAppStateChangeEvent) => {
|
52
|
-
* // code to handle the event goes here
|
53
|
-
* });
|
54
|
-
* }
|
55
|
-
* ```
|
56
|
-
*/
|
57
|
-
function registerAppInstallationHandler(appInstallHandler: OtherAppStateChangeEventHandler): void;
|
58
|
-
/**
|
59
|
-
* @hidden
|
60
|
-
* @beta
|
61
|
-
* @internal
|
62
|
-
* Limited to Microsoft-internal use
|
63
|
-
*
|
64
|
-
* This function can be called so that the handler passed to {@link registerAppInstallationHandler}
|
65
|
-
* will no longer receive app installation events. If this is called before registering a handler
|
66
|
-
* it will have no effect.
|
67
|
-
*
|
68
|
-
* @throws Error if {@link app.initialize} has not successfully completed or if the platform
|
69
|
-
* does not support the otherAppStateChange capability.
|
70
|
-
*/
|
71
|
-
function unregisterAppInstallationHandler(): void;
|
72
|
-
/**
|
73
|
-
* Checks if the otherAppStateChange capability is supported by the host
|
74
|
-
* @returns boolean to represent whether the otherAppStateChange capability is supported
|
75
|
-
*
|
76
|
-
* @throws Error if {@link app.initialize} has not successfully completed
|
77
|
-
*
|
78
|
-
* @beta
|
79
|
-
*/
|
80
|
-
function isSupported(): boolean;
|
12
|
+
/**
|
13
|
+
* @hidden
|
14
|
+
* @beta
|
15
|
+
* @internal
|
16
|
+
* Limited to Microsoft-internal use
|
17
|
+
*
|
18
|
+
* Represent an event that has happened with other number of applications installed on this host.
|
19
|
+
* (e.g. a new app has been installed)
|
20
|
+
*/
|
21
|
+
export interface OtherAppStateChangeEvent {
|
22
|
+
/** An array of app ids that this event applies to */
|
23
|
+
appIds: string[];
|
81
24
|
}
|
25
|
+
/**
|
26
|
+
* @hidden
|
27
|
+
* @beta
|
28
|
+
* @internal
|
29
|
+
* Limited to Microsoft-internal use
|
30
|
+
*
|
31
|
+
* A function handler that will be called whenever an event happens with some number of applications installed on this host.
|
32
|
+
*/
|
33
|
+
export type OtherAppStateChangeEventHandler = (event: OtherAppStateChangeEvent) => void;
|
34
|
+
/**
|
35
|
+
* @hidden
|
36
|
+
* @beta
|
37
|
+
* @internal
|
38
|
+
* Limited to Microsoft-internal use
|
39
|
+
*
|
40
|
+
* This function allows an app to register a handler that will receive whenever other applications are installed
|
41
|
+
* on the host while the developer's application is running.
|
42
|
+
*
|
43
|
+
* @param appInstallHandler - This handler will be called whenever apps are installed on the host.
|
44
|
+
*
|
45
|
+
* @throws Error if {@link app.initialize} has not successfully completed, if the platform
|
46
|
+
* does not support the otherAppStateChange capability, or if a valid handler is not passed to the function.
|
47
|
+
*
|
48
|
+
* @example
|
49
|
+
* ``` ts
|
50
|
+
* if (otherAppStateChange.isSupported()) {
|
51
|
+
* otherAppStateChange.registerAppInstallationHandler((event: otherAppStateChange.OtherAppStateChangeEvent) => {
|
52
|
+
* // code to handle the event goes here
|
53
|
+
* });
|
54
|
+
* }
|
55
|
+
* ```
|
56
|
+
*/
|
57
|
+
export declare function registerAppInstallationHandler(appInstallHandler: OtherAppStateChangeEventHandler): void;
|
58
|
+
/**
|
59
|
+
* @hidden
|
60
|
+
* @beta
|
61
|
+
* @internal
|
62
|
+
* Limited to Microsoft-internal use
|
63
|
+
*
|
64
|
+
* This function can be called so that the handler passed to {@link registerAppInstallationHandler}
|
65
|
+
* will no longer receive app installation events. If this is called before registering a handler
|
66
|
+
* it will have no effect.
|
67
|
+
*
|
68
|
+
* @throws Error if {@link app.initialize} has not successfully completed or if the platform
|
69
|
+
* does not support the otherAppStateChange capability.
|
70
|
+
*/
|
71
|
+
export declare function unregisterAppInstallationHandler(): void;
|
72
|
+
/**
|
73
|
+
* Checks if the otherAppStateChange capability is supported by the host
|
74
|
+
* @returns boolean to represent whether the otherAppStateChange capability is supported
|
75
|
+
*
|
76
|
+
* @throws Error if {@link app.initialize} has not successfully completed
|
77
|
+
*
|
78
|
+
* @beta
|
79
|
+
*/
|
80
|
+
export declare function isSupported(): boolean;
|