@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.
Files changed (183) hide show
  1. package/README.md +4 -4
  2. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +11 -1
  3. package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +10 -0
  4. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +11 -1
  5. package/dist/esm/packages/teams-js/dts/internal/hostToAppTelemetry.d.ts +51 -0
  6. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +11 -0
  7. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +5 -0
  8. package/dist/esm/packages/teams-js/dts/internal/pagesHelpers.d.ts +24 -0
  9. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +23 -1
  10. package/dist/esm/packages/teams-js/dts/internal/uint8array-extras/uint8array-extras.d.ts +6 -0
  11. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +20 -1
  12. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +2 -2
  13. package/dist/esm/packages/teams-js/dts/internal/visualMediaHelpers.d.ts +14 -0
  14. package/dist/esm/packages/teams-js/dts/internal/webStorageHelpers.d.ts +4 -0
  15. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +61 -61
  16. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +48 -48
  17. package/dist/esm/packages/teams-js/dts/private/copilot/copilot.d.ts +2 -0
  18. package/dist/esm/packages/teams-js/dts/private/copilot/eligibility.d.ts +29 -0
  19. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +355 -349
  20. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +70 -68
  21. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +104 -105
  22. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +41 -42
  23. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +113 -114
  24. package/dist/esm/packages/teams-js/dts/private/files.d.ts +590 -582
  25. package/dist/esm/packages/teams-js/dts/private/hostEntity/hostEntity.d.ts +42 -0
  26. package/dist/esm/packages/teams-js/dts/private/hostEntity/tab.d.ts +134 -0
  27. package/dist/esm/packages/teams-js/dts/private/index.d.ts +19 -18
  28. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +31 -25
  29. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +147 -142
  30. package/dist/esm/packages/teams-js/dts/private/messageChannels/dataLayer.d.ts +39 -0
  31. package/dist/esm/packages/teams-js/dts/private/messageChannels/messageChannels.d.ts +28 -0
  32. package/dist/esm/packages/teams-js/dts/private/messageChannels/telemetry.d.ts +39 -0
  33. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +31 -25
  34. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +69 -70
  35. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +219 -214
  36. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/fullTrust.d.ts +31 -0
  37. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/joinedTeams.d.ts +30 -0
  38. package/dist/esm/packages/teams-js/dts/private/teams/teams.d.ts +63 -0
  39. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +192 -186
  40. package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +21 -2
  41. package/dist/esm/packages/teams-js/dts/public/app/lifecycle.d.ts +3 -2
  42. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +1 -1
  43. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +6 -0
  44. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +2 -1
  45. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +1 -0
  46. package/dist/esm/packages/teams-js/dts/public/call.d.ts +1 -0
  47. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +4 -0
  48. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +1 -0
  49. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +0 -4
  50. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +3 -2
  51. package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +0 -13
  52. package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +2 -1
  53. package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +3 -2
  54. package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +2 -1
  55. package/dist/esm/packages/teams-js/dts/public/geoLocation/geoLocation.d.ts +3 -2
  56. package/dist/esm/packages/teams-js/dts/public/geoLocation/map.d.ts +6 -0
  57. package/dist/esm/packages/teams-js/dts/public/index.d.ts +9 -9
  58. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +11 -0
  59. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +1 -0
  60. package/dist/esm/packages/teams-js/dts/public/location.d.ts +4 -3
  61. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +1 -0
  62. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +1 -0
  63. package/dist/esm/packages/teams-js/dts/public/media.d.ts +0 -3
  64. package/dist/esm/packages/teams-js/dts/public/meeting/appShareButton.d.ts +51 -0
  65. package/dist/esm/packages/teams-js/dts/public/meeting/meeting.d.ts +854 -0
  66. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +1 -0
  67. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +8 -0
  68. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +2 -1
  69. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +1 -0
  70. package/dist/esm/packages/teams-js/dts/public/pages/appButton.d.ts +30 -0
  71. package/dist/esm/packages/teams-js/dts/public/pages/backStack.d.ts +44 -0
  72. package/dist/esm/packages/teams-js/dts/public/pages/config.d.ts +123 -0
  73. package/dist/esm/packages/teams-js/dts/public/pages/currentApp.d.ts +46 -0
  74. package/dist/esm/packages/teams-js/dts/public/pages/fullTrust.d.ts +33 -0
  75. package/dist/esm/packages/teams-js/dts/public/pages/pages.d.ts +253 -0
  76. package/dist/esm/packages/teams-js/dts/public/pages/tabs.d.ts +32 -0
  77. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +81 -103
  78. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +3 -0
  79. package/dist/esm/packages/teams-js/dts/public/search.d.ts +9 -0
  80. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +1 -0
  81. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +4 -3
  82. package/dist/esm/packages/teams-js/dts/public/sharing/history.d.ts +47 -0
  83. package/dist/esm/packages/teams-js/dts/public/sharing/sharing.d.ts +76 -0
  84. package/dist/esm/packages/teams-js/dts/public/stageView/self.d.ts +23 -0
  85. package/dist/esm/packages/teams-js/dts/public/stageView/stageView.d.ts +81 -0
  86. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +0 -8
  87. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +4 -0
  88. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +2 -1
  89. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +209 -210
  90. package/dist/esm/packages/teams-js/dts/public/visualMedia/image.d.ts +64 -0
  91. package/dist/esm/packages/teams-js/dts/public/visualMedia/visualMedia.d.ts +116 -0
  92. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +20 -22
  93. package/dist/esm/packages/teams-js/src/index.js +1 -1
  94. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
  95. package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +1 -1
  96. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  97. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
  98. package/dist/esm/packages/teams-js/src/internal/hostToAppTelemetry.js +1 -0
  99. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
  100. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
  101. package/dist/esm/packages/teams-js/src/internal/pagesHelpers.js +1 -0
  102. package/dist/esm/packages/teams-js/src/internal/uint8array-extras/uint8array-extras.js +1 -0
  103. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  104. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  105. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
  106. package/dist/esm/packages/teams-js/src/internal/visualMediaHelpers.js +1 -0
  107. package/dist/esm/packages/teams-js/src/internal/webStorageHelpers.js +1 -0
  108. package/dist/esm/packages/teams-js/src/private/appEntity.js +1 -1
  109. package/dist/esm/packages/teams-js/src/private/conversations.js +1 -1
  110. package/dist/esm/packages/teams-js/src/private/copilot/copilot.js +1 -0
  111. package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -0
  112. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  113. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  114. package/dist/esm/packages/teams-js/src/private/externalAppCardActions.js +1 -1
  115. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
  116. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
  117. package/dist/esm/packages/teams-js/src/private/files.js +1 -1
  118. package/dist/esm/packages/teams-js/src/private/hostEntity/hostEntity.js +1 -0
  119. package/dist/esm/packages/teams-js/src/private/hostEntity/tab.js +1 -0
  120. package/dist/esm/packages/teams-js/src/private/logs.js +1 -1
  121. package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -1
  122. package/dist/esm/packages/teams-js/src/private/messageChannels/dataLayer.js +1 -0
  123. package/dist/esm/packages/teams-js/src/private/messageChannels/messageChannels.js +1 -0
  124. package/dist/esm/packages/teams-js/src/private/messageChannels/telemetry.js +1 -0
  125. package/dist/esm/packages/teams-js/src/private/notifications.js +1 -1
  126. package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -1
  127. package/dist/esm/packages/teams-js/src/private/remoteCamera.js +1 -1
  128. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/fullTrust.js +1 -0
  129. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/joinedTeams.js +1 -0
  130. package/dist/esm/packages/teams-js/src/private/teams/teams.js +1 -0
  131. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  132. package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
  133. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  134. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  135. package/dist/esm/packages/teams-js/src/public/meeting/appShareButton.js +1 -0
  136. package/dist/esm/packages/teams-js/src/public/meeting/meeting.js +1 -0
  137. package/dist/esm/packages/teams-js/src/public/navigation.js +1 -1
  138. package/dist/esm/packages/teams-js/src/public/pages/appButton.js +1 -0
  139. package/dist/esm/packages/teams-js/src/public/pages/backStack.js +1 -0
  140. package/dist/esm/packages/teams-js/src/public/pages/config.js +1 -0
  141. package/dist/esm/packages/teams-js/src/public/pages/currentApp.js +1 -0
  142. package/dist/esm/packages/teams-js/src/public/pages/fullTrust.js +1 -0
  143. package/dist/esm/packages/teams-js/src/public/pages/pages.js +1 -0
  144. package/dist/esm/packages/teams-js/src/public/pages/tabs.js +1 -0
  145. package/dist/esm/packages/teams-js/src/public/profile.js +1 -1
  146. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  147. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  148. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  149. package/dist/esm/packages/teams-js/src/public/sharing/history.js +1 -0
  150. package/dist/esm/packages/teams-js/src/public/sharing/sharing.js +1 -0
  151. package/dist/esm/packages/teams-js/src/public/stageView/self.js +1 -0
  152. package/dist/esm/packages/teams-js/src/public/stageView/stageView.js +1 -0
  153. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  154. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  155. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -1
  156. package/dist/esm/packages/teams-js/src/public/visualMedia/image.js +1 -0
  157. package/dist/esm/packages/teams-js/src/public/visualMedia/visualMedia.js +1 -0
  158. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  159. package/dist/umd/MicrosoftTeams.d.ts +5755 -5161
  160. package/dist/umd/MicrosoftTeams.js +6258 -6439
  161. package/dist/umd/MicrosoftTeams.js.map +1 -1
  162. package/dist/umd/MicrosoftTeams.min.js +1 -1
  163. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  164. package/package.json +50 -1
  165. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +0 -39
  166. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +0 -176
  167. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +0 -107
  168. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +0 -116
  169. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +0 -906
  170. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +0 -574
  171. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +0 -124
  172. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +0 -104
  173. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +0 -192
  174. package/dist/esm/packages/teams-js/src/private/copilot.js +0 -1
  175. package/dist/esm/packages/teams-js/src/private/hostEntity.js +0 -1
  176. package/dist/esm/packages/teams-js/src/private/messageChannels.js +0 -1
  177. package/dist/esm/packages/teams-js/src/private/teams.js +0 -1
  178. package/dist/esm/packages/teams-js/src/public/meeting.js +0 -1
  179. package/dist/esm/packages/teams-js/src/public/pages.js +0 -1
  180. package/dist/esm/packages/teams-js/src/public/sharing.js +0 -1
  181. package/dist/esm/packages/teams-js/src/public/stageView.js +0 -1
  182. package/dist/esm/packages/teams-js/src/public/visualMedia.js +0 -1
  183. /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
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * Module to interact with the menu-specific part of the SDK.
3
3
  * This object is used to show View Configuration, Action Menu and Navigation Bar Menu.
