@microsoft/teams-js 2.30.0-beta.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 (136) hide show
  1. package/README.md +4 -4
  2. package/dist/esm/_virtual/__polyfill-node.os.js +1 -0
  3. package/dist/esm/_virtual/_polyfill-node.os.js +1 -0
  4. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/node.js +1 -1
  5. package/dist/esm/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +1 -0
  6. package/dist/esm/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +1 -0
  7. package/dist/esm/packages/teams-js/dts/index.d.ts +2 -0
  8. package/dist/esm/packages/teams-js/dts/internal/VideoFrameTypes.d.ts +78 -0
  9. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +8 -0
  10. package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +16 -0
  11. package/dist/esm/packages/teams-js/dts/internal/communication.d.ts +162 -0
  12. package/dist/esm/packages/teams-js/dts/internal/constants.d.ts +146 -0
  13. package/dist/esm/packages/teams-js/dts/internal/deepLinkConstants.d.ts +26 -0
  14. package/dist/esm/packages/teams-js/dts/internal/deepLinkUtilities.d.ts +4 -0
  15. package/dist/esm/packages/teams-js/dts/internal/emailAddressValidation.d.ts +1 -0
  16. package/dist/esm/packages/teams-js/dts/internal/globalVars.d.ts +12 -0
  17. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +80 -0
  18. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +47 -0
  19. package/dist/esm/packages/teams-js/dts/internal/internalAPIs.d.ts +61 -0
  20. package/dist/esm/packages/teams-js/dts/internal/marketplaceUtils.d.ts +94 -0
  21. package/dist/esm/packages/teams-js/dts/internal/mediaUtil.d.ts +95 -0
  22. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +73 -0
  23. package/dist/esm/packages/teams-js/dts/internal/nestedAppAuthUtils.d.ts +105 -0
  24. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +11 -0
  25. package/dist/esm/packages/teams-js/dts/internal/responseHandler.d.ts +30 -0
  26. package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +344 -0
  27. package/dist/esm/packages/teams-js/dts/internal/typeCheckUtilities.d.ts +1 -0
  28. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +200 -0
  29. package/dist/esm/packages/teams-js/dts/internal/uuidObject.d.ts +11 -0
  30. package/dist/esm/packages/teams-js/dts/internal/validOrigins.d.ts +6 -0
  31. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +31 -0
  32. package/dist/esm/packages/teams-js/dts/internal/videoFrameTick.d.ts +10 -0
  33. package/dist/esm/packages/teams-js/dts/internal/videoPerformanceMonitor.d.ts +54 -0
  34. package/dist/esm/packages/teams-js/dts/internal/videoPerformanceStatistics.d.ts +49 -0
  35. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +89 -0
  36. package/dist/esm/packages/teams-js/dts/private/constants.d.ts +9 -0
  37. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +152 -0
  38. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +39 -0
  39. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +378 -0
  40. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +75 -0
  41. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +112 -0
  42. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +49 -0
  43. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +123 -0
  44. package/dist/esm/packages/teams-js/dts/private/files.d.ts +758 -0
  45. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +176 -0
  46. package/dist/esm/packages/teams-js/dts/private/index.d.ts +20 -0
  47. package/dist/esm/packages/teams-js/dts/private/interfaces.d.ts +250 -0
  48. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +25 -0
  49. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +203 -0
  50. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +107 -0
  51. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +26 -0
  52. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +81 -0
  53. package/dist/esm/packages/teams-js/dts/private/privateAPIs.d.ts +60 -0
  54. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +298 -0
  55. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +116 -0
  56. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +244 -0
  57. package/dist/esm/packages/teams-js/dts/public/adaptiveCards.d.ts +6 -0
  58. package/dist/esm/packages/teams-js/dts/public/app.d.ts +592 -0
  59. package/dist/esm/packages/teams-js/dts/public/appId.d.ts +33 -0
  60. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +57 -0
  61. package/dist/esm/packages/teams-js/dts/public/appInstallDialog.d.ts +18 -0
  62. package/dist/esm/packages/teams-js/dts/public/appWindow.d.ts +66 -0
  63. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +409 -0
  64. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +53 -0
  65. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +40 -0
  66. package/dist/esm/packages/teams-js/dts/public/call.d.ts +53 -0
  67. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +66 -0
  68. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +34 -0
  69. package/dist/esm/packages/teams-js/dts/public/constants.d.ts +179 -0
  70. package/dist/esm/packages/teams-js/dts/public/dialog.d.ts +286 -0
  71. package/dist/esm/packages/teams-js/dts/public/emailAddress.d.ts +12 -0
  72. package/dist/esm/packages/teams-js/dts/public/geoLocation.d.ts +100 -0
  73. package/dist/esm/packages/teams-js/dts/public/index.d.ts +44 -0
  74. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +1133 -0
  75. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +221 -0
  76. package/dist/esm/packages/teams-js/dts/public/location.d.ts +86 -0
  77. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +95 -0
  78. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +321 -0
  79. package/dist/esm/packages/teams-js/dts/public/media.d.ts +440 -0
  80. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +906 -0
  81. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +188 -0
  82. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +58 -0
  83. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +45 -0
  84. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +15 -0
  85. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +574 -0
  86. package/dist/esm/packages/teams-js/dts/public/people.d.ts +75 -0
  87. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +127 -0
  88. package/dist/esm/packages/teams-js/dts/public/publicAPIs.d.ts +218 -0
  89. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +207 -0
  90. package/dist/esm/packages/teams-js/dts/public/search.d.ts +91 -0
  91. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +32 -0
  92. package/dist/esm/packages/teams-js/dts/public/serializable.interface.d.ts +17 -0
  93. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +101 -0
  94. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +124 -0
  95. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +104 -0
  96. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +62 -0
  97. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +77 -0
  98. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +119 -0
  99. package/dist/esm/packages/teams-js/dts/public/version.d.ts +5 -0
  100. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +213 -0
  101. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +192 -0
  102. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +27 -0
  103. package/dist/esm/packages/teams-js/src/artifactsForCDN/validDomains.json.js +1 -1
  104. package/dist/esm/packages/teams-js/src/index.js +1 -1
  105. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -0
  106. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  107. package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -1
  108. package/dist/esm/packages/teams-js/src/internal/responseHandler.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/hostEntity.js +1 -1
  112. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  113. package/dist/esm/packages/teams-js/src/public/app.js +1 -1
  114. package/dist/esm/packages/teams-js/src/public/appId.js +1 -1
  115. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  116. package/dist/esm/packages/teams-js/src/public/appInstallDialog.js +1 -1
  117. package/dist/esm/packages/teams-js/src/public/authentication.js +1 -1
  118. package/dist/esm/packages/teams-js/src/public/barCode.js +1 -1
  119. package/dist/esm/packages/teams-js/src/public/calendar.js +1 -1
  120. package/dist/esm/packages/teams-js/src/public/call.js +1 -1
  121. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  122. package/dist/esm/packages/teams-js/src/public/constants.js +1 -1
  123. package/dist/esm/packages/teams-js/src/public/pages.js +1 -1
  124. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  125. package/dist/esm/packages/teams-js/src/public/serializable.interface.js +1 -0
  126. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  127. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  128. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  129. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  130. package/dist/umd/MicrosoftTeams.d.ts +10740 -10768
  131. package/dist/umd/MicrosoftTeams.js +1572 -1360
  132. package/dist/umd/MicrosoftTeams.js.map +1 -1
  133. package/dist/umd/MicrosoftTeams.min.js +1 -1
  134. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  135. package/package.json +1 -1
  136. package/dist/esm/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js +0 -1
