@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
@@ -1,574 +0,0 @@
1
- import { AppId } from '../public/appId';
2
- import { FrameInfo, ShareDeepLinkParameters, TabInformation, TabInstance, TabInstanceParameters } from './interfaces';
3
- export declare function navigateCrossDomainHelper(apiVersionTag: string, url: string): Promise<void>;
4
- export declare function backStackNavigateBackHelper(apiVersionTag: string): Promise<void>;
5
- export declare function tabsNavigateToTabHelper(apiVersionTag: string, tabInstance: TabInstance): Promise<void>;
6
- /**
7
- * @hidden
8
- */
9
- export declare function returnFocusHelper(apiVersionTag: string, navigateForward?: boolean): void;
10
- export declare function getTabInstancesHelper(apiVersionTag: string, tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
11
- export declare function getMruTabInstancesHelper(apiVersionTag: string, tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
12
- export declare function shareDeepLinkHelper(apiVersionTag: string, deepLinkParameters: ShareDeepLinkParameters): void;
13
- export declare function setCurrentFrameHelper(apiVersionTag: string, frameInfo: FrameInfo): void;
14
- export declare function configSetValidityStateHelper(apiVersionTag: string, validityState: boolean): void;
15
- export declare function getConfigHelper(apiVersionTag: string): Promise<pages.InstanceConfig>;
16
- export declare function configSetConfigHelper(apiVersionTag: string, instanceConfig: pages.InstanceConfig): Promise<void>;
17
- /**
18
- * Navigation-specific part of the SDK.
19
- */
20
- export declare namespace pages {
21
- /** Callback function */
22
- type handlerFunctionType = () => void;
23
- /** Full screen function */
24
- type fullScreenChangeFunctionType = (isFullScreen: boolean) => void;
25
- /** Back button handler function */
26
- type backButtonHandlerFunctionType = () => boolean;
27
- /** Save event function */
28
- type saveEventType = (evt: pages.config.SaveEvent) => void;
29
- /** Remove event function */
30
- type removeEventType = (evt: pages.config.RemoveEvent) => void;
31
- /**
32
- * @hidden
33
- * List of enter focus action items
34
- *
35
- * @internal
36
- * Limited to Microsoft-internal use
37
- */
38
- enum EnterFocusType {
39
- /**
40
- * Determines the previous direction to focus in app when hot keys entered.
41
- */
42
- PreviousLandmark = 0,
43
- /**
44
- * Determines the next direction to focus in app when hot keys entered.
45
- */
46
- NextLandmark = 1,
47
- /**
48
- * Determines if the focus should go to the particular content of the app.
49
- * Read - Focus should go to the content of the app.
50
- */
51
- Read = 2,
52
- /**
53
- * Determines if the focus should go to the particular content of the app.
54
- * Compose - Focus should go to the compose area (such as textbox) of the app.
55
- */
56
- Compose = 3
57
- }
58
- /**
59
- * Return focus action items
60
- */
61
- enum ReturnFocusType {
62
- /**
63
- * Determines the direction to focus in host for previous landmark.
64
- */
65
- PreviousLandmark = 0,
66
- /**
67
- * Determines the direction to focus in host for next landmark.
68
- */
69
- NextLandmark = 1,
70
- /**
71
- * Determines if the focus should go to the host's activity feed
72
- */
73
- GoToActivityFeed = 2
74
- }
75
- /**
76
- * @deprecated
77
- * Return focus to the host. Will move focus forward or backward 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 navigateForward - Determines the direction to focus in host.
82
- */
83
- function returnFocus(navigateForward?: boolean): void;
84
- /**
85
- * 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
86
- * the F6/tab order in the host.
87
- * On mobile hosts or hosts where there is no keyboard interaction or UI notion of "focus" this function has no
88
- * effect and will be a no-op when called.
89
- * @param returnFocusType - Determines the type of focus to return to in the host.
90
- */
91
- function returnFocus(returnFocusType: pages.ReturnFocusType): void;
92
- /**
93
- * @hidden
94
- *
95
- * Registers a handler for specifying focus when it passes from the host to the application.
96
- * On mobile hosts or hosts where there is no UI notion of "focus" the handler registered with
97
- * this function will never be called.
98
- *
99
- * @param handler - The handler for placing focus within the application.
100
- *
101
- * @internal
102
- * Limited to Microsoft-internal use
103
- */
104
- function registerFocusEnterHandler(handler: (navigateForward: boolean, enterFocusType?: EnterFocusType) => void): void;
105
- /**
106
- * Sets/Updates the current frame with new information
107
- *
108
- * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
109
- * user clicks 'Go To Website'
110
- */
111
- function setCurrentFrame(frameInfo: FrameInfo): void;
112
- /**
113
- * Initializes the library with context information for the frame
114
- *
115
- * @param frameInfo - Frame information containing the URL used in the iframe on reload and the URL for when the
116
- * user clicks 'Go To Website'
117
- * @param callback - An optional callback that is executed once the application has finished initialization.
118
- * @param validMessageOrigins - An optional list of cross-frame message origins. They must have
119
- * https: protocol otherwise they will be ignored. Example: https:www.example.com
120
- */
121
- function initializeWithFrameContext(frameInfo: FrameInfo, callback?: handlerFunctionType, validMessageOrigins?: string[]): void;
122
- /**
123
- * Defines the configuration of the current or desired instance
124
- */
125
- interface InstanceConfig {
126
- /**
127
- * A suggested display name for the new content.
128
- * In the settings for an existing instance being updated, this call has no effect.
129
- */
130
- suggestedDisplayName?: string;
131
- /**
132
- * Sets the URL to use for the content of this instance.
133
- */
134
- contentUrl: string;
135
- /**
136
- * Sets the URL for the removal configuration experience.
137
- */
138
- removeUrl?: string;
139
- /**
140
- * Sets the URL to use for the external link to view the underlying resource in a browser.
141
- */
142
- websiteUrl?: string;
143
- /**
144
- * The developer-defined unique ID for the entity to which this content points.
145
- */
146
- entityId?: string;
147
- }
148
- /**
149
- * Gets the config for the current instance.
150
- * @returns Promise that resolves with the {@link InstanceConfig} object.
151
- */
152
- function getConfig(): Promise<InstanceConfig>;
153
- /**
154
- * @deprecated
155
- * As of 2.0.0, this API is deprecated and can be replaced by the standard JavaScript
156
- * API, window.location.href, when navigating the app to a new cross-domain URL. Any URL
157
- * that is redirected to must be listed in the validDomains block of the manifest. Please
158
- * remove any calls to this API.
159
- * @param url - The URL to navigate the frame to.
160
- * @returns Promise that resolves when the navigation has completed.
161
- */
162
- function navigateCrossDomain(url: string): Promise<void>;
163
- /**
164
- * Used to navigate to apps other than your own.
165
- *
166
- * If you are looking to navigate within your own app, use {@link pages.currentApp.navigateToDefaultPage} or {@link pages.currentApp.navigateTo}
167
- *
168
- * @param params Parameters for the navigation
169
- * @returns a `Promise` that will resolve if the navigation was successful or reject if it was not
170
- * @throws `Error` if the app ID is not valid or `params.webUrl` is defined but not a valid URL
171
- */
172
- function navigateToApp(params: AppNavigationParameters | NavigateToAppParams): Promise<void>;
173
- /**
174
- * Shares a deep link that a user can use to navigate back to a specific state in this page.
175
- * Please note that this method does not yet work on mobile hosts.
176
- *
177
- * @param deepLinkParameters - ID and label for the link and fallback URL.
178
- */
179
- function shareDeepLink(deepLinkParameters: ShareDeepLinkParameters): void;
180
- /**
181
- * Registers a handler for changes from or to full-screen view for a tab.
182
- * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
183
- * On hosts where there is no support for making an app full screen, the handler registered
184
- * with this function will never be called.
185
- * @param handler - The handler to invoke when the user toggles full-screen view for a tab.
186
- */
187
- function registerFullScreenHandler(handler: fullScreenChangeFunctionType): void;
188
- /**
189
- * Checks if the pages capability is supported by the host
190
- * @returns boolean to represent whether the appEntity capability is supported
191
- *
192
- * @throws Error if {@linkcode app.initialize} has not successfully completed
193
- */
194
- function isSupported(): boolean;
195
- /**
196
- * @deprecated
197
- * This interface has been deprecated in favor of a more type-safe interface using {@link pages.AppNavigationParameters}
198
- *
199
- * Parameters for the {@link pages.navigateToApp} function
200
- */
201
- interface NavigateToAppParams {
202
- /**
203
- * ID of the app to navigate to
204
- */
205
- appId: string;
206
- /**
207
- * Developer-defined ID of the page to navigate to within the app (formerly called `entityId`)
208
- */
209
- pageId: string;
210
- /**
211
- * Fallback URL to open if the navigation cannot be completed within the host (e.g. if the target app is not installed)
212
- */
213
- webUrl?: string;
214
- /**
215
- * Developer-defined ID describing the content to navigate to within the page. This ID is passed to the application
216
- * via the {@link app.PageInfo.subPageId} property on the {@link app.Context} object (retrieved by calling {@link app.getContext})
217
- */
218
- subPageId?: string;
219
- /**
220
- * For apps installed as a channel tab, this ID can be supplied to indicate in which Teams channel the app should be opened
221
- */
222
- channelId?: string;
223
- /**
224
- * Optional ID of the chat or meeting where the app should be opened
225
-
226
- */
227
- chatId?: string;
228
- }
229
- /**
230
- * Type-safer version of parameters for the {@link pages.navigateToApp} function
231
- */
232
- interface AppNavigationParameters {
233
- /**
234
- * ID of the app to navigate to
235
- */
236
- appId: AppId;
237
- /**
238
- * Developer-defined ID of the page to navigate to within the app (formerly called `entityId`)
239
- */
240
- pageId: string;
241
- /**
242
- * Fallback URL to open if the navigation cannot be completed within the host (e.g., if the target app is not installed)
243
- */
244
- webUrl?: URL;
245
- /**
246
- * Developer-defined ID describing the content to navigate to within the page. This ID is passed to the application
247
- * via the {@link app.PageInfo.subPageId} property on the {@link app.Context} object (retrieved by calling {@link app.getContext})
248
- */
249
- subPageId?: string;
250
- /**
251
- * For apps installed as a channel tab, this ID can be supplied to indicate in which Teams channel the app should be opened
252
- * This property has no effect in hosts where apps cannot be opened in channels
253
- */
254
- channelId?: string;
255
- /**
256
- * Optional ID of the chat or meeting where the app should be opened
257
- * This property has no effect in hosts where apps cannot be opened in chats or meetings
258
- */
259
- chatId?: string;
260
- }
261
- /**
262
- * Provides APIs for querying and navigating between contextual tabs of an application. Unlike personal tabs,
263
- * contextual tabs are pages associated with a specific context, such as channel or chat.
264
- */
265
- namespace tabs {
266
- /**
267
- * Navigates the hosted application to the specified tab instance.
268
- * @param tabInstance - The destination tab instance.
269
- * @returns Promise that resolves when the navigation has completed.
270
- */
271
- function navigateToTab(tabInstance: TabInstance): Promise<void>;
272
- /**
273
- * Retrieves application tabs for the current user.
274
- * If no TabInstanceParameters are passed, the application defaults to favorite teams and favorite channels.
275
- * @param tabInstanceParameters - An optional set of flags that specify whether to scope call to favorite teams or channels.
276
- * @returns Promise that resolves with the {@link TabInformation}. Contains information for the user's tabs that are owned by this application {@link TabInstance}.
277
- */
278
- function getTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
279
- /**
280
- * Retrieves the most recently used application tabs for the current user.
281
- * @param tabInstanceParameters - An optional set of flags. Note this is currently ignored and kept for future use.
282
- * @returns Promise that resolves with the {@link TabInformation}. Contains information for the users' most recently used tabs {@link TabInstance}.
283
- */
284
- function getMruTabInstances(tabInstanceParameters?: TabInstanceParameters): Promise<TabInformation>;
285
- /**
286
- * Checks if the pages.tab capability is supported by the host
287
- * @returns boolean to represent whether the pages.tab capability is supported
288
- *
289
- * @throws Error if {@linkcode app.initialize} has not successfully completed
290
- */
291
- function isSupported(): boolean;
292
- }
293
- /**
294
- * Provides APIs to interact with the configuration-specific part of the SDK.
295
- * This object is usable only on the configuration frame.
296
- */
297
- namespace config {
298
- /**
299
- * @hidden
300
- * Hide from docs because this function is only used during initialization
301
- *
302
- * Adds register handlers for settings.save and settings.remove upon initialization. Function is called in {@link app.initializeHelper}
303
- * @internal
304
- * Limited to Microsoft-internal use
305
- */
306
- function initialize(): void;
307
- /**
308
- * Sets the validity state for the configuration.
309
- * The initial value is false, so the user cannot save the configuration until this is called with true.
310
- * @param validityState - Indicates whether the save or remove button is enabled for the user.
311
- */
312
- function setValidityState(validityState: boolean): void;
313
- /**
314
- * Sets the configuration for the current instance.
315
- * This is an asynchronous operation; calls to getConfig are not guaranteed to reflect the changed state.
316
- * @param instanceConfig - The desired configuration for this instance.
317
- * @returns Promise that resolves when the operation has completed.
318
- */
319
- function setConfig(instanceConfig: InstanceConfig): Promise<void>;
320
- /**
321
- * Registers a handler for when the user attempts to save the configuration. This handler should be used
322
- * to create or update the underlying resource powering the content.
323
- * The object passed to the handler must be used to notify whether to proceed with the save.
324
- * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
325
- * @param handler - The handler to invoke when the user selects the Save button.
326
- */
327
- function registerOnSaveHandler(handler: saveEventType): void;
328
- /**
329
- * @hidden
330
- * Undocumented helper function with shared code between deprecated version and current version of the registerOnSaveHandler API.
331
- *
332
- * @internal
333
- * Limited to Microsoft-internal use
334
- *
335
- * @param apiVersionTag - The API version tag, which is used for telemetry, composed by API version number and source API name.
336
- * @param handler - The handler to invoke when the user selects the Save button.
337
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
338
- */
339
- function registerOnSaveHandlerHelper(apiVersionTag: string, handler: (evt: SaveEvent) => void, versionSpecificHelper?: () => void): void;
340
- /**
341
- * Registers a handler for user attempts to remove content. This handler should be used
342
- * to remove the underlying resource powering the content.
343
- * The object passed to the handler must be used to indicate whether to proceed with the removal.
344
- * Only one handler may be registered at a time. Subsequent registrations will override the first.
345
- * @param handler - The handler to invoke when the user selects the Remove button.
346
- */
347
- function registerOnRemoveHandler(handler: removeEventType): void;
348
- /**
349
- * @hidden
350
- * Undocumented helper function with shared code between deprecated version and current version of the registerOnRemoveHandler API.
351
- *
352
- * @internal
353
- * Limited to Microsoft-internal use
354
- *
355
- * @param apiVersionTag - The API version tag, which is used for telemetry, composed by API version number and source API name.
356
- * @param handler - The handler to invoke when the user selects the Remove button.
357
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
358
- */
359
- function registerOnRemoveHandlerHelper(apiVersionTag: string, handler: (evt: RemoveEvent) => void, versionSpecificHelper?: () => void): void;
360
- /**
361
- * Registers a handler for when the tab configuration is changed by the user
362
- * @param handler - The handler to invoke when the user clicks on Settings.
363
- */
364
- function registerChangeConfigHandler(handler: handlerFunctionType): void;
365
- /**
366
- * Describes the results of the settings.save event. Includes result, notifySuccess, and notifyFailure
367
- * to indicate the return object (result) and the status of whether the settings.save call succeeded or not and why.
368
- */
369
- interface SaveEvent {
370
- /**
371
- * Object containing properties passed as arguments to the settings.save event.
372
- */
373
- result: SaveParameters;
374
- /**
375
- * Indicates that the underlying resource has been created and the config can be saved.
376
- */
377
- notifySuccess(): void;
378
- /**
379
- * Indicates that creation of the underlying resource failed and that the config cannot be saved.
380
- * @param reason - Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
381
- */
382
- notifyFailure(reason?: string): void;
383
- }
384
- /**
385
- * Describes the results of the settings.remove event. Includes notifySuccess, and notifyFailure
386
- * to indicate the status of whether the settings.save call succeeded or not and why.
387
- */
388
- interface RemoveEvent {
389
- /**
390
- * Indicates that the underlying resource has been removed and the content can be removed.
391
- */
392
- notifySuccess(): void;
393
- /**
394
- * Indicates that removal of the underlying resource failed and that the content cannot be removed.
395
- * @param reason - Specifies a reason for the failure. If provided, this string is displayed to the user; otherwise a generic error is displayed.
396
- */
397
- notifyFailure(reason?: string): void;
398
- }
399
- /**
400
- * Parameters used in the settings.save event
401
- */
402
- interface SaveParameters {
403
- /**
404
- * Connector's webhook Url returned as arguments to settings.save event as part of user clicking on Save
405
- */
406
- webhookUrl?: string;
407
- }
408
- /**
409
- * Checks if the pages.config capability is supported by the host
410
- * @returns boolean to represent whether the pages.config capability is supported
411
- *
412
- * @throws Error if {@linkcode app.initialize} has not successfully completed
413
- */
414
- function isSupported(): boolean;
415
- }
416
- /**
417
- * Provides APIs for handling the user's navigational history.
418
- */
419
- namespace backStack {
420
- /**
421
- * @hidden
422
- * Register backButtonPress handler.
423
- *
424
- * @internal
425
- * Limited to Microsoft-internal use.
426
- */
427
- function _initialize(): void;
428
- /**
429
- * Navigates back in the hosted application. See {@link pages.backStack.registerBackButtonHandler} for notes on usage.
430
- * @returns Promise that resolves when the navigation has completed.
431
- */
432
- function navigateBack(): Promise<void>;
433
- /**
434
- * Registers a handler for user presses of the host client's back button. Experiences that maintain an internal
435
- * navigation stack should use this handler to navigate the user back within their frame. If an application finds
436
- * that after running its back button handler it cannot handle the event it should call the navigateBack
437
- * method to ask the host client to handle it instead.
438
- * @param handler - The handler to invoke when the user presses the host client's back button.
439
- */
440
- function registerBackButtonHandler(handler: backButtonHandlerFunctionType): void;
441
- /**
442
- * @hidden
443
- * Undocumented helper function with shared code between deprecated version and current version of the registerBackButtonHandler API.
444
- *
445
- * @internal
446
- * Limited to Microsoft-internal use
447
- * @param apiVersionTag - The tag indicating API version number with name
448
- * @param handler - The handler to invoke when the user presses the host client's back button.
449
- * @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
450
- */
451
- function registerBackButtonHandlerHelper(apiVersionTag: string, handler: () => boolean, versionSpecificHelper?: () => void): void;
452
- /**
453
- * Checks if the pages.backStack capability is supported by the host
454
- * @returns boolean to represent whether the pages.backStack capability is supported
455
- *
456
- * @throws Error if {@linkcode app.initialize} has not successfully completed
457
- */
458
- function isSupported(): boolean;
459
- }
460
- /**
461
- * @hidden
462
- * Hide from docs
463
- * ------
464
- * Provides APIs to interact with the full-trust part of the SDK. Limited to 1P applications
465
- * @internal
466
- * Limited to Microsoft-internal use
467
- */
468
- namespace fullTrust {
469
- /**
470
- * @hidden
471
- * Hide from docs
472
- * ------
473
- * Place the tab into full-screen mode.
474
- *
475
- */
476
- function enterFullscreen(): void;
477
- /**
478
- * @hidden
479
- * Hide from docs
480
- * ------
481
- * Reverts the tab into normal-screen mode.
482
- */
483
- function exitFullscreen(): void;
484
- /**
485
- * @hidden
486
- *
487
- * Checks if the pages.fullTrust capability is supported by the host
488
- * @returns boolean to represent whether the pages.fullTrust capability is supported
489
- *
490
- * @throws Error if {@linkcode app.initialize} has not successfully completed
491
- */
492
- function isSupported(): boolean;
493
- }
494
- /**
495
- * Provides APIs to interact with the app button part of the SDK.
496
- */
497
- namespace appButton {
498
- /**
499
- * Registers a handler for clicking the app button.
500
- * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
501
- * @param handler - The handler to invoke when the personal app button is clicked in the app bar.
502
- */
503
- function onClick(handler: handlerFunctionType): void;
504
- /**
505
- * Registers a handler for entering hover of the app button.
506
- * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
507
- * @param handler - The handler to invoke when entering hover of the personal app button in the app bar.
508
- */
509
- function onHoverEnter(handler: handlerFunctionType): void;
510
- /**
511
- * Registers a handler for exiting hover of the app button.
512
- * Only one handler can be registered at a time. A subsequent registration replaces an existing registration.
513
- * @param handler - The handler to invoke when exiting hover of the personal app button in the app bar.
514
- */
515
- function onHoverLeave(handler: handlerFunctionType): void;
516
- /**
517
- * Checks if pages.appButton capability is supported by the host
518
- * @returns boolean to represent whether the pages.appButton capability is supported
519
- *
520
- * @throws Error if {@linkcode app.initialize} has not successfully completed
521
- */
522
- function isSupported(): boolean;
523
- }
524
- /**
525
- * Provides functions for navigating within your own app
526
- *
527
- * @remarks
528
- * If you are looking to navigate to a different app, use {@link pages.navigateToApp}.
529
- */
530
- namespace currentApp {
531
- /**
532
- * Parameters provided to the {@link pages.currentApp.navigateTo} function
533
- */
534
- interface NavigateWithinAppParams {
535
- /**
536
- * The developer-defined unique ID for the page defined in the manifest or when first configuring
537
- * the page. (Known as {@linkcode Context.entityId} prior to TeamsJS v2.0.0)
538
- */
539
- pageId: string;
540
- /**
541
- * Optional developer-defined unique ID describing the content to navigate to within the page. This
542
- * can be retrieved from the Context object {@link app.PageInfo.subPageId | app.Context.page.subPageId}
543
- */
544
- subPageId?: string;
545
- }
546
- /**
547
- * Navigate within the currently running app
548
- *
549
- * @remarks
550
- * If you are looking to navigate to a different app, use {@link pages.navigateToApp}.
551
- *
552
- * @param params Parameters for the navigation
553
- * @returns `Promise` that will resolve if the navigation was successful and reject if not
554
- */
555
- function navigateTo(params: NavigateWithinAppParams): Promise<void>;
556
- /**
557
- * Navigate to the currently running app's first static page defined in the application
558
- * manifest.
559
- *
560
- * @returns `Promise` that will resolve if the navigation was successful and reject if not
561
- */
562
- function navigateToDefaultPage(): Promise<void>;
563
- /**
564
- * Checks if pages.currentApp capability is supported by the host
565
- * @returns boolean to represent whether the pages.currentApp capability is supported
566
- *
567
- * @throws Error if {@linkcode app.initialize} has not successfully completed
568
- */
569
- function isSupported(): boolean;
570
- }
571
- }
572
- export declare function isAppNavigationParametersObject(obj: pages.AppNavigationParameters | pages.NavigateToAppParams): obj is pages.AppNavigationParameters;
573
- export declare function convertNavigateToAppParamsToAppNavigationParameters(params: pages.NavigateToAppParams): pages.AppNavigationParameters;
574
- export declare function convertAppNavigationParametersToNavigateToAppParams(params: pages.AppNavigationParameters): pages.NavigateToAppParams;