4
+ * @module
4
5
  */
5
6
  /**
6
7
  * @hidden
@@ -1,3 +1,11 @@
1
+ /**
2
+ * @hidden
3
+ * Hidden from Docs
4
+ *
5
+ * @internal
6
+ * Limited to Microsoft-internal use
7
+ * @module
8
+ */
1
9
  import { SdkError } from './interfaces';
2
10
  /**
3
11
  * @hidden
@@ -1,7 +1,8 @@
1
- import { TabInstance } from './interfaces';
2
1
  /**
3
2
  * Navigation specific part of the SDK.
3
+ * @module
4
4
  */
5
+ import { TabInstance } from './interfaces';
5
6
  /** Navigation on complete handler function type */
6
7
  export type onCompleteHandlerFunctionType = (status: boolean, reason?: string) => void;
7
8
  /**
@@ -1,6 +1,7 @@
1
1
  /**
2
2
  * @beta
3
3
  * Nested app auth capabilities
4
+ * @module
4
5
  */
5
6
  /**
6
7
  * Checks if MSAL-NAA channel recommended by the host
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Provides APIs to interact with the app button part of the SDK.
3
+ * @module
4
+ */
5
+ import { handlerFunctionType } from './pages';
6
+ /**
7
+ * Registers a handler for clicking the app button.
8
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
9
+ * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
10
+ */
11
+ export declare function onClick(handler: handlerFunctionType): void;
12
+ /**
13
+ * Registers a handler for entering hover of the app button.
14
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
15
+ * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
16
+ */
17
+ export declare function onHoverEnter(handler: handlerFunctionType): void;
18
+ /**
19
+ * Registers a handler for exiting hover of the app button.
20
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
21
+ * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
22
+ */
23
+ export declare function onHoverLeave(handler: handlerFunctionType): void;
24
+ /**
25
+ * Checks if pages.appButton capability is supported by the host
26
+ * @returns boolean to represent whether the pages.appButton capability is supported
27
+ *
28
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
29
+ */
30
+ export declare function isSupported(): boolean;
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Provides APIs for handling the user's navigational history.
3
+ * @module
4
+ */
5
+ import { backButtonHandlerFunctionType } from './pages';
6
+ /**
7
+ * @hidden
8
+ * Register backButtonPress handler.
9
+ *
10
+ * @internal
11
+ * Limited to Microsoft-internal use.
12
+ */
13
+ export declare function _initialize(): void;
14
+ /**
15
+ * Navigates back in the hosted application. See {@link pages.backStack.registerBackButtonHandler} for notes on usage.
16
+ * @returns Promise that resolves when the navigation has completed.
17
+ */
18
+ export declare function navigateBack(): Promise<void>;
19
+ /**
20
+ * Registers a handler for user presses of the host client's back button. Experiences that maintain an internal
21
+ * navigation stack should use this handler to navigate the user back within their frame. If an application finds
22
+ * that after running its back button handler it cannot handle the event it should call the navigateBack
23
+ * method to ask the host client to handle it instead.
24
+ * @param handler - The handler to invoke when the user presses the host client's back button.
25
+ */
26
+ export declare function registerBackButtonHandler(handler: backButtonHandlerFunctionType): void;
27
+ /**
28
+ * @hidden
29
+ * Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
30
+ *
31
+ * @internal
32
+ * Limited to Microsoft-internal use
33
+ * @param apiVersionTag - The tag indicating API version number with name
34
+ * @param handler - The handler to invoke when the user presses the host client's back button.
35
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
36
+ */
37
+ export declare function registerBackButtonHandlerHelper(apiVersionTag: string, handler: () => boolean, versionSpecificHelper?: () => void): void;
38
+ /**
39
+ * Checks if the pages.backStack capability is supported by the host
40
+ * @returns boolean to represent whether the pages.backStack capability is supported
41
+ *
42
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
43
+ */
44
+ export declare function isSupported(): boolean;
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Provides APIs to interact with the configuration-specific part of the SDK.
3
+ * This object is usable only on the configuration frame.
4
+ * @module
5
+ */
6
+ import { handlerFunctionType, InstanceConfig, removeEventType, saveEventType } from './pages';
7
+ /**
8
+ * @hidden
9
+ * Hide from docs because this function is only used during initialization
10
+ *
11
+ * Adds register handlers for settings.save and settings.remove upon initialization. Function is called in {@link app.initializeHelper}
12
+ * @internal
13
+ * Limited to Microsoft-internal use
14
+ */
15
+ export declare function initialize(): void;
16
+ /**
17
+ * Sets the validity state for the configuration.
18
+ * The initial value is false, so the user cannot save the configuration until this is called with true.
19
+ * @param validityState - Indicates whether the save or remove button is enabled for the user.
20
+ */
21
+ export declare function setValidityState(validityState: boolean): void;
22
+ /**
23
+ * Sets the configuration for the current instance.
24
+ * This is an asynchronous operation; calls to getConfig are not guaranteed to reflect the changed state.
25
+ * @param instanceConfig - The desired configuration for this instance.
26
+ * @returns Promise that resolves when the operation has completed.
27
+ */
28
+ export declare function setConfig(instanceConfig: InstanceConfig): Promise<void>;
29
+ /**
30
+ * Registers a handler for when the user attempts to save the configuration. This handler should be used
31
+ * to create or update the underlying resource powering the content.
32
+ * The object passed to the handler must be used to notify whether to proceed with the save.
33
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
34
+ * @param handler - The handler to invoke when the user selects the Save button.
35
+ */
36
+ export declare function registerOnSaveHandler(handler: saveEventType): void;
37
+ /**
38
+ * @hidden
39
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
40
+ *
41
+ * @internal
42
+ * Limited to Microsoft-internal use
43
+ *
44
+ * @param apiVersionTag - The API version tag, which is used for telemetry, composed by API version number and source API name.
45
+ * @param handler - The handler to invoke when the user selects the Save button.
46
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
47
+ */
48
+ export declare function registerOnSaveHandlerHelper(apiVersionTag: string, handler: (evt: SaveEvent) => void, versionSpecificHelper?: () => void): void;
49
+ /**
50
+ * Registers a handler for user attempts to remove content. This handler should be used
51
+ * to remove the underlying resource powering the content.
52
+ * The object passed to the handler must be used to indicate whether to proceed with the removal.
53
+ * Only one handler may be registered at a time. Subsequent registrations will override the first.
54
+ * @param handler - The handler to invoke when the user selects the Remove button.
55
+ */
56
+ export declare function registerOnRemoveHandler(handler: removeEventType): void;
57
+ /**
58
+ * @hidden
59
+ * Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
60
+ *
61
+ * @internal
62
+ * Limited to Microsoft-internal use
63
+ *
64
+ * @param apiVersionTag - The API version tag, which is used for telemetry, composed by API version number and source API name.
65
+ * @param handler - The handler to invoke when the user selects the Remove button.
66
+ * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
67
+ */
68
+ export declare function registerOnRemoveHandlerHelper(apiVersionTag: string, handler: (evt: RemoveEvent) => void, versionSpecificHelper?: () => void): void;
69
+ /**
70
+ * Registers a handler for when the tab configuration is changed by the user
71
+ * @param handler - The handler to invoke when the user clicks on Settings.
72
+ */
73
+ export declare function registerChangeConfigHandler(handler: handlerFunctionType): void;
74
+ /**
75
+ * Describes the results of the settings.save event. Includes result, notifySuccess, and notifyFailure
76
+ * to indicate the return object (result) and the status of whether the settings.save call succeeded or not and why.
77
+ */
78
+ export interface SaveEvent {
79
+ /**
80
+ * Object containing properties passed as arguments to the settings.save event.
81
+ */
82
+ result: SaveParameters;
83
+ /**
84
+ * Indicates that the underlying resource has been created and the config can be saved.
85
+ */
86
+ notifySuccess(): void;
87
+ /**
88
+ * Indicates that creation of the underlying resource failed and that the config cannot be saved.
89
+ * @param reason - Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
90
+ */
91
+ notifyFailure(reason?: string): void;
92
+ }
93
+ /**
94
+ * Describes the results of the settings.remove event. Includes notifySuccess, and notifyFailure
95
+ * to indicate the status of whether the settings.save call succeeded or not and why.
96
+ */
97
+ export interface RemoveEvent {
98
+ /**
99
+ * Indicates that the underlying resource has been removed and the content can be removed.
100
+ */
101
+ notifySuccess(): void;
102
+ /**
103
+ * Indicates that removal of the underlying resource failed and that the content cannot be removed.
104
+ * @param reason - Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
105
+ */
106
+ notifyFailure(reason?: string): void;
107
+ }
108
+ /**
109
+ * Parameters used in the settings.save event
110
+ */
111
+ export interface SaveParameters {
112
+ /**
113
+ * Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save
114
+ */
115
+ webhookUrl?: string;
116
+ }
117
+ /**
118
+ * Checks if the pages.config capability is supported by the host
119
+ * @returns boolean to represent whether the pages.config capability is supported
120
+ *
121
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
122
+ */
123
+ export declare function isSupported(): boolean;
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Provides functions for navigating within your own app
3
+ *
4
+ * @remarks
5
+ * If you are looking to navigate to a different app, use {@link pages.navigateToApp}.
6
+ * @module
7
+ */
8
+ /**
9
+ * Parameters provided to the {@link navigateTo} function
10
+ */
11
+ export interface NavigateWithinAppParams {
12
+ /**
13
+ * The developer-defined unique ID for the page defined in the manifest or when first configuring
14
+ * the page. (Known as {@linkcode Context.entityId} prior to TeamsJS v2.0.0)
15
+ */
16
+ pageId: string;
17
+ /**
18
+ * Optional developer-defined unique ID describing the content to navigate to within the page. This
19
+ * can be retrieved from the Context object {@link app.PageInfo.subPageId | app.Context.page.subPageId}
20
+ */
21
+ subPageId?: string;
22
+ }
23
+ /**
24
+ * Navigate within the currently running app
25
+ *
26
+ * @remarks
27
+ * If you are looking to navigate to a different app, use {@link pages.navigateToApp}.
28
+ *
29
+ * @param params Parameters for the navigation
30
+ * @returns `Promise` that will resolve if the navigation was successful and reject if not
31
+ */
32
+ export declare function navigateTo(params: NavigateWithinAppParams): Promise<void>;
33
+ /**
34
+ * Navigate to the currently running app's first static page defined in the application
35
+ * manifest.
36
+ *
37
+ * @returns `Promise` that will resolve if the navigation was successful and reject if not
38
+ */
39
+ export declare function navigateToDefaultPage(): Promise<void>;
40
+ /**
41
+ * Checks if pages.currentApp capability is supported by the host
42
+ * @returns boolean to represent whether the pages.currentApp capability is supported
43
+ *
44
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
45
+ */
46
+ export declare function isSupported(): boolean;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @hidden
3
+ * Hide from docs
4
+ * ------
5
+ * Provides APIs to interact with the full-trust part of the SDK. Limited to 1P applications
6
+ * @internal
7
+ * Limited to Microsoft-internal use
8
+ * @module
9
+ */
10
+ /**
11
+ * @hidden
12
+ * Hide from docs
13
+ * ------
14
+ * Place the tab into full-screen mode.
15
+ *
16
+ */
17
+ export declare function enterFullscreen(): void;
18
+ /**
19
+ * @hidden
20
+ * Hide from docs
21
+ * ------
22
+ * Reverts the tab into normal-screen mode.
23
+ */
24
+ export declare function exitFullscreen(): void;
25
+ /**
26
+ * @hidden
27
+ *
28
+ * Checks if the pages.fullTrust capability is supported by the host
29
+ * @returns boolean to represent whether the pages.fullTrust capability is supported
30
+ *
31
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
32
+ */
33
+ export declare function isSupported(): boolean;
@@ -0,0 +1,253 @@
1
+ /**
2
+ * Navigation-specific part of the SDK.
3
+ * @module
4
+ */
5
+ import { AppId } from '../appId';
6
+ import { FrameInfo, ShareDeepLinkParameters } from '../interfaces';
7
+ import * as appButton from './appButton';
8
+ import * as backStack from './backStack';
9
+ import * as config from './config';
10
+ import * as currentApp from './currentApp';
11
+ import * as fullTrust from './fullTrust';
12
+ import * as tabs from './tabs';
13
+ /** Callback function */
14
+ export type handlerFunctionType = () => void;
15
+ /** Full screen function */
16
+ export type fullScreenChangeFunctionType = (isFullScreen: boolean) => void;
17
+ /** Back button handler function */
18
+ export type backButtonHandlerFunctionType = () => boolean;
19
+ /** Save event function */
20
+ export type saveEventType = (evt: config.SaveEvent) => void;
21
+ /** Remove event function */
22
+ export type removeEventType = (evt: config.RemoveEvent) => void;
23
+ /**
24
+ * @hidden
25
+ * List of enter focus action items
26
+ *
27
+ * @internal
28
+ * Limited to Microsoft-internal use
29
+ */
30
+ export declare enum EnterFocusType {
31
+ /**
32
+ * Determines the previous direction to focus in app when hot keys entered.
33
+ */
34
+ PreviousLandmark = 0,
35
+ /**
36
+ * Determines the next direction to focus in app when hot keys entered.
37
+ */
38
+ NextLandmark = 1,
39
+ /**
40
+ * Determines if the focus should go to the particular content of the app.
41
+ * Read - Focus should go to the content of the app.
42
+ */
43
+ Read = 2,
44
+ /**
45
+ * Determines if the focus should go to the particular content of the app.
46
+ * Compose - Focus should go to the compose area (such as textbox) of the app.
47
+ */
48
+ Compose = 3
49
+ }
50
+ /**
51
+ * Return focus action items
52
+ */
53
+ export declare enum ReturnFocusType {
54
+ /**
55
+ * Determines the direction to focus in host for previous landmark.
56
+ */
57
+ PreviousLandmark = 0,
58
+ /**
59
+ * Determines the direction to focus in host for next landmark.
60
+ */
61
+ NextLandmark = 1,
62
+ /**
63
+ * Determines if the focus should go to the host's activity feed
64
+ */
65
+ GoToActivityFeed = 2
66
+ }
67
+ /**
68
+ * @deprecated
69
+ * Return focus to the host. Will move focus forward or backward based on where the application container falls in
70
+ * the F6/tab order in the host.
71
+ * On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no
72
+ * effect and will be a no-op when called.
73
+ * @param navigateForward - Determines the direction to focus in host.
74
+ */
75
+ export declare function returnFocus(navigateForward?: boolean): void;
76
+ /**
77
+ * Return focus to the host. Will attempt to send focus to the appropriate part of the host (as specified by returnFocusType) based on where the application container falls in
78
+ * the F6/tab order in the host.
79
+ * On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no
80
+ * effect and will be a no-op when called.
81
+ * @param returnFocusType - Determines the type of focus to return to in the host.
82
+ */
83
+ export declare function returnFocus(returnFocusType: ReturnFocusType): void;
84
+ /**
85
+ * @hidden
86
+ *
87
+ * Registers a handler for specifying focus when it passes from the host to the application.
88
+ * On mobile hosts or hosts where there is no UI notion of "focus" the handler registered with
89
+ * this function will never be called.
90
+ *
91
+ * @param handler - The handler for placing focus within the application.
92
+ *
93
+ * @internal
94
+ * Limited to Microsoft-internal use
95
+ */
96
+ export declare function registerFocusEnterHandler(handler: (navigateForward: boolean, enterFocusType?: EnterFocusType) => void): void;
97
+ /**
98
+ * Sets/Updates the current frame with new information
99
+ *
100
+ * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
101
+ * user clicks 'Go To Website'
102
+ */
103
+ export declare function setCurrentFrame(frameInfo: FrameInfo): void;
104
+ /**
105
+ * Initializes the library with context information for the frame
106
+ *
107
+ * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
108
+ * user clicks 'Go To Website'
109
+ * @param callback - An optional callback that is executed once the application has finished initialization.
110
+ * @param validMessageOrigins - An optional list of cross-frame message origins. They must have
111
+ * https: protocol otherwise they will be ignored. Example: https:www.example.com
112
+ */
113
+ export declare function initializeWithFrameContext(frameInfo: FrameInfo, callback?: handlerFunctionType, validMessageOrigins?: string[]): void;
114
+ /**
115
+ * Defines the configuration of the current or desired instance
116
+ */
117
+ export interface InstanceConfig {
118
+ /**
119
+ * A suggested display name for the new content.
120
+ * In the settings for an existing instance being updated, this call has no effect.
121
+ */
122
+ suggestedDisplayName?: string;
123
+ /**
124
+ * Sets the URL to use for the content of this instance.
125
+ */
126
+ contentUrl: string;
127
+ /**
128
+ * Sets the URL for the removal configuration experience.
129
+ */
130
+ removeUrl?: string;
131
+ /**
132
+ * Sets the URL to use for the external link to view the underlying resource in a browser.
133
+ */
134
+ websiteUrl?: string;
135
+ /**
136
+ * The developer-defined unique ID for the entity to which this content points.
137
+ */
138
+ entityId?: string;
139
+ }
140
+ /**
141
+ * Gets the config for the current instance.
142
+ * @returns Promise that resolves with the {@link InstanceConfig} object.
143
+ */
144
+ export declare function getConfig(): Promise<InstanceConfig>;
145
+ /**
146
+ * @deprecated
147
+ * As of 2.0.0, this API is deprecated and can be replaced by the standard JavaScript
148
+ * API, window.location.href, when navigating the app to a new cross-domain URL. Any URL
149
+ * that is redirected to must be listed in the validDomains block of the manifest. Please
150
+ * remove any calls to this API.
151
+ * @param url - The URL to navigate the frame to.
152
+ * @returns Promise that resolves when the navigation has completed.
153
+ */
154
+ export declare function navigateCrossDomain(url: string): Promise<void>;
155
+ /**
156
+ * Used to navigate to apps other than your own.
157
+ *
158
+ * If you are looking to navigate within your own app, use {@link pages.currentApp.navigateToDefaultPage} or {@link pages.currentApp.navigateTo}
159
+ *
160
+ * @param params Parameters for the navigation
161
+ * @returns a `Promise` that will resolve if the navigation was successful or reject if it was not
162
+ * @throws `Error` if the app ID is not valid or `params.webUrl` is defined but not a valid URL
163
+ */
164
+ export declare function navigateToApp(params: AppNavigationParameters | NavigateToAppParams): Promise<void>;
165
+ /**
166
+ * Shares a deep link that a user can use to navigate back to a specific state in this page.
167
+ * Please note that this method does not yet work on mobile hosts.
168
+ *
169
+ * @param deepLinkParameters - ID and label for the link and fallback URL.
170
+ */
171
+ export declare function shareDeepLink(deepLinkParameters: ShareDeepLinkParameters): void;
172
+ /**
173
+ * Registers a handler for changes from or to full-screen view for a tab.
174
+ * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
175
+ * On hosts where there is no support for making an app full screen, the handler registered
176
+ * with this function will never be called.
177
+ * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
178
+ */
179
+ export declare function registerFullScreenHandler(handler: fullScreenChangeFunctionType): void;
180
+ /**
181
+ * Checks if the pages capability is supported by the host
182
+ * @returns boolean to represent whether the appEntity capability is supported
183
+ *
184
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
185
+ */
186
+ export declare function isSupported(): boolean;
187
+ /**
188
+ * @deprecated
189
+ * This interface has been deprecated in favor of a more type-safe interface using {@link AppNavigationParameters}
190
+ *
191
+ * Parameters for the {@link navigateToApp} function
192
+ */
193
+ export interface NavigateToAppParams {
194
+ /**
195
+ * ID of the app to navigate to
196
+ */
197
+ appId: string;
198
+ /**
199
+ * Developer-defined ID of the page to navigate to within the app (formerly called `entityId`)
200
+ */
201
+ pageId: string;
202
+ /**
203
+ * Fallback URL to open if the navigation cannot be completed within the host (e.g. if the target app is not installed)
204
+ */
205
+ webUrl?: string;
206
+ /**
207
+ * Developer-defined ID describing the content to navigate to within the page. This ID is passed to the application
208
+ * via the {@link app.PageInfo.subPageId} property on the {@link app.Context} object (retrieved by calling {@link app.getContext})
209
+ */
210
+ subPageId?: string;
211
+ /**
212
+ * For apps installed as a channel tab, this ID can be supplied to indicate in which Teams channel the app should be opened
213
+ */
214
+ channelId?: string;
215
+ /**
216
+ * Optional ID of the chat or meeting where the app should be opened
217
+
218
+ */
219
+ chatId?: string;
220
+ }
221
+ /**
222
+ * Type-safer version of parameters for the {@link navigateToApp} function
223
+ */
224
+ export interface AppNavigationParameters {
225
+ /**
226
+ * ID of the app to navigate to
227
+ */
228
+ appId: AppId;
229
+ /**
230
+ * Developer-defined ID of the page to navigate to within the app (formerly called `entityId`)
231
+ */
232
+ pageId: string;
233
+ /**
234
+ * Fallback URL to open if the navigation cannot be completed within the host (e.g., if the target app is not installed)
235
+ */
236
+ webUrl?: URL;
237
+ /**
238
+ * Developer-defined ID describing the content to navigate to within the page. This ID is passed to the application
239
+ * via the {@link app.PageInfo.subPageId} property on the {@link app.Context} object (retrieved by calling {@link app.getContext})
240
+ */
241
+ subPageId?: string;
242
+ /**
243
+ * For apps installed as a channel tab, this ID can be supplied to indicate in which Teams channel the app should be opened
244
+ * This property has no effect in hosts where apps cannot be opened in channels
245
+ */
246
+ channelId?: string;
247
+ /**
248
+ * Optional ID of the chat or meeting where the app should be opened
249
+ * This property has no effect in hosts where apps cannot be opened in chats or meetings
250
+ */
251
+ chatId?: string;
252
+ }
253
+ export { appButton, backStack, config, currentApp, fullTrust, tabs };
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Provides APIs for querying and navigating between contextual tabs of an application. Unlike personal tabs,
3
+ * contextual tabs are pages associated with a specific context, such as channel or chat.
4
+ * @module
5
+ */
6
+ import { TabInformation, TabInstance, TabInstanceParameters } from '../interfaces';
7
+ /**
8
+ * Navigates the hosted application to the specified tab instance.
9
+ * @param tabInstance - The destination tab instance.
10
+ * @returns Promise that resolves when the navigation has completed.
11
+ */
12
+ export declare function navigateToTab(tabInstance: TabInstance): Promise<void>;
13
+ /**
14
+ * Retrieves application tabs for the current user.
15
+ * If no TabInstanceParameters are passed, the application defaults to favorite teams and favorite channels.
16
+ * @param tabInstanceParameters - An optional set of flags that specify whether to scope call to favorite teams or channels.
17
+ * @returns Promise that resolves with the {@link TabInformation}. Contains information for the user's tabs that are owned by this application {@link TabInstance}.
18
+ */
19
+ export declare function getTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
20
+ /**
21
+ * Retrieves the most recently used application tabs for the current user.
22
+ * @param tabInstanceParameters - An optional set of flags. Note this is currently ignored and kept for future use.
23
+ * @returns Promise that resolves with the {@link TabInformation}. Contains information for the users' most recently used tabs {@link TabInstance}.
24
+ */
25
+ export declare function getMruTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
26
+ /**
27
+ * Checks if the pages.tab capability is supported by the host
28
+ * @returns boolean to represent whether the pages.tab capability is supported
29
+ *
30
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
31
+ */
32
+ export declare function isSupported(): boolean;