@microsoft/teams-js 2.35.0-beta.1 → 2.35.0-beta.2

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 (29) hide show
  1. package/dist/esm/packages/teams-js/dts/internal/{appIdValidation.d.ts → idValidation.d.ts} +12 -1
  2. package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +1 -0
  3. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForDA.d.ts +75 -0
  4. package/dist/esm/packages/teams-js/dts/private/externalAppErrorHandling.d.ts +19 -0
  5. package/dist/esm/packages/teams-js/dts/private/index.d.ts +1 -0
  6. package/dist/esm/packages/teams-js/dts/public/appId.d.ts +6 -11
  7. package/dist/esm/packages/teams-js/dts/public/featureFlags.d.ts +44 -0
  8. package/dist/esm/packages/teams-js/dts/public/index.d.ts +2 -0
  9. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +1 -0
  10. package/dist/esm/packages/teams-js/dts/public/uuidObject.d.ts +15 -1
  11. package/dist/esm/packages/teams-js/dts/public/validatedSafeString.d.ts +25 -0
  12. package/dist/esm/packages/teams-js/src/index.js +1 -1
  13. package/dist/esm/packages/teams-js/src/internal/childCommunication.js +1 -1
  14. package/dist/esm/packages/teams-js/src/internal/idValidation.js +1 -0
  15. package/dist/esm/packages/teams-js/src/private/constants.js +1 -0
  16. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  17. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForDA.js +1 -0
  18. package/dist/esm/packages/teams-js/src/private/externalAppErrorHandling.js +1 -0
  19. package/dist/esm/packages/teams-js/src/public/appId.js +1 -1
  20. package/dist/esm/packages/teams-js/src/public/featureFlags.js +1 -0
  21. package/dist/esm/packages/teams-js/src/public/uuidObject.js +1 -1
  22. package/dist/esm/packages/teams-js/src/public/validatedSafeString.js +1 -0
  23. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  24. package/dist/umd/MicrosoftTeams.js +313 -26
  25. package/dist/umd/MicrosoftTeams.js.map +1 -1
  26. package/dist/umd/MicrosoftTeams.min.js +1 -1
  27. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  28. package/package.json +1 -1
  29. package/dist/esm/packages/teams-js/src/internal/appIdValidation.js +0 -1
@@ -1,4 +1,5 @@
1
1
  import { AppId } from '../public/appId';
2
+ import { ValidatedSafeString } from '../public/validatedSafeString';
2
3
  /**
3
4
  * This function can be used to validate if a string is a "valid" app id.
4
5
  * Valid is a relative term, in this case. Truly valid app ids are UUIDs as documented in the schema:
@@ -10,7 +11,8 @@ import { AppId } from '../public/appId';
10
11
  * @param potentialAppId A string to check if it's a "valid" app id
11
12
  * @throws Error with a message describing the exact validation violation
12
13
  */
13
- export declare function validateStringAsAppId(potentialAppId: string): void;
14
+ export declare function validateStringLength(potentialAppId: string): void;
15
+ export declare function validateSafeContent(potentialAppId: string): void;
14
16
  export declare const minimumValidAppIdLength = 4;
15
17
  export declare const maximumValidAppIdLength = 256;
16
18
  export declare function isStringWithinAppIdLengthLimits(potentialAppId: string): boolean;
@@ -24,3 +26,12 @@ export declare function doesStringContainNonPrintableCharacters(str: string): bo
24
26
  * Limited to Microsoft-internal use
25
27
  */
26
28
  export declare function validateAppIdInstance(potentialAppId: AppId): void;
