@microsoft/teams-js 2.55.0 → 2.56.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.
package/README.md CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
24
24
 
25
25
  ### Production
26
26
 
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.55.0/js/MicrosoftTeams.min.js) or point your package manager at them.
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.56.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
45
45
  ```html
46
46
  <!-- Microsoft Teams JavaScript API (via CDN) -->
47
47
  <script
48
- src="https://res.cdn.office.net/teams-js/2.55.0/js/MicrosoftTeams.min.js"
49
- integrity="sha384-qOOENVJGWr7UF7wvgyycjvq3sZen4SEYQwZMKqpquvV/PNMtSJb3VGZ/sAIKsZDw"
48
+ src="https://res.cdn.office.net/teams-js/2.56.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-ftygCQXhLMbuUBdLMhfAnIFTGb2SAYYAPD9iyq2LRkbWpKkEifAGD+qPVcPgthO2"
50
50
  crossorigin="anonymous"
51
51
  ></script>
52
52
 
53
53
  <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.55.0/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.56.0/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -52,7 +52,7 @@ export declare function isHostClientMobile(): boolean;
52
52
  export declare function throwExceptionIfMobileApiIsNotSupported(requiredVersion?: string): void;
53
53
  /**
54
54
  * @hidden
55
- * Processes the valid origins specifuied by the user, de-duplicates and converts them into a regexp
55
+ * Processes the valid origins specified by the user, de-duplicates and converts them into a regexp
56
56
  * which is used later for message source/origin validation
57
57
  *
58
58
  * @internal
@@ -80,6 +80,10 @@ export declare const enum ApiName {
80
80
  Chat_OpenGroupChat = "chat.openGroupChat",
81
81
  Clipboard_Read = "clipboard.read",
82
82
  Clipboard_Write = "clipboard.write",
83
+ ContextualSearch_CloseContextualSearch = "contextualSearch.closeContextualSearch",
84
+ ContextualSearch_OpenContextualSearch = "contextualSearch.openContextualSearch",
85
+ ContextualSearch_RegisterCloseContextualSearchHandler = "contextualSearch.registerCloseContextualSearchHandler",
86
+ ContextualSearch_RegisterOpenContextualSearchHandler = "contextualSearch.registerOpenContextualSearchHandler",
83
87
  Conversations_CloseConversation = "conversations.closeConversation",
84
88
  Conversations_GetChatMember = "conversations.getChatMember",
85
89
  Conversations_OpenConversation = "conversations.openConversation",
@@ -1,4 +1,11 @@
1
1
  export declare function prefetchOriginsFromCDN(): Promise<void>;
2
+ /**
3
+ * @internal
4
+ * Limited to Microsoft-internal use
5
+ *
6
+ * Exported so the JSON validation can be unit tested directly.
7
+ */
8
+ export declare function isValidOriginsJSONValid(validOriginsJSON: string): boolean;
2
9
  /**
3
10
  * @internal
4
11
  * Limited to Microsoft-internal use
@@ -0,0 +1,99 @@
1
+ /**
2
+ * @hidden
3
+ * Module to interact with the Teams Contextual Search pane.
4
+ *
5
+ * @internal
6
+ * Limited to Microsoft-internal use
7
+ *
8
+ * @module
9
+ */
10
+ /**
11
+ * Parameters used when opening the contextual search pane.
12
+ *
13
+ * @hidden
14
+ * @internal
15
+ * Limited to Microsoft-internal use
16
+ */
17
+ export interface OpenContextualSearchRequest {
18
+ /**
19
+ * Identifies the entry point that triggered contextual search.
20
+ * This value may be used by the host for telemetry.
21
+ */
22
+ triggerSource?: string;
23
+ }
24
+ /**
25
+ * Handler invoked when the contextual search pane becomes visible.
26
+ *
27
+ * @hidden
28
+ * @internal
29
+ * Limited to Microsoft-internal use
30
+ */
31
+ export type ContextualSearchOpenedHandler = () => void;
32
+ /**
33
+ * Handler invoked when the contextual search pane is closed.
34
+ *
35
+ * @hidden
36
+ * @internal
37
+ * Limited to Microsoft-internal use
38
+ */
39
+ export type ContextualSearchClosedHandler = () => void;
40
+ /**
41
+ * Opens the contextual search pane.
42
+ *
43
+ * The returned promise resolves when the host has processed the request.
44
+ *
45
+ * @param request - Optional parameters for opening contextual search.
46
+ * @returns Promise resolved when the host processes the request.
47
+ *
48
+ * @hidden
49
+ * @internal
50
+ * Limited to Microsoft-internal use
51
+ */
52
+ export declare function openContextualSearch(request?: OpenContextualSearchRequest): Promise<void>;
53
+ /**
54
+ * Closes the contextual search pane.
55
+ *
56
+ * The returned promise resolves when the host has processed the request.
57
+ *
58
+ * @returns Promise resolved when the host processes the request.
59
+ *
60
+ * @hidden
61
+ * @internal
62
+ * Limited to Microsoft-internal use
63
+ */
64
+ export declare function closeContextualSearch(): Promise<void>;
65
+ /**
66
+ * Registers a handler invoked when the contextual search pane becomes visible.
67
+ *
68
+ * This includes pane visibility changes initiated by host entry points such as
69
+ * keyboard shortcuts or autosuggest.
70
+ *
71
+ * @param handler - Handler invoked when contextual search becomes visible.
72
+ *
73
+ * @hidden
74
+ * @internal
75
+ * Limited to Microsoft-internal use
76
+ */
77
+ export declare function registerOnContextualSearchOpenedHandler(handler: ContextualSearchOpenedHandler): void;
78
+ /**
79
+ * Registers a handler invoked when the contextual search pane is closed.
80
+ *
81
+ * @param handler - Handler invoked when contextual search is closed.
82
+ *
83
+ * @hidden
84
+ * @internal
85
+ * Limited to Microsoft-internal use
86
+ */
87
+ export declare function registerOnContextualSearchClosedHandler(handler: ContextualSearchClosedHandler): void;
88
+ /**
89
+ * Checks whether the contextual search capability is supported by the host.
90
+ *
91
+ * @returns Whether contextual search is supported.
92
+ *
93
+ * @throws Error if {@linkcode app.initialize} has not completed successfully.
94
+ *
95
+ * @hidden
96
+ * @internal
97
+ * Limited to Microsoft-internal use
98
+ */
99
+ export declare function isSupported(): boolean;
@@ -1,6 +1,7 @@
1
1
  export * as logs from './logs';
2
2
  export { ChatMembersInformation, FilePreviewParameters, NotificationTypes, ShowNotificationParameters, TeamInstanceParameters, ThreadMember, UserJoinedTeamsInformation, ViewerActionTypes, UserSettingTypes, } from './interfaces';
3
3
  export { sendCustomMessage, sendCustomEvent, registerCustomHandler, uploadCustomApp, registerUserSettingsChangeHandler, openFilePreview, } from './privateAPIs';
4
+ export * as contextualSearch from './contextualSearch';
4
5
  export * as conversations from './conversations';
5
6
  export { ConversationResponse, OpenConversationRequest } from './conversations';
6
7
  export * as copilot from './copilot/copilot';
@@ -155,14 +155,19 @@ export declare function notifyFailure(result?: string): void;
155
155
  export interface LegacyCallBacks {
156
156
  /**
157
157
  * @deprecated
158
- * As of TeamsJS v2.0.0, this property has been deprecated in favor of a Promise-based pattern.
158
+ * As of TeamsJS v2.0.0, this property has been deprecated in favor of the `Promise` returned from
159
+ * {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>}
160
+ * and {@link authentication.getAuthToken authentication.getAuthToken(authTokenRequest: AuthTokenRequestParameters): Promise\<string\>}.
159
161
  *
160
162
  * A function that is called if the request succeeds.
161
163
  */
162
164
  successCallback?: (result: string) => void;
163
165
  /**
164
166
  * @deprecated
165
- * As of TeamsJS v2.0.0, this property has been deprecated in favor of a Promise-based pattern.
167
+ * As of TeamsJS v2.0.0, this property has been deprecated in favor of the `Promise` returned from
168
+ * {@link authentication.authenticate authentication.authenticate(authenticateParameters: AuthenticatePopUpParameters): Promise\<string\>}
169
+ * and {@link authentication.getAuthToken authentication.getAuthToken(authTokenRequest: AuthTokenRequestParameters): Promise\<string\>},
170
+ * which rejects with the reason for the failure.
166
171
  *
167
172
  * A function that is called if the request fails, with the reason for the failure.
168
173
  */
@@ -398,7 +403,8 @@ export declare enum DataResidency {
398
403
  }
399
404
  /**
400
405
  * @deprecated
401
- * As of TeamsJS v2.0.0, this interface has been deprecated in favor of a Promise-based pattern.
406
+ * As of TeamsJS v2.0.0, this interface has been deprecated in favor of the `Promise` returned from
407
+ * {@link authentication.getUser authentication.getUser(): Promise\<UserProfile\>}.
402
408
  * @hidden
403
409
  * Describes the UserRequest. Success callback describes how a successful request is handled.
404
410
  * Failure callback describes how a failed request is handled.
@@ -42,3 +42,12 @@ export declare function setFeatureFlagsState(featureFlags: RuntimeFeatureFlags):
42
42
  * @returns The current state of the runtime feature flags.
43
43
  */
44
44
  export declare function overwriteFeatureFlagsState(newFeatureFlags: Partial<RuntimeFeatureFlags>): RuntimeFeatureFlags;
45
+ /**
46
+ * @hidden
47
+ * @internal
48
+ * Limited to Microsoft-internal use.
49
+ *
50
+ * Restores the runtime feature flags to their default values. This mirrors {@link resetBuildFeatureFlags}
51
+ * and is intended for test teardown so that a flag set by one test cannot leak into later ones.
52
+ */
53
+ export declare function resetFeatureFlagsState(): void;
@@ -12,6 +12,10 @@ export type getLocationCallbackFunctionType = (error: SdkError, location: Locati
12
12
  export type showLocationCallbackFunctionType = (error: SdkError, status: boolean) => void;
13
13
  /**
14
14
  * @deprecated
15
+ * As of 2.1.0, this interface is no longer needed. Instead of setting `allowChooseLocation`, call one of the following functions:
16
+ * - {@link geoLocation.getCurrentLocation geoLocation.getCurrentLocation(): Promise\<geoLocation.Location\>} to get the current location.
17
+ * - {@link geoLocation.map.chooseLocation geoLocation.map.chooseLocation(): Promise\<geoLocation.Location\>} to choose location on map.
18
+ *
15
19
  * Data Structure to set the location properties in getLocation call.
16
20
  */
17
21
  export interface LocationProps {
@@ -31,7 +35,9 @@ export interface LocationProps {
31
35
  }
32
36
  /**
33
37
  * @deprecated
34
- * Data struture to represent the location information
38
+ * As of 2.1.0, please use {@link geoLocation.Location} instead.
39
+ *
40
+ * Data structure to represent the location information
35
41
  */
36
42
  export interface Location {
37
43
  /**
@@ -54,8 +60,8 @@ export interface Location {
54
60
  /**
55
61
  * @deprecated
56
62
  * As of 2.1.0, please use one of the following functions:
57
- * - {@link geoLocation.getCurrentLocation geoLocation.getCurrentLocation(): Promise\<Location\>} to get the current location.
58
- * - {@link geoLocation.map.chooseLocation geoLocation.map.chooseLocation(): Promise\<Location\>} to choose location on map.
63
+ * - {@link geoLocation.getCurrentLocation geoLocation.getCurrentLocation(): Promise\<geoLocation.Location\>} to get the current location.
64
+ * - {@link geoLocation.map.chooseLocation geoLocation.map.chooseLocation(): Promise\<geoLocation.Location\>} to choose location on map.
59
65
  *
60
66
  * Fetches user location
61
67
  * @param props {@link LocationProps} - Specifying how the location request is handled
@@ -64,7 +70,7 @@ export interface Location {
64
70
  export declare function getLocation(props: LocationProps, callback: getLocationCallbackFunctionType): void;
65
71
  /**
66
72
  * @deprecated
67
- * As of 2.1.0, please use {@link geoLocation.map.showLocation geoLocation.map.showLocation(location: Location): Promise\<void\>} instead.
73
+ * As of 2.1.0, please use {@link geoLocation.map.showLocation geoLocation.map.showLocation(location: geoLocation.Location): Promise\<void\>} instead.
68
74
  *
69
75
  * Shows the location on map corresponding to the given coordinates
70
76
  *
@@ -30,6 +30,7 @@ interface IRuntimeV4 extends IBaseRuntime {
30
30
  readonly call?: {};
31
31
  readonly chat?: {};
32
32
  readonly clipboard?: {};
33
+ readonly contextualSearch?: {};
33
34
  readonly conversations?: {};
34
35
  readonly copilot?: {
35
36
  readonly customTelemetry?: {};
@@ -25,46 +25,46 @@ export interface SearchQuery {
25
25
  */
26
26
  export type SearchQueryHandler = (query: SearchQuery) => void;
27
27
  /**
28
- * Allows the caller to register for various events fired by the host search experience.
29
- * Calling this function indicates that your application intends to plug into the host's search box and handle search events,
30
- * when the user is actively using your page/tab.
31
- *
32
- * The host may visually update its search box, e.g. with the name or icon of your application.
33
- *
34
- * Your application should *not* re-render inside of these callbacks, there may be a large number
35
- * of onChangeHandler calls if the user is typing rapidly in the search box.
36
- *
37
- * @param onClosedHandler - This handler will be called when the user exits or cancels their search.
38
- * Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
39
- * will be whatever the last query was before ending search.
40
- *
41
- * @param onExecuteHandler - The handler will be called when the user executes their
42
- * search (by pressing Enter for example). Should be used to display the full list of search results.
43
- * The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
44
- *
45
- * @param onChangeHandler - This optional handler will be called when the user first starts using the
46
- * host's search box and as the user types their query. Can be used to put your application into a
47
- * word-wheeling state or to display suggestions as the user is typing.
48
- *
49
- * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
50
- * with the current contents of the search box.
51
- * @example
52
- * ``` ts
53
- * search.registerHandlers(
54
- query => {
55
- console.log('Update your application to handle the search experience being closed. Last query: ${query.searchTerm}');
56
- },
57
- query => {
58
- console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
59
- },
60
- query => {
61
- console.log(`Update your application with the changed search query: ${query.searchTerm}`);
62
- },
63
- );
64
- * ```
65
- *
66
- * @beta
67
- */
28
+ * Allows the caller to register for various events fired by the host search experience.
29
+ * Calling this function indicates that your application intends to plug into the host's search box and handle search events,
30
+ * when the user is actively using your page/tab.
31
+ *
32
+ * The host may visually update its search box, e.g. with the name or icon of your application.
33
+ *
34
+ * Your application should *not* re-render inside of these callbacks, there may be a large number
35
+ * of onChangeHandler calls if the user is typing rapidly in the search box.
36
+ *
37
+ * @param onClosedHandler - This handler will be called when the user exits or cancels their search.
38
+ * Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
39
+ * will be whatever the last query was before ending search.
40
+ *
41
+ * @param onExecuteHandler - The handler will be called when the user executes their
42
+ * search (by pressing Enter for example). Should be used to display the full list of search results.
43
+ * The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
44
+ *
45
+ * @param onChangeHandler - This optional handler will be called when the user first starts using the
46
+ * host's search box and as the user types their query. Can be used to put your application into a
47
+ * word-wheeling state or to display suggestions as the user is typing.
48
+ *
49
+ * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
50
+ * with the current contents of the search box.
51
+ * @example
52
+ * ``` ts
53
+ * search.registerHandlers(
54
+ * query => {
55
+ * console.log(`Update your application to handle the search experience being closed. Last query: ${query.searchTerm}`);
56
+ * },
57
+ * query => {
58
+ * console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
59
+ * },
60
+ * query => {
61
+ * console.log(`Update your application with the changed search query: ${query.searchTerm}`);
62
+ * },
63
+ * );
64
+ * ```
65
+ *
66
+ * @beta
67
+ */
68
68
  export declare function registerHandlers(onClosedHandler: SearchQueryHandler, onExecuteHandler: SearchQueryHandler, onChangeHandler?: SearchQueryHandler): void;
69
69
  /**
70
70
  * Allows the caller to unregister for all events fired by the host search experience. Calling
@@ -66,15 +66,15 @@ export interface FileResult {
66
66
  */
67
67
  error?: SdkError;
68
68
  /**
69
- * File chunk which will be assemebled and converted into a blob
69
+ * File chunk which will be assembled and converted into a blob
70
70
  */
71
71
  fileChunk: FileChunk;
72
72
  /**
73
- * File index of the file for which chunk data is getting recieved
73
+ * File index of the file for which chunk data is getting received
74
74
  */
75
75
  fileIndex: number;
76
76
  /**
77
- * File type/MIME type which is getting recieved
77
+ * File type/MIME type which is getting received
78
78
  */
79
79
  fileType: string;
80
80
  /**
@@ -29,8 +29,8 @@ export declare class UUID implements ISerializable {
29
29
  }
30
30
  /**
31
31
  * @hidden
32
- * Checks if the incoming id is an instance of ValidatedSafeString
33
- * @param id An object to check if it's an instance of ValidatedSafeString
32
+ * Checks if the incoming id is an instance of UUID
33
+ * @param id An object to check if it's an instance of UUID
34
34
  * @throws Error with a message describing the violation
35
35
  * @internal
36
36
  * Limited to Microsoft-internal use
@@ -1 +1 @@
1
- export{NotificationTypes,UserSettingTypes,ViewerActionTypes}from"./private/interfaces.js";export{openFilePreview,registerCustomHandler,registerUserSettingsChangeHandler,sendCustomEvent,sendCustomMessage,uploadCustomApp}from"./private/privateAPIs.js";import*as e from"./private/externalAppAuthentication.js";export{e as externalAppAuthentication};export{UserAuthenticationState}from"./private/externalAppAuthentication.js";import*as r from"./private/logs.js";export{r as logs};import*as t from"./private/conversations.js";export{t as conversations};import*as o from"./private/copilot/copilot.js";export{o as copilot};import*as p from"./private/copilot/sidePanelInterfaces.js";export{p as sidePanelInterfaces};import*as i from"./private/externalAppAuthenticationForCEA.js";export{i as externalAppAuthenticationForCEA};import*as a from"./private/externalAppCardActions.js";export{a as externalAppCardActions};import*as s from"./private/externalAppCardActionsForCEA.js";export{s as externalAppCardActionsForCEA};import*as m from"./private/externalAppCardActionsForDA.js";export{m as externalAppCardActionsForDA};import*as n from"./private/externalAppCommands.js";export{n as externalAppCommands};import*as l from"./private/files.js";export{l as files};import*as c from"./private/meetingRoom.js";export{c as meetingRoom};import*as f from"./private/messageChannels/messageChannels.js";export{f as messageChannels};import*as u from"./private/nestedAppAuth/nestedAppAuthBridge.js";export{u as nestedAppAuthBridge};import*as x from"./private/notifications.js";export{x as notifications};import*as j from"./private/otherAppStateChange.js";export{j as otherAppStateChange};import*as d from"./private/plugins.js";export{d as plugins};import*as g from"./private/remoteCamera.js";export{g as remoteCamera};import*as b from"./private/appEntity.js";export{b as appEntity};import*as v from"./private/teams/teams.js";export{v as teams};import*as A from"./private/videoEffectsEx.js";export{A as videoEffectsEx};import*as C from"./private/hostEntity/hostEntity.js";export{C as hostEntity};import*as h from"./private/store.js";export{h as store};import*as S from"./private/widgetHosting/widgetHosting.js";export{S as widgetHosting};export{ChannelType,DialogDimension,FrameContexts,HostClientType,HostName,RenderingSurfaces,DialogDimension as TaskModuleDimension,TeamType,UserTeamRole}from"./public/constants.js";export{ActionObjectType,EduType,ErrorCode,FileOpenPreference,SecondaryM365ContentIdName}from"./public/interfaces.js";export{AppId}from"./public/appId.js";export{EmailAddress}from"./public/emailAddress.js";export{activateChildProxyingCommunication,getCurrentFeatureFlagsState,overwriteFeatureFlagsState,setFeatureFlagsState}from"./public/featureFlags.js";export{getAdaptiveCardSchemaVersion}from"./public/adaptiveCards.js";export{ChildAppWindow,ParentAppWindow}from"./public/appWindow.js";export{ValidatedSafeString}from"./public/validatedSafeString.js";export{version}from"./public/version.js";export{enablePrintCapability,executeDeepLink,getContext,getMruTabInstances,getTabInstances,initialize,initializeWithFrameContext,print,registerAppButtonClickHandler,registerAppButtonHoverEnterHandler,registerAppButtonHoverLeaveHandler,registerBackButtonHandler,registerBeforeUnloadHandler,registerChangeSettingsHandler,registerFocusEnterHandler,registerFullScreenHandler,registerOnLoadHandler,registerOnThemeChangeHandler,setFrameContext,shareDeepLink}from"./public/publicAPIs.js";export{navigateBack,navigateCrossDomain,navigateToTab,returnFocus}from"./public/navigation.js";export{UUID}from"./public/uuidObject.js";import*as H from"./public/liveShareHost.js";export{H as liveShare};export{LiveShareHost}from"./public/liveShareHost.js";import*as y from"./public/authentication.js";export{y as authentication};import*as F from"./public/app/app.js";export{F as app};import*as T from"./public/appPerformanceMetrics.js";export{T as appPerformanceMetrics};import*as E from"./public/appInstallDialog.js";export{E as appInstallDialog};import*as w from"./public/barCode.js";export{w as barCode};import*as I from"./public/chat.js";export{I as chat};import*as D from"./public/clipboard.js";export{D as clipboard};import*as P from"./public/dialog/dialog.js";export{P as dialog};import*as B from"./public/nestedAppAuth.js";export{B as nestedAppAuth};import*as k from"./public/geoLocation/geoLocation.js";export{k as geoLocation};import*as L from"./public/pages/pages.js";export{L as pages};import*as M from"./public/menus.js";export{M as menus};import*as U from"./public/media.js";export{U as media};import*as O from"./public/secondaryBrowser.js";export{O as secondaryBrowser};import*as R from"./public/location.js";export{R as location};import*as V from"./public/meeting/meeting.js";export{V as meeting};import*as z from"./public/monetization.js";export{z as monetization};import*as W from"./public/calendar.js";export{W as calendar};import*as N from"./public/mail/mail.js";export{N as mail};import*as q from"./public/teamsAPIs.js";export{q as teamsCore};import*as G from"./public/people.js";export{G as people};import*as J from"./public/profile.js";export{J as profile};import*as K from"./public/videoEffects.js";export{K as videoEffects};import*as Q from"./public/search.js";export{Q as search};import*as X from"./public/sharing/sharing.js";export{X as sharing};import*as Y from"./public/stageView/stageView.js";export{Y as stageView};import*as Z from"./public/visualMedia/visualMedia.js";export{Z as visualMedia};import*as $ from"./public/webStorage.js";export{$ as webStorage};import*as _ from"./public/call.js";export{_ as call};import*as ee from"./public/appInitialization.js";export{ee as appInitialization};import*as re from"./public/thirdPartyCloudStorage.js";export{re as thirdPartyCloudStorage};import*as te from"./public/settings.js";export{te as settings};import*as oe from"./public/tasks.js";export{oe as tasks};import*as pe from"./public/marketplace.js";export{pe as marketplace};import*as ie from"./public/mouseRelay.js";export{ie as mouseRelay};import*as ae from"./public/shortcutRelay.js";export{ae as shortcutRelay};
1
+ export{NotificationTypes,UserSettingTypes,ViewerActionTypes}from"./private/interfaces.js";export{openFilePreview,registerCustomHandler,registerUserSettingsChangeHandler,sendCustomEvent,sendCustomMessage,uploadCustomApp}from"./private/privateAPIs.js";import*as e from"./private/externalAppAuthentication.js";export{e as externalAppAuthentication};export{UserAuthenticationState}from"./private/externalAppAuthentication.js";import*as r from"./private/logs.js";export{r as logs};import*as t from"./private/contextualSearch.js";export{t as contextualSearch};import*as o from"./private/conversations.js";export{o as conversations};import*as p from"./private/copilot/copilot.js";export{p as copilot};import*as i from"./private/copilot/sidePanelInterfaces.js";export{i as sidePanelInterfaces};import*as a from"./private/externalAppAuthenticationForCEA.js";export{a as externalAppAuthenticationForCEA};import*as s from"./private/externalAppCardActions.js";export{s as externalAppCardActions};import*as m from"./private/externalAppCardActionsForCEA.js";export{m as externalAppCardActionsForCEA};import*as n from"./private/externalAppCardActionsForDA.js";export{n as externalAppCardActionsForDA};import*as l from"./private/externalAppCommands.js";export{l as externalAppCommands};import*as c from"./private/files.js";export{c as files};import*as f from"./private/meetingRoom.js";export{f as meetingRoom};import*as u from"./private/messageChannels/messageChannels.js";export{u as messageChannels};import*as x from"./private/nestedAppAuth/nestedAppAuthBridge.js";export{x as nestedAppAuthBridge};import*as j from"./private/notifications.js";export{j as notifications};import*as d from"./private/otherAppStateChange.js";export{d as otherAppStateChange};import*as g from"./private/plugins.js";export{g as plugins};import*as b from"./private/remoteCamera.js";export{b as remoteCamera};import*as v from"./private/appEntity.js";export{v as appEntity};import*as A from"./private/teams/teams.js";export{A as teams};import*as C from"./private/videoEffectsEx.js";export{C as videoEffectsEx};import*as h from"./private/hostEntity/hostEntity.js";export{h as hostEntity};import*as S from"./private/store.js";export{S as store};import*as H from"./private/widgetHosting/widgetHosting.js";export{H as widgetHosting};export{ChannelType,DialogDimension,FrameContexts,HostClientType,HostName,RenderingSurfaces,DialogDimension as TaskModuleDimension,TeamType,UserTeamRole}from"./public/constants.js";export{ActionObjectType,EduType,ErrorCode,FileOpenPreference,SecondaryM365ContentIdName}from"./public/interfaces.js";export{AppId}from"./public/appId.js";export{EmailAddress}from"./public/emailAddress.js";export{activateChildProxyingCommunication,getCurrentFeatureFlagsState,overwriteFeatureFlagsState,setFeatureFlagsState}from"./public/featureFlags.js";export{getAdaptiveCardSchemaVersion}from"./public/adaptiveCards.js";export{ChildAppWindow,ParentAppWindow}from"./public/appWindow.js";export{ValidatedSafeString}from"./public/validatedSafeString.js";export{version}from"./public/version.js";export{enablePrintCapability,executeDeepLink,getContext,getMruTabInstances,getTabInstances,initialize,initializeWithFrameContext,print,registerAppButtonClickHandler,registerAppButtonHoverEnterHandler,registerAppButtonHoverLeaveHandler,registerBackButtonHandler,registerBeforeUnloadHandler,registerChangeSettingsHandler,registerFocusEnterHandler,registerFullScreenHandler,registerOnLoadHandler,registerOnThemeChangeHandler,setFrameContext,shareDeepLink}from"./public/publicAPIs.js";export{navigateBack,navigateCrossDomain,navigateToTab,returnFocus}from"./public/navigation.js";export{UUID}from"./public/uuidObject.js";import*as y from"./public/liveShareHost.js";export{y as liveShare};export{LiveShareHost}from"./public/liveShareHost.js";import*as F from"./public/authentication.js";export{F as authentication};import*as T from"./public/app/app.js";export{T as app};import*as E from"./public/appPerformanceMetrics.js";export{E as appPerformanceMetrics};import*as w from"./public/appInstallDialog.js";export{w as appInstallDialog};import*as I from"./public/barCode.js";export{I as barCode};import*as D from"./public/chat.js";export{D as chat};import*as P from"./public/clipboard.js";export{P as clipboard};import*as B from"./public/dialog/dialog.js";export{B as dialog};import*as k from"./public/nestedAppAuth.js";export{k as nestedAppAuth};import*as L from"./public/geoLocation/geoLocation.js";export{L as geoLocation};import*as M from"./public/pages/pages.js";export{M as pages};import*as U from"./public/menus.js";export{U as menus};import*as O from"./public/media.js";export{O as media};import*as R from"./public/secondaryBrowser.js";export{R as secondaryBrowser};import*as V from"./public/location.js";export{V as location};import*as z from"./public/meeting/meeting.js";export{z as meeting};import*as W from"./public/monetization.js";export{W as monetization};import*as N from"./public/calendar.js";export{N as calendar};import*as q from"./public/mail/mail.js";export{q as mail};import*as G from"./public/teamsAPIs.js";export{G as teamsCore};import*as J from"./public/people.js";export{J as people};import*as K from"./public/profile.js";export{K as profile};import*as Q from"./public/videoEffects.js";export{Q as videoEffects};import*as X from"./public/search.js";export{X as search};import*as Y from"./public/sharing/sharing.js";export{Y as sharing};import*as Z from"./public/stageView/stageView.js";export{Z as stageView};import*as $ from"./public/visualMedia/visualMedia.js";export{$ as visualMedia};import*as _ from"./public/webStorage.js";export{_ as webStorage};import*as ee from"./public/call.js";export{ee as call};import*as re from"./public/appInitialization.js";export{re as appInitialization};import*as te from"./public/thirdPartyCloudStorage.js";export{te as thirdPartyCloudStorage};import*as oe from"./public/settings.js";export{oe as settings};import*as pe from"./public/tasks.js";export{pe as tasks};import*as ie from"./public/marketplace.js";export{ie as marketplace};import*as ae from"./public/mouseRelay.js";export{ae as mouseRelay};import*as se from"./public/shortcutRelay.js";export{se as shortcutRelay};
@@ -1 +1 @@
1
- import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.55.1_tslib@2.8.1_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{ORIGIN_LIST_FETCH_TIMEOUT_IN_MS as t,validOriginsCdnEndpoint as r,validOriginsFallback as n}from"./constants.js";import{GlobalVars as o}from"./globalVars.js";import{getLogger as e}from"./telemetry.js";import{validateHostAgainstPattern as l,createURLVerifier as s}from"./urlPattern.js";import{inServerSideRenderingEnvironment as a,isValidHttpsURL as c}from"./utils.js";let u=[];const d=e("validateOrigin");let f;function g(){return i(this,void 0,void 0,function*(){f||(yield m())})}function p(){return 0===u.length}function m(o=!1){return i(this,void 0,void 0,function*(){if(!p()&&!o)return u;if(f)return f;if(a())return u=n,n;{d("Initiating fetch call to acquire valid origins list from CDN");const i=new AbortController,o=setTimeout(()=>i.abort(),t);return f=fetch(r,{signal:i.signal}).then(i=>{if(clearTimeout(o),!i.ok)throw new Error("Invalid Response from Fetch Call");return d("Fetch call completed and retrieved valid origins list from CDN"),i.json().then(i=>{if(function(i){let t=JSON.parse(i);try{t=JSON.parse(i)}catch(i){return!1}if(!t.validOrigins)return!1;for(const i of t.validOrigins)try{new URL("https://"+i)}catch(t){return d("isValidOriginsFromCDN call failed to validate origin: %s",i),!1}return!0}(JSON.stringify(i)))return u=i.validOrigins,u;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(i=>("AbortError"===i.name?d(`validOrigins fetch call to CDN failed due to Timeout of ${t} ms. Defaulting to fallback list`):d("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",i),u=n,u)),f}})}function h(i,t){let r;try{const t=s(i,d);if(!t)return!1;r=t}catch(i){return!1}return r.test(t)}function v(i,t){const r=p()?n:u;return O(i,r)?Promise.resolve(!0):(d("Origin %s is not in the local valid origins list, fetching from CDN",i),m(t).then(t=>O(i,t)))}function O(i,t){for(const t of o.additionalValidOrigins)if(h(t,i))return!0;const r=i.host;return c(i)?!!t.some(i=>l(i,r))||(d("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",i,t,o.additionalValidOrigins),!1):(d("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",i,i.protocol),!1)}g();export{g as prefetchOriginsFromCDN,v as validateOrigin};
1
+ import{__awaiter as i}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.55.1_tslib@2.8.1_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{ORIGIN_LIST_FETCH_TIMEOUT_IN_MS as t,validOriginsCdnEndpoint as r,validOriginsFallback as n}from"./constants.js";import{GlobalVars as o}from"./globalVars.js";import{getLogger as e}from"./telemetry.js";import{validateHostAgainstPattern as l,createURLVerifier as s}from"./urlPattern.js";import{inServerSideRenderingEnvironment as a,isValidHttpsURL as c}from"./utils.js";let u=[];const f=e("validateOrigin");let d;function g(){return i(this,void 0,void 0,function*(){d||(yield m())})}function p(){return 0===u.length}function m(o=!1){return i(this,void 0,void 0,function*(){if(!p()&&!o)return u;if(d)return d;if(a())return u=n,n;{f("Initiating fetch call to acquire valid origins list from CDN");const i=new AbortController,o=setTimeout(()=>i.abort(),t);return d=fetch(r,{signal:i.signal}).then(i=>{if(clearTimeout(o),!i.ok)throw new Error("Invalid Response from Fetch Call");return f("Fetch call completed and retrieved valid origins list from CDN"),i.json().then(i=>{if(h(JSON.stringify(i)))return u=i.validOrigins,u;throw new Error("Valid origins list retrieved from CDN is invalid")})}).catch(i=>("AbortError"===i.name?f(`validOrigins fetch call to CDN failed due to Timeout of ${t} ms. Defaulting to fallback list`):f("validOrigins fetch call to CDN failed with error: %s. Defaulting to fallback list",i),u=n,u)),d}})}function h(i){let t;try{t=JSON.parse(i)}catch(i){return!1}if(!t||!Array.isArray(t.validOrigins))return!1;for(const i of t.validOrigins){if("string"!=typeof i)return!1;try{new URL("https://"+i)}catch(t){return f("isValidOriginsFromCDN call failed to validate origin: %s",i),!1}}return!0}function v(i,t){let r;try{const t=s(i,f);if(!t)return!1;r=t}catch(i){return!1}return r.test(t)}function b(i,t){const r=p()?n:u;return O(i,r)?Promise.resolve(!0):(f("Origin %s is not in the local valid origins list, fetching from CDN",i),m(t).then(t=>O(i,t)))}function O(i,t){for(const t of o.additionalValidOrigins)if(v(t,i))return!0;const r=i.host;return c(i)?!!t.some(i=>l(i,r))||(f("Origin %s is invalid because it is not an origin approved by this library or included in the call to app.initialize.\nOrigins approved by this library: %o\nOrigins included in app.initialize: %o",i,t,o.additionalValidOrigins),!1):(f("Origin %s is invalid because it is not using https protocol. Protocol being used: %s",i,i.protocol),!1)}g();export{h as isValidOriginsJSONValid,g as prefetchOriginsFromCDN,b as validateOrigin};
@@ -0,0 +1 @@
1
+ import{callFunctionInHost as t}from"../internal/communication.js";import{registerHandlerHelper as e}from"../internal/handlers.js";import{ensureInitialized as n}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{FrameContexts as o,errorNotSupportedOnPlatform as c}from"../public/constants.js";import{runtime as a}from"../public/runtime.js";const l="v1";function u(e){if(n(a,o.content),!m())throw c;const u=[null==e?void 0:e.triggerSource];return t("contextualSearch.openContextualSearch",u,r(l,"contextualSearch.openContextualSearch"))}function i(){if(n(a,o.content),!m())throw c;return t("contextualSearch.closeContextualSearch",[],r(l,"contextualSearch.closeContextualSearch"))}function h(t){e(r(l,"contextualSearch.registerOpenContextualSearchHandler"),"contextualSearchOpened",t,[o.content],()=>{if(!m())throw c})}function s(t){e(r(l,"contextualSearch.registerCloseContextualSearchHandler"),"contextualSearchClosed",t,[o.content],()=>{if(!m())throw c})}function m(){return n(a)&&!!a.supports.contextualSearch}export{i as closeContextualSearch,m as isSupported,u as openContextualSearch,s as registerOnContextualSearchClosedHandler,h as registerOnContextualSearchOpenedHandler};
@@ -1 +1 @@
1
- const n={childProxyingCommunication:!1};function i(){n.childProxyingCommunication=!0}function o(){return n.childProxyingCommunication}let t={disableEnforceOriginMatchForChildResponses:!1};function c(){return t}function r(n){t=n}function e(n){return r(Object.assign(Object.assign({},t),n)),c()}export{i as activateChildProxyingCommunication,c as getCurrentFeatureFlagsState,o as isChildProxyingEnabled,e as overwriteFeatureFlagsState,r as setFeatureFlagsState};
1
+ const n={childProxyingCommunication:!1};function i(){n.childProxyingCommunication=!0}function o(){return n.childProxyingCommunication}let t=Object.assign({},{disableEnforceOriginMatchForChildResponses:!1});function c(){return t}function r(n){t=n}function e(n){return r(Object.assign(Object.assign({},t),n)),c()}export{i as activateChildProxyingCommunication,c as getCurrentFeatureFlagsState,o as isChildProxyingEnabled,e as overwriteFeatureFlagsState,r as setFeatureFlagsState};
@@ -1 +1 @@
1
- const o="2.55.0";export{o as version};
1
+ const o="2.56.0";export{o as version};