@microsoft/teams-js 2.20.1-beta.1 → 2.21.1-beta.0

Sign up to get free protection for your applications and to get access to all the features.
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.20.0/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.21.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.20.0/js/MicrosoftTeams.min.js"
49
- integrity="sha384-wBC2cOp5ArjIyhxoK1NtXvJb98SbNojaoD6hXpvxWil+g4O1M2rXNtywEcAoQ8bl"
48
+ src="https://res.cdn.office.net/teams-js/2.21.0/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-8IiFmUTxC/bV/D3X+IBPbfibh4oRJIbu7E14dqbrDjvMRs5JDg7p4sz0/JT74f2a"
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.20.0/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.21.0/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -4824,8 +4824,6 @@ interface OpenChatRequest {
4824
4824
  * Used when starting a chat with one person
4825
4825
  *
4826
4826
  * @see OpenGroupChatRequest for use when a chat with more than one person
4827
- *
4828
- * @beta
4829
4827
  */
4830
4828
  export interface OpenSingleChatRequest extends OpenChatRequest {
4831
4829
  /**
@@ -4838,8 +4836,6 @@ export interface OpenSingleChatRequest extends OpenChatRequest {
4838
4836
  * Used when starting a chat with more than one person
4839
4837
  *
4840
4838
  * @see OpenSingleChatRequest for use in a chat with only one person
4841
- *
4842
- * @beta
4843
4839
  */
4844
4840
  export interface OpenGroupChatRequest extends OpenChatRequest {
4845
4841
  /**
@@ -4854,8 +4850,6 @@ export interface OpenGroupChatRequest extends OpenChatRequest {
4854
4850
  }
4855
4851
  /**
4856
4852
  * Contains functionality to start chat with others
4857
- *
4858
- * @beta
4859
4853
  */
4860
4854
  export namespace chat {
4861
4855
  /**
@@ -4865,8 +4859,6 @@ export namespace chat {
4865
4859
  * @param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
4866
4860
  *
4867
4861
  * @returns Promise resolved upon completion
4868
- *
4869
- * @beta
4870
4862
  */
4871
4863
  function openChat(openChatRequest: OpenSingleChatRequest): Promise<void>;
4872
4864
  /**
@@ -4877,8 +4869,6 @@ export namespace chat {
4877
4869
  * @param openChatRequest: {@link OpenGroupChatRequest} - a request object that contains a list of user emails as well as optional parameters for message and topic (display name for the group chat).
4878
4870
  *
4879
4871
  * @returns Promise resolved upon completion
4880
- *
4881
- * @beta
4882
4872
  */
4883
4873
  function openGroupChat(openChatRequest: OpenGroupChatRequest): Promise<void>;
4884
4874
  /**
@@ -4886,8 +4876,6 @@ export namespace chat {
4886
4876
  * @returns boolean to represent whether the chat capability is supported
4887
4877
  *
4888
4878
  * @throws Error if {@linkcode app.initialize} has not successfully completed
4889
- *
4890
- * @beta
4891
4879
  */
4892
4880
  function isSupported(): boolean;
4893
4881
  }
@@ -7282,6 +7270,64 @@ export namespace meeting {
7282
7270
  * @beta
7283
7271
  */
7284
7272
  function registerMeetingReactionReceivedHandler(handler: (eventData: MeetingReactionReceivedEventData) => void): void;
7273
+ /**
7274
+ * @hidden
7275
+ * Hide from docs beacuse it's only used internally as a serialization/deserialization type
7276
+ *
7277
+ * @internal
7278
+ * Limited to Microsoft-internal use
7279
+ */
7280
+ interface ISerializedJoinMeetingParams {
7281
+ joinWebUrl: string;
7282
+ source: EventActionSource;
7283
+ }
7284
+ /**
7285
+ * This function is used to join a meeting.
7286
+ * This opens a meeting in a new window for the desktop app.
7287
+ * In case of a web app, it will close the current app and open the meeting in the same tab.
7288
+ * There is currently no support or experience for this on mobile platforms.
7289
+ * @param joinMeetingParams This takes {@link JoinMeetingParams} for joining the meeting. If source isn't passed then it is marked as 'Other' by default.
7290
+ * @throws error if the meeting join fails, the promise will reject to an object with the error message.
7291
+ */
7292
+ function joinMeeting(joinMeetingParams: JoinMeetingParams): Promise<void>;
7293
+ /**
7294
+ * Contains information associated with parameters required for joining the Microsoft Teams meetings.
7295
+ * More details regarding parameters can be found at:
7296
+ * [Online Meeting Base - Microsoft Graph v1.0](https://learn.microsoft.com/en-us/graph/api/resources/onlinemeetingbase?view=graph-rest-1.0)
7297
+ */
7298
+ interface JoinMeetingParams {
7299
+ /** The join URL of the online meeting. */
7300
+ joinWebUrl: URL;
7301
+ /** The source of the join button click. If not passed, 'Other' is the default value of source. {@link EventActionSource} */
7302
+ source?: EventActionSource;
7303
+ }
7304
+ /** The source of the join button click. */
7305
+ enum EventActionSource {
7306
+ /**
7307
+ * Source is calendar grid context menu.
7308
+ */
7309
+ M365CalendarGridContextMenu = "m365_calendar_grid_context_menu",
7310
+ /**
7311
+ * Source is calendar grid peek.
7312
+ */
7313
+ M365CalendarGridPeek = "m365_calendar_grid_peek",
7314
+ /**
7315
+ * Source is calendar grid event card join button.
7316
+ */
7317
+ M365CalendarGridEventCardJoinButton = "m365_calendar_grid_event_card_join_button",
7318
+ /**
7319
+ * Source is calendar form ribbon join button.
7320
+ */
7321
+ M365CalendarFormRibbonJoinButton = "m365_calendar_form_ribbon_join_button",
7322
+ /**
7323
+ * Source is calendar form join teams meeting button.
7324
+ */
7325
+ M365CalendarFormJoinTeamsMeetingButton = "m365_calendar_form_join_teams_meeting_button",
7326
+ /**
7327
+ * Other sources.
7328
+ */
7329
+ Other = "other"
7330
+ }
7285
7331
  /**
7286
7332
  * Nested namespace for functions to control behavior of the app share button
7287
7333
  *
@@ -3378,6 +3378,7 @@ var ApiName;
3378
3378
  ApiName["BarCode_ScanBarCode"] = "barCode.scanBarCode";
3379
3379
  ApiName["Calendar_ComposeMeeting"] = "calendar.composeMeeting";
3380
3380
  ApiName["Calendar_OpenCalendarItem"] = "calendar.openCalendarItem";
3381
+ ApiName["Meeting_JoinMeeting"] = "meeting.joinMeeting";
3381
3382
  ApiName["Call_StartCall"] = "call.startCall";
3382
3383
  ApiName["Chat_OpenChat"] = "chat.openChat";
3383
3384
  ApiName["Chat_OpenGroupChat"] = "chat.openGroupChat";
@@ -3628,7 +3629,7 @@ var ApiName;
3628
3629
  })(ApiName || (ApiName = {}));
3629
3630
 
3630
3631
  ;// CONCATENATED MODULE: ./src/artifactsForCDN/validDomains.json
3631
- const validDomains_namespaceObject = JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","*.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","ssauth.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');
3632
+ const validDomains_namespaceObject = JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');
3632
3633
  var artifactsForCDN_validDomains_namespaceObject = /*#__PURE__*/__webpack_require__.t(validDomains_namespaceObject, 2);
3633
3634
  ;// CONCATENATED MODULE: ./src/internal/constants.ts
3634
3635
 
@@ -4917,7 +4918,7 @@ const _minRuntimeConfigToUninitialize = {
4917
4918
  * @hidden
4918
4919
  * Package version.
4919
4920
  */
4920
- const version = "2.20.1-beta.1";
4921
+ const version = "2.21.1-beta.0";
4921
4922
 
4922
4923
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
4923
4924
 
@@ -8561,7 +8562,7 @@ function createMessageRequest(apiVersionTag, func, args) {
8561
8562
  func: func,
8562
8563
  timestamp: Date.now(),
8563
8564
  args: args || [],
8564
- apiversiontag: apiVersionTag,
8565
+ apiVersionTag: apiVersionTag,
8565
8566
  };
8566
8567
  }
8567
8568
  /**
@@ -9911,8 +9912,6 @@ var barCode;
9911
9912
 
9912
9913
  /**
9913
9914
  * Describes information needed to start a chat
9914
- *
9915
- * @beta
9916
9915
  */
9917
9916
  /**
9918
9917
  * v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
@@ -9920,8 +9919,6 @@ var barCode;
9920
9919
  const chatTelemetryVersionNumber = ApiVersionNumber.V_2;
9921
9920
  /**
9922
9921
  * Contains functionality to start chat with others
9923
- *
9924
- * @beta
9925
9922
  */
9926
9923
  var chat;
9927
9924
  (function (chat) {
@@ -9932,8 +9929,6 @@ var chat;
9932
9929
  * @param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
9933
9930
  *
9934
9931
  * @returns Promise resolved upon completion
9935
- *
9936
- * @beta
9937
9932
  */
9938
9933
  function openChat(openChatRequest) {
9939
9934
  const apiVersionTag = getApiVersionTag(chatTelemetryVersionNumber, ApiName.Chat_OpenChat);
@@ -9966,8 +9961,6 @@ var chat;
9966
9961
  * @param openChatRequest: {@link OpenGroupChatRequest} - a request object that contains a list of user emails as well as optional parameters for message and topic (display name for the group chat).
9967
9962
  *
9968
9963
  * @returns Promise resolved upon completion
9969
- *
9970
- * @beta
9971
9964
  */
9972
9965
  function openGroupChat(openChatRequest) {
9973
9966
  const apiVersionTag = getApiVersionTag(chatTelemetryVersionNumber, ApiName.Chat_OpenGroupChat);
@@ -10007,8 +10000,6 @@ var chat;
10007
10000
  * @returns boolean to represent whether the chat capability is supported
10008
10001
  *
10009
10002
  * @throws Error if {@linkcode app.initialize} has not successfully completed
10010
- *
10011
- * @beta
10012
10003
  */
10013
10004
  function isSupported() {
10014
10005
  return ensureInitialized(runtime) && runtime.supports.chat ? true : false;
@@ -10985,6 +10976,54 @@ var meeting;
10985
10976
  registerHandler(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterMeetingReactionReceivedHandler), 'meeting.meetingReactionReceived', handler);
10986
10977
  }
10987
10978
  meeting.registerMeetingReactionReceivedHandler = registerMeetingReactionReceivedHandler;
10979
+ /**
10980
+ * This function is used to join a meeting.
10981
+ * This opens a meeting in a new window for the desktop app.
10982
+ * In case of a web app, it will close the current app and open the meeting in the same tab.
10983
+ * There is currently no support or experience for this on mobile platforms.
10984
+ * @param joinMeetingParams This takes {@link JoinMeetingParams} for joining the meeting. If source isn't passed then it is marked as 'Other' by default.
10985
+ * @throws error if the meeting join fails, the promise will reject to an object with the error message.
10986
+ */
10987
+ function joinMeeting(joinMeetingParams) {
10988
+ if ((joinMeetingParams === null || joinMeetingParams === void 0 ? void 0 : joinMeetingParams.joinWebUrl) === undefined || (joinMeetingParams === null || joinMeetingParams === void 0 ? void 0 : joinMeetingParams.joinWebUrl) === null) {
10989
+ return Promise.reject(new Error('Invalid joinMeetingParams'));
10990
+ }
10991
+ ensureInitialized(runtime);
10992
+ const serializedJoinMeetingParams = {
10993
+ joinWebUrl: joinMeetingParams.joinWebUrl.href,
10994
+ source: joinMeetingParams.source || EventActionSource.Other,
10995
+ };
10996
+ return sendAndHandleSdkError(getApiVersionTag(ApiVersionNumber.V_2, ApiName.Meeting_JoinMeeting), 'meeting.joinMeeting', serializedJoinMeetingParams);
10997
+ }
10998
+ meeting.joinMeeting = joinMeeting;
10999
+ /** The source of the join button click. */
11000
+ let EventActionSource;
11001
+ (function (EventActionSource) {
11002
+ /**
11003
+ * Source is calendar grid context menu.
11004
+ */
11005
+ EventActionSource["M365CalendarGridContextMenu"] = "m365_calendar_grid_context_menu";
11006
+ /**
11007
+ * Source is calendar grid peek.
11008
+ */
11009
+ EventActionSource["M365CalendarGridPeek"] = "m365_calendar_grid_peek";
11010
+ /**
11011
+ * Source is calendar grid event card join button.
11012
+ */
11013
+ EventActionSource["M365CalendarGridEventCardJoinButton"] = "m365_calendar_grid_event_card_join_button";
11014
+ /**
11015
+ * Source is calendar form ribbon join button.
11016
+ */
11017
+ EventActionSource["M365CalendarFormRibbonJoinButton"] = "m365_calendar_form_ribbon_join_button";
11018
+ /**
11019
+ * Source is calendar form join teams meeting button.
11020
+ */
11021
+ EventActionSource["M365CalendarFormJoinTeamsMeetingButton"] = "m365_calendar_form_join_teams_meeting_button";
11022
+ /**
11023
+ * Other sources.
11024
+ */
11025
+ EventActionSource["Other"] = "other";
11026
+ })(EventActionSource = meeting.EventActionSource || (meeting.EventActionSource = {}));
10988
11027
  /**
10989
11028
  * Nested namespace for functions to control behavior of the app share button
10990
11029
  *