@microsoft/teams-js 2.4.2-beta.1 → 2.4.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.
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.4.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.4.2/js/MicrosoftTeams.min.js) or point your package manager at them.
28
28
 
29
29
  ## Usage
30
30
 
@@ -45,13 +45,13 @@ Reference the SDK 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.4.1/js/MicrosoftTeams.min.js"
49
- integrity="sha384-f54aC8b3HUFudeEk+QUkv5RpZUpPr2g7TdP4+jnDAMoJSmt+PbMdUV+zGTYCQY1c"
48
+ src="https://res.cdn.office.net/teams-js/2.4.2/js/MicrosoftTeams.min.js"
49
+ integrity="sha384-M1BiuUWGXFEu6jscBr/dyRZl4uojmiT5eMSu50lpG3eUyacKjwXE0eWRa2ZIdOmQ"
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.4.1/dist/MicrosoftTeams.min.js"></script>
54
+ <script src="node_modules/@microsoft/teams-js@2.4.2/dist/MicrosoftTeams.min.js"></script>
55
55
 
56
56
  <!-- Microsoft Teams JavaScript API (via local) -->
57
57
  <script src="MicrosoftTeams.min.js"></script>
@@ -69,6 +69,10 @@ Stay tuned for examples coming soon.
69
69
 
