@microsoft/teams-js 2.31.0-beta.1 → 2.31.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 (180) hide show
  1. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +11 -1
  2. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +11 -1
  3. package/dist/esm/packages/teams-js/dts/internal/hostToAppTelemetry.d.ts +51 -0
  4. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +11 -0
  5. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +5 -0
  6. package/dist/esm/packages/teams-js/dts/internal/pagesHelpers.d.ts +24 -0
  7. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +23 -1
  8. package/dist/esm/packages/teams-js/dts/internal/uint8array-extras/uint8array-extras.d.ts +6 -0
  9. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +20 -1
  10. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +2 -2
  11. package/dist/esm/packages/teams-js/dts/internal/visualMediaHelpers.d.ts +14 -0
  12. package/dist/esm/packages/teams-js/dts/internal/webStorageHelpers.d.ts +4 -0
  13. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +61 -61
  14. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +48 -48
  15. package/dist/esm/packages/teams-js/dts/private/copilot/copilot.d.ts +2 -0
  16. package/dist/esm/packages/teams-js/dts/private/copilot/eligibility.d.ts +29 -0
  17. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +355 -349
  18. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +67 -68
  19. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +104 -105
  20. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +41 -42
  21. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +113 -114
  22. package/dist/esm/packages/teams-js/dts/private/files.d.ts +590 -582
  23. package/dist/esm/packages/teams-js/dts/private/hostEntity/hostEntity.d.ts +42 -0
  24. package/dist/esm/packages/teams-js/dts/private/hostEntity/tab.d.ts +134 -0
  25. package/dist/esm/packages/teams-js/dts/private/index.d.ts +19 -18
  26. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +31 -25
  27. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +147 -142
  28. package/dist/esm/packages/teams-js/dts/private/messageChannels/dataLayer.d.ts +39 -0
  29. package/dist/esm/packages/teams-js/dts/private/messageChannels/messageChannels.d.ts +28 -0
  30. package/dist/esm/packages/teams-js/dts/private/messageChannels/telemetry.d.ts +39 -0
  31. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +31 -25
  32. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +69 -70
  33. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +219 -214
  34. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/fullTrust.d.ts +31 -0
  35. package/dist/esm/packages/teams-js/dts/private/teams/fullTrust/joinedTeams.d.ts +30 -0
  36. package/dist/esm/packages/teams-js/dts/private/teams/teams.d.ts +63 -0
  37. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +192 -186
  38. package/dist/esm/packages/teams-js/dts/public/app/app.d.ts +21 -2
  39. package/dist/esm/packages/teams-js/dts/public/app/lifecycle.d.ts +3 -2
  40. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +1 -1
  41. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +6 -0
  42. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +2 -1
  43. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +1 -0
  44. package/dist/esm/packages/teams-js/dts/public/call.d.ts +1 -0
  45. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +4 -0
  46. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +1 -0
  47. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +0 -4
  48. package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +3 -2
  49. package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +0 -13
  50. package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +2 -1
  51. package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +3 -2
  52. package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +2 -1
  53. package/dist/esm/packages/teams-js/dts/public/geoLocation/geoLocation.d.ts +3 -2
  54. package/dist/esm/packages/teams-js/dts/public/geoLocation/map.d.ts +6 -0
  55. package/dist/esm/packages/teams-js/dts/public/index.d.ts +9 -9
  56. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +11 -0
  57. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +1 -0
  58. package/dist/esm/packages/teams-js/dts/public/location.d.ts +4 -3
  59. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +1 -0
  60. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +1 -0
  61. package/dist/esm/packages/teams-js/dts/public/media.d.ts +0 -3
  62. package/dist/esm/packages/teams-js/dts/public/meeting/appShareButton.d.ts +51 -0
  63. package/dist/esm/packages/teams-js/dts/public/meeting/meeting.d.ts +854 -0
  64. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +1 -0
  65. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +8 -0
  66. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +2 -1
  67. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +1 -0
  68. package/dist/esm/packages/teams-js/dts/public/pages/appButton.d.ts +30 -0
  69. package/dist/esm/packages/teams-js/dts/public/pages/backStack.d.ts +44 -0
  70. package/dist/esm/packages/teams-js/dts/public/pages/config.d.ts +123 -0
  71. package/dist/esm/packages/teams-js/dts/public/pages/currentApp.d.ts +46 -0
  72. package/dist/esm/packages/teams-js/dts/public/pages/fullTrust.d.ts +33 -0
  73. package/dist/esm/packages/teams-js/dts/public/pages/pages.d.ts +253 -0
  74. package/dist/esm/packages/teams-js/dts/public/pages/tabs.d.ts +32 -0
  75. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +81 -103
  76. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +3 -0
  77. package/dist/esm/packages/teams-js/dts/public/search.d.ts +9 -0
  78. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +1 -0
  79. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +4 -3
  80. package/dist/esm/packages/teams-js/dts/public/sharing/history.d.ts +47 -0
  81. package/dist/esm/packages/teams-js/dts/public/sharing/sharing.d.ts +76 -0
  82. package/dist/esm/packages/teams-js/dts/public/stageView/self.d.ts +23 -0
  83. package/dist/esm/packages/teams-js/dts/public/stageView/stageView.d.ts +81 -0
  84. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +0 -8
  85. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +4 -0
  86. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +2 -1
  87. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +209 -210
  88. package/dist/esm/packages/teams-js/dts/public/visualMedia/image.d.ts +64 -0
  89. package/dist/esm/packages/teams-js/dts/public/visualMedia/visualMedia.d.ts +116 -0
  90. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +20 -22
  91. package/dist/esm/packages/teams-js/src/index.js +1 -1
  92. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
  93. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  94. package/dist/esm/packages/teams-js/src/internal/handlers.js +1 -1
  95. package/dist/esm/packages/teams-js/src/internal/hostToAppTelemetry.js +1 -0
  96. package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
  97. package/dist/esm/packages/teams-js/src/internal/messageObjects.js +1 -1
  98. package/dist/esm/packages/teams-js/src/internal/pagesHelpers.js +1 -0
  99. package/dist/esm/packages/teams-js/src/internal/uint8array-extras/uint8array-extras.js +1 -0
  100. package/dist/esm/packages/teams-js/src/internal/utils.js +1 -1
  101. package/dist/esm/packages/teams-js/src/internal/validOrigins.js +1 -1
  102. package/dist/esm/packages/teams-js/src/internal/videoEffectsUtils.js +1 -1
  103. package/dist/esm/packages/teams-js/src/internal/visualMediaHelpers.js +1 -0
  104. package/dist/esm/packages/teams-js/src/internal/webStorageHelpers.js +1 -0
  105. package/dist/esm/packages/teams-js/src/private/appEntity.js +1 -1
  106. package/dist/esm/packages/teams-js/src/private/conversations.js +1 -1
  107. package/dist/esm/packages/teams-js/src/private/copilot/copilot.js +1 -0
  108. package/dist/esm/packages/teams-js/src/private/copilot/eligibility.js +1 -0
  109. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  110. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  111. package/dist/esm/packages/teams-js/src/private/externalAppCardActions.js +1 -1
  112. package/dist/esm/packages/teams-js/src/private/externalAppCardActionsForCEA.js +1 -1
  113. package/dist/esm/packages/teams-js/src/private/externalAppCommands.js +1 -1
  114. package/dist/esm/packages/teams-js/src/private/files.js +1 -1
  115. package/dist/esm/packages/teams-js/src/private/hostEntity/hostEntity.js +1 -0
  116. package/dist/esm/packages/teams-js/src/private/hostEntity/tab.js +1 -0
  117. package/dist/esm/packages/teams-js/src/private/logs.js +1 -1
  118. package/dist/esm/packages/teams-js/src/private/meetingRoom.js +1 -1
  119. package/dist/esm/packages/teams-js/src/private/messageChannels/dataLayer.js +1 -0
  120. package/dist/esm/packages/teams-js/src/private/messageChannels/messageChannels.js +1 -0
  121. package/dist/esm/packages/teams-js/src/private/messageChannels/telemetry.js +1 -0
  122. package/dist/esm/packages/teams-js/src/private/notifications.js +1 -1
  123. package/dist/esm/packages/teams-js/src/private/otherAppStateChange.js +1 -1
  124. package/dist/esm/packages/teams-js/src/private/remoteCamera.js +1 -1
  125. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/fullTrust.js +1 -0
  126. package/dist/esm/packages/teams-js/src/private/teams/fullTrust/joinedTeams.js +1 -0
  127. package/dist/esm/packages/teams-js/src/private/teams/teams.js +1 -0
  128. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  129. package/dist/esm/packages/teams-js/src/public/app/app.js +1 -1
  130. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  131. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  132. package/dist/esm/packages/teams-js/src/public/meeting/appShareButton.js +1 -0
  133. package/dist/esm/packages/teams-js/src/public/meeting/meeting.js +1 -0
  134. package/dist/esm/packages/teams-js/src/public/navigation.js +1 -1
  135. package/dist/esm/packages/teams-js/src/public/pages/appButton.js +1 -0
  136. package/dist/esm/packages/teams-js/src/public/pages/backStack.js +1 -0
  137. package/dist/esm/packages/teams-js/src/public/pages/config.js +1 -0
  138. package/dist/esm/packages/teams-js/src/public/pages/currentApp.js +1 -0
  139. package/dist/esm/packages/teams-js/src/public/pages/fullTrust.js +1 -0
  140. package/dist/esm/packages/teams-js/src/public/pages/pages.js +1 -0
  141. package/dist/esm/packages/teams-js/src/public/pages/tabs.js +1 -0
  142. package/dist/esm/packages/teams-js/src/public/profile.js +1 -1
  143. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  144. package/dist/esm/packages/teams-js/src/public/runtime.js +1 -1
  145. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  146. package/dist/esm/packages/teams-js/src/public/sharing/history.js +1 -0
  147. package/dist/esm/packages/teams-js/src/public/sharing/sharing.js +1 -0
  148. package/dist/esm/packages/teams-js/src/public/stageView/self.js +1 -0
  149. package/dist/esm/packages/teams-js/src/public/stageView/stageView.js +1 -0
  150. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  151. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  152. package/dist/esm/packages/teams-js/src/public/videoEffects.js +1 -1
  153. package/dist/esm/packages/teams-js/src/public/visualMedia/image.js +1 -0
  154. package/dist/esm/packages/teams-js/src/public/visualMedia/visualMedia.js +1 -0
  155. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  156. package/dist/umd/MicrosoftTeams.d.ts +5751 -5160
  157. package/dist/umd/MicrosoftTeams.js +6231 -6442
  158. package/dist/umd/MicrosoftTeams.js.map +1 -1
  159. package/dist/umd/MicrosoftTeams.min.js +1 -1
  160. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  161. package/package.json +1 -1
  162. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +0 -39
  163. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +0 -176
  164. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +0 -107
  165. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +0 -116
  166. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +0 -906
  167. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +0 -574
  168. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +0 -124
  169. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +0 -104
  170. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +0 -192
  171. package/dist/esm/packages/teams-js/src/private/copilot.js +0 -1
  172. package/dist/esm/packages/teams-js/src/private/hostEntity.js +0 -1
  173. package/dist/esm/packages/teams-js/src/private/messageChannels.js +0 -1
  174. package/dist/esm/packages/teams-js/src/private/teams.js +0 -1
  175. package/dist/esm/packages/teams-js/src/public/meeting.js +0 -1
  176. package/dist/esm/packages/teams-js/src/public/pages.js +0 -1
  177. package/dist/esm/packages/teams-js/src/public/sharing.js +0 -1
  178. package/dist/esm/packages/teams-js/src/public/stageView.js +0 -1
  179. package/dist/esm/packages/teams-js/src/public/visualMedia.js +0 -1
  180. /package/dist/esm/node_modules/.pnpm/{@rollup_plugin-typescript@11.1.6_rollup@4.24.0_tslib@2.6.3_typescript@4.9.5 → @rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5}/node_modules/tslib/tslib.es6.js +0 -0
