@microsoft/teams-js 2.30.0 → 2.31.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/dist/esm/_virtual/__polyfill-node.os.js +1 -0
  2. package/dist/esm/_virtual/_polyfill-node.os.js +1 -0
  3. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/node.js +1 -1
  4. package/dist/esm/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +1 -0
  5. package/dist/esm/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +1 -0
  6. package/dist/esm/packages/teams-js/dts/index.d.ts +2 -0
  7. package/dist/esm/packages/teams-js/dts/internal/VideoFrameTypes.d.ts +78 -0
  8. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +8 -0
  9. package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +16 -0
  10. package/dist/esm/packages/teams-js/dts/internal/communication.d.ts +162 -0
  11. package/dist/esm/packages/teams-js/dts/internal/constants.d.ts +146 -0
  12. package/dist/esm/packages/teams-js/dts/internal/deepLinkConstants.d.ts +26 -0
  13. package/dist/esm/packages/teams-js/dts/internal/deepLinkUtilities.d.ts +4 -0
  14. package/dist/esm/packages/teams-js/dts/internal/emailAddressValidation.d.ts +1 -0
  15. package/dist/esm/packages/teams-js/dts/internal/globalVars.d.ts +12 -0
  16. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +80 -0
  17. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +47 -0
  18. package/dist/esm/packages/teams-js/dts/internal/internalAPIs.d.ts +61 -0
  19. package/dist/esm/packages/teams-js/dts/internal/marketplaceUtils.d.ts +94 -0
  20. package/dist/esm/packages/teams-js/dts/internal/mediaUtil.d.ts +95 -0
  21. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +73 -0
  22. package/dist/esm/packages/teams-js/dts/internal/nestedAppAuthUtils.d.ts +105 -0
  23. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +11 -0
  24. package/dist/esm/packages/teams-js/dts/internal/responseHandler.d.ts +30 -0
  25. package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +344 -0
  26. package/dist/esm/packages/teams-js/dts/internal/typeCheckUtilities.d.ts +1 -0
  27. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +200 -0
  28. package/dist/esm/packages/teams-js/dts/internal/uuidObject.d.ts +11 -0
  29. package/dist/esm/packages/teams-js/dts/internal/validOrigins.d.ts +6 -0
  30. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +31 -0
  31. package/dist/esm/packages/teams-js/dts/internal/videoFrameTick.d.ts +10 -0
  32. package/dist/esm/packages/teams-js/dts/internal/videoPerformanceMonitor.d.ts +54 -0
  33. package/dist/esm/packages/teams-js/dts/internal/videoPerformanceStatistics.d.ts +49 -0
  34. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +89 -0
  35. package/dist/esm/packages/teams-js/dts/private/constants.d.ts +9 -0
  36. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +152 -0
  37. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +39 -0
  38. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +378 -0
  39. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +75 -0
  40. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +112 -0
  41. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +49 -0
  42. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +123 -0
  43. package/dist/esm/packages/teams-js/dts/private/files.d.ts +758 -0
  44. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +176 -0
  45. package/dist/esm/packages/teams-js/dts/private/index.d.ts +20 -0
  46. package/dist/esm/packages/teams-js/dts/private/interfaces.d.ts +250 -0
  47. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +25 -0
  48. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +203 -0
  49. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +107 -0
  50. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +26 -0
  51. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +81 -0
  52. package/dist/esm/packages/teams-js/dts/private/privateAPIs.d.ts +60 -0
  53. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +298 -0
  54. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +116 -0
  55. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +244 -0
  56. package/dist/esm/packages/teams-js/dts/public/adaptiveCards.d.ts +6 -0
  57. package/dist/esm/packages/teams-js/dts/public/app.d.ts +592 -0
  58. package/dist/esm/packages/teams-js/dts/public/appId.d.ts +33 -0
  59. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +57 -0
  60. package/dist/esm/packages/teams-js/dts/public/appInstallDialog.d.ts +18 -0
  61. package/dist/esm/packages/teams-js/dts/public/appWindow.d.ts +66 -0
  62. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +409 -0
  63. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +53 -0
  64. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +40 -0
  65. package/dist/esm/packages/teams-js/dts/public/call.d.ts +53 -0
  66. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +66 -0
  67. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +34 -0
  68. package/dist/esm/packages/teams-js/dts/public/constants.d.ts +179 -0
  69. package/dist/esm/packages/teams-js/dts/public/dialog.d.ts +286 -0
  70. package/dist/esm/packages/teams-js/dts/public/emailAddress.d.ts +12 -0
  71. package/dist/esm/packages/teams-js/dts/public/geoLocation.d.ts +100 -0
  72. package/dist/esm/packages/teams-js/dts/public/index.d.ts +44 -0
  73. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +1133 -0
  74. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +221 -0
  75. package/dist/esm/packages/teams-js/dts/public/location.d.ts +86 -0
  76. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +95 -0
  77. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +321 -0
  78. package/dist/esm/packages/teams-js/dts/public/media.d.ts +440 -0
  79. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +906 -0
  80. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +188 -0
  81. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +58 -0
  82. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +45 -0
  83. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +15 -0
  84. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +574 -0
  85. package/dist/esm/packages/teams-js/dts/public/people.d.ts +75 -0
  86. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +127 -0
  87. package/dist/esm/packages/teams-js/dts/public/publicAPIs.d.ts +218 -0
  88. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +207 -0
  89. package/dist/esm/packages/teams-js/dts/public/search.d.ts +91 -0
  90. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +32 -0
  91. package/dist/esm/packages/teams-js/dts/public/serializable.interface.d.ts +17 -0
  92. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +101 -0
  93. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +124 -0
  94. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +104 -0
  95. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +62 -0
  96. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +77 -0
  97. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +119 -0
  98. package/dist/esm/packages/teams-js/dts/public/version.d.ts +5 -0
  99. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +213 -0
  100. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +192 -0
  101. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +27 -0
  102. package/dist/esm/packages/teams-js/src/index.js +1 -1
  103. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -0
  104. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  105. package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -1
  106. package/dist/esm/packages/teams-js/src/internal/responseHandler.js +1 -0
  107. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  108. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  109. package/dist/esm/packages/teams-js/src/private/hostEntity.js +1 -1
  110. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  111. package/dist/esm/packages/teams-js/src/public/app.js +1 -1
  112. package/dist/esm/packages/teams-js/src/public/appId.js +1 -1
  113. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  114. package/dist/esm/packages/teams-js/src/public/appInstallDialog.js +1 -1
  115. package/dist/esm/packages/teams-js/src/public/authentication.js +1 -1
  116. package/dist/esm/packages/teams-js/src/public/barCode.js +1 -1
  117. package/dist/esm/packages/teams-js/src/public/calendar.js +1 -1
  118. package/dist/esm/packages/teams-js/src/public/call.js +1 -1
  119. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  120. package/dist/esm/packages/teams-js/src/public/constants.js +1 -1
  121. package/dist/esm/packages/teams-js/src/public/pages.js +1 -1
  122. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  123. package/dist/esm/packages/teams-js/src/public/serializable.interface.js +1 -0
  124. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  125. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  126. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  127. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  128. package/dist/umd/MicrosoftTeams.d.ts +10740 -10768
  129. package/dist/umd/MicrosoftTeams.js +1571 -1359
  130. package/dist/umd/MicrosoftTeams.js.map +1 -1
  131. package/dist/umd/MicrosoftTeams.min.js +1 -1
  132. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  133. package/package.json +1 -51
  134. package/dist/esm/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js +0 -1
