@microsoft/teams-js 2.15.0-beta.0 → 2.15.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.
@@ -2668,6 +2668,8 @@ export enum HostClientType {
2668
2668
  ios = "ios",
2669
2669
  /** Represents the iPadOS client of host, which runs on iOS devices such as iPads. */
2670
2670
  ipados = "ipados",
2671
+ /** The host is running on a macOS client, which runs on devices such as MacBooks. */
2672
+ macos = "macos",
2671
2673
  /**
2672
2674
  * @deprecated
2673
2675
  * As of 2.0.0, please use {@link teamsRoomsWindows} instead.
@@ -2941,7 +2943,7 @@ export interface TeamInformation {
2941
2943
  */
2942
2944
  export interface LocaleInfo {
2943
2945
  /** Represents the user's platform on which the app is running. */
2944
- platform: HostClientType.android | HostClientType.ios | 'macos' | 'windows';
2946
+ platform: HostClientType.android | HostClientType.ios | HostClientType.macos | 'windows';
2945
2947
  /**
2946
2948
  * Represents the regional format used by the user's locale.
2947
2949
  * @example `en-us`.
@@ -3746,6 +3748,24 @@ export interface AdaptiveCardVersion {
3746
3748
  /** Represents the minor version number. */
3747
3749
  minorVersion: number;
3748
3750
  }
3751
+ /**
3752
+ * Currently supported Mime type
3753
+ */
3754
+ export enum ClipboardSupportedMimeType {
3755
+ TextPlain = "text/plain",
3756
+ TextHtml = "text/html",
3757
+ ImagePNG = "image/png",
3758
+ ImageJPEG = "image/jpeg"
3759
+ }
3760
+ /**
3761
+ * Clipboard write parameters
3762
+ */
3763
+ export interface ClipboardParams {
3764
+ /** Mime Type of data to be copied to Clipboard */
3765
+ mimeType: ClipboardSupportedMimeType;
3766
+ /** Blob content in Base64 string format */
3767
+ content: string;
3768
+ }
3749
3769
 
3750
3770
  /**
3751
3771
  * Namespace to interact with app initialization and lifecycle.
@@ -4285,97 +4305,6 @@ export namespace appInstallDialog {
4285
4305
  function isSupported(): boolean;
4286
4306
  }
4287
4307
 
4288
- /**
4289
- * Namespace to interact with the appNotification specific part of the SDK
4290
- * @beta
4291
- */
4292
- export namespace appNotification {
4293
- /**
4294
- * Data structure to represent appNotification information
4295
- *
4296
- * @beta
4297
- */
4298
- interface NotificationDisplayParam {
4299
- /**
4300
- * Notification title(maximum length: 75 characters)
4301
- */
4302
- title: string;
4303
- /**
4304
- * Notification content (maximum length: 1500 characters)
4305
- */
4306
- content: string;
4307
- /**
4308
- * This would represent an optional icon that can be displayed on the notification. It should have a max size of 49 pixels by 49 pixels
4309
- * If no icon is provided, the notification card would be displayed without an icon
4310
- * The url link to where the icon is stored should be provided as the input string
4311
- */
4312
- icon?: URL;
4313
- /**
4314
- * This would specify how long a notification would be displayed on the screen for (unit: seconds)
4315
- *
4316
- */
4317
- displayDurationInSeconds: number;
4318
- /**
4319
- * A url link to the page in which the notification would direct the user to.
4320
- */
4321
- notificationActionUrl: URL;
4322
- }
4323
- /**
4324
- * @internal
4325
- *
4326
- * @hidden
4327
- *
4328
- * @beta
4329
- *
4330
- * Data structure to represent appNotification information that would be sent to the host SDK
4331
- */
4332
- interface NotificationDisplayParamForAppHost {
4333
- /**
4334
- * Notification title(maximum length: 75 characters)
4335
- */
4336
- title: string;
4337
- /**
4338
- * Notification content (maximum length: 1500 characters)
4339
- */
4340
- content: string;
4341
- /**
4342
- * This would represent an optional icon that can be displayed on the notification. It should have a max size of 49 pixels by 49 pixels
4343
- * If no icon is provided, the notification card would be displayed without an icon
4344
- * The url link to where the icon is stored should be provided as the input string
4345
- */
4346
- notificationIconAsString?: string;
4347
- /**
4348
- * This would specify how long a notification would be displayed on the screen for (unit: seconds)
4349
- *
4350
- */
4351
- displayDurationInSeconds: number;
4352
- /**
4353
- * A url string type to the page in which the notification would direct the user to.
4354
- */
4355
- notificationActionUrlAsString: string;
4356
- }
4357
- /**
4358
- * Displays appNotification after making a validiity check on all of the required parameters, by calling the validateNotificationDisplayParams helper function
4359
- * An interface object containing all the required parameters to be displayed on the notification would be passed in here
4360
- * The notificationDisplayParam would be serialized before passing across to the message handler to ensure all objects passed contain simple parameters that would properly pass across the Iframe
4361
- * @param notificationdisplayparam - Interface object with all the parameters required to display an appNotificiation
4362
- * @returns a promise resolution upon conclusion
4363
- * @throws Error if appNotification capability is not supported
4364
- * @throws Error if notficationDisplayParam was not validated successfully
4365
- *
4366
- * @beta
4367
- */
4368
- function displayInAppNotification(notificationDisplayParam: NotificationDisplayParam): Promise<void>;
4369
- /**
4370
- * Checks if appNotification is supported by the host
4371
- * @returns boolean to represent whether the appNotification capability is supported
4372
- * @throws Error if {@linkcode app.initialize} has not successfully completed
4373
- *
4374
- * @beta
4375
- */
4376
- function isSupported(): boolean;
4377
- }
4378
-
4379
4308
  /**
4380
4309
  * Namespace to interact with the barcode scanning-specific part of the SDK.
4381
4310
  *
@@ -4514,6 +4443,43 @@ export namespace chat {
4514
4443
  }
4515
4444
  export {};
4516
4445
 
4446
+ /**
4447
+ * Interact with the system clipboard
4448
+ *
4449
+ * @beta
4450
+ */
4451
+ export namespace clipboard {
4452
+ /**
4453
+ * Function to copy data to clipboard.
4454
+ * @remarks
4455
+ * Note: clipboard.write only supports Text, HTML, PNG, and JPEG data format.
4456
+ * MIME type for Text -> `text/plain`, HTML -> `text/html`, PNG/JPEG -> `image/(png | jpeg)`
4457
+ * Also, JPEG will be converted to PNG image when copying to clipboard.
4458
+ *
4459
+ * @param blob - A Blob object representing the data to be copied to clipboard.
4460
+ * @returns A string promise which resolves to success message from the clipboard or
4461
+ * rejects with error stating the reason for failure.
4462
+ */
4463
+ function write(blob: Blob): Promise<void>;
4464
+ /**
4465
+ * Function to read data from clipboard.
4466
+ *
4467
+ * @returns A promise blob which resolves to the data read from the clipboard or
4468
+ * rejects stating the reason for failure.
4469
+ * Note: Returned blob type will contain one of the MIME type `image/png`, `text/plain` or `text/html`.
4470
+ */
4471
+ function read(): Promise<Blob>;
4472
+ /**
4473
+ * Checks if clipboard capability is supported by the host
4474
+ * @returns boolean to represent whether the clipboard capability is supported
4475
+ *
4476
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
4477
+ *
4478
+ * @beta
4479
+ */
4480
+ function isSupported(): boolean;
4481
+ }
4482
+
4517
4483
  /**
4518
4484
  * This group of capabilities enables apps to show modal dialogs. There are two primary types of dialogs: URL-based dialogs and [Adaptive Card](https://learn.microsoft.com/adaptive-cards/) dialogs.
4519
4485
  * Both types of dialogs are shown on top of your app, preventing interaction with your app while they are displayed.
@@ -4988,7 +4954,7 @@ export namespace pages {
4988
4954
  export function navigateToApp(params: NavigateToAppParams): Promise<void>;
4989
4955
  /**
4990
4956
  * Shares a deep link that a user can use to navigate back to a specific state in this page.
4991
- * Please note that this method does yet work on mobile hosts.
4957
+ * Please note that this method does not yet work on mobile hosts.
4992
4958
  *
4993
4959
  * @param deepLinkParameters - ID and label for the link and fallback URL.
4994
4960
  */