@microsoft/teams-js 2.39.1 → 2.40.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
24
24
 
25
25
  ### Production
26
26
 
27
- You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.39.1/js/MicrosoftTeams.min.js) or point your package manager at them.
27
+ You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.40.0/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
45
45
  ```html
46
46
  <!-- Microsoft Teams JavaScript API (via CDN) -->
47
47
  <script
48
- src="https://res.cdn.office.net/teams-js/2.39.1/js/MicrosoftTeams.min.js"
49
- integrity="sha384-DCaADE5ucxq02uymDGfLHqBklxuM03ZONTCmqdwEFNouwR1kHsPHVT1UYOyb3X72"
48
+ src="https://res.cdn.office.net/teams-js/2.40.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-QXdQxWIYy1PLsb9pdWIm5k6mjLxVKAF4ISp0BVCZZCiZNyaKXinYNAQVT8+8hEIf"
50
50
  crossorigin="anonymous"
51
51
  ></script>
52
52
 
53
53
  <!-- Microsoft Teams JavaScript API (via npm) -->
54
- <script src="node_modules/@microsoft/teams-js@2.39.1/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.40.0/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -12,7 +12,9 @@ export declare enum ContentItemType {
12
12
  MEDIA = "media",
13
13
  CALENDAR_INVITE = "calendarInvite",
14
14
  WEB_PAGE = "webPage",
15
- MIXED = "mixed"
15
+ MIXED = "mixed",
16
+ TEAMS = "teams",
17
+ FILE = "file"
16
18
  }
17
19
  /**
18
20
  * @hidden
@@ -56,15 +58,8 @@ export interface ServerEmailContent extends BaseEmailContent {
56
58
  export interface DraftEmailContent extends BaseEmailContent {
57
59
  responseToEmailId?: string;
58
60
  savedTime?: Date;
61
+ composeType?: 'new' | 'reply' | 'replyAll' | 'forward';
59
62
  }
60
- /**
61
- * @hidden
62
- *
63
- * Interface for draft email content (no id, times optional)
64
- *
65
- * @internal
66
- * Limited to Microsoft-internal use
67
- */
68
63
  export type EmailContent = ServerEmailContent | DraftEmailContent;
69
64
  /**
70
65
  * @hidden
@@ -113,7 +108,7 @@ export interface WebPageContent {
113
108
  */
114
109
  export interface TextSelection {
115
110
  content: string;
116
- source?: EmailContent | WebPageContent | CalendarInviteContent;
111
+ source?: EmailContent | WebPageContent | CalendarInviteContent | TeamsContent | FileContent;
117
112
  }
118
113
  /**
119
114
  * @hidden
@@ -189,7 +184,198 @@ export interface MediaSelection {
189
184
  type: MediaSelectionType;
190
185
  altText?: string;
191
186
  content: ImageContent | AudioContent | VideoContent;
192
- source?: EmailContent | WebPageContent | CalendarInviteContent;
187
+ source?: EmailContent | WebPageContent | CalendarInviteContent | TeamsContent | FileContent;
188
+ }
189
+ /**
190
+ * @hidden
191
+ *
192
+ * Interface representing the context of a Microsoft Teams chat.
193
+ * Contains identifying information for a specific Teams chat session.
194
+ *
195
+ * @internal
196
+ * Limited to Microsoft-internal use
197
+ */
198
+ export interface TeamsChatContext {
199
+ chatId: string;
200
+ }
201
+ /**
202
+ * @hidden
203
+ *
204
+ * Interface representing the context of a Microsoft Teams channel.
205
+ * Contains identifying information for a specific Teams channel and related content.
206
+ *
207
+ * @internal
208
+ * Limited to Microsoft-internal use
209
+ */
210
+ export interface TeamsChannelContext {
211
+ channelId: string;
212
+ teamId: string;
213
+ channelName?: string;
214
+ postId?: string;
215
+ replyChainId?: string;
216
+ clientConversationId?: string;
217
+ }
218
+ /**
219
+ * @hidden
220
+ *
221
+ * Interface representing the context of a Microsoft Teams meeting.
222
+ * Contains configuration and identifying information for Teams meeting sessions including Copilot features.
223
+ *
224
+ * @internal
225
+ * Limited to Microsoft-internal use
226
+ */
227
+ export interface TeamsMeetingContext {
228
+ callId: string;
229
+ threadId: string;
230
+ organizerId: string;
231
+ messageId?: string;
232
+ groupId?: string;
233
+ sessionType?: TeamsSessionType;
234
+ vroomId?: string;
235
+ iCalUid?: string;
236
+ conversationId?: string;
237
+ locale?: string;
238
+ disableHistory?: boolean;
239
+ Dimensions?: TeamsDimension[];
240
+ UtteranceInfo?: TeamsUtteranceInfo;
241
+ copilotMode?: CopilotMode;
242
+ transcriptState?: TranscriptState;
243
+ enableMeetingCopilotResponseHandoff?: boolean;
244
+ enableCopilotResponseCopyRestriction?: boolean;
245
+ enableMeetingCopilotVisualInsights?: boolean;
246
+ enableMeetingCopilotCitation?: boolean;
247
+ }
248
+ /**
249
+ * @hidden
250
+ *
251
+ * Enum representing different types of Teams session contexts.
252
+ * Defines the various meeting and chat session types within Microsoft Teams.
253
+ *
254
+ * @internal
255
+ * Limited to Microsoft-internal use
256
+ */
257
+ export declare enum TeamsSessionType {
258
+ Private = "Private",
259
+ Shared = "Shared",
260
+ Recap = "Recap",
261
+ RecapCall = "RecapCall",
262
+ PrivateViewCall = "PrivateViewCall",
263
+ Chat = "Chat",
264
+ Compose = "Compose"
265
+ }
266
+ /**
267
+ * @hidden
268
+ *
269
+ * Interface for telemetry dimension data used in analytics and reporting.
270
+ * Contains dimension name-value pairs for categorizing telemetry data.
271
+ *
272
+ * @internal
273
+ * Limited to Microsoft-internal use
274
+ */
275
+ export interface TeamsDimension {
276
+ DimensionName: TeamsDimensionName;
277
+ DimensionValue: string;
278
+ }
279
+ /**
280
+ * @hidden
281
+ *
282
+ * Enum defining telemetry dimension names for categorizing analytics data.
283
+ * Used to specify the type of dimension being tracked in telemetry systems.
284
+ *
285
+ * @internal
286
+ * Limited to Microsoft-internal use
287
+ */
288
+ export declare enum TeamsDimensionName {
289
+ ClientDeviceType = "ClientDeviceType",
290
+ ClientRing = "ClientRing",
291
+ ClientScenarioName = "ClientScenarioName"
292
+ }
293
+ /**
294
+ * @hidden
295
+ *
296
+ * Interface for utterance identification information used in conversation tracking.
297
+ * Contains unique identifiers for individual utterances in chat or meeting contexts.
298
+ *
299
+ * @internal
300
+ * Limited to Microsoft-internal use
301
+ */
302
+ export interface TeamsUtteranceInfo {
303
+ utteranceId?: string;
304
+ }
305
+ /**
306
+ * @hidden
307
+ *
308
+ * Enum defining different Copilot operational modes.
309
+ * Specifies whether Copilot is enabled and how it should function in Teams contexts.
310
+ *
311
+ * @internal
312
+ * Limited to Microsoft-internal use
313
+ */
314
+ export declare enum CopilotMode {
315
+ Enabled = "enabled",
316
+ Disabled = "disabled",
317
+ EnabledWithTranscript = "enabledWithTranscript"
318
+ }
319
+ /**
320
+ * @hidden
321
+ *
322
+ * Enum defining different transcript states for meeting recordings.
323
+ * Indicates the current status of transcript generation and availability.
324
+ *
325
+ * @internal
326
+ * Limited to Microsoft-internal use
327
+ */
328
+ export declare enum TranscriptState {
329
+ NotStarted = "notStarted",
330
+ Active = "active",
331
+ Inactive = "inactive",
332
+ UnknownFutureValue = "unknownFutureValue"
333
+ }
334
+ /**
335
+ * @hidden
336
+ *
337
+ * Enum defining the context types for Teams-related content.
338
+ * Specifies whether the content is from a chat, channel, meeting, or meeting chat.
339
+ *
340
+ * @internal
341
+ * Limited to Microsoft-internal use
342
+ */
343
+ export declare enum TeamsContextType {
344
+ Chat = "Chat",
345
+ Channel = "Channel",
346
+ Meeting = "Meeting",
347
+ MeetingChat = "MeetingChat"
348
+ }
349
+ /**
350
+ * @hidden
351
+ *
352
+ * Interface for Teams-related content data including app information and context.
353
+ * Contains metadata about Teams applications and their execution contexts.
354
+ *
355
+ * @internal
356
+ * Limited to Microsoft-internal use
357
+ */
358
+ export interface TeamsContent {
359
+ appName?: string;
360
+ appVersion?: string;
361
+ appPlatform?: string;
362
+ appRingInfo?: string;
363
+ contextType: TeamsContextType;
364
+ chatContext?: TeamsChatContext;
365
+ channelContext?: TeamsChannelContext;
366
+ meetingContext?: TeamsMeetingContext;
367
+ }
368
+ /**
369
+ * @hidden
370
+ *
371
+ * Interface for file content data including URLs and metadata.
372
+ * Represents file attachments and documents referenced in content.
373
+ *
374
+ * @internal
375
+ * Limited to Microsoft-internal use
376
+ */
377
+ export interface FileContent {
378
+ fileUrl?: string;
193
379
  }
194
380
  /**
195
381
  * @hidden
@@ -205,6 +391,7 @@ export interface MixedContent {
205
391
  media?: (ImageContent | AudioContent | VideoContent)[];
206
392
  calendarInvites?: CalendarInviteContent[];
207
393
  webPages?: WebPageContent[];
394
+ files?: FileContent[];
208
395
  otherContent?: Array<Record<string, unknown>> | undefined;
209
396
  }
210
397
  /**
@@ -215,7 +402,7 @@ export interface MixedContent {
215
402
  * @internal
216
403
  * Limited to Microsoft-internal use
217
404
  */
218
- export type ContentItem = EmailContent | TextSelection | MediaSelection | CalendarInviteContent | WebPageContent | MixedContent;
405
+ export type ContentItem = EmailContent | TextSelection | MediaSelection | CalendarInviteContent | WebPageContent | TeamsContent | FileContent | MixedContent;
219
406
  /**
220
407
  * @hidden
221
408
  *
@@ -227,7 +414,7 @@ export type ContentItem = EmailContent | TextSelection | MediaSelection | Calend
227
414
  */
228
415
  export interface Content {
229
416
  userAction?: string;
230
- contentType: ContentItemType.CALENDAR_INVITE | ContentItemType.EMAIL | ContentItemType.MEDIA | ContentItemType.TEXT | ContentItemType.WEB_PAGE | ContentItemType.MIXED;
417
+ contentType: ContentItemType.CALENDAR_INVITE | ContentItemType.EMAIL | ContentItemType.MEDIA | ContentItemType.TEXT | ContentItemType.TEAMS | ContentItemType.FILE | ContentItemType.WEB_PAGE | ContentItemType.MIXED;
231
418
  formCode?: string;
232
419
  contentItems: ContentItem[];
233
420
  metadata?: string;
@@ -1 +1 @@
1
- var e,t,o,n;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed"}(e||(e={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(t||(t={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(o||(o={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(n||(n={}));class p extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}export{e as ContentItemType,t as MediaSelectionType,n as SidePanelErrorCode,p as SidePanelErrorImpl,o as UserConsent};
1
+ var e,t,n,a,o,i,c,r,p;!function(e){e.EMAIL="email",e.TEXT="text",e.MEDIA="media",e.CALENDAR_INVITE="calendarInvite",e.WEB_PAGE="webPage",e.MIXED="mixed",e.TEAMS="teams",e.FILE="file"}(e||(e={})),function(e){e.IMAGE="image",e.AUDIO="audio",e.VIDEO="video"}(t||(t={})),function(e){e.Private="Private",e.Shared="Shared",e.Recap="Recap",e.RecapCall="RecapCall",e.PrivateViewCall="PrivateViewCall",e.Chat="Chat",e.Compose="Compose"}(n||(n={})),function(e){e.ClientDeviceType="ClientDeviceType",e.ClientRing="ClientRing",e.ClientScenarioName="ClientScenarioName"}(a||(a={})),function(e){e.Enabled="enabled",e.Disabled="disabled",e.EnabledWithTranscript="enabledWithTranscript"}(o||(o={})),function(e){e.NotStarted="notStarted",e.Active="active",e.Inactive="inactive",e.UnknownFutureValue="unknownFutureValue"}(i||(i={})),function(e){e.Chat="Chat",e.Channel="Channel",e.Meeting="Meeting",e.MeetingChat="MeetingChat"}(c||(c={})),function(e){e.Accepted="accepted",e.NotAccepted="not_accepted"}(r||(r={})),function(e){e.ConsentNotAccepted="consent_not_accepted",e.PageContentBlockedPolicy="page_content_blocked_policy",e.PageContentBlockedDlp="page_content_blocked_dlp",e.PageContentTypeNotSupportedYet="page_content_type_not_supported_yet",e.PageContentSizeNotSupported="page_content_size_not_supported",e.PageContextChanged="page_context_changed",e.PageContentExtractionFailed="page_content_extraction_failed",e.PageContentSizeNotSupportedPDF="page_content_size_not_supported_pdf",e.NotSupportedOnPlatform="not_supported_on_platform",e.OtherError="other_error"}(p||(p={}));class d extends Error{constructor(e,t){super(t),this.errorCode=e,this.name="SidePanelError"}}export{e as ContentItemType,o as CopilotMode,t as MediaSelectionType,p as SidePanelErrorCode,d as SidePanelErrorImpl,c as TeamsContextType,a as TeamsDimensionName,n as TeamsSessionType,i as TranscriptState,r as UserConsent};
@@ -1 +1 @@
1
- const o="2.39.1";export{o as version};
1
+ const t="2.40.0-beta.0";export{t as version};
@@ -1365,9 +1365,14 @@ var sidePanelInterfaces_namespaceObject = {};
1365
1365
  __webpack_require__.r(sidePanelInterfaces_namespaceObject);
1366
1366
  __webpack_require__.d(sidePanelInterfaces_namespaceObject, {
1367
1367
  ContentItemType: () => (ContentItemType),
1368
+ CopilotMode: () => (CopilotMode),
1368
1369
  MediaSelectionType: () => (MediaSelectionType),
1369
1370
  SidePanelErrorCode: () => (SidePanelErrorCode),
1370
1371
  SidePanelErrorImpl: () => (SidePanelErrorImpl),
1372
+ TeamsContextType: () => (TeamsContextType),
1373
+ TeamsDimensionName: () => (TeamsDimensionName),
1374
+ TeamsSessionType: () => (TeamsSessionType),
1375
+ TranscriptState: () => (TranscriptState),
1371
1376
  UserConsent: () => (UserConsent)
1372
1377
  });
1373
1378
 
@@ -4585,7 +4590,7 @@ function isSerializable(arg) {
4585
4590
  * @hidden
4586
4591
  * Package version.
4587
4592
  */
4588
- const version = "2.39.1";
4593
+ const version = "2.40.0-beta.0";
4589
4594
 
4590
4595
  ;// ./src/public/featureFlags.ts
4591
4596
  // All build feature flags are defined inside this object. Any build feature flag must have its own unique getter and setter function. This pattern allows for client apps to treeshake unused code and avoid including code guarded by this feature flags in the final bundle. If this property isn't desired, use the below runtime feature flags object.
@@ -9464,6 +9469,8 @@ var ContentItemType;
9464
9469
  ContentItemType["CALENDAR_INVITE"] = "calendarInvite";
9465
9470
  ContentItemType["WEB_PAGE"] = "webPage";
9466
9471
  ContentItemType["MIXED"] = "mixed";
9472
+ ContentItemType["TEAMS"] = "teams";
9473
+ ContentItemType["FILE"] = "file";
9467
9474
  })(ContentItemType || (ContentItemType = {}));
9468
9475
  /**
9469
9476
  * @hidden
@@ -9479,6 +9486,87 @@ var MediaSelectionType;
9479
9486
  MediaSelectionType["AUDIO"] = "audio";
9480
9487
  MediaSelectionType["VIDEO"] = "video";
9481
9488
  })(MediaSelectionType || (MediaSelectionType = {}));
9489
+ /**
9490
+ * @hidden
9491
+ *
9492
+ * Enum representing different types of Teams session contexts.
9493
+ * Defines the various meeting and chat session types within Microsoft Teams.
9494
+ *
9495
+ * @internal
9496
+ * Limited to Microsoft-internal use
9497
+ */
9498
+ var TeamsSessionType;
9499
+ (function (TeamsSessionType) {
9500
+ TeamsSessionType["Private"] = "Private";
9501
+ TeamsSessionType["Shared"] = "Shared";
9502
+ TeamsSessionType["Recap"] = "Recap";
9503
+ TeamsSessionType["RecapCall"] = "RecapCall";
9504
+ TeamsSessionType["PrivateViewCall"] = "PrivateViewCall";
9505
+ TeamsSessionType["Chat"] = "Chat";
9506
+ TeamsSessionType["Compose"] = "Compose";
9507
+ })(TeamsSessionType || (TeamsSessionType = {}));
9508
+ /**
9509
+ * @hidden
9510
+ *
9511
+ * Enum defining telemetry dimension names for categorizing analytics data.
9512
+ * Used to specify the type of dimension being tracked in telemetry systems.
9513
+ *
9514
+ * @internal
9515
+ * Limited to Microsoft-internal use
9516
+ */
9517
+ var TeamsDimensionName;
9518
+ (function (TeamsDimensionName) {
9519
+ TeamsDimensionName["ClientDeviceType"] = "ClientDeviceType";
9520
+ TeamsDimensionName["ClientRing"] = "ClientRing";
9521
+ TeamsDimensionName["ClientScenarioName"] = "ClientScenarioName";
9522
+ })(TeamsDimensionName || (TeamsDimensionName = {}));
9523
+ /**
9524
+ * @hidden
9525
+ *
9526
+ * Enum defining different Copilot operational modes.
9527
+ * Specifies whether Copilot is enabled and how it should function in Teams contexts.
9528
+ *
9529
+ * @internal
9530
+ * Limited to Microsoft-internal use
9531
+ */
9532
+ var CopilotMode;
9533
+ (function (CopilotMode) {
9534
+ CopilotMode["Enabled"] = "enabled";
9535
+ CopilotMode["Disabled"] = "disabled";
9536
+ CopilotMode["EnabledWithTranscript"] = "enabledWithTranscript";
9537
+ })(CopilotMode || (CopilotMode = {}));
9538
+ /**
9539
+ * @hidden
9540
+ *
9541
+ * Enum defining different transcript states for meeting recordings.
9542
+ * Indicates the current status of transcript generation and availability.
9543
+ *
9544
+ * @internal
9545
+ * Limited to Microsoft-internal use
9546
+ */
9547
+ var TranscriptState;
9548
+ (function (TranscriptState) {
9549
+ TranscriptState["NotStarted"] = "notStarted";
9550
+ TranscriptState["Active"] = "active";
9551
+ TranscriptState["Inactive"] = "inactive";
9552
+ TranscriptState["UnknownFutureValue"] = "unknownFutureValue";
9553
+ })(TranscriptState || (TranscriptState = {}));
9554
+ /**
9555
+ * @hidden
9556
+ *
9557
+ * Enum defining the context types for Teams-related content.
9558
+ * Specifies whether the content is from a chat, channel, meeting, or meeting chat.
9559
+ *
9560
+ * @internal
9561
+ * Limited to Microsoft-internal use
9562
+ */
9563
+ var TeamsContextType;
9564
+ (function (TeamsContextType) {
9565
+ TeamsContextType["Chat"] = "Chat";
9566
+ TeamsContextType["Channel"] = "Channel";
9567
+ TeamsContextType["Meeting"] = "Meeting";
9568
+ TeamsContextType["MeetingChat"] = "MeetingChat";
9569
+ })(TeamsContextType || (TeamsContextType = {}));
9482
9570
  /**
9483
9571
  * @hidden
9484
9572
  *