@@ -1,378 +1,384 @@
1
+ /**
2
+ * @hidden
3
+ * Module to delegate authentication and message extension requests to the host
4
+ * @internal
5
+ * Limited to Microsoft-internal use
6
+ * @module
7
+ */
1
8
  import { ResponseHandler } from '../internal/responseHandler';
2
9
  import { ISerializable } from '../public/serializable.interface';
10
+ /*********** BEGIN REQUEST TYPE ************/
3
11
  /**
4
12
  * @hidden
5
- * Namespace to delegate authentication and message extension requests to the host
13
+ * Information about the bot request that should be resent by the host
6
14
  * @internal
7
15
  * Limited to Microsoft-internal use
8
16
  */
9
- export declare namespace externalAppAuthentication {
10
- /*********** BEGIN REQUEST TYPE ************/
11
- /**
12
- * @hidden
13
- * Information about the bot request that should be resent by the host
14
- * @internal
15
- * Limited to Microsoft-internal use
16
- */
17
- type IOriginalRequestInfo = IQueryMessageExtensionRequest | IActionExecuteInvokeRequest;
18
- /**
19
- * @hidden
20
- * Parameters OauthWindow
21
- * @internal
22
- * Limited to Microsoft-internal use
23
- */
24
- type OauthWindowProperties = {
25
- /**
26
- * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
27
- */
28
- width?: number;
29
- /**
30
- * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
31
- */
32
- height?: number;
33
- /**
34
- * Some identity providers restrict their authentication pages from being displayed in embedded browsers (e.g., a web view inside of a native application)
35
- * If the identity provider you are using prevents embedded browser usage, this flag should be set to `true` to enable the authentication page
36
- * to be opened in an external browser. If this flag is `false`, the page will be opened directly within the current hosting application.
37
- *
38
- * This flag is ignored when the host for the application is a web app (as opposed to a native application) as the behavior is unnecessary in a web-only
39
- * environment without an embedded browser.
40
- */
41
- isExternal?: boolean;
42
- };
43
- /**
44
- * @hidden
45
- * Parameters for the authentication pop-up. This interface is used exclusively with the externalAppAuthentication APIs
46
- * @internal
47
- * Limited to Microsoft-internal use
48
- */
49
- type AuthenticatePopUpParameters = {
50
- /**
51
- * The URL for the authentication pop-up.
52
- */
53
- url: URL;
54
- /**
55
- * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
56
- */
57
- width?: number;
58
- /**
59
- * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
60
- */
61
- height?: number;
62
- /**
63
- * Some identity providers restrict their authentication pages from being displayed in embedded browsers (e.g., a web view inside of a native application)
64
- * If the identity provider you are using prevents embedded browser usage, this flag should be set to `true` to enable the authentication page specified in
65
- * the {@link url} property to be opened in an external browser.
66
- * If this flag is `false`, the page will be opened directly within the current hosting application.
67
- *
68
- * This flag is ignored when the host for the application is a web app (as opposed to a native application) as the behavior is unnecessary in a web-only
69
- * environment without an embedded browser.
70
- */
71
- isExternal?: boolean;
72
- };
73
- /**
74
- * @hidden
75
- * Parameters for SSO authentication. This interface is used exclusively with the externalAppAuthentication APIs
76
- * @internal
77
- * Limited to Microsoft-internal use
78
- */
79
- type AuthTokenRequestParameters = {
80
- /**
81
- * An optional list of claims which to pass to Microsoft Entra when requesting the access token.
82
- */
83
- claims?: string[];
84
- /**
85
- * An optional flag indicating whether to attempt the token acquisition silently or allow a prompt to be shown.
86
- */
87
- silent?: boolean;
88
- };
89
- /**
90
- * @hidden
91
- * Information about the message extension request that should be resent by the host. Corresponds to request schema in https://learn.microsoft.com/microsoftteams/platform/resources/messaging-extension-v3/search-extensions#receive-user-requests
92
- * @internal
93
- * Limited to Microsoft-internal use
94
- */
95
- interface IQueryMessageExtensionRequest {
96
- requestType: OriginalRequestType.QueryMessageExtensionRequest;
97
- commandId: string;
98
- parameters: {
99
- name: string;
100
- value: string;
101
- }[];
102
- queryOptions?: {
103
- count: number;
104
- skip: number;
105
- };
106
- }
107
- /**
108
- * @hidden
109
- * Information about the Action.Execute request that should be resent by the host. Corresponds to schema in https://adaptivecards.io/explorer/Action.Execute.html
110
- * @internal
111
- * Limited to Microsoft-internal use
112
- */
113
- interface IActionExecuteInvokeRequest {
114
- requestType: OriginalRequestType.ActionExecuteInvokeRequest;
115
- type: string;
116
- id: string;
117
- verb: string;
118
- data: string | Record<string, unknown>;
119
- }
120
- /**
121
- * @hidden
122
- * @internal
123
- * Limited to Microsoft-internal use
124
- */
125
- class SerializableActionExecuteInvokeRequest implements ISerializable {
126
- private invokeRequest;
127
- constructor(invokeRequest: externalAppAuthentication.IActionExecuteInvokeRequest);
128
- serialize(): object | string;
129
- }
130
- /**
131
- * @beta
132
- * @hidden
133
- * Determines if the provided response object is an instance of IActionExecuteResponse
134
- * @internal
135
- * Limited to Microsoft-internal use
136
- * @param response The object to check whether it is of IActionExecuteResponse type
137
- */
138
- function isActionExecuteResponse(response: unknown): response is externalAppAuthentication.IActionExecuteResponse;
139
- /**
140
- * @hidden
141
- * This is the only allowed value for IActionExecuteInvokeRequest.type. Used for validation
142
- * @internal
143
- * Limited to Microsoft-internal use
144
- */
145
- const ActionExecuteInvokeRequestType = "Action.Execute";
146
- /**
147
- * @hidden
148
- * Used to differentiate between IOriginalRequestInfo types
149
- * @internal
150
- * Limited to Microsoft-internal use
151
- */
152
- enum OriginalRequestType {
153
- ActionExecuteInvokeRequest = "ActionExecuteInvokeRequest",
154
- QueryMessageExtensionRequest = "QueryMessageExtensionRequest"
155
- }
156
- /*********** END REQUEST TYPE ************/
157
- /*********** BEGIN RESPONSE TYPE ************/
158
- /**
159
- * @hidden
160
- * The response from the bot returned via the host
161
- * @internal
162
- * Limited to Microsoft-internal use
163
- */
164
- type IInvokeResponse = IQueryMessageExtensionResponse | IActionExecuteResponse;
165
- /**
166
- * @hidden
167
- * Used to differentiate between IInvokeResponse types
168
- * @internal
169
- * Limited to Microsoft-internal use
170
- */
171
- enum InvokeResponseType {
172
- ActionExecuteInvokeResponse = "ActionExecuteInvokeResponse",
173
- QueryMessageExtensionResponse = "QueryMessageExtensionResponse"
174
- }
175
- /**
176
- * @hidden
177
- * The response from the bot returned via the host for a message extension query request.
178
- * @internal
179
- * Limited to Microsoft-internal use
180
- */
181
- interface IQueryMessageExtensionResponse {
182
- responseType: InvokeResponseType.QueryMessageExtensionResponse;
183
- composeExtension?: ComposeExtensionResponse;
184
- }
185
- /**
186
- * @hidden
187
- * The response from the bot returned via the host for an Action.Execute request.
188
- * @internal
189
- * Limited to Microsoft-internal use
190
- */
191
- interface IActionExecuteResponse {
192
- responseType: InvokeResponseType.ActionExecuteInvokeResponse;
193
- value: Record<string, unknown>;
194
- signature?: string;
195
- statusCode: number;
196
- type: string;
197
- }
17
+ export type IOriginalRequestInfo = IQueryMessageExtensionRequest | IActionExecuteInvokeRequest;
18
+ /**
19
+ * @hidden
20
+ * Parameters OauthWindow
21
+ * @internal
22
+ * Limited to Microsoft-internal use
23
+ */
24
+ export type OauthWindowProperties = {
198
25
  /**
199
- * @hidden
200
- * @internal
201
- * Limited to Microsoft-internal use
26
+ * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
202
27
  */
203
- class ActionExecuteResponseHandler extends ResponseHandler<IActionExecuteResponse, IActionExecuteResponse> {
204
- validate(response: externalAppAuthentication.IActionExecuteResponse): boolean;
205
- deserialize(response: externalAppAuthentication.IActionExecuteResponse): externalAppAuthentication.IActionExecuteResponse;
206
- }
28
+ width?: number;
207
29
  /**
208
- * @hidden
209
- * The compose extension response returned for a message extension query request. `suggestedActions` will be present only when the type is is 'config' or 'auth'.
210
- * @internal
211
- * Limited to Microsoft-internal use
30
+ * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
212
31
  */
213
- type ComposeExtensionResponse = {
214
- attachmentLayout: AttachmentLayout;
215
- type: ComposeResultTypes;
216
- attachments?: QueryMessageExtensionAttachment[];
217
- suggestedActions?: QueryMessageExtensionSuggestedActions;
218
- text?: string;
219
- };
32
+ height?: number;
220
33
  /**
221
- * @hidden
34
+ * Some identity providers restrict their authentication pages from being displayed in embedded browsers (e.g., a web view inside of a native application)
35
+ * If the identity provider you are using prevents embedded browser usage, this flag should be set to `true` to enable the authentication page
36
+ * to be opened in an external browser. If this flag is `false`, the page will be opened directly within the current hosting application.
222
37
  *
223
- * @internal
224
- * Limited to Microsoft-internal use
38
+ * This flag is ignored when the host for the application is a web app (as opposed to a native application) as the behavior is unnecessary in a web-only
39
+ * environment without an embedded browser.
225
40
  */
226
- type QueryMessageExtensionSuggestedActions = {
227
- actions: Action[];
228
- };
229
- /**
230
- * @hidden
231
- *
232
- * @internal
233
- * Limited to Microsoft-internal use
234
- */
235
- type Action = {
236
- type: string;
237
- title: string;
238
- value: string;
239
- };
41
+ isExternal?: boolean;
42
+ };
43
+ /**
44
+ * @hidden
45
+ * Parameters for the authentication pop-up. This interface is used exclusively with the externalAppAuthentication APIs
46
+ * @internal
47
+ * Limited to Microsoft-internal use
48
+ */
49
+ export type AuthenticatePopUpParameters = {
240
50
  /**
241
- * @hidden
242
- *
243
- * @internal
244
- * Limited to Microsoft-internal use
51
+ * The URL for the authentication pop-up.
245
52
  */
246
- type QueryMessageExtensionCard = {
247
- contentType: string;
248
- content: Record<string, unknown>;
249
- fallbackHtml?: string;
250
- signature?: string;
251
- };
53
+ url: URL;
252
54
  /**
253
- * @hidden
254
- *
255
- * @internal
256
- * Limited to Microsoft-internal use
55
+ * The preferred width for the pop-up. This value can be ignored if outside the acceptable bounds.
257
56
  */
258
- type QueryMessageExtensionAttachment = QueryMessageExtensionCard & {
259
- preview?: QueryMessageExtensionCard;
260
- };
57
+ width?: number;
261
58
  /**
262
- * @hidden
263
- *
264
- * @internal
265
- * Limited to Microsoft-internal use
59
+ * The preferred height for the pop-up. This value can be ignored if outside the acceptable bounds.
266
60
  */
267
- type AttachmentLayout = 'grid' | 'list';
61
+ height?: number;
268
62
  /**
269
- * @hidden
63
+ * Some identity providers restrict their authentication pages from being displayed in embedded browsers (e.g., a web view inside of a native application)
64
+ * If the identity provider you are using prevents embedded browser usage, this flag should be set to `true` to enable the authentication page specified in
65
+ * the {@link url} property to be opened in an external browser.
66
+ * If this flag is `false`, the page will be opened directly within the current hosting application.
270
67
  *
271
- * @internal
272
- * Limited to Microsoft-internal use
68
+ * This flag is ignored when the host for the application is a web app (as opposed to a native application) as the behavior is unnecessary in a web-only
69
+ * environment without an embedded browser.
273
70
  */
274
- type ComposeResultTypes = 'auth' | 'config' | 'message' | 'result' | 'silentAuth';
275
- /*********** END RESPONSE TYPE ************/
276
- /*********** BEGIN ERROR TYPE ***********/
277
- interface InvokeError {
278
- errorCode: InvokeErrorCode;
279
- message?: string;
280
- }
281
- /**
282
- * @beta
283
- * @hidden
284
- * Determines if the provided error object is an instance of InvokeError
285
- * @internal
286
- * Limited to Microsoft-internal use
287
- * @param err The error object to check whether it is of InvokeError type
288
- */
289
- function isInvokeError(err: unknown): err is externalAppAuthentication.InvokeError;
71
+ isExternal?: boolean;
72
+ };
73
+ /**
74
+ * @hidden
75
+ * Parameters for SSO authentication. This interface is used exclusively with the externalAppAuthentication APIs
76
+ * @internal
77
+ * Limited to Microsoft-internal use
78
+ */
79
+ export type AuthTokenRequestParameters = {
290
80
  /**
291
- * @hidden
292
- *
293
- * @internal
294
- * Limited to Microsoft-internal use
81
+ * An optional list of claims which to pass to Microsoft Entra when requesting the access token.
295
82
  */
296
- enum InvokeErrorCode {
297
- INTERNAL_ERROR = "INTERNAL_ERROR"
298
- }
83
+ claims?: string[];
299
84
  /**
300
- * @hidden
301
- * Wrapper to differentiate between InvokeError and IInvokeResponse response from host
302
- * @internal
303
- * Limited to Microsoft-internal use
85
+ * An optional flag indicating whether to attempt the token acquisition silently or allow a prompt to be shown.
304
86
  */
305
- type InvokeErrorWrapper = InvokeError & {
306
- responseType: undefined;
87
+ silent?: boolean;
88
+ };
89
+ /**
90
+ * @hidden
91
+ * Information about the message extension request that should be resent by the host. Corresponds to request schema in https://learn.microsoft.com/microsoftteams/platform/resources/messaging-extension-v3/search-extensions#receive-user-requests
92
+ * @internal
93
+ * Limited to Microsoft-internal use
94
+ */
95
+ export interface IQueryMessageExtensionRequest {
96
+ requestType: OriginalRequestType.QueryMessageExtensionRequest;
97
+ commandId: string;
98
+ parameters: {
99
+ name: string;
100
+ value: string;
101
+ }[];
102
+ queryOptions?: {
103
+ count: number;
104
+ skip: number;
307
105
  };
308
- /**
309
- * @beta
310
- * @hidden
311
- * Signals to the host to perform authentication using the given authentication parameters and then resend the request to the application specified by the app ID with the authentication result.
312
- * @internal
313
- * Limited to Microsoft-internal use
314
- * @param appId ID of the application backend to which the request and authentication response should be sent. This must be a UUID
315
- * @param authenticateParameters Parameters for the authentication pop-up
316
- * @param originalRequestInfo Information about the original request that should be resent
317
- * @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
318
- */
319
- function authenticateAndResendRequest(appId: string, authenticateParameters: AuthenticatePopUpParameters, originalRequestInfo: IOriginalRequestInfo): Promise<IInvokeResponse>;
320
- /**
321
- * @beta
322
- * @hidden
323
- * Signals to the host to perform SSO authentication for the application specified by the app ID
324
- * @internal
325
- * Limited to Microsoft-internal use
326
- * @param appId ID of the application backend for which the host should attempt SSO authentication. This must be a UUID
327
- * @param authTokenRequest Parameters for SSO authentication
328
- * @returns A promise that resolves when authentication and succeeds and rejects with InvokeError on failure
329
- */
330
- function authenticateWithSSO(appId: string, authTokenRequest: AuthTokenRequestParameters): Promise<void>;
331
- /**
332
- * @beta
333
- * @hidden
334
- * Signals to the host to perform SSO authentication for the application specified by the app ID and then resend the request to the application backend with the authentication result
335
- * @internal
336
- * Limited to Microsoft-internal use
337
- * @param appId ID of the application backend for which the host should attempt SSO authentication and resend the request and authentication response. This must be a UUID.
338
- * @param authTokenRequest Parameters for SSO authentication
339
- * @param originalRequestInfo Information about the original request that should be resent
340
- * @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
341
- */
342
- function authenticateWithSSOAndResendRequest(appId: string, authTokenRequest: AuthTokenRequestParameters, originalRequestInfo: IOriginalRequestInfo): Promise<IInvokeResponse>;
343
- /**
344
- * @beta
345
- * @hidden
346
- * Signals to the host to perform Oauth2 authentication for the application specified by the title ID
347
- * @internal
348
- * Limited to Microsoft-internal use
349
- * @param titleId ID of the acquisition
350
- * @param oauthConfigId lookup ID in token store
351
- * @param oauthWindowParameters parameters for the signIn window
352
- * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
353
- */
354
- function authenticateWithOauth2(titleId: string, oauthConfigId: string, oauthWindowParameters: OauthWindowProperties): Promise<void>;
355
- /**
356
- * @beta
357
- * @hidden
358
- * API to authenticate power platform connector plugins
359
- * @internal
360
- * Limited to Microsoft-internal use
361
- * @param titleId ID of the acquisition
362
- * @param signInUrl signInUrl for the connctor page listing the connector. This is optional
363
- * @param oauthWindowParameters parameters for the signIn window
364
- * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
365
- */
366
- function authenticateWithPowerPlatformConnectorPlugins(titleId: string, signInUrl?: URL, oauthWindowParameters?: OauthWindowProperties): Promise<void>;
367
- /**
368
- * @hidden
369
- * Checks if the externalAppAuthentication capability is supported by the host
370
- * @returns boolean to represent whether externalAppAuthentication capability is supported
371
- *
372
- * @throws Error if {@linkcode app.initialize} has not successfully completed
373
- *
374
- * @internal
375
- * Limited to Microsoft-internal use
376
- */
377
- function isSupported(): boolean;
378
106
  }
107
+ /**
108
+ * @hidden
109
+ * Information about the Action.Execute request that should be resent by the host. Corresponds to schema in https://adaptivecards.io/explorer/Action.Execute.html
110
+ * @internal
111
+ * Limited to Microsoft-internal use
112
+ */
113
+ export interface IActionExecuteInvokeRequest {
114
+ requestType: OriginalRequestType.ActionExecuteInvokeRequest;
115
+ type: string;
116
+ id: string;
117
+ verb: string;
118
+ data: string | Record<string, unknown>;
119
+ }
120
+ /**
121
+ * @hidden
122
+ * @internal
123
+ * Limited to Microsoft-internal use
124
+ */
125
+ export declare class SerializableActionExecuteInvokeRequest implements ISerializable {
126
+ private invokeRequest;
127
+ constructor(invokeRequest: IActionExecuteInvokeRequest);
128
+ serialize(): object | string;
129
+ }
130
+ /**
131
+ * @beta
132
+ * @hidden
133
+ * Determines if the provided response object is an instance of IActionExecuteResponse
134
+ * @internal
135
+ * Limited to Microsoft-internal use
136
+ * @param response The object to check whether it is of IActionExecuteResponse type
137
+ */
138
+ export declare function isActionExecuteResponse(response: unknown): response is IActionExecuteResponse;
139
+ /**
140
+ * @hidden
141
+ * This is the only allowed value for IActionExecuteInvokeRequest.type. Used for validation
142
+ * @internal
143
+ * Limited to Microsoft-internal use
144
+ */
145
+ export declare const ActionExecuteInvokeRequestType = "Action.Execute";
146
+ /**
147
+ * @hidden
148
+ * Used to differentiate between IOriginalRequestInfo types
149
+ * @internal
150
+ * Limited to Microsoft-internal use
151
+ */
152
+ export declare enum OriginalRequestType {
153
+ ActionExecuteInvokeRequest = "ActionExecuteInvokeRequest",
154
+ QueryMessageExtensionRequest = "QueryMessageExtensionRequest"
155
+ }
156
+ /*********** END REQUEST TYPE ************/
157
+ /*********** BEGIN RESPONSE TYPE ************/
158
+ /**
159
+ * @hidden
160
+ * The response from the bot returned via the host
161
+ * @internal
162
+ * Limited to Microsoft-internal use
163
+ */
164
+ export type IInvokeResponse = IQueryMessageExtensionResponse | IActionExecuteResponse;
165
+ /**
166
+ * @hidden
167
+ * Used to differentiate between IInvokeResponse types
168
+ * @internal
169
+ * Limited to Microsoft-internal use
170
+ */
171
+ export declare enum InvokeResponseType {
172
+ ActionExecuteInvokeResponse = "ActionExecuteInvokeResponse",
173
+ QueryMessageExtensionResponse = "QueryMessageExtensionResponse"
174
+ }
175
+ /**
176
+ * @hidden
177
+ * The response from the bot returned via the host for a message extension query request.
178
+ * @internal
179
+ * Limited to Microsoft-internal use
180
+ */
181
+ export interface IQueryMessageExtensionResponse {
182
+ responseType: InvokeResponseType.QueryMessageExtensionResponse;
183
+ composeExtension?: ComposeExtensionResponse;
184
+ }
185
+ /**
186
+ * @hidden
187
+ * The response from the bot returned via the host for an Action.Execute request.
188
+ * @internal
189
+ * Limited to Microsoft-internal use
190
+ */
191
+ export interface IActionExecuteResponse {
192
+ responseType: InvokeResponseType.ActionExecuteInvokeResponse;
193
+ value: Record<string, unknown>;
194
+ signature?: string;
195
+ statusCode: number;
196
+ type: string;
197
+ }
198
+ /**
199
+ * @hidden
200
+ * @internal
201
+ * Limited to Microsoft-internal use
202
+ */
203
+ export declare class ActionExecuteResponseHandler extends ResponseHandler<IActionExecuteResponse, IActionExecuteResponse> {
204
+ validate(response: IActionExecuteResponse): boolean;
205
+ deserialize(response: IActionExecuteResponse): IActionExecuteResponse;
206
+ }
207
+ /**
208
+ * @hidden
209
+ * The compose extension response returned for a message extension query request. `suggestedActions` will be present only when the type is is 'config' or 'auth'.
210
+ * @internal
211
+ * Limited to Microsoft-internal use
212
+ */
213
+ export type ComposeExtensionResponse = {
214
+ attachmentLayout: AttachmentLayout;
215
+ type: ComposeResultTypes;
216
+ attachments?: QueryMessageExtensionAttachment[];
217
+ suggestedActions?: QueryMessageExtensionSuggestedActions;
218
+ text?: string;
219
+ };
220
+ /**
221
+ * @hidden
222
+ *
223
+ * @internal
224
+ * Limited to Microsoft-internal use
225
+ */
226
+ export type QueryMessageExtensionSuggestedActions = {
227
+ actions: Action[];
228
+ };
229
+ /**
230
+ * @hidden
231
+ *
232
+ * @internal
233
+ * Limited to Microsoft-internal use
234
+ */
235
+ export type Action = {
236
+ type: string;
237
+ title: string;
238
+ value: string;
239
+ };
240
+ /**
241
+ * @hidden
242
+ *
243
+ * @internal
244
+ * Limited to Microsoft-internal use
245
+ */
246
+ export type QueryMessageExtensionCard = {
247
+ contentType: string;
248
+ content: Record<string, unknown>;
249
+ fallbackHtml?: string;
250
+ signature?: string;
251
+ };
252
+ /**
253
+ * @hidden
254
+ *
255
+ * @internal
256
+ * Limited to Microsoft-internal use
257
+ */
258
+ export type QueryMessageExtensionAttachment = QueryMessageExtensionCard & {
259
+ preview?: QueryMessageExtensionCard;
260
+ };
261
+ /**
262
+ * @hidden
263
+ *
264
+ * @internal
265
+ * Limited to Microsoft-internal use
266
+ */
267
+ export type AttachmentLayout = 'grid' | 'list';
268
+ /**
269
+ * @hidden
270
+ *
271
+ * @internal
272
+ * Limited to Microsoft-internal use
273
+ */
274
+ export type ComposeResultTypes = 'auth' | 'config' | 'message' | 'result' | 'silentAuth';
275
+ /*********** END RESPONSE TYPE ************/
276
+ /*********** BEGIN ERROR TYPE ***********/
277
+ export interface InvokeError {
278
+ errorCode: InvokeErrorCode;
279
+ message?: string;
280
+ }
281
+ /**
282
+ * @beta
283
+ * @hidden
284
+ * Determines if the provided error object is an instance of InvokeError
285
+ * @internal
286
+ * Limited to Microsoft-internal use
287
+ * @param err The error object to check whether it is of InvokeError type
288
+ */
289
+ export declare function isInvokeError(err: unknown): err is InvokeError;
290
+ /**
291
+ * @hidden
292
+ *
293
+ * @internal
294
+ * Limited to Microsoft-internal use
295
+ */
296
+ export declare enum InvokeErrorCode {
297
+ INTERNAL_ERROR = "INTERNAL_ERROR"
298
+ }
299
+ /**
300
+ * @hidden
301
+ * Wrapper to differentiate between InvokeError and IInvokeResponse response from host
302
+ * @internal
303
+ * Limited to Microsoft-internal use
304
+ */
305
+ export type InvokeErrorWrapper = InvokeError & {
306
+ responseType: undefined;
307
+ };
308
+ /**
309
+ * @beta
310
+ * @hidden
311
+ * @internal
312
+ * Limited to Microsoft-internal use
313
+ */
314
+ export declare function validateActionExecuteInvokeRequest(actionExecuteRequest: IActionExecuteInvokeRequest): void;
315
+ /**
316
+ * @beta
317
+ * @hidden
318
+ * Signals to the host to perform authentication using the given authentication parameters and then resend the request to the application specified by the app ID with the authentication result.
319
+ * @internal
320
+ * Limited to Microsoft-internal use
321
+ * @param appId ID of the application backend to which the request and authentication response should be sent. This must be a UUID
322
+ * @param authenticateParameters Parameters for the authentication pop-up
323
+ * @param originalRequestInfo Information about the original request that should be resent
324
+ * @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
325
+ */
326
+ export declare function authenticateAndResendRequest(appId: string, authenticateParameters: AuthenticatePopUpParameters, originalRequestInfo: IOriginalRequestInfo): Promise<IInvokeResponse>;
327
+ /**
328
+ * @beta
329
+ * @hidden
330
+ * Signals to the host to perform SSO authentication for the application specified by the app ID
331
+ * @internal
332
+ * Limited to Microsoft-internal use
333
+ * @param appId ID of the application backend for which the host should attempt SSO authentication. This must be a UUID
334
+ * @param authTokenRequest Parameters for SSO authentication
335
+ * @returns A promise that resolves when authentication and succeeds and rejects with InvokeError on failure
336
+ */
337
+ export declare function authenticateWithSSO(appId: string, authTokenRequest: AuthTokenRequestParameters): Promise<void>;
338
+ /**
339
+ * @beta
340
+ * @hidden
341
+ * Signals to the host to perform SSO authentication for the application specified by the app ID and then resend the request to the application backend with the authentication result
342
+ * @internal
343
+ * Limited to Microsoft-internal use
344
+ * @param appId ID of the application backend for which the host should attempt SSO authentication and resend the request and authentication response. This must be a UUID.
345
+ * @param authTokenRequest Parameters for SSO authentication
346
+ * @param originalRequestInfo Information about the original request that should be resent
347
+ * @returns A promise that resolves to the IInvokeResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
348
+ */
349
+ export declare function authenticateWithSSOAndResendRequest(appId: string, authTokenRequest: AuthTokenRequestParameters, originalRequestInfo: IOriginalRequestInfo): Promise<IInvokeResponse>;
350
+ /**
351
+ * @beta
352
+ * @hidden
353
+ * Signals to the host to perform Oauth2 authentication for the application specified by the title ID
354
+ * @internal
355
+ * Limited to Microsoft-internal use
356
+ * @param titleId ID of the acquisition
357
+ * @param oauthConfigId lookup ID in token store
358
+ * @param oauthWindowParameters parameters for the signIn window
359
+ * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
360
+ */
361
+ export declare function authenticateWithOauth2(titleId: string, oauthConfigId: string, oauthWindowParameters: OauthWindowProperties): Promise<void>;
362
+ /**
363
+ * @beta
364
+ * @hidden
365
+ * API to authenticate power platform connector plugins
366
+ * @internal
367
+ * Limited to Microsoft-internal use
368
+ * @param titleId ID of the acquisition
369
+ * @param signInUrl signInUrl for the connctor page listing the connector. This is optional
370
+ * @param oauthWindowParameters parameters for the signIn window
371
+ * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
372
+ */
373
+ export declare function authenticateWithPowerPlatformConnectorPlugins(titleId: string, signInUrl?: URL, oauthWindowParameters?: OauthWindowProperties): Promise<void>;
374
+ /**
375
+ * @hidden
376
+ * Checks if the externalAppAuthentication capability is supported by the host
377
+ * @returns boolean to represent whether externalAppAuthentication capability is supported
378
+ *
379
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
380
+ *
381
+ * @internal
382
+ * Limited to Microsoft-internal use
383
+ */
384
+ export declare function isSupported(): boolean;