@@ -0,0 +1,574 @@
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;
@@ -0,0 +1,75 @@
1
+ import { SdkError } from './interfaces';
2
+ export declare namespace people {
3
+ /** Select people callback function type */
4
+ type selectPeopleCallbackFunctionType = (error: SdkError, people: PeoplePickerResult[]) => void;
5
+ /**
6
+ * Launches a people picker and allows the user to select one or more people from the list
7
+ * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
8
+
9
+ * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of Microsoft Entra IDs, display names and emails of the selected users
10
+ * @param peoplePickerInputs - Input parameters to launch customized people picker
11
+ * @returns Promise that will be fulfilled when the operation has completed
12
+ */
13
+ function selectPeople(peoplePickerInputs?: PeoplePickerInputs): Promise<PeoplePickerResult[]>;
14
+ /**
15
+ * @deprecated
16
+ * As of TeamsJS v2.0.0, please use {@link people.selectPeople people.selectPeople(peoplePickerInputs?: PeoplePickerInputs): Promise\<PeoplePickerResult[]\>} instead.
17
+ *
18
+ * Launches a people picker and allows the user to select one or more people from the list
19
+ * If the app is added to personal app scope the people picker launched is org wide and if the app is added to a chat/channel, people picker launched is also limited to the members of chat/channel
20
+
21
+ * @param callback - Returns list of JSON object of type PeoplePickerResult which consists of Microsoft Entra IDs, display names and emails of the selected users
22
+ * @param peoplePickerInputs - Input parameters to launch customized people picker
23
+ */
24
+ function selectPeople(callback: selectPeopleCallbackFunctionType, peoplePickerInputs?: PeoplePickerInputs): void;
25
+ /**
26
+ * Input parameter supplied to the People Picker API
27
+ */
28
+ interface PeoplePickerInputs {
29
+ /**
30
+ * Optional; Set title for the people picker
31
+ * Default value is "Select people" for multiselect and "Select a person" for single select
32
+ */
33
+ title?: string;
34
+ /**
35
+ * Optional; Microsoft Entra IDs of the users to be pre-populated in the search box of people picker control
36
+ * If single select is enabled this value, only the first user in the list will be pre-populated
37
+ * Default value is null
38
+ */
39
+ setSelected?: string[];
40
+ /**
41
+ * Optional; launches the people picker in org wide scope even if the app is added to a chat or channel
42
+ * Default value is false
43
+ */
44
+ openOrgWideSearchInChatOrChannel?: boolean;
45
+ /**
46
+ * Optional; launches the people picker for which only 1 person can be selected
47
+ * Default value is false
48
+ */
49
+ singleSelect?: boolean;
50
+ }
51
+ /**
52
+ * Output user object of people picker API
53
+ */
54
+ interface PeoplePickerResult {
55
+ /**
56
+ * user object ID (also known as Microsoft Entra ID) of the selected user
57
+ */
58
+ objectId: string;
59
+ /**
60
+ * Optional; display name of the selected user
61
+ */
62
+ displayName?: string;
63
+ /**
64
+ * Optional; email of the selected user
65
+ */
66
+ email?: string;
67
+ }
68
+ /**
69
+ * Checks if the people capability is supported by the host
70
+ * @returns boolean to represent whether the people capability is supported
71
+ *
72
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
73
+ */
74
+ function isSupported(): boolean;
75
+ }