@@ -0,0 +1,378 @@
1
+ import { ResponseHandler } from '../internal/responseHandler';
2
+ import { ISerializable } from '../public/serializable.interface';
3
+ /**
4
+ * @hidden
5
+ * Namespace to delegate authentication and message extension requests to the host
6
+ * @internal
7
+ * Limited to Microsoft-internal use
8
+ */
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
+ }
198
+ /**
199
+ * @hidden
200
+ * @internal
201
+ * Limited to Microsoft-internal use
202
+ */
203
+ class ActionExecuteResponseHandler extends ResponseHandler<IActionExecuteResponse, IActionExecuteResponse> {
204
+ validate(response: externalAppAuthentication.IActionExecuteResponse): boolean;
205
+ deserialize(response: externalAppAuthentication.IActionExecuteResponse): externalAppAuthentication.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
+ 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
+ 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
+ };
240
+ /**
241
+ * @hidden
242
+ *
243
+ * @internal
244
+ * Limited to Microsoft-internal use
245
+ */
246
+ 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
+ type QueryMessageExtensionAttachment = QueryMessageExtensionCard & {
259
+ preview?: QueryMessageExtensionCard;
260
+ };
261
+ /**
262
+ * @hidden
263
+ *
264
+ * @internal
265
+ * Limited to Microsoft-internal use
266
+ */
267
+ type AttachmentLayout = 'grid' | 'list';
268
+ /**
269
+ * @hidden
270
+ *
271
+ * @internal
272
+ * Limited to Microsoft-internal use
273
+ */
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;
290
+ /**
291
+ * @hidden
292
+ *
293
+ * @internal
294
+ * Limited to Microsoft-internal use
295
+ */
296
+ 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
+ type InvokeErrorWrapper = InvokeError & {
306
+ responseType: undefined;
307
+ };
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
+ }
@@ -0,0 +1,75 @@
1
+ import { AppId } from '../public';
2
+ import { externalAppAuthentication } from './externalAppAuthentication';
3
+ /**
4
+ * @hidden
5
+ * Namespace to delegate authentication requests to the host for custom engine agents
6
+ * @internal
7
+ * Limited to Microsoft-internal use
8
+ * @beta
9
+ */
10
+ export declare namespace externalAppAuthenticationForCEA {
11
+ /**
12
+ * @beta
13
+ * @hidden
14
+ * Signals to the host to perform SSO authentication for the application specified by the app ID, and then send the authResult to the application backend.
15
+ * @internal
16
+ * Limited to Microsoft-internal use
17
+ * @param appId App ID of the app upon whose behalf Copilot is requesting authentication. This must be a UUID.
18
+ * @param conversationId ConversationId To tell the bot what conversation the calls are coming from
19
+ * @param authTokenRequest Parameters for SSO authentication
20
+ * @throws InvokeError if the host encounters an error while authenticating
21
+ * @returns A promise that resolves when authentication succeeds and rejects with InvokeError on failure
22
+ */
23
+ function authenticateWithSSO(appId: AppId, conversationId: string, authTokenRequest: externalAppAuthentication.AuthTokenRequestParameters): Promise<void>;
24
+ /**
25
+ * @beta
26
+ * @hidden
27
+ * Signals to the host to perform authentication using the given authentication parameters and then send the auth result to the application backend.
28
+ * @internal
29
+ * Limited to Microsoft-internal use
30
+ * @param appId App ID of the app upon whose behalf Copilot is requesting authentication. This must be a UUID.
31
+ * @param conversationId ConversationId To tell the bot what conversation the calls are coming from
32
+ * @param authenticateParameters Parameters for the authentication pop-up
33
+ * @throws InvokeError if the host encounters an error while authenticating
34
+ * @returns A promise that resolves from the application backend and rejects with InvokeError if the host encounters an error while authenticating
35
+ */
36
+ function authenticateWithOauth(appId: AppId, conversationId: string, authenticateParameters: externalAppAuthentication.AuthenticatePopUpParameters): Promise<void>;
37
+ /**
38
+ * @beta
39
+ * @hidden
40
+ * Signals to the host to perform authentication using the given authentication parameters and then resend the request to the application backend with the authentication result.
41
+ * @internal
42
+ * Limited to Microsoft-internal use
43
+ * @param appId App ID of the app upon whose behalf Copilot is requesting authentication. This must be a UUID.
44
+ * @param conversationId ConversationId To tell the bot what conversation the calls are coming from
45
+ * @param authenticateParameters Parameters for the authentication pop-up
46
+ * @param originalRequestInfo Information about the original request that should be resent
47
+ * @throws InvokeError if the host encounters an error while authenticating or resending the request
48
+ * @returns A promise that resolves to the IActionExecuteResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
49
+ */
50
+ function authenticateAndResendRequest(appId: AppId, conversationId: string, authenticateParameters: externalAppAuthentication.AuthenticatePopUpParameters, originalRequestInfo: externalAppAuthentication.IActionExecuteInvokeRequest): Promise<externalAppAuthentication.IActionExecuteResponse>;
51
+ /**
52
+ * @beta
53
+ * @hidden
54
+ * 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 and originalRequestInfo
55
+ * @internal
56
+ * Limited to Microsoft-internal use
57
+ * @param appId App ID of the app upon whose behalf Copilot is requesting authentication. This must be a UUID.
58
+ * @param conversationId ConversationId To tell the bot what conversation the calls are coming from
59
+ * @param authTokenRequest Parameters for SSO authentication
60
+ * @param originalRequestInfo Information about the original request that should be resent
61
+ * @throws InvokeError if the host encounters an error while authenticating or resending the request
62
+ * @returns A promise that resolves to the IActionExecuteResponse from the application backend and rejects with InvokeError if the host encounters an error while authenticating or resending the request
63
+ */
64
+ function authenticateWithSSOAndResendRequest(appId: AppId, conversationId: string, authTokenRequest: externalAppAuthentication.AuthTokenRequestParameters, originalRequestInfo: externalAppAuthentication.IActionExecuteInvokeRequest): Promise<externalAppAuthentication.IActionExecuteResponse>;
65
+ /**
66
+ * @beta
67
+ * @hidden
68
+ * Checks if the externalAppAuthenticationForCEA capability is supported by the host
69
+ * @returns boolean to represent whether externalAppAuthenticationForCEA capability is supported
70
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
71
+ * @internal
72
+ * Limited to Microsoft-internal use
73
+ */
74
+ function isSupported(): boolean;
75
+ }
@@ -0,0 +1,112 @@
1
+ import { ExternalAppErrorCode } from './constants';
2
+ /**
3
+ * @hidden
4
+ * Namespace to delegate adaptive card action execution to the host
5
+ * @internal
6
+ * Limited to Microsoft-internal use
7
+ */
8
+ export declare namespace externalAppCardActions {
9
+ /**
10
+ * @hidden
11
+ * The type of deeplink action that was executed by the host
12
+ * @internal
13
+ * Limited to Microsoft-internal use
14
+ */
15
+ enum ActionOpenUrlType {
16
+ DeepLinkDialog = "DeepLinkDialog",
17
+ DeepLinkOther = "DeepLinkOther",
18
+ DeepLinkStageView = "DeepLinkStageView",
19
+ GenericUrl = "GenericUrl"
20
+ }
21
+ /**
22
+ * @beta
23
+ * @hidden
24
+ * Error that can be thrown from IExternalAppCardActionService.handleActionOpenUrl
25
+ * and IExternalAppCardActionForCEAService.handleActionOpenUrl
26
+ *
27
+ * @internal
28
+ * Limited to Microsoft-internal use
29
+ */
30
+ interface ActionOpenUrlError {
31
+ errorCode: ActionOpenUrlErrorCode;
32
+ message?: string;
33
+ }
34
+ /**
35
+ * @beta
36
+ * @hidden
37
+ * Error codes that can be thrown from IExternalAppCardActionService.handleActionOpenUrl
38
+ * and IExternalAppCardActionForCEAService.handleActionOpenUrl
39
+ *
40
+ * @internal
41
+ * Limited to Microsoft-internal use
42
+ */
43
+ enum ActionOpenUrlErrorCode {
44
+ INTERNAL_ERROR = "INTERNAL_ERROR",
45
+ INVALID_LINK = "INVALID_LINK",
46
+ NOT_SUPPORTED = "NOT_SUPPORTED"
47
+ }
48
+ /**
49
+ * @beta
50
+ * @hidden
51
+ * The payload that is used when executing an Adaptive Card Action.Submit
52
+ *
53
+ * @internal
54
+ * Limited to Microsoft-internal use
55
+ */
56
+ interface IAdaptiveCardActionSubmit {
57
+ id: string;
58
+ data: string | Record<string, unknown>;
59
+ }
60
+ /**
61
+ * @beta
62
+ * @hidden
63
+ * Error that can be thrown from IExternalAppCardActionService.handleActionSubmit
64
+ * and IExternalAppCardActionForCEAService.handleActionSubmit
65
+ *
66
+ * @internal
67
+ * Limited to Microsoft-internal use
68
+ */
69
+ interface ActionSubmitError {
70
+ errorCode: ExternalAppErrorCode;
71
+ message?: string;
72
+ }
73
+ /**
74
+ * @beta
75
+ * @hidden
76
+ * Delegates an Adaptive Card Action.Submit request to the host for the application with the provided app ID
77
+ * @internal
78
+ * Limited to Microsoft-internal use
79
+ * @param appId ID of the application the request is intended for. This must be a UUID
80
+ * @param actionSubmitPayload The Adaptive Card Action.Submit payload
81
+ * @param cardActionsConfig The card actions configuration. This indicates which subtypes should be handled by this API
82
+ * @returns Promise that resolves when the request is completed and rejects with ActionSubmitError if the request fails
83
+ */
84
+ function processActionSubmit(appId: string, actionSubmitPayload: IAdaptiveCardActionSubmit): Promise<void>;
85
+ /**
86
+ * @beta
87
+ * @hidden
88
+ * Delegates an Adaptive Card Action.OpenUrl request to the host for the application with the provided app ID.
89
+ * If `fromElement` is not provided, the information from the manifest is used to determine whether the URL can
90
+ * be processed by the host. Deep link URLs for plugins are not supported and will result in an error.
91
+ * @internal
92
+ * Limited to Microsoft-internal use
93
+ * @param appId ID of the application the request is intended for. This must be a UUID
94
+ * @param url The URL to open
95
+ * @param fromElement The element on behalf of which the M365 app is making the request.
96
+ * @returns Promise that resolves to ActionOpenUrlType indicating the type of URL that was opened on success and rejects with ActionOpenUrlError if the request fails
97
+ */
98
+ function processActionOpenUrl(appId: string, url: URL, fromElement?: {
99
+ name: 'composeExtensions' | 'plugins';
100
+ }): Promise<ActionOpenUrlType>;
101
+ /**
102
+ * @hidden
103
+ * Checks if the externalAppCardActions capability is supported by the host
104
+ * @returns boolean to represent whether externalAppCardActions capability is supported
105
+ *
106
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
107
+ *
108
+ * @internal
109
+ * Limited to Microsoft-internal use
110
+ */
111
+ function isSupported(): boolean;
112
+ }
@@ -0,0 +1,49 @@
1
+ import { AppId } from '../public';
2
+ import { externalAppCardActions } from './externalAppCardActions';
3
+ /**
4
+ * @beta
5
+ * @hidden
6
+ * Namespace to delegate adaptive card action for Custom Engine Agent execution to the host
7
+ * @internal
8
+ * Limited to Microsoft-internal use
9
+ */
10
+ export declare namespace externalAppCardActionsForCEA {
11
+ /**
12
+ * @beta
13
+ * @hidden
14
+ * Delegates an Adaptive Card Action.OpenUrl request to the host for the application with the provided app ID.
15
+ * @internal
16
+ * Limited to Microsoft-internal use
17
+ * @param appId ID of the application the request is intended for. This must be a UUID
18
+ * @param conversationId To tell the bot what conversation the calls are coming from
19
+ * @param url The URL to open
20
+ * @throws Error if the response has not successfully completed
21
+ * @returns Promise that resolves to ActionOpenUrlType indicating the type of URL that was opened on success and rejects with ActionOpenUrlError if the request fails
22
+ */
23
+ function processActionOpenUrl(appId: AppId, conversationId: string, url: URL): Promise<externalAppCardActions.ActionOpenUrlType>;
24
+ /**
25
+ * @beta
26
+ * @hidden
27
+ * Delegates an Adaptive Card Action.Submit request to the host for the application with the provided app ID
28
+ * @internal
29
+ * Limited to Microsoft-internal use
30
+ * @param appId ID of the application the request is intended for. This must be a UUID
31
+ * @param conversationId To tell the bot what conversation the calls are coming from
32
+ * @param actionSubmitPayload The Adaptive Card Action.Submit payload
33
+ * @throws Error if host notifies of an error
34
+ * @returns Promise that resolves when the request is completed and rejects with ActionSubmitError if the request fails
35
+ */
36
+ function processActionSubmit(appId: AppId, conversationId: string, actionSubmitPayload: externalAppCardActions.IAdaptiveCardActionSubmit): Promise<void>;
37
+ /**
38
+ * @beta
39
+ * @hidden
40
+ * Checks if the externalAppCardActionsForCEA capability is supported by the host
41
+ * @returns boolean to represent whether externalAppCardActions capability is supported
42
+ *
43
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
44
+ *
45
+ * @internal
46
+ * Limited to Microsoft-internal use
47
+ */
48
+ function isSupported(): boolean;
49
+ }