@microsoft/teams-js 2.31.0-beta.1 → 2.31.0-beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (187) hide show
  1. package/dist/esm/_virtual/_polyfill-node.os.js +1 -1
  2. package/dist/esm/_virtual/_polyfill-node.process.js +1 -1
  3. package/dist/esm/_virtual/_polyfill-node.util.js +1 -1
  4. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +11 -1
  5. package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +10 -0
  6. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +11 -1
  7. package/dist/esm/packages/teams-js/dts/internal/hostToAppTelemetry.d.ts +51 -0
  8. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +11 -0
  9. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +5 -0
  10. package/dist/esm/packages/teams-js/dts/internal/pagesHelpers.d.ts +24 -0
  11. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +23 -1
  12. package/dist/esm/packages/teams-js/dts/internal/uint8array-extras/uint8array-extras.d.ts +6 -0
  13. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +20 -1
  14. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +2 -2
  15. package/dist/esm/packages/teams-js/dts/internal/visualMediaHelpers.d.ts +14 -0
  16. package/dist/esm/packages/teams-js/dts/internal/webStorageHelpers.d.ts +4 -0
  17. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +61 -61
  18. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +48 -48
  19. package/dist/esm/packages/teams-js/dts/private/copilot/copilot.d.ts +2 -0
  20. package/dist/esm/packages/teams-js/dts/private/copilot/eligibility.d.ts +29 -0
  21. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +355 -349
  22. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +70 -68
  23. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +104 -105
  24. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +41 -42
  25. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +113 -114
  26. package/dist/esm/packages/teams-js/dts/private/files.d.ts +590 -582
  27. package/dist/esm/packages/teams-js/dts/private/hostEntity/hostEntity.d.ts +42 -0
  28. package/dist/esm/packages/teams-js/dts/private/hostEntity/tab.d.ts +134 -0
  29. package/dist/esm/packages/teams-js/dts/private/index.d.ts +19 -18
  30. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +31 -25
  31. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +147 -142
  32. package/dist/esm/packages/teams-js/dts/private/messageChannels/dataLayer.d.ts +39 -0
  33. package/dist/esm/packages/teams-js/dts/private/messageChannels/messageChannels.d.ts +28 -0
  34. package/dist/esm/packages/teams-js/dts/private/messageChannels/telemetry.d.ts +39 -0
  35. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +31 -25
  36. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +69 -70
  37. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +219 -214
  38. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/fullTrust.d.ts +31 -0
  39. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/joinedTeams.d.ts +30 -0
  40. package/dist/esm/packages/teams-js/dts/private/teams/teams.d.ts +63 -0
  41. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +192 -186
  42. package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +21 -2
  43. package/dist/esm/packages/teams-js/dts/public/app/lifecycle.d.ts +3 -2
  44. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +1 -1
  45. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +6 -0
  46. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +2 -1
  47. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +1 -0
  48. package/dist/esm/packages/teams-js/dts/public/call.d.ts +1 -0
  49. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +4 -0
  50. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +1 -0
  51. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +0 -4
  52. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +3 -2
  53. package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +0 -13
  54. package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +2 -1
  55. package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +3 -2
  56. package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +2 -1
  57. package/dist/esm/packages/teams-js/dts/public/geoLocation/geoLocation.d.ts +3 -2
  58. package/dist/esm/packages/teams-js/dts/public/geoLocation/map.d.ts +6 -0
  59. package/dist/esm/packages/teams-js/dts/public/index.d.ts +9 -9
  60. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +11 -0
  61. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +1 -0
  62. package/dist/esm/packages/teams-js/dts/public/location.d.ts +4 -3
  63. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +1 -0
  64. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +1 -0
  65. package/dist/esm/packages/teams-js/dts/public/media.d.ts +0 -3
  66. package/dist/esm/packages/teams-js/dts/public/meeting/appShareButton.d.ts +51 -0
  67. package/dist/esm/packages/teams-js/dts/public/meeting/meeting.d.ts +854 -0
  68. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +1 -0
  69. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +8 -0
  70. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +2 -1
  71. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +1 -0
  72. package/dist/esm/packages/teams-js/dts/public/pages/appButton.d.ts +30 -0
  73. package/dist/esm/packages/teams-js/dts/public/pages/backStack.d.ts +44 -0
  74. package/dist/esm/packages/teams-js/dts/public/pages/config.d.ts +123 -0
  75. package/dist/esm/packages/teams-js/dts/public/pages/currentApp.d.ts +46 -0
  76. package/dist/esm/packages/teams-js/dts/public/pages/fullTrust.d.ts +33 -0
  77. package/dist/esm/packages/teams-js/dts/public/pages/pages.d.ts +253 -0
  78. package/dist/esm/packages/teams-js/dts/public/pages/tabs.d.ts +32 -0
  79. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +81 -103
  80. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +3 -0
  81. package/dist/esm/packages/teams-js/dts/public/search.d.ts +9 -0
  82. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +1 -0
  83. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +4 -3
  84. package/dist/esm/packages/teams-js/dts/public/sharing/history.d.ts +47 -0
  85. package/dist/esm/packages/teams-js/dts/public/sharing/sharing.d.ts +76 -0
  86. package/dist/esm/packages/teams-js/dts/public/stageView/self.d.ts +23 -0
  87. package/dist/esm/packages/teams-js/dts/public/stageView/stageView.d.ts +81 -0
  88. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +0 -8
  89. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +4 -0
  90. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +2 -1
  91. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +209 -210
  92. package/dist/esm/packages/teams-js/dts/public/visualMedia/image.d.ts +64 -0
  93. package/dist/esm/packages/teams-js/dts/public/visualMedia/visualMedia.d.ts +116 -0
  94. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +20 -22
  95. package/dist/esm/packages/teams-js/src/index.js +1 -1
  96. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
  97. package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +1 -1
  98. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  99. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
  100. package/dist/esm/packages/teams-js/src/internal/hostToAppTelemetry.js +1 -0
  101. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
  102. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
  103. package/dist/esm/packages/teams-js/src/internal/pagesHelpers.js +1 -0
  104. package/dist/esm/packages/teams-js/src/internal/uint8array-extras/uint8array-extras.js +1 -0
  105. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  106. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  107. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
  108. package/dist/esm/packages/teams-js/src/internal/visualMediaHelpers.js +1 -0
  109. package/dist/esm/packages/teams-js/src/internal/webStorageHelpers.js +1 -0
  110. package/dist/esm/packages/teams-js/src/private/appEntity.js +1 -1
  111. package/dist/esm/packages/teams-js/src/private/conversations.js +1 -1
  112. package/dist/esm/packages/teams-js/src/private/copilot/copilot.js +1 -0
  113. package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -0
  114. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  115. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  116. package/dist/esm/packages/teams-js/src/private/externalAppCardActions.js +1 -1
  117. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
  118. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
  119. package/dist/esm/packages/teams-js/src/private/files.js +1 -1
  120. package/dist/esm/packages/teams-js/src/private/hostEntity/hostEntity.js +1 -0
  121. package/dist/esm/packages/teams-js/src/private/hostEntity/tab.js +1 -0
  122. package/dist/esm/packages/teams-js/src/private/logs.js +1 -1
  123. package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -1
  124. package/dist/esm/packages/teams-js/src/private/messageChannels/dataLayer.js +1 -0
  125. package/dist/esm/packages/teams-js/src/private/messageChannels/messageChannels.js +1 -0
  126. package/dist/esm/packages/teams-js/src/private/messageChannels/telemetry.js +1 -0
  127. package/dist/esm/packages/teams-js/src/private/notifications.js +1 -1
  128. package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -1
  129. package/dist/esm/packages/teams-js/src/private/remoteCamera.js +1 -1
  130. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/fullTrust.js +1 -0
  131. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/joinedTeams.js +1 -0
  132. package/dist/esm/packages/teams-js/src/private/teams/teams.js +1 -0
  133. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  134. package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
  135. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  136. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  137. package/dist/esm/packages/teams-js/src/public/meeting/appShareButton.js +1 -0
  138. package/dist/esm/packages/teams-js/src/public/meeting/meeting.js +1 -0
  139. package/dist/esm/packages/teams-js/src/public/navigation.js +1 -1
  140. package/dist/esm/packages/teams-js/src/public/pages/appButton.js +1 -0
  141. package/dist/esm/packages/teams-js/src/public/pages/backStack.js +1 -0
  142. package/dist/esm/packages/teams-js/src/public/pages/config.js +1 -0
  143. package/dist/esm/packages/teams-js/src/public/pages/currentApp.js +1 -0
  144. package/dist/esm/packages/teams-js/src/public/pages/fullTrust.js +1 -0
  145. package/dist/esm/packages/teams-js/src/public/pages/pages.js +1 -0
  146. package/dist/esm/packages/teams-js/src/public/pages/tabs.js +1 -0
  147. package/dist/esm/packages/teams-js/src/public/profile.js +1 -1
  148. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  149. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  150. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  151. package/dist/esm/packages/teams-js/src/public/sharing/history.js +1 -0
  152. package/dist/esm/packages/teams-js/src/public/sharing/sharing.js +1 -0
  153. package/dist/esm/packages/teams-js/src/public/stageView/self.js +1 -0
  154. package/dist/esm/packages/teams-js/src/public/stageView/stageView.js +1 -0
  155. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  156. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  157. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -1
  158. package/dist/esm/packages/teams-js/src/public/visualMedia/image.js +1 -0
  159. package/dist/esm/packages/teams-js/src/public/visualMedia/visualMedia.js +1 -0
  160. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  161. package/dist/umd/MicrosoftTeams.js +6259 -6439
  162. package/dist/umd/MicrosoftTeams.js.map +1 -1
  163. package/dist/umd/MicrosoftTeams.min.js +1 -1
  164. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  165. package/package.json +1 -1
  166. package/dist/esm/_virtual/_polyfill-node.buffer.js +0 -1
  167. package/dist/esm/_virtual/_polyfill-node.global.js +0 -1
  168. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +0 -39
  169. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +0 -176
  170. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +0 -107
  171. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +0 -116
  172. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +0 -906
  173. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +0 -574
  174. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +0 -124
  175. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +0 -104
  176. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +0 -192
  177. package/dist/esm/packages/teams-js/src/private/copilot.js +0 -1
  178. package/dist/esm/packages/teams-js/src/private/hostEntity.js +0 -1
  179. package/dist/esm/packages/teams-js/src/private/messageChannels.js +0 -1
  180. package/dist/esm/packages/teams-js/src/private/teams.js +0 -1
  181. package/dist/esm/packages/teams-js/src/public/meeting.js +0 -1
  182. package/dist/esm/packages/teams-js/src/public/pages.js +0 -1
  183. package/dist/esm/packages/teams-js/src/public/sharing.js +0 -1
  184. package/dist/esm/packages/teams-js/src/public/stageView.js +0 -1
  185. package/dist/esm/packages/teams-js/src/public/visualMedia.js +0 -1
  186. package/dist/umd/MicrosoftTeams.d.ts +0 -11263
  187. /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
- export declare namespace notifications {
3
- /**
4
- * @hidden
5
- * display notification API.
6
- *
7
- * @param message - Notification message.
8
- * @param notificationType - Notification type
9
- *
10
- * @internal
11
- * Limited to Microsoft-internal use
12
- */
13
- function showNotification(showNotificationParameters: ShowNotificationParameters): void;
14
- /**
15
- * @hidden
16
- *
17
- * Checks if the notifications capability is supported by the host
18
- * @returns boolean to represent whether the notifications capability is supported
19
- *
20
- * @throws Error if {@linkcode app.initialize} has not successfully completed
21
- *
22
- * @internal
23
- * Limited to Microsoft-internal use
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
- export declare namespace otherAppStateChange {
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
- interface OtherAppStateChangeEvent {
22
- /** An array of app ids that this event applies to */
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;