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

Sign up to get free protection for your applications and to get access to all the features.
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,34 @@
1
+ /**
2
+ * Interact with the system clipboard
3
+ *
4
+ * @beta
5
+ */
6
+ /**
7
+ * Function to copy data to clipboard.
8
+ * @remarks
9
+ * Note: clipboard.write only supports Text, HTML, PNG, and JPEG data format.
10
+ * MIME type for Text -> `text/plain`, HTML -> `text/html`, PNG/JPEG -> `image/(png | jpeg)`
11
+ * Also, JPEG will be converted to PNG image when copying to clipboard.
12
+ *
13
+ * @param blob - A Blob object representing the data to be copied to clipboard.
14
+ * @returns A string promise which resolves to success message from the clipboard or
15
+ * rejects with error stating the reason for failure.
16
+ */
17
+ export declare function write(blob: Blob): Promise<void>;
18
+ /**
19
+ * Function to read data from clipboard.
20
+ *
21
+ * @returns A promise blob which resolves to the data read from the clipboard or
22
+ * rejects stating the reason for failure.
23
+ * Note: Returned blob type will contain one of the MIME type `image/png`, `text/plain` or `text/html`.
24
+ */
25
+ export declare function read(): Promise<Blob>;
26
+ /**
27
+ * Checks if clipboard capability is supported by the host
28
+ * @returns boolean to represent whether the clipboard capability is supported
29
+ *
30
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
31
+ *
32
+ * @beta
33
+ */
34
+ export declare function isSupported(): boolean;
@@ -0,0 +1,179 @@
1
+ /** HostClientType represents the different client platforms on which host can be run. */
2
+ export declare enum HostClientType {
3
+ /** Represents the desktop client of host, which is installed on a user's computer and runs as a standalone application. */
4
+ desktop = "desktop",
5
+ /** Represents the web-based client of host, which runs in a web browser. */
6
+ web = "web",
7
+ /** Represents the Android mobile client of host, which runs on Android devices such as smartphones and tablets. */
8
+ android = "android",
9
+ /** Represents the iOS mobile client of host, which runs on iOS devices such as iPhones. */
10
+ ios = "ios",
11
+ /** Represents the iPadOS client of host, which runs on iOS devices such as iPads. */
12
+ ipados = "ipados",
13
+ /** The host is running on a macOS client, which runs on devices such as MacBooks. */
14
+ macos = "macos",
15
+ /**
16
+ * @deprecated
17
+ * As of TeamsJS v2.0.0, please use {@link teamsRoomsWindows} instead.
18
+ */
19
+ rigel = "rigel",
20
+ /** Represents the client of host, which runs on surface hub devices. */
21
+ surfaceHub = "surfaceHub",
22
+ /** Represents the client of host, which runs on Teams Rooms on Windows devices. More information on Microsoft Teams Rooms on Windows can be found [Microsoft Teams Rooms (Windows)](https://support.microsoft.com/office/microsoft-teams-rooms-windows-help-e667f40e-5aab-40c1-bd68-611fe0002ba2)*/
23
+ teamsRoomsWindows = "teamsRoomsWindows",
24
+ /** Represents the client of host, which runs on Teams Rooms on Android devices. More information on Microsoft Teams Rooms on Android can be found [Microsoft Teams Rooms (Android)].(https://support.microsoft.com/office/get-started-with-teams-rooms-on-android-68517298-d513-46be-8d6d-d41db5e6b4b2)*/
25
+ teamsRoomsAndroid = "teamsRoomsAndroid",
26
+ /** Represents the client of host, which runs on Teams phones. More information can be found [Microsoft Teams Phones](https://support.microsoft.com/office/get-started-with-teams-phones-694ca17d-3ecf-40ca-b45e-d21b2c442412) */
27
+ teamsPhones = "teamsPhones",
28
+ /** Represents the client of host, which runs on Teams displays devices. More information can be found [Microsoft Teams Displays](https://support.microsoft.com/office/get-started-with-teams-displays-ff299825-7f13-4528-96c2-1d3437e6d4e6) */
29
+ teamsDisplays = "teamsDisplays"
30
+ }
31
+ /** HostName indicates the possible hosts for your application. */
32
+ export declare enum HostName {
33
+ /**
34
+ * Office.com and Office Windows App
35
+ */
36
+ office = "Office",
37
+ /**
38
+ * For "desktop" specifically, this refers to the new, pre-release version of Outlook for Windows.
39
+ * Also used on other platforms that map to a single Outlook client.
40
+ */
41
+ outlook = "Outlook",
42
+ /**
43
+ * Outlook for Windows: the classic, native, desktop client
44
+ */
45
+ outlookWin32 = "OutlookWin32",
46
+ /**
47
+ * Microsoft-internal test Host
48
+ */
49
+ orange = "Orange",
50
+ /**
51
+ * Microsoft connected workplace platform
52
+ */
53
+ places = "Places",
54
+ /**
55
+ * Teams
56
+ */
57
+ teams = "Teams",
58
+ /**
59
+ * Modern Teams
60
+ */
61
+ teamsModern = "TeamsModern"
62
+ }
63
+ /**
64
+ * FrameContexts provides information about the context in which the app is running within the host.
65
+ * Developers can use FrameContexts to determine how their app should behave in different contexts,
66
+ * and can use the information provided by the context to adapt the app to the user's needs.
67
+ *
68
+ * @example
69
+ * If your app is running in the "settings" context, you should be displaying your apps configuration page.
70
+ * If the app is running in the content context, the developer may want to display information relevant to
71
+ * the content the user is currently viewing.
72
+ */
73
+ export declare enum FrameContexts {
74
+ /**
75
+ * App's frame context from where settings page can be accessed.
76
+ * See [how to create a configuration page.]( https://learn.microsoft.com/microsoftteams/platform/tabs/how-to/create-tab-pages/configuration-page?tabs=teamsjs-v2)
77
+ */
78
+ settings = "settings",
79
+ /** The default context for the app where all the content of the app is displayed. */
80
+ content = "content",
81
+ /** Frame context used when app is running in the authentication window launched by calling {@link authentication.authenticate} */
82
+ authentication = "authentication",
83
+ /** The page shown when the user uninstalls the app. */
84
+ remove = "remove",
85
+ /** A task module is a pop-up window that can be used to display a form, a dialog, or other interactive content within the host. */
86
+ task = "task",
87
+ /** The side panel is a persistent panel that is displayed on the right side of the host and can be used to display content or UI that is relevant to the current page or tab. */
88
+ sidePanel = "sidePanel",
89
+ /** The stage is a large area that is displayed at the center of the host and can be used to display content or UI that requires a lot of space, such as a video player or a document editor. */
90
+ stage = "stage",
91
+ /** App's frame context from where meetingStage can be accessed in a meeting session, which is the primary area where video and presentation content is displayed during a meeting. */
92
+ meetingStage = "meetingStage"
93
+ }
94
+ /**
95
+ * Indicates the team type, currently used to distinguish between different team
96
+ * types in Office 365 for Education (team types 1, 2, 3, and 4).
97
+ */
98
+ export declare enum TeamType {
99
+ /** Represents a standard or classic team in host that is designed for ongoing collaboration and communication among a group of people. */
100
+ Standard = 0,
101
+ /** Represents an educational team in host that is designed for classroom collaboration and communication among students and teachers. */
102
+ Edu = 1,
103
+ /** Represents a class team in host that is designed for classroom collaboration and communication among students and teachers in a structured environment. */
104
+ Class = 2,
105
+ /** Represents a professional learning community (PLC) team in host that is designed for educators to collaborate and share resources and best practices. */
106
+ Plc = 3,
107
+ /** Represents a staff team in host that is designed for staff collaboration and communication among staff members.*/
108
+ Staff = 4
109
+ }
110
+ /**
111
+ * Indicates the various types of roles of a user in a team.
112
+ */
113
+ export declare enum UserTeamRole {
114
+ /** Represents that the user is an owner or administrator of the team. */
115
+ Admin = 0,
116
+ /** Represents that the user is a standard member of the team. */
117
+ User = 1,
118
+ /** Represents that the user does not have any role in the team. */
119
+ Guest = 2
120
+ }
121
+ /**
122
+ * Dialog module dimension enum
123
+ */
124
+ export declare enum DialogDimension {
125
+ /** Represents a large-sized dialog box, which is typically used for displaying large amounts of content or complex workflows that require more space. */
126
+ Large = "large",
127
+ /** Represents a medium-sized dialog box, which is typically used for displaying moderate amounts of content or workflows that require less space. */
128
+ Medium = "medium",
129
+ /** Represents a small-sized dialog box, which is typically used for displaying simple messages or workflows that require minimal space.*/
130
+ Small = "small"
131
+ }
132
+ import { AdaptiveCardVersion, SdkError } from './interfaces';
133
+ /**
134
+ * @deprecated
135
+ * As of TeamsJS v2.0.0, please use {@link DialogDimension} instead.
136
+ */
137
+ export { DialogDimension as TaskModuleDimension };
138
+ import { HostVersionsInfo } from './interfaces';
139
+ /**
140
+ * The type of the channel with which the content is associated.
141
+ */
142
+ export declare enum ChannelType {
143
+ /** The default channel type. Type of channel is used for general collaboration and communication within a team. */
144
+ Regular = "Regular",
145
+ /** Type of channel is used for sensitive or confidential communication within a team and is only accessible to members of the channel. */
146
+ Private = "Private",
147
+ /** Type of channel is used for collaboration between multiple teams or groups and is accessible to members of all the teams or groups. */
148
+ Shared = "Shared"
149
+ }
150
+ /** An error object indicating that the requested operation or feature is not supported on the current platform or device.
151
+ * @typedef {Object} SdkError
152
+ */
153
+ export declare const errorNotSupportedOnPlatform: SdkError;
154
+ /**
155
+ * @hidden
156
+ *
157
+ * Minimum Adaptive Card version supported by the host.
158
+ */
159
+ export declare const minAdaptiveCardVersion: AdaptiveCardVersion;
160
+ /**
161
+ * @hidden
162
+ *
163
+ * Adaptive Card version supported by the Teams v1 client.
164
+ */
165
+ export declare const teamsMinAdaptiveCardVersion: HostVersionsInfo;
166
+ /**
167
+ * @hidden
168
+ * An error object indicates that the image count from visualMedia.image API is invalid.
169
+ *
170
+ * @beta
171
+ */
172
+ export declare const errorInvalidCount: Error;
173
+ /**
174
+ * @hidden
175
+ * An error object indicates that the response from the visualMedia.image API is invalid.
176
+ *
177
+ * @beta
178
+ */
179
+ export declare const errorInvalidResponse: Error;
@@ -0,0 +1,286 @@
1
+ import { AdaptiveCardDialogInfo, BotAdaptiveCardDialogInfo, BotUrlDialogInfo, DialogInfo, DialogSize, UrlDialogInfo } from './interfaces';
2
+ export declare function updateResizeHelper(apiVersionTag: string, dimensions: DialogSize): void;
3
+ export declare function urlOpenHelper(apiVersionTag: string, urlDialogInfo: UrlDialogInfo, submitHandler?: dialog.DialogSubmitHandler, messageFromChildHandler?: dialog.PostMessageChannel): void;
4
+ export declare function botUrlOpenHelper(apiVersionTag: string, urlDialogInfo: BotUrlDialogInfo, submitHandler?: dialog.DialogSubmitHandler, messageFromChildHandler?: dialog.PostMessageChannel): void;
5
+ export declare function urlSubmitHelper(apiVersionTag: string, result?: string | object, appIds?: string | string[]): void;
6
+ /**
7
+ * This group of capabilities enables apps to show modal dialogs. There are two primary types of dialogs: URL-based dialogs and [Adaptive Card](https://learn.microsoft.com/adaptive-cards/) dialogs.
8
+ * Both types of dialogs are shown on top of your app, preventing interaction with your app while they are displayed.
9
+ * - URL-based dialogs allow you to specify a URL from which the contents will be shown inside the dialog.
10
+ * - For URL dialogs, use the functions and interfaces in the {@link dialog.url} namespace.
11
+ * - Adaptive Card-based dialogs allow you to provide JSON describing an Adaptive Card that will be shown inside the dialog.
12
+ * - For Adaptive Card dialogs, use the functions and interfaces in the {@link dialog.adaptiveCard} namespace.
13
+ *
14
+ * @remarks Note that dialogs were previously called "task modules". While they have been renamed for clarity, the functionality has been maintained.
15
+ * For more details, see [Dialogs](https://learn.microsoft.com/microsoftteams/platform/task-modules-and-cards/what-are-task-modules)
16
+ *
17
+ * @beta
18
+ */
19
+ export declare namespace dialog {
20
+ /**
21
+ * Data Structure to represent the SDK response when dialog closes
22
+ *
23
+ * @beta
24
+ */
25
+ interface ISdkResponse {
26
+ /**
27
+ * Error in case there is a failure before dialog submission
28
+ */
29
+ err?: string;
30
+ /**
31
+ * Value provided in the `result` parameter by the dialog when the {@linkcode url.submit} function
32
+ * was called.
33
+ * If the dialog was closed by the user without submitting (e.g., using a control in the corner
34
+ * of the dialog), this value will be `undefined` here.
35
+ */
36
+ result?: string | object;
37
+ }
38
+ /**
39
+ * Handler used to receive and process messages sent between a dialog and the app that launched it
40
+ * @beta
41
+ */
42
+ type PostMessageChannel = (message: any) => void;
43
+ /**
44
+ * Handler used for receiving results when a dialog closes, either the value passed by {@linkcode url.submit}
45
+ * or an error if the dialog was closed by the user.
46
+ *
47
+ * @see {@linkcode ISdkResponse}
48
+ *
49
+ * @beta
50
+ */
51
+ type DialogSubmitHandler = (result: ISdkResponse) => void;
52
+ /**
53
+ * @hidden
54
+ * Hide from docs because this function is only used during initialization
55
+ *
56
+ * Adds register handlers for messageForChild upon initialization and only in the tasks FrameContext. {@link FrameContexts.task}
57
+ * Function is called during app initialization
58
+ * @internal
59
+ * Limited to Microsoft-internal use
60
+ *
61
+ * @beta
62
+ */
63
+ function initialize(): void;
64
+ namespace url {
65
+ /**
66
+ * Allows app to open a url based dialog.
67
+ *
68
+ * @remarks
69
+ * This function cannot be called from inside of a dialog
70
+ *
71
+ * @param urlDialogInfo - An object containing the parameters of the dialog module.
72
+ * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
73
+ * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
74
+ *
75
+ * @beta
76
+ */
77
+ function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void;
78
+ /**
79
+ * Submit the dialog module and close the dialog
80
+ *
81
+ * @remarks
82
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
83
+ *
84
+ * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
85
+ * If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
86
+ *
87
+ * @param appIds - Valid application(s) that can receive the result of the submitted dialogs. Specifying this parameter helps prevent malicious apps from retrieving the dialog result. Multiple app IDs can be specified because a web app from a single underlying domain can power multiple apps across different environments and branding schemes.
88
+ *
89
+ * @beta
90
+ */
91
+ function submit(result?: string | object, appIds?: string | string[]): void;
92
+ /**
93
+ * Subcapability that allows communication between the dialog and the parent app.
94
+ *
95
+ * @remarks
96
+ * Note that dialog can be invoked from parentless scenarios e.g. Search Message Extensions. The subcapability `parentCommunication` is not supported in such scenarios.
97
+ *
98
+ * @beta
99
+ */
100
+ namespace parentCommunication {
101
+ /**
102
+ * Send message to the parent from dialog
103
+ *
104
+ * @remarks
105
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
106
+ *
107
+ * @param message - The message to send to the parent
108
+ *
109
+ * @beta
110
+ */
111
+ function sendMessageToParentFromDialog(message: any): void;
112
+ /**
113
+ * Send message to the dialog from the parent
114
+ *
115
+ * @param message - The message to send
116
+ *
117
+ * @beta
118
+ */
119
+ function sendMessageToDialog(message: any): void;
120
+ /**
121
+ * Register a listener that will be triggered when a message is received from the app that opened the dialog.
122
+ *
123
+ * @remarks
124
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
125
+ *
126
+ * @param listener - The listener that will be triggered.
127
+ *
128
+ * @beta
129
+ */
130
+ function registerOnMessageFromParent(listener: PostMessageChannel): void;
131
+ /**
132
+ * Checks if dialog.url.parentCommunication capability is supported by the host
133
+ *
134
+ * @returns boolean to represent whether dialog.url.parentCommunication capability is supported
135
+ *
136
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
137
+ *
138
+ * @beta
139
+ */
140
+ function isSupported(): boolean;
141
+ }
142
+ /**
143
+ * Checks if dialog.url module is supported by the host
144
+ *
145
+ * @returns boolean to represent whether dialog.url module is supported
146
+ *
147
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
148
+ *
149
+ * @beta
150
+ */
151
+ function isSupported(): boolean;
152
+ /**
153
+ * Namespace to open a dialog that sends results to the bot framework
154
+ *
155
+ * @beta
156
+ */
157
+ namespace bot {
158
+ /**
159
+ * Allows an app to open a dialog that sends submitted data to a bot.
160
+ *
161
+ * @param botUrlDialogInfo - An object containing the parameters of the dialog module including completionBotId.
162
+ * @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
163
+ * @param messageFromChildHandler - Handler that triggers if dialog sends a message to the app.
164
+ *
165
+ * @returns a function that can be used to send messages to the dialog.
166
+ *
167
+ * @beta
168
+ */
169
+ function open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void;
170
+ /**
171
+ * Checks if dialog.url.bot capability is supported by the host
172
+ *
173
+ * @returns boolean to represent whether dialog.url.bot is supported
174
+ *
175
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
176
+ *
177
+ * @beta
178
+ */
179
+ function isSupported(): boolean;
180
+ }
181
+ /**
182
+ * @hidden
183
+ *
184
+ * Convert UrlDialogInfo to DialogInfo to send the information to host in {@linkcode open} API.
185
+ *
186
+ * @internal
187
+ * Limited to Microsoft-internal use
188
+ */
189
+ function getDialogInfoFromUrlDialogInfo(urlDialogInfo: UrlDialogInfo): DialogInfo;
190
+ /**
191
+ * @hidden
192
+ *
193
+ * Convert BotUrlDialogInfo to DialogInfo to send the information to host in {@linkcode bot.open} API.
194
+ *
195
+ * @internal
196
+ * Limited to Microsoft-internal use
197
+ */
198
+ function getDialogInfoFromBotUrlDialogInfo(botUrlDialogInfo: BotUrlDialogInfo): DialogInfo;
199
+ }
200
+ /**
201
+ * This function currently serves no purpose and should not be used. All functionality that used
202
+ * to be covered by this method is now in subcapabilities and those isSupported methods should be
203
+ * used directly.
204
+ *
205
+ * @hidden
206
+ */
207
+ function isSupported(): boolean;
208
+ /**
209
+ * Namespace to update the dialog
210
+ *
211
+ * @beta
212
+ */
213
+ namespace update {
214
+ /**
215
+ * Update dimensions - height/width of a dialog.
216
+ *
217
+ * @param dimensions - An object containing width and height properties.
218
+ *
219
+ * @beta
220
+ */
221
+ function resize(dimensions: DialogSize): void;
222
+ /**
223
+ * Checks if dialog.update capability is supported by the host
224
+ * @returns boolean to represent whether dialog.update capabilty is supported
225
+ *
226
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
227
+ *
228
+ * @beta
229
+ */
230
+ function isSupported(): boolean;
231
+ }
232
+ /**
233
+ * Subcapability for interacting with adaptive card dialogs
234
+ * @beta
235
+ */
236
+ namespace adaptiveCard {
237
+ /**
238
+ * Allows app to open an adaptive card based dialog.
239
+ *
240
+ * @remarks
241
+ * This function cannot be called from inside of a dialog
242
+ *
243
+ * @param adaptiveCardDialogInfo - An object containing the parameters of the dialog module {@link AdaptiveCardDialogInfo}.
244
+ * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode url.submit} function or when the user closes the dialog.
245
+ *
246
+ * @beta
247
+ */
248
+ function open(adaptiveCardDialogInfo: AdaptiveCardDialogInfo, submitHandler?: DialogSubmitHandler): void;
249
+ /**
250
+ * Checks if dialog.adaptiveCard module is supported by the host
251
+ *
252
+ * @returns boolean to represent whether dialog.adaptiveCard module is supported
253
+ *
254
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
255
+ *
256
+ * @beta
257
+ */
258
+ function isSupported(): boolean;
259
+ /**
260
+ * Namespace for interaction with adaptive card dialogs that need to communicate with the bot framework
261
+ *
262
+ * @beta
263
+ */
264
+ namespace bot {
265
+ /**
266
+ * Allows an app to open an adaptive card-based dialog module using bot.
267
+ *
268
+ * @param botAdaptiveCardDialogInfo - An object containing the parameters of the dialog module including completionBotId.
269
+ * @param submitHandler - Handler that triggers when the dialog has been submitted or closed.
270
+ *
271
+ * @beta
272
+ */
273
+ function open(botAdaptiveCardDialogInfo: BotAdaptiveCardDialogInfo, submitHandler?: DialogSubmitHandler): void;
274
+ /**
275
+ * Checks if dialog.adaptiveCard.bot capability is supported by the host
276
+ *
277
+ * @returns boolean to represent whether dialog.adaptiveCard.bot is supported
278
+ *
279
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
280
+ *
281
+ * @beta
282
+ */
283
+ function isSupported(): boolean;
284
+ }
285
+ }
286
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Represents a validated email.
3
+ */
4
+ export declare class EmailAddress {
5
+ /** Represents the input email address string */
6
+ private readonly val;
7
+ constructor(val: string);
8
+ /**
9
+ * Retrieve the validated email address as a string.
10
+ */
11
+ toString(): string;
12
+ }
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Namespace to interact with the geoLocation module-specific part of the SDK. This is the newer version of location module.
3
+ *
4
+ * @beta
5
+ */
6
+ export declare namespace geoLocation {
7
+ /**
8
+ * Data struture to represent the location information
9
+ *
10
+ * @beta
11
+ */
12
+ interface Location {
13
+ /**
14
+ Latitude of the location
15
+ */
16
+ latitude: number;
17
+ /**
18
+ Longitude of the location
19
+ */
20
+ longitude: number;
21
+ /**
22
+ Accuracy describes the maximum distance in meters from the captured coordinates to the possible actual location
23
+ @remarks
24
+ This property is only in scope for mobile
25
+ */
26
+ accuracy?: number;
27
+ /**
28
+ Time stamp when the location was captured
29
+ */
30
+ timestamp?: number;
31
+ }
32
+ /**
33
+ * Fetches current user coordinates
34
+ * @returns Promise that will resolve with {@link geoLocation.Location} object or reject with an error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
35
+ *
36
+ * @beta
37
+ */
38
+ function getCurrentLocation(): Promise<Location>;
39
+ /**
40
+ * Checks whether or not location has user permission
41
+ *
42
+ * @returns Promise that will resolve with true if the user had granted the app permission to location information, or with false otherwise,
43
+ * In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
44
+ *
45
+ * @beta
46
+ */
47
+ function hasPermission(): Promise<boolean>;
48
+ /**
49
+ * Requests user permission for location
50
+ *
51
+ * @returns true if the user consented permission for location, false otherwise
52
+ * @returns Promise that will resolve with true if the user consented permission for location, or with false otherwise,
53
+ * In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
54
+ *
55
+ * @beta
56
+ */
57
+ function requestPermission(): Promise<boolean>;
58
+ /**
59
+ * Checks if geoLocation capability is supported by the host
60
+ * @returns boolean to represent whether geoLocation is supported
61
+ *
62
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
63
+ *
64
+ * @beta
65
+ */
66
+ function isSupported(): boolean;
67
+ /**
68
+ * Namespace to interact with the location on map module-specific part of the SDK.
69
+ *
70
+ * @beta
71
+ */
72
+ namespace map {
73
+ /**
74
+ * Allows user to choose location on map
75
+ *
76
+ * @returns Promise that will resolve with {@link geoLocation.Location} object chosen by the user or reject with an error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
77
+ *
78
+ * @beta
79
+ */
80
+ function chooseLocation(): Promise<Location>;
81
+ /**
82
+ * Shows the location on map corresponding to the given coordinates
83
+ *
84
+ * @param location - Location to be shown on the map
85
+ * @returns Promise that resolves when the location dialog has been closed or reject with an error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
86
+ *
87
+ * @beta
88
+ */
89
+ function showLocation(location: Location): Promise<void>;
90
+ /**
91
+ * Checks if geoLocation.map capability is supported by the host
92
+ * @returns boolean to represent whether geoLocation.map is supported
93
+ *
94
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
95
+ *
96
+ * @beta
97
+ */
98
+ function isSupported(): boolean;
99
+ }
100
+ }
@@ -0,0 +1,44 @@
1
+ export * as authentication from './authentication';
2
+ export { ChannelType, DialogDimension, FrameContexts, HostClientType, HostName, TaskModuleDimension, TeamType, UserTeamRole, } from './constants';
3
+ export { ActionInfo, ActionObjectType, AdaptiveCardVersion, AdaptiveCardDialogInfo, BaseActionObject, BotAdaptiveCardDialogInfo, BotUrlDialogInfo, Context, DeepLinkParameters, DialogInfo, DialogSize, ErrorCode, FileOpenPreference, FrameContext, FrameInfo, LoadContext, LocaleInfo, M365ContentAction, ResumeContext, SdkError, SecondaryId, SecondaryM365ContentIdName, ShareDeepLinkParameters, TabInformation, TabInstance, TabInstanceParameters, TaskInfo, TeamInformation, UrlDialogInfo, } from './interfaces';
4
+ export * as app from './app';
5
+ export { AppId } from './appId';
6
+ export { EmailAddress } from './emailAddress';
7
+ export * as appInstallDialog from './appInstallDialog';
8
+ export * as barCode from './barCode';
9
+ export { chat, OpenGroupChatRequest, OpenSingleChatRequest } from './chat';
10
+ export * as clipboard from './clipboard';
11
+ export { dialog } from './dialog';
12
+ export { nestedAppAuth } from './nestedAppAuth';
13
+ export { geoLocation } from './geoLocation';
14
+ export { getAdaptiveCardSchemaVersion } from './adaptiveCards';
15
+ export { pages } from './pages';
16
+ export { addEventListnerFunctionType, ChildAppWindow, IAppWindow, onCompleteFunctionType, ParentAppWindow, } from './appWindow';
17
+ export { menus } from './menus';
18
+ export { media } from './media';
19
+ export { secondaryBrowser } from './secondaryBrowser';
20
+ export { location } from './location';
21
+ export { meeting } from './meeting';
22
+ export { monetization } from './monetization';
23
+ export * as calendar from './calendar';
24
+ export { mail } from './mail';
25
+ export { teamsCore } from './teamsAPIs';
26
+ export { people } from './people';
27
+ export { profile } from './profile';
28
+ export { videoEffects } from './videoEffects';
29
+ export { search } from './search';
30
+ export { sharing } from './sharing';
31
+ export { stageView } from './stageView';
32
+ export { version } from './version';
33
+ export { visualMedia } from './visualMedia';
34
+ export { webStorage } from './webStorage';
35
+ export * as call from './call';
36
+ export * as appInitialization from './appInitialization';
37
+ export { thirdPartyCloudStorage } from './thirdPartyCloudStorage';
38
+ export { callbackFunctionType, enablePrintCapability, executeDeepLink, executeDeepLinkOnCompleteFunctionType, getContext, getContextCallbackFunctionType, getMruTabInstances, getTabInstances, getTabInstancesCallbackFunctionType, initialize, initializeWithFrameContext, print, registerAppButtonClickHandler, registerAppButtonHoverEnterHandler, registerAppButtonHoverLeaveHandler, registerBackButtonHandler, registerBackButtonHandlerFunctionType, registerBeforeUnloadHandler, registerChangeSettingsHandler, registerFocusEnterHandler, registerFullScreenHandler, registerFullScreenHandlerFunctionType, registerOnLoadHandler, registerOnThemeChangeHandler, registerOnThemeChangeHandlerFunctionType, setFrameContext, shareDeepLink, } from './publicAPIs';
39
+ export { navigateBack, navigateCrossDomain, navigateToTab, onCompleteHandlerFunctionType, returnFocus, } from './navigation';
40
+ export * as settings from './settings';
41
+ export { tasks } from './tasks';
42
+ export { liveShare, LiveShareHost } from './liveShareHost';
43
+ export { marketplace } from './marketplace';
44
+ export { ISerializable } from './serializable.interface';