70
70
  The [Teams Test App](https://aka.ms/teams-test-app) is used to validate the Teams client SDK APIs.
71
71
 
72
+ ## Troubleshooting
73
+
74
+ If the CDN hash value on the npm page is out of date please refer to [here] (https://github.com/OfficeDev/microsoft-teams-library-js/blob/main/packages/teams-js/README.md) for an up to date version. If you notice this problem, please report that issue to us in [GitHub Issues] (https://github.com/OfficeDev/microsoft-teams-library-js/issues)
75
+
72
76
  ## Contributing
73
77
 
74
78
  Please be sure to check out the [Contributor's guide](../../CONTRIBUTING.md) for crucial steps.
@@ -3499,7 +3499,7 @@ export namespace app {
3499
3499
  */
3500
3500
  reason: FailedReason;
3501
3501
  /**
3502
- * This property is currently unused.
3502
+ * A message that describes the failure
3503
3503
  */
3504
3504
  message?: string;
3505
3505
  }
@@ -4073,10 +4073,8 @@ export namespace dialog {
4073
4073
  */
4074
4074
  err?: string;
4075
4075
  /**
4076
- * Value provided in the `result` parameter by the dialog when the {@linkcode submit} function
4077
- * was called.
4078
- * If the dialog was closed by the user without submitting (e.g., using a control in the corner
4079
- * of the dialog), this value will be `undefined` here.
4076
+ * Result value that the dialog is submitted with using {@linkcode submit} function
4077
+ *
4080
4078
  */
4081
4079
  result?: string | object;
4082
4080
  }
@@ -6368,7 +6366,7 @@ export namespace stageView {
6368
6366
  function isSupported(): boolean;
6369
6367
  }
6370
6368
 
6371
- export const version = "ERROR: This value should be replaced by webpack!";
6369
+ export const version: string;
6372
6370
 
6373
6371
  /**
6374
6372
  * Contains functionality to allow web apps to store data in webview cache
@@ -6897,198 +6895,3 @@ export namespace tasks {
6897
6895
  function getDefaultSizeIfNotProvided(taskInfo: TaskInfo): TaskInfo;
6898
6896
  }
6899
6897
 
6900
- /**
6901
- * @hidden
6902
- * Allowed roles during a meeting.
6903
- *
6904
- * @beta
6905
- */
6906
- export enum UserMeetingRole {
6907
- guest = "Guest",
6908
- attendee = "Attendee",
6909
- presenter = "Presenter",
6910
- organizer = "Organizer"
6911
- }
6912
- /**
6913
- * @hidden
6914
- * State of the current Live Share sessions backing fluid container.
6915
- *
6916
- * @beta
6917
- */
6918
- export enum ContainerState {
6919
- /**
6920
- * The call to `LiveShareHost.setContainerId()` successfully created the container mapping
6921
- * for the current Live Share session.
6922
- */
6923
- added = "Added",
6924
- /**
6925
- * A container mapping for the current Live Share Session already exists and should be used
6926
- * when joining the sessions Fluid container.
6927
- */
6928
- alreadyExists = "AlreadyExists",
6929
- /**
6930
- * The call to `LiveShareHost.setContainerId()` failed to create the container mapping due to
6931
- * another client having already set the container ID for the current Live Share session.
6932
- */
6933
- conflict = "Conflict",
6934
- /**
6935
- * A container mapping for the current Live Share session doesn't exist yet.
6936
- */
6937
- notFound = "NotFound"
6938
- }
6939
- /**
6940
- * @hidden
6941
- * Returned from `LiveShareHost.get/setFluidContainerId()` to specify the container mapping for the
6942
- * current Live Share session.
6943
- *
6944
- * @beta
6945
- */
6946
- export interface IFluidContainerInfo {
6947
- /**
6948
- * State of the containerId mapping.
6949
- */
6950
- containerState: ContainerState;
6951
- /**
6952
- * ID of the container to join for the meeting. Undefined if the container hasn't been
6953
- * created yet.
6954
- */
6955
- containerId: string | undefined;
6956
- /**
6957
- * If true, the local client should create the container and then save the created containers
6958
- * ID to the mapping service.
6959
- */
6960
- shouldCreate: boolean;
6961
- /**
6962
- * If `containerId` is undefined and `shouldCreate` is false, the container isn't ready but
6963
- * another client is creating it. The local client should wait the specified amount of time and
6964
- * then ask for the container info again.
6965
- */
6966
- retryAfter: number;
6967
- }
6968
- /**
6969
- * @hidden
6970
- * Returned from `LiveShareHost.getNtpTime()` to specify the global timestamp for the current
6971
- * Live Share session.
6972
- *
6973
- * @beta
6974
- */
6975
- export interface INtpTimeInfo {
6976
- /**
6977
- * ISO 8601 formatted server time. For example: '2019-09-07T15:50-04:00'
6978
- */
6979
- ntpTime: string;
6980
- /**
6981
- * Server time expressed as the number of milliseconds since the ECMAScript epoch.
6982
- */
6983
- ntpTimeInUTC: number;
6984
- }
6985
- /**
6986
- * @hidden
6987
- * Returned from `LiveShareHost.getFluidTenantInfo()` to specify the Fluid service to use for the
6988
- * current Live Share session.
6989
- *
6990
- * @beta
6991
- */
6992
- export interface IFluidTenantInfo {
6993
- /**
6994
- * The Fluid Tenant ID Live Share should use.
6995
- */
6996
- tenantId: string;
6997
- /**
6998
- * The Fluid service endpoint Live Share should use.
6999
- */
7000
- serviceEndpoint?: string;
7001
- /**
7002
- * @deprecated
7003
- * As of Fluid 1.0 this configuration information has been deprecated in favor of
7004
- * `serviceEndpoint`.
7005
- */
7006
- ordererEndpoint: string;
7007
- /**
7008
- * @deprecated
7009
- * As of Fluid 1.0 this configuration information has been deprecated in favor of
7010
- * `serviceEndpoint`.
7011
- */
7012
- storageEndpoint: string;
7013
- }
7014
- /**
7015
- * Live Share host implementation for O365 and Teams clients.
7016
- *
7017
- * @beta
7018
- */
7019
- export class LiveShareHost {
7020
- /**
7021
- * @hidden
7022
- * Returns the Fluid Tenant connection info for user's current context.
7023
- *
7024
- * @beta
7025
- */
7026
- getFluidTenantInfo(): Promise<IFluidTenantInfo>;
7027
- /**
7028
- * @hidden
7029
- * Returns the fluid access token for mapped container Id.
7030
- *
7031
- * @param containerId Fluid's container Id for the request. Undefined for new containers.
7032
- * @returns token for connecting to Fluid's session.
7033
- *
7034
- * @beta
7035
- */
7036
- getFluidToken(containerId?: string): Promise<string>;
7037
- /**
7038
- * @hidden
7039
- * Returns the ID of the fluid container associated with the user's current context.
7040
- *
7041
- * @beta
7042
- */
7043
- getFluidContainerId(): Promise<IFluidContainerInfo>;
7044
- /**
7045
- * @hidden
7046
- * Sets the ID of the fluid container associated with the current context.
7047
- *
7048
- * @remarks
7049
- * If this returns false, the client should delete the container they created and then call
7050
- * `getFluidContainerId()` to get the ID of the container being used.
7051
- * @param containerId ID of the fluid container the client created.
7052
- * @returns A data structure with a `containerState` indicating the success or failure of the request.
7053
- *
7054
- * @beta
7055
- */
7056
- setFluidContainerId(containerId: string): Promise<IFluidContainerInfo>;
7057
- /**
7058
- * @hidden
7059
- * Returns the shared clock server's current time.
7060
- *
7061
- * @beta
7062
- */
7063
- getNtpTime(): Promise<INtpTimeInfo>;
7064
- /**
7065
- * @hidden
7066
- * Associates the fluid client ID with a set of user roles.
7067
- *
7068
- * @param clientId The ID for the current user's Fluid client. Changes on reconnects.
7069
- * @returns The roles for the current user.
7070
- *
7071
- * @beta
7072
- */
7073
- registerClientId(clientId: string): Promise<UserMeetingRole[]>;
7074
- /**
7075
- * @hidden
7076
- * Returns the roles associated with a client ID.
7077
- *
7078
- * @param clientId The Client ID the message was received from.
7079
- * @returns The roles for a given client. Returns `undefined` if the client ID hasn't been registered yet.
7080
- *
7081
- * @beta
7082
- */
7083
- getClientRoles(clientId: string): Promise<UserMeetingRole[] | undefined>;
7084
- /**
7085
- * Returns a host instance for the client that can be passed to the `LiveShareClient` class.
7086
- *
7087
- * @remarks
7088
- * The application must first be initialized and may only be called from `meetingStage` or `sidePanel` contexts.
7089
- *
7090
- * @beta
7091
- */
7092
- static create(): LiveShareHost;
7093
- }
7094
-
@@ -1046,20 +1046,17 @@ __webpack_require__.d(__webpack_exports__, {
1046
1046
  "ActionObjectType": () => (/* reexport */ ActionObjectType),
1047
1047
  "ChannelType": () => (/* reexport */ ChannelType),
1048
1048
  "ChildAppWindow": () => (/* reexport */ ChildAppWindow),
1049
- "ContainerState": () => (/* reexport */ ContainerState),
1050
1049
  "DialogDimension": () => (/* reexport */ DialogDimension),
1051
1050
  "ErrorCode": () => (/* reexport */ ErrorCode),
1052
1051
  "FileOpenPreference": () => (/* reexport */ FileOpenPreference),
1053
1052
  "FrameContexts": () => (/* reexport */ FrameContexts),
1054
1053
  "HostClientType": () => (/* reexport */ HostClientType),
1055
1054
  "HostName": () => (/* reexport */ HostName),
1056
- "LiveShareHost": () => (/* reexport */ LiveShareHost),
1057
1055
  "NotificationTypes": () => (/* reexport */ NotificationTypes),
1058
1056
  "ParentAppWindow": () => (/* reexport */ ParentAppWindow),
1059
1057
  "SecondaryM365ContentIdName": () => (/* reexport */ SecondaryM365ContentIdName),
1060
1058
  "TaskModuleDimension": () => (/* reexport */ TaskModuleDimension),
1061
1059
  "TeamType": () => (/* reexport */ TeamType),
1062
- "UserMeetingRole": () => (/* reexport */ UserMeetingRole),
1063
1060
  "UserSettingTypes": () => (/* reexport */ UserSettingTypes),
1064
1061
  "UserTeamRole": () => (/* reexport */ UserTeamRole),
1065
1062
  "ViewerActionTypes": () => (/* reexport */ ViewerActionTypes),
@@ -1133,7 +1130,7 @@ __webpack_require__.d(__webpack_exports__, {
1133
1130
  });
1134
1131
 
1135
1132
  ;// CONCATENATED MODULE: ./src/public/version.ts
1136
- var version = "2.4.2-beta.1";
1133
+ var version = "2.4.2";
1137
1134
 
1138
1135
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1139
1136
  var GlobalVars = /** @class */ (function () {
@@ -8251,175 +8248,6 @@ var tasks;
8251
8248
  tasks.getDefaultSizeIfNotProvided = getDefaultSizeIfNotProvided;
8252
8249
  })(tasks || (tasks = {}));
8253
8250
 
8254
- ;// CONCATENATED MODULE: ./src/public/liveShareHost.ts
8255
-
8256
-
8257
-
8258
- /**
8259
- * @hidden
8260
- * Allowed roles during a meeting.
8261
- *
8262
- * @beta
8263
- */
8264
- var UserMeetingRole;
8265
- (function (UserMeetingRole) {
8266
- UserMeetingRole["guest"] = "Guest";
8267
- UserMeetingRole["attendee"] = "Attendee";
8268
- UserMeetingRole["presenter"] = "Presenter";
8269
- UserMeetingRole["organizer"] = "Organizer";
8270
- })(UserMeetingRole || (UserMeetingRole = {}));
8271
- /**
8272
- * @hidden
8273
- * State of the current Live Share sessions backing fluid container.
8274
- *
8275
- * @beta
8276
- */
8277
- var ContainerState;
8278
- (function (ContainerState) {
8279
- /**
8280
- * The call to `LiveShareHost.setContainerId()` successfully created the container mapping
8281
- * for the current Live Share session.
8282
- */
8283
- ContainerState["added"] = "Added";
8284
- /**
8285
- * A container mapping for the current Live Share Session already exists and should be used
8286
- * when joining the sessions Fluid container.
8287
- */
8288
- ContainerState["alreadyExists"] = "AlreadyExists";
8289
- /**
8290
- * The call to `LiveShareHost.setContainerId()` failed to create the container mapping due to
8291
- * another client having already set the container ID for the current Live Share session.
8292
- */
8293
- ContainerState["conflict"] = "Conflict";
8294
- /**
8295
- * A container mapping for the current Live Share session doesn't exist yet.
8296
- */
8297
- ContainerState["notFound"] = "NotFound";
8298
- })(ContainerState || (ContainerState = {}));
8299
- /**
8300
- * Live Share host implementation for O365 and Teams clients.
8301
- *
8302
- * @beta
8303
- */
8304
- var LiveShareHost = /** @class */ (function () {
8305
- function LiveShareHost() {
8306
- }
8307
- /**
8308
- * @hidden
8309
- * Returns the Fluid Tenant connection info for user's current context.
8310
- *
8311
- * @beta
8312
- */
8313
- LiveShareHost.prototype.getFluidTenantInfo = function () {
8314
- return new Promise(function (resolve) {
8315
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8316
- resolve(sendAndHandleSdkError('interactive.getFluidTenantInfo'));
8317
- });
8318
- };
8319
- /**
8320
- * @hidden
8321
- * Returns the fluid access token for mapped container Id.
8322
- *
8323
- * @param containerId Fluid's container Id for the request. Undefined for new containers.
8324
- * @returns token for connecting to Fluid's session.
8325
- *
8326
- * @beta
8327
- */
8328
- LiveShareHost.prototype.getFluidToken = function (containerId) {
8329
- return new Promise(function (resolve) {
8330
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8331
- // eslint-disable-next-line strict-null-checks/all
8332
- resolve(sendAndHandleSdkError('interactive.getFluidToken', containerId));
8333
- });
8334
- };
8335
- /**
8336
- * @hidden
8337
- * Returns the ID of the fluid container associated with the user's current context.
8338
- *
8339
- * @beta
8340
- */
8341
- LiveShareHost.prototype.getFluidContainerId = function () {
8342
- return new Promise(function (resolve) {
8343
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8344
- resolve(sendAndHandleSdkError('interactive.getFluidContainerId'));
8345
- });
8346
- };
8347
- /**
8348
- * @hidden
8349
- * Sets the ID of the fluid container associated with the current context.
8350
- *
8351
- * @remarks
8352
- * If this returns false, the client should delete the container they created and then call
8353
- * `getFluidContainerId()` to get the ID of the container being used.
8354
- * @param containerId ID of the fluid container the client created.
8355
- * @returns A data structure with a `containerState` indicating the success or failure of the request.
8356
- *
8357
- * @beta
8358
- */
8359
- LiveShareHost.prototype.setFluidContainerId = function (containerId) {
8360
- return new Promise(function (resolve) {
8361
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8362
- resolve(sendAndHandleSdkError('interactive.setFluidContainerId', containerId));
8363
- });
8364
- };
8365
- /**
8366
- * @hidden
8367
- * Returns the shared clock server's current time.
8368
- *
8369
- * @beta
8370
- */
8371
- LiveShareHost.prototype.getNtpTime = function () {
8372
- return new Promise(function (resolve) {
8373
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8374
- resolve(sendAndHandleSdkError('interactive.getNtpTime'));
8375
- });
8376
- };
8377
- /**
8378
- * @hidden
8379
- * Associates the fluid client ID with a set of user roles.
8380
- *
8381
- * @param clientId The ID for the current user's Fluid client. Changes on reconnects.
8382
- * @returns The roles for the current user.
8383
- *
8384
- * @beta
8385
- */
8386
- LiveShareHost.prototype.registerClientId = function (clientId) {
8387
- return new Promise(function (resolve) {
8388
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8389
- resolve(sendAndHandleSdkError('interactive.registerClientId', clientId));
8390
- });
8391
- };
8392
- /**
8393
- * @hidden
8394
- * Returns the roles associated with a client ID.
8395
- *
8396
- * @param clientId The Client ID the message was received from.
8397
- * @returns The roles for a given client. Returns `undefined` if the client ID hasn't been registered yet.
8398
- *
8399
- * @beta
8400
- */
8401
- LiveShareHost.prototype.getClientRoles = function (clientId) {
8402
- return new Promise(function (resolve) {
8403
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8404
- resolve(sendAndHandleSdkError('interactive.getClientRoles', clientId));
8405
- });
8406
- };
8407
- /**
8408
- * Returns a host instance for the client that can be passed to the `LiveShareClient` class.
8409
- *
8410
- * @remarks
8411
- * The application must first be initialized and may only be called from `meetingStage` or `sidePanel` contexts.
8412
- *
8413
- * @beta
8414
- */
8415
- LiveShareHost.create = function () {
8416
- ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8417
- return new LiveShareHost();
8418
- };
8419
- return LiveShareHost;
8420
- }());
8421
-
8422
-
8423
8251
  ;// CONCATENATED MODULE: ./src/public/index.ts
8424
8252
 
8425
8253
 
@@ -8452,7 +8280,6 @@ var LiveShareHost = /** @class */ (function () {
8452
8280
 
8453
8281
 
8454
8282
 
8455
-
8456
8283
 
8457
8284
 
8458
8285