29
+ /**
30
+ * @hidden
31
+ * Checks if the incoming string is an instance of ValidatedSafeString
32
+ * @param incomingString An object to check if it's an instance of ValidatedSafeString
33
+ * @throws Error with a message describing the violation
34
+ * @internal
35
+ * Limited to Microsoft-internal use
36
+ */
37
+ export declare function validateSafeStringInstance(incomingString: ValidatedSafeString): void;
@@ -109,6 +109,7 @@ export declare const enum ApiName {
109
109
  ExternalAppCardActions_ProcessActionSubmit = "externalAppCardActions.processActionSubmit",
110
110
  ExternalAppCardActionsForCEA_ProcessActionOpenUrl = "externalAppCardActionsForCEA.processActionOpenUrl",
111
111
  ExternalAppCardActionsForCEA_ProcessActionSubmit = "externalAppCardActionsForCEA.processActionSubmit",
112
+ ExternalAppCardActionsForDA_ProcessActionOpenUrlDialog = "externalAppCardActionsForDA.processActionOpenUrlDialog",
112
113
  ExternalAppCommands_ProcessActionCommands = "externalAppCommands.processActionCommand",
113
114
  Files_AddCloudStorageFolder = "files.addCloudStorageFolder",
114
115
  Files_AddCloudStorageProvider = "files.addCloudStorageProvider",
@@ -0,0 +1,75 @@
1
+ /**
2
+ * @beta
3
+ * @hidden
4
+ * Module to delegate adaptive card action for Declarative Agents execution to the host
5
+ * @internal
6
+ * Limited to Microsoft-internal use
7
+ * @module
8
+ */
9
+ import { DialogSize } from '../public';
10
+ import { AppId } from '../public';
11
+ import { ISerializable } from '../public/serializable.interface';
12
+ import { UUID } from '../public/uuidObject';
13
+ /**
14
+ * @beta
15
+ * @hidden
16
+ * Base interface for Dialog Information.
17
+ * @internal
18
+ * Limited to Microsoft-internal use
19
+ *
20
+ * @param title The title of the dialog.
21
+ * @param size The size of the dialog.
22
+ */
23
+ export interface IDialogActionBase {
24
+ title: string;
25
+ size: DialogSize;
26
+ }
27
+ /**
28
+ * @beta
29
+ * @hidden
30
+ * Interface to define the Dialog info for Adaptive Card Action.OpenUrlDialog request.
31
+ * @internal
32
+ * Limited to Microsoft-internal use
33
+ *
34
+ * @param url The URL to open in the dialog.
35
+ */
36
+ export interface IActionOpenUrlDialogInfo extends IDialogActionBase {
37
+ url: URL;
38
+ }
39
+ /**
40
+ * @beta
41
+ * @hidden
42
+ * Delegates an Adaptive Card Action.OpenUrlDialog request to the host for the application with the provided app ID
43
+ * @internal
44
+ * Limited to Microsoft-internal use
45
+ * @param appId ID of the application the request is intended for. This must be a UUID
46
+ * @param actionOpenUrlDialogInfo Information required to open the URL dialog
47
+ * @param traceId The trace identifier used for monitoring and live site investigations
48
+ * @returns Promise that resolves when the request is completed and rejects with ExternalAppError if the request fails
49
+ */
50
+ export declare function processActionOpenUrlDialog(appId: AppId, actionOpenUrlDialogInfo: IActionOpenUrlDialogInfo, traceId: UUID): Promise<void>;
51
+ /**
52
+ * @beta
53
+ * @hidden
54
+ * Checks if the externalAppCardActions capability is supported by the host
55
+ * @returns boolean to represent whether externalAppCardActions capability is supported
56
+ *
57
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
58
+ *
59
+ * @internal
60
+ * Limited to Microsoft-internal use
61
+ */
62
+ export declare function isSupported(): boolean;
63
+ /**
64
+ * @beta
65
+ * @hidden
66
+ * Serializable class for ActionOpenUrlDialogInfo to send info to the host
67
+ *
68
+ * @internal
69
+ * Limited to Microsoft-internal use
70
+ */
71
+ export declare class SerializableActionOpenUrlDialogInfo implements ISerializable {
72
+ private info;
73
+ constructor(info: IActionOpenUrlDialogInfo);
74
+ serialize(): object;
75
+ }
@@ -0,0 +1,19 @@
1
+ import { ExternalAppErrorCode } from './constants';
2
+ /**
3
+ * @hidden
4
+ * Error object that can be thrown from externalAppCommands, externalAppCardCommands and other external app APIs
5
+ * @internal
6
+ * Limited to Microsoft-internal use
7
+ */
8
+ export interface ExternalAppError {
9
+ errorCode: ExternalAppErrorCode;
10
+ message?: string;
11
+ }
12
+ /**
13
+ * @hidden
14
+ * Determines if the provided error object is an instance of ExternalAppError
15
+ * @internal
16
+ * Limited to Microsoft-internal use
17
+ * @param err The error object to check whether it is of ExternalAppError type
18
+ */
19
+ export declare function isExternalAppError(err: unknown): err is ExternalAppError;
@@ -8,6 +8,7 @@ export * as externalAppAuthentication from './externalAppAuthentication';
8
8
  export * as externalAppAuthenticationForCEA from './externalAppAuthenticationForCEA';
9
9
  export * as externalAppCardActions from './externalAppCardActions';
10
10
  export * as externalAppCardActionsForCEA from './externalAppCardActionsForCEA';
11
+ export * as externalAppCardActionsForDA from './externalAppCardActionsForDA';
11
12
  export * as externalAppCommands from './externalAppCommands';
12
13
  export * as files from './files';
13
14
  export * as meetingRoom from './meetingRoom';
@@ -1,4 +1,4 @@
1
- import { ISerializable } from './serializable.interface';
1
+ import { ValidatedSafeString } from './validatedSafeString';
2
2
  /**
3
3
  * A strongly-typed class used to represent a "valid" app id.
4
4
  *
@@ -10,8 +10,7 @@ import { ISerializable } from './serializable.interface';
10
10
  * for script tags, length, and non-printable characters. Validation will be updated in the future to ensure
11
11
  * the app id is a valid UUID as legacy apps update.
12
12
  */
13
- export declare class AppId implements ISerializable {
14
- private readonly appIdAsString;
13
+ export declare class AppId extends ValidatedSafeString {
15
14
  /**
16
15
  * Creates a strongly-typed AppId from a string
17
16
  *
@@ -20,14 +19,10 @@ export declare class AppId implements ISerializable {
20
19
  */
21
20
  constructor(appIdAsString: string);
22
21
  /**
23
- * @hidden
24
- * @internal
22
+ * Returns a JSON representation of the AppId object
23
+ * @returns A JSON representation of the AppId object
25
24
  *
26
- * @returns A serializable representation of an AppId, used for passing AppIds to the host.
25
+ * note: this method maintains backward compatibility for JSON serialization
27
26
  */
28
- serialize(): object | string;
29
- /**
30
- * Returns the app id as a string
31
- */
32
- toString(): string;
27
+ toJSON(): object;
33
28
  }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * This function enables child proxying communication for apps that still needs it.
3
+ *
4
+ * @deprecated Child proxying is considered an insecure feature and will be removed in future releases.
5
+ */
6
+ export declare function activateChildProxyingCommunication(): void;
7
+ /**
8
+ * @hidden
9
+ * @internal
10
+ * Limited to Microsoft-internal use.
11
+ */
12
+ export declare function isChildProxyingEnabled(): boolean;
13
+ /**
14
+ * @hidden
15
+ * @internal
16
+ * Limited to Microsoft-internal use.
17
+ */
18
+ export declare function resetBuildFeatureFlags(): void;
19
+ /**
20
+ * Feature flags to activate or deactivate certain features at runtime for an app.
21
+ */
22
+ export interface RuntimeFeatureFlags {
23
+ /**
24
+ * Disables origin validation for responses to child windows. When enabled, this flag bypasses security checks that verify the origin of child window that receives the response.
25
+ *
26
+ * Default: false
27
+ */
28
+ disableEnforceOriginMatchForChildResponses: boolean;
29
+ }
30
+ /**
31
+ * @returns The current state of the runtime feature flags.
32
+ */
33
+ export declare function getCurrentFeatureFlagsState(): RuntimeFeatureFlags;
34
+ /**
35
+ * It sets the runtime feature flags to the new feature flags provided.
36
+ * @param featureFlags The new feature flags to set.
37
+ */
38
+ export declare function setFeatureFlagsState(featureFlags: RuntimeFeatureFlags): void;
39
+ /**
40
+ * It overwrites all the feature flags in the runtime feature flags object with the new feature flags provided.
41
+ * @param newFeatureFlags The new feature flags to set.
42
+ * @returns The current state of the runtime feature flags.
43
+ */
44
+ export declare function overwriteFeatureFlagsState(newFeatureFlags: Partial<RuntimeFeatureFlags>): RuntimeFeatureFlags;
@@ -10,6 +10,7 @@ export * as chat from './chat';
10
10
  export { OpenGroupChatRequest, OpenSingleChatRequest } from './chat';
11
11
  export * as clipboard from './clipboard';
12
12
  export * as dialog from './dialog/dialog';
13
+ export { activateChildProxyingCommunication, getCurrentFeatureFlagsState, overwriteFeatureFlagsState, RuntimeFeatureFlags, setFeatureFlagsState, } from './featureFlags';
13
14
  export * as nestedAppAuth from './nestedAppAuth';
14
15
  export * as geoLocation from './geoLocation/geoLocation';
15
16
  export { getAdaptiveCardSchemaVersion } from './adaptiveCards';
@@ -30,6 +31,7 @@ export * as videoEffects from './videoEffects';
30
31
  export * as search from './search';
31
32
  export * as sharing from './sharing/sharing';
32
33
  export * as stageView from './stageView/stageView';
34
+ export { ValidatedSafeString } from './validatedSafeString';
33
35
  export { version } from './version';
34
36
  export * as visualMedia from './visualMedia/visualMedia';
35
37
  export * as webStorage from './webStorage';
@@ -46,6 +46,7 @@ interface IRuntimeV4 extends IBaseRuntime {
46
46
  readonly externalAppAuthenticationForCEA?: {};
47
47
  readonly externalAppCardActions?: {};
48
48
  readonly externalAppCardActionsForCEA?: {};
49
+ readonly externalAppCardActionsForDA?: {};
49
50
  readonly externalAppCommands?: {};
50
51
  readonly geoLocation?: {
51
52
  readonly map?: {};
@@ -1,3 +1,4 @@
1
+ import { ISerializable } from './serializable.interface';
1
2
  /**
2
3
  * @internal
3
4
  * Limited to Microsoft-internal use
@@ -5,7 +6,7 @@
5
6
  * Represents a UUID (Universally Unique Identifier) object.
6
7
  * This class provides a way to generate, validate, and represent UUIDs as strings.
7
8
  */
8
- export declare class UUID {
9
+ export declare class UUID implements ISerializable {
9
10
  private readonly uuid;
10
11
  /**
11
12
  * Creates an instance of the UUID class.
@@ -21,4 +22,17 @@ export declare class UUID {
21
22
  * @returns {string} - The UUID string.
22
23
  */
23
24
  toString(): string;
25
+ /**
26
+ * @returns A serializable representation of an uuid, used for passing uuids to the host.
27
+ */
28
+ serialize(): object | string;
24
29
  }
30
+ /**
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
34
+ * @throws Error with a message describing the violation
35
+ * @internal
36
+ * Limited to Microsoft-internal use
37
+ */
38
+ export declare function validateUuidInstance(id: UUID): void;
@@ -0,0 +1,25 @@
1
+ import { ISerializable } from './serializable.interface';
2
+ /**
3
+ * A strongly typed class used to represent a "valid" string id.
4
+ */
5
+ export declare class ValidatedSafeString implements ISerializable {
6
+ private readonly idAsString;
7
+ /**
8
+ * Creates a strongly-typed Id from a string
9
+ *
10
+ * @param idAsString An id represented as a string
11
+ * @throws Error with a message describing the exact validation violation
12
+ */
13
+ constructor(idAsString: string);
14
+ /**
15
+ * @hidden
16
+ * @internal
17
+ *
18
+ * @returns A serializable representation of an AppId, used for passing AppIds to the host.
19
+ */
20
+ serialize(): object | string;
21
+ /**
22
+ * Returns the app id as a string
23
+ */
24
+ toString(): string;
25
+ }
@@ -1 +1 @@
1
- export{NotificationTypes,UserSettingTypes,ViewerActionTypes}from"./private/interfaces.js";export{openFilePreview,registerCustomHandler,registerUserSettingsChangeHandler,sendCustomEvent,sendCustomMessage,uploadCustomApp}from"./private/privateAPIs.js";import*as r from"./private/logs.js";export{r as logs};import*as e from"./private/conversations.js";export{e as conversations};import*as o from"./private/copilot/copilot.js";export{o as copilot};import*as t from"./private/externalAppAuthentication.js";export{t as externalAppAuthentication};import*as p from"./private/externalAppAuthenticationForCEA.js";export{p as externalAppAuthenticationForCEA};import*as i from"./private/externalAppCardActions.js";export{i as externalAppCardActions};import*as s from"./private/externalAppCardActionsForCEA.js";export{s as externalAppCardActionsForCEA};import*as a from"./private/externalAppCommands.js";export{a as externalAppCommands};import*as m from"./private/files.js";export{m as files};import*as n from"./private/meetingRoom.js";export{n as meetingRoom};import*as l from"./private/messageChannels/messageChannels.js";export{l as messageChannels};import*as c from"./private/notifications.js";export{c as notifications};import*as f from"./private/otherAppStateChange.js";export{f as otherAppStateChange};import*as x from"./private/remoteCamera.js";export{x as remoteCamera};import*as u from"./private/appEntity.js";export{u as appEntity};import*as j from"./private/teams/teams.js";export{j as teams};import*as b from"./private/videoEffectsEx.js";export{b as videoEffectsEx};import*as d from"./private/hostEntity/hostEntity.js";export{d as hostEntity};import*as g from"./private/store.js";export{g as store};export{ChannelType,DialogDimension,FrameContexts,HostClientType,HostName,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{getAdaptiveCardSchemaVersion}from"./public/adaptiveCards.js";export{ChildAppWindow,ParentAppWindow}from"./public/appWindow.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 v from"./public/liveShareHost.js";export{v as liveShare};export{LiveShareHost}from"./public/liveShareHost.js";import*as C from"./public/authentication.js";export{C as authentication};import*as A from"./public/app/app.js";export{A as app};import*as h from"./public/appInstallDialog.js";export{h as appInstallDialog};import*as H from"./public/barCode.js";export{H as barCode};import*as T from"./public/chat.js";export{T as chat};import*as y from"./public/clipboard.js";export{y as clipboard};import*as E from"./public/dialog/dialog.js";export{E as dialog};import*as S from"./public/nestedAppAuth.js";export{S as nestedAppAuth};import*as I from"./public/geoLocation/geoLocation.js";export{I as geoLocation};import*as D from"./public/pages/pages.js";export{D as pages};import*as F from"./public/menus.js";export{F as menus};import*as w from"./public/media.js";export{w as media};import*as k from"./public/secondaryBrowser.js";export{k as secondaryBrowser};import*as B from"./public/location.js";export{B as location};import*as P from"./public/meeting/meeting.js";export{P as meeting};import*as L from"./public/monetization.js";export{L as monetization};import*as M from"./public/calendar.js";export{M as calendar};import*as U from"./public/mail/mail.js";export{U as mail};import*as O from"./public/teamsAPIs.js";export{O as teamsCore};import*as z from"./public/people.js";export{z as people};import*as V from"./public/profile.js";export{V as profile};import*as W from"./public/videoEffects.js";export{W as videoEffects};import*as N from"./public/search.js";export{N as search};import*as R from"./public/sharing/sharing.js";export{R as sharing};import*as q from"./public/stageView/stageView.js";export{q as stageView};import*as G from"./public/visualMedia/visualMedia.js";export{G as visualMedia};import*as J from"./public/webStorage.js";export{J as webStorage};import*as K from"./public/call.js";export{K as call};import*as Q from"./public/appInitialization.js";export{Q as appInitialization};import*as X from"./public/thirdPartyCloudStorage.js";export{X as thirdPartyCloudStorage};import*as Y from"./public/settings.js";export{Y as settings};import*as Z from"./public/tasks.js";export{Z as tasks};import*as $ from"./public/marketplace.js";export{$ as marketplace};
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/logs.js";export{e as logs};import*as r from"./private/conversations.js";export{r as conversations};import*as t from"./private/copilot/copilot.js";export{t as copilot};import*as o from"./private/externalAppAuthentication.js";export{o as externalAppAuthentication};import*as p from"./private/externalAppAuthenticationForCEA.js";export{p as externalAppAuthenticationForCEA};import*as i from"./private/externalAppCardActions.js";export{i as externalAppCardActions};import*as a from"./private/externalAppCardActionsForCEA.js";export{a as externalAppCardActionsForCEA};import*as s from"./private/externalAppCardActionsForDA.js";export{s as externalAppCardActionsForDA};import*as m from"./private/externalAppCommands.js";export{m as externalAppCommands};import*as n from"./private/files.js";export{n as files};import*as l from"./private/meetingRoom.js";export{l as meetingRoom};import*as c from"./private/messageChannels/messageChannels.js";export{c as messageChannels};import*as f from"./private/notifications.js";export{f as notifications};import*as x from"./private/otherAppStateChange.js";export{x as otherAppStateChange};import*as u from"./private/remoteCamera.js";export{u as remoteCamera};import*as j from"./private/appEntity.js";export{j as appEntity};import*as d from"./private/teams/teams.js";export{d as teams};import*as b from"./private/videoEffectsEx.js";export{b as videoEffectsEx};import*as g from"./private/hostEntity/hostEntity.js";export{g as hostEntity};import*as v from"./private/store.js";export{v as store};export{ChannelType,DialogDimension,FrameContexts,HostClientType,HostName,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 C from"./public/liveShareHost.js";export{C as liveShare};export{LiveShareHost}from"./public/liveShareHost.js";import*as A from"./public/authentication.js";export{A as authentication};import*as h from"./public/app/app.js";export{h as app};import*as S from"./public/appInstallDialog.js";export{S as appInstallDialog};import*as H from"./public/barCode.js";export{H as barCode};import*as F from"./public/chat.js";export{F as chat};import*as y from"./public/clipboard.js";export{y as clipboard};import*as T from"./public/dialog/dialog.js";export{T as dialog};import*as E from"./public/nestedAppAuth.js";export{E as nestedAppAuth};import*as D from"./public/geoLocation/geoLocation.js";export{D as geoLocation};import*as I from"./public/pages/pages.js";export{I as pages};import*as w from"./public/menus.js";export{w as menus};import*as P from"./public/media.js";export{P as media};import*as k from"./public/secondaryBrowser.js";export{k as secondaryBrowser};import*as B from"./public/location.js";export{B as location};import*as L from"./public/meeting/meeting.js";export{L as meeting};import*as M from"./public/monetization.js";export{M as monetization};import*as U from"./public/calendar.js";export{U as calendar};import*as O from"./public/mail/mail.js";export{O as mail};import*as V from"./public/teamsAPIs.js";export{V as teamsCore};import*as z from"./public/people.js";export{z as people};import*as W from"./public/profile.js";export{W as profile};import*as N from"./public/videoEffects.js";export{N as videoEffects};import*as R from"./public/search.js";export{R as search};import*as q from"./public/sharing/sharing.js";export{q as sharing};import*as G from"./public/stageView/stageView.js";export{G as stageView};import*as J from"./public/visualMedia/visualMedia.js";export{J as visualMedia};import*as K from"./public/webStorage.js";export{K as webStorage};import*as Q from"./public/call.js";export{Q as call};import*as X from"./public/appInitialization.js";export{X as appInitialization};import*as Y from"./public/thirdPartyCloudStorage.js";export{Y as thirdPartyCloudStorage};import*as Z from"./public/settings.js";export{Z as settings};import*as $ from"./public/tasks.js";export{$ as tasks};import*as _ from"./public/marketplace.js";export{_ as marketplace};
@@ -1 +1 @@
1
- import{__awaiter as n}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{flushMessageQueue as i,getMessageIdsAsLogString as o}from"./communicationUtils.js";import{callHandler as s}from"./handlers.js";import{deserializeMessageRequest as e,serializeMessageResponse as r}from"./messageObjects.js";import{getLogger as t,getApiVersionTag as d}from"./telemetry.js";const u=t("childProxyingCommunication");class a{}function c(){a.window=null,a.origin=null,a.messageQueue=[]}function l(){return!!a.window}function g(n,i){return a.window&&!a.window.closed&&n!==a.window||(a.window=n,a.origin=i),a.window&&a.window.closed?(a.window=null,a.origin=null,!1):a.window===n}function m(r,t,u,c){return n(this,void 0,void 0,(function*(){a.window===t&&(i(a.window,a.origin,a.messageQueue,"child"),function(n,i,r){if(void 0===n.data.id||void 0===n.data.func)return;const t=e(n.data),[u,c]=s(t.func,t.args);if(u&&void 0!==c)return w("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",o(t),t.func),void f(t.id,t.uuid,Array.isArray(c)?c:[c]);w("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",o(t),t.func),function(n,i,s){const e=i(d("v2","tasks.startTask"),n.func,n.args,!0);s(e.uuid,((...i)=>{if(a.window){const s=i.pop();w("Message from parent being relayed to child, id: %s",o(n)),f(n.id,n.uuid,i,s)}}))}(t,i,r)}(r,u,c))}))}a.messageQueue=[];const w=u.extend("handleIncomingMessageFromChild");function f(n,i,s,e){const t=a.window,d=function(n,i,o,s){return{id:n,uuid:i,args:o||[],isPartialResponse:s}}(n,i,s,e),u=r(d),c=a.origin;t&&c&&(w("Sending message %s to %s via postMessage, args = %o",o(u),"child",u.args),t.postMessage(u,c))}function p(n,i){const o=a.window,s=function(n,i){return{func:n,args:i||[]}}(n,i),e=a.origin;o&&e?o.postMessage(s,e):a.messageQueue.push(s)}export{m as handleIncomingMessageFromChild,p as sendMessageEventToChild,l as shouldEventBeRelayedToChild,g as shouldProcessChildMessage,c as uninitializeChildCommunication};
1
+ import{__awaiter as n}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{isChildProxyingEnabled as i,getCurrentFeatureFlagsState as o}from"../public/featureFlags.js";import{flushMessageQueue as e,getMessageIdsAsLogString as s}from"./communicationUtils.js";import{callHandler as r}from"./handlers.js";import{deserializeMessageRequest as t,serializeMessageResponse as d}from"./messageObjects.js";import{getLogger as a,getApiVersionTag as u}from"./telemetry.js";const c=a("childProxyingCommunication");class l{}function g(){l.window=null,l.origin=null,l.messageQueue=[]}function f(){return!!i()&&!!l.window}function m(n,o){return!!i()&&(l.window&&!l.window.closed&&n!==l.window||(l.window=n,l.origin=o),l.window&&l.window.closed?(l.window=null,l.origin=null,!1):l.window===n)}function w(i,d,a,c){return n(this,void 0,void 0,(function*(){l.window===d&&(e(l.window,l.origin,l.messageQueue,"child"),function(n,i,e){if(void 0===n.data.id||void 0===n.data.func)return;const d=t(n.data),[a,c]=r(d.func,d.args);if(a&&void 0!==c)return p("Handler called in response to message %s from child. Returning response from handler to child, action: %s.",s(d),d.func),void h(d.id,d.uuid,Array.isArray(c)?c:[c]);p("No handler for message %s from child found; relaying message on to parent, action: %s. Relayed message will have a new id.",s(d),d.func),function(n,i,e){const r=i(u("v2","tasks.startTask"),n.func,n.args,!0),t=l.origin;e(r.uuid,((...i)=>{if(!l.window)return;if(!o().disableEnforceOriginMatchForChildResponses&&t!==l.origin)return void p("Origin of child window has changed, not sending response back to child window");const e=i.pop();p("Message from parent being relayed to child, id: %s",s(n)),h(n.id,n.uuid,i,e)}))}(d,i,e)}(i,a,c))}))}l.messageQueue=[];const p=c.extend("handleIncomingMessageFromChild");function h(n,i,o,e){const r=l.window,t=function(n,i,o,e){return{id:n,uuid:i,args:o||[],isPartialResponse:e}}(n,i,o,e),a=d(t),u=l.origin;r&&u&&(p("Sending message %s to %s via postMessage, args = %o",s(a),"child",a.args),r.postMessage(a,u))}function v(n,i){const o=l.window,e=function(n,i){return{func:n,args:i||[]}}(n,i),s=l.origin;o&&s?o.postMessage(e,s):l.messageQueue.push(e)}export{w as handleIncomingMessageFromChild,v as sendMessageEventToChild,f as shouldEventBeRelayedToChild,m as shouldProcessChildMessage,g as uninitializeChildCommunication};
@@ -0,0 +1 @@
1
+ import{AppId as i}from"../public/appId.js";import{hasScriptTags as t}from"./utils.js";function n(i){if(!e(i))throw new Error(`Potential app id (${i}) is invalid; its length ${i.length} is not within the length limits (${r}-${a}).`)}function o(i){if(t(i))throw new Error(`Potential app id (${i}) is invalid; it contains script tags.`);if(s(i))throw new Error(`Potential app id (${i}) is invalid; it contains non-printable characters.`)}const r=4,a=256;function e(i){return i.length<a&&i.length>r}function s(i){return[...i].some((i=>{const t=i.charCodeAt(0);return t<32||t>126}))}function l(t){if(!(t instanceof i))throw new Error(`Potential app id (${t}) is invalid; it is not an instance of AppId class.`)}export{s as doesStringContainNonPrintableCharacters,e as isStringWithinAppIdLengthLimits,a as maximumValidAppIdLength,r as minimumValidAppIdLength,l as validateAppIdInstance,o as validateSafeContent,n as validateStringLength};
@@ -0,0 +1 @@
1
+ var R;!function(R){R.INTERNAL_ERROR="INTERNAL_ERROR"}(R||(R={}));export{R as ExternalAppErrorCode};
@@ -1 +1 @@
1
- import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{validateAppIdInstance as n}from"../internal/appIdValidation.js";import{callFunctionInHost as e,callFunctionInHostAndHandleResponse as i}from"../internal/communication.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{validateId as a}from"../internal/utils.js";import{FrameContexts as u,errorNotSupportedOnPlatform as c}from"../public/constants.js";import{runtime as p}from"../public/runtime.js";import{validateActionExecuteInvokeRequest as h,ActionExecuteResponseHandler as s,SerializableActionExecuteInvokeRequest as l,isInvokeError as A}from"./externalAppAuthentication.js";const m="v2";function d(n,i,a){return t(this,void 0,void 0,(function*(){if(o(p,u.content),!v())throw c;return w(n,i),e("externalAppAuthenticationForCEA.authenticateWithSSO",[n,i,a.authId,a.connectionName,a.claims,a.silent],r(m,"externalAppAuthenticationForCEA.authenticateWithSSO"),A)}))}function f(n,i,a){return t(this,void 0,void 0,(function*(){if(o(p,u.content),!v())throw c;return w(n,i),e("externalAppAuthenticationForCEA.authenticateWithOauth",[n,i,a.url.href,a.width,a.height,a.isExternal],r(m,"externalAppAuthenticationForCEA.authenticateWithOauth"),A)}))}function x(n,e,a,d){return t(this,void 0,void 0,(function*(){if(o(p,u.content),!v())throw c;return w(n,e),h(d),i("externalAppAuthenticationForCEA.authenticateAndResendRequest",[n,e,new l(d),a.url.href,a.width,a.height,a.isExternal],new s,r(m,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),A)}))}function E(n,e,a,d){return t(this,void 0,void 0,(function*(){if(o(p,u.content),!v())throw c;return w(n,e),h(d),i("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[n,e,new l(d),a.authId,a.connectionName,a.claims,a.silent],new s,r(m,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),A)}))}function v(){return!(!o(p)||!p.supports.externalAppAuthenticationForCEA)}function w(t,e){a(e,new Error("conversation id is not valid.")),n(t)}export{x as authenticateAndResendRequest,f as authenticateWithOauth,d as authenticateWithSSO,E as authenticateWithSSOAndResendRequest,v as isSupported,w as validateInput};
1
+ import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHost as n,callFunctionInHostAndHandleResponse as e}from"../internal/communication.js";import{validateAppIdInstance as i}from"../internal/idValidation.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as r}from"../internal/telemetry.js";import{validateId as a}from"../internal/utils.js";import{FrameContexts as u,errorNotSupportedOnPlatform as c}from"../public/constants.js";import{runtime as h}from"../public/runtime.js";import{validateActionExecuteInvokeRequest as s,ActionExecuteResponseHandler as p,SerializableActionExecuteInvokeRequest as l,isInvokeError as A}from"./externalAppAuthentication.js";const m="v2";function d(e,i,a){return t(this,void 0,void 0,(function*(){if(o(h,u.content),!v())throw c;return w(e,i),n("externalAppAuthenticationForCEA.authenticateWithSSO",[e,i,a.authId,a.connectionName,a.claims,a.silent],r(m,"externalAppAuthenticationForCEA.authenticateWithSSO"),A)}))}function f(e,i,a){return t(this,void 0,void 0,(function*(){if(o(h,u.content),!v())throw c;return w(e,i),n("externalAppAuthenticationForCEA.authenticateWithOauth",[e,i,a.url.href,a.width,a.height,a.isExternal],r(m,"externalAppAuthenticationForCEA.authenticateWithOauth"),A)}))}function x(n,i,a,d){return t(this,void 0,void 0,(function*(){if(o(h,u.content),!v())throw c;return w(n,i),s(d),e("externalAppAuthenticationForCEA.authenticateAndResendRequest",[n,i,new l(d),a.url.href,a.width,a.height,a.isExternal],new p,r(m,"externalAppAuthenticationForCEA.authenticateAndResendRequest"),A)}))}function E(n,i,a,d){return t(this,void 0,void 0,(function*(){if(o(h,u.content),!v())throw c;return w(n,i),s(d),e("externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest",[n,i,new l(d),a.authId,a.connectionName,a.claims,a.silent],new p,r(m,"externalAppAuthenticationForCEA.authenticateWithSSOAndResendRequest"),A)}))}function v(){return!(!o(h)||!h.supports.externalAppAuthenticationForCEA)}function w(t,n){a(n,new Error("conversation id is not valid.")),i(t)}export{x as authenticateAndResendRequest,f as authenticateWithOauth,d as authenticateWithSSO,E as authenticateWithSSOAndResendRequest,v as isSupported,w as validateInput};
@@ -0,0 +1 @@
1
+ import{__awaiter as r}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHost as t}from"../internal/communication.js";import{validateAppIdInstance as i}from"../internal/idValidation.js";import{ensureInitialized as o}from"../internal/internalAPIs.js";import{getApiVersionTag as n}from"../internal/telemetry.js";import{FrameContexts as e,errorNotSupportedOnPlatform as s}from"../public/constants.js";import{runtime as p}from"../public/runtime.js";import{validateUuidInstance as l}from"../public/uuidObject.js";import{isExternalAppError as c}from"./externalAppErrorHandling.js";function m(m,f,d){return r(this,void 0,void 0,(function*(){if(o(p,e.content),!u())throw s;return function(r,t){i(r),l(t)}(m,d),t("externalAppCardActionsForDA.processActionOpenUrlDialog",[m,new a(f),d],n("v2","externalAppCardActionsForDA.processActionOpenUrlDialog"),c)}))}function u(){return!(!o(p)||!p.supports.externalAppCardActionsForDA)}class a{constructor(r){this.info=r}serialize(){const{url:r,title:t,size:i}=this.info;return{url:r.href,title:t,size:i}}}export{a as SerializableActionOpenUrlDialogInfo,u as isSupported,m as processActionOpenUrlDialog};
@@ -0,0 +1 @@
1
+ import{ExternalAppErrorCode as e}from"./constants.js";function t(t){if("object"!=typeof t||null===t)return!1;const o=t;return Object.values(e).includes(o.errorCode)&&(void 0===o.message||"string"==typeof o.message)}export{t as isExternalAppError};
@@ -1 +1 @@
1
- import{validateStringAsAppId as t}from"../internal/appIdValidation.js";class r{constructor(r){this.appIdAsString=r,t(r)}serialize(){return this.toString()}toString(){return this.appIdAsString}}export{r as AppId};
1
+ import{validateStringLength as t}from"../internal/idValidation.js";import{ValidatedSafeString as r}from"./validatedSafeString.js";class i extends r{constructor(r){super(r),t(r)}toJSON(){return{appIdAsString:this.toString()}}}export{i as AppId};
@@ -0,0 +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 +1 @@
1
- import{validateUuid as t,generateGUID as r}from"../internal/utils.js";class i{constructor(i=r()){this.uuid=i,t(i)}toString(){return this.uuid}}export{i as UUID};
1
+ import{validateUuid as i,generateGUID as t}from"../internal/utils.js";class n{constructor(n=t()){this.uuid=n,i(n)}toString(){return this.uuid}serialize(){return this.toString()}}function r(i){if(!(i instanceof n))throw new Error(`Potential id (${JSON.stringify(i)}) is invalid; it is not an instance of UUID class.`)}export{n as UUID,r as validateUuidInstance};
@@ -0,0 +1 @@
1
+ import{validateSafeContent as t}from"../internal/idValidation.js";class i{constructor(i){this.idAsString=i,t(i)}serialize(){return this.toString()}toString(){return this.idAsString}}export{i as ValidatedSafeString};
@@ -1 +1 @@
1
- const t="2.35.0-beta.1";export{t as version};
1
+ const t="2.35.0-beta.2";export{t as version};