@types/office-js-preview 1.0.392 → 1.0.394

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.
@@ -8,7 +8,7 @@ This package contains type definitions for Office.js (https://github.com/OfficeD
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Tue, 13 Jun 2023 23:02:50 GMT
11
+ * Last updated: Tue, 20 Jun 2023 17:32:41 GMT
12
12
  * Dependencies: none
13
13
  * Global values: `Excel`, `Office`, `OfficeCore`, `OfficeExtension`, `OneNote`, `PowerPoint`, `Visio`, `Word`
14
14
 
@@ -1552,11 +1552,9 @@ declare namespace Office {
1552
1552
  *
1553
1553
  * **Important**:
1554
1554
  *
1555
- * - In Outlook, this API isn't supported in the following scenarios.
1555
+ * - In Outlook, this API isn't supported if you load an add-in in an Outlook.com or Gmail mailbox.
1556
1556
  *
1557
- * - If the add-in is loaded in an Outlook.com or Gmail mailbox.
1558
- *
1559
- * - If the add-in is loaded in Outlook on the web in the Safari browser. This results in error 13001 ("The user is not signed into Office").
1557
+ * - In Outlook on the web, this API isn't supported if you use the Safari browser. This results in error 13001 ("The user is not signed into Office").
1560
1558
  *
1561
1559
  * - In Outlook on the web, if you use the
1562
1560
  * {@link https://learn.microsoft.com/javascript/api/office/office.ui#office-office-ui-displaydialogasync-member(1) | displayDialogAsync}
@@ -12358,13 +12356,10 @@ declare namespace Office {
12358
12356
  *
12359
12357
  * **Important**:
12360
12358
  *
12361
- * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12362
- *
12363
- * - **Windows, Web**: The cursor position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning
12364
- * of the body prior to the `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call.
12365
- *
12366
- * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12367
- * body of the mail item.
12359
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on Windows and on the web, the cursor
12360
+ * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the
12361
+ * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor
12362
+ * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item.
12368
12363
  *
12369
12364
  * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12370
12365
  * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
@@ -12399,13 +12394,10 @@ declare namespace Office {
12399
12394
  *
12400
12395
  * **Important**:
12401
12396
  *
12402
- * - After the content is prepended, the position of the cursor depends on which client the add-in is running.
12403
- *
12404
- * - **Windows, Web**: The cursor position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning
12405
- * of the body prior to the `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call.
12406
- *
12407
- * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12408
- * body of the mail item.
12397
+ * - After the content is prepended, the position of the cursor depends on which client the add-in is running. In Outlook on Windows and on the web, the cursor
12398
+ * position remains the same in the pre-existing content of the body. For example, if the cursor was positioned at the beginning of the body prior to the
12399
+ * `prependAsync` call, it will appear between the prepended content and the pre-existing content of the body after the call. In Outlook on Mac, the cursor
12400
+ * position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the body of the mail item.
12409
12401
  *
12410
12402
  * - When working with HTML-formatted bodies, it's important to note that the client may modify the value passed to `prependAsync` to
12411
12403
  * make it render efficiently with its rendering engine. This means that the value returned from a subsequent call to the `Body.getAsync` method
@@ -12516,14 +12508,10 @@ declare namespace Office {
12516
12508
  *
12517
12509
  * **Important**:
12518
12510
  *
12519
- * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12520
- *
12521
- * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12522
- *
12523
- * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12524
- * body of the mail item.
12525
- *
12526
- * - **Web**: The cursor appears at the end of the body of the mail item.
12511
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows,
12512
+ * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item.
12513
+ * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects
12514
+ * something in the body of the mail item.
12527
12515
  *
12528
12516
  * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12529
12517
  * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
@@ -12562,14 +12550,10 @@ declare namespace Office {
12562
12550
  *
12563
12551
  * **Important**:
12564
12552
  *
12565
- * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running.
12566
- *
12567
- * - **Windows**: The cursor appears at the beginning of the body of the mail item.
12568
- *
12569
- * - **Mac**: The cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects something in the
12570
- * body of the mail item.
12571
- *
12572
- * - **Web**: The cursor appears at the end of the body of the mail item.
12553
+ * - After the body is replaced with the specified content, the position of the cursor depends on which client the add-in is running. In Outlook on Windows,
12554
+ * the cursor appears at the beginning of the body of the mail item, while in Outlook on the web, the cursor appears at the end of the body of the mail item.
12555
+ * In Outlook on Mac, the cursor position isn't preserved. The cursor disappears after the `prependAsync` call and only reappears when the user selects
12556
+ * something in the body of the mail item.
12573
12557
  *
12574
12558
  * - When working with HTML-formatted bodies, it's important to note that the value returned by the `Body.getAsync` method won't necessarily
12575
12559
  * be the exact same value that was previously passed in the `Body.setAsync` method. The client may modify the value passed to `setAsync` to make it
@@ -14777,11 +14761,11 @@ declare namespace Office {
14777
14761
  * @param options - An object literal that contains one or more of the following properties:-
14778
14762
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
14779
14763
  * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
14780
- * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages are returned as an array of JSON objects in the
14781
- * `asyncResult.value` property. These properties include the item ID, subject, item type (`Message` is the only supported type at this time), and item mode
14782
- * (`Read` or `Compose`). The objects in the array follow the order in which messages were selected.
14764
+ * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages, such as the item ID and subject, are returned as an array of
14765
+ * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which
14766
+ * messages were selected.
14783
14767
  */
14784
- getSelectedItemsAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<object[]>) => void): void;
14768
+ getSelectedItemsAsync(options: Office.AsyncContextOptions, callback: (asyncResult: Office.AsyncResult<SelectedItemDetails[]>) => void): void;
14785
14769
  /**
14786
14770
  * Gets currently selected messages on which an add-in can activate and perform operations. An add-in can activate on a maximum of 100 messages at a time.
14787
14771
  * To learn more about item multi-select, see
@@ -14799,11 +14783,11 @@ declare namespace Office {
14799
14783
  * @param options - An object literal that contains one or more of the following properties:-
14800
14784
  * `asyncContext`: Developers can provide any object they wish to access in the callback function.
14801
14785
  * @param callback - When the method completes, the function passed in the `callback` parameter is called with a single parameter,
14802
- * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages are returned as an array of JSON objects in the
14803
- * `asyncResult.value` property. These properties include the item ID, subject, item type (`Message` is the only supported type at this time), and item mode
14804
- * (`Read` or `Compose`). The objects in the array follow the order in which messages were selected.
14786
+ * `asyncResult`, which is an `Office.AsyncResult` object. The properties of the selected messages, such as the item ID and subject, are returned as an array of
14787
+ * {@link Office.SelectedItemDetails | SelectedItemDetails} objects in the `asyncResult.value` property. The objects in the array follow the order in which
14788
+ * messages were selected.
14805
14789
  */
14806
- getSelectedItemsAsync(callback: (asyncResult: Office.AsyncResult<object[]>) => void): void;
14790
+ getSelectedItemsAsync(callback: (asyncResult: Office.AsyncResult<SelectedItemDetails[]>) => void): void;
14807
14791
  /**
14808
14792
  * Gets a token identifying the user and the Office Add-in.
14809
14793
  *
@@ -18570,6 +18554,52 @@ declare namespace Office {
18570
18554
  */
18571
18555
  set(name: string, value: any): void;
18572
18556
  }
18557
+ /**
18558
+ * Represents the properties of a message that's currently selected in Outlook.
18559
+ *
18560
+ * @remarks
18561
+ * [Api set: Mailbox 1.13]
18562
+ *
18563
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/understanding-outlook-add-in-permissions | Minimum permission level}**: **read/write mailbox**
18564
+ *
18565
+ * **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose, Message Read
18566
+ */
18567
+ interface SelectedItemDetails {
18568
+ /**
18569
+ * The identifier of the message conversation that contains the message that's currently selected.
18570
+ *
18571
+ * @beta
18572
+ */
18573
+ conversationId: string;
18574
+ /**
18575
+ * Returns `true` if the message that's currently selected contains an attachment.
18576
+ *
18577
+ * @beta
18578
+ */
18579
+ hasAttachment: boolean;
18580
+ /**
18581
+ * The internet message identifier of the message that's currently selected.
18582
+ *
18583
+ * @beta
18584
+ */
18585
+ internetMessageId: string;
18586
+ /**
18587
+ * The Exchange Web Services (EWS) item identifier of the message that's currently selected.
18588
+ */
18589
+ itemId: string;
18590
+ /**
18591
+ * The Outlook mode (`Read` or `Compose`) of the message that's currently selected.
18592
+ */
18593
+ itemMode: string;
18594
+ /**
18595
+ * The type of the item that's currently selected. `Message` is the only supported type at this time.
18596
+ */
18597
+ itemType: MailboxEnums.ItemType | string;
18598
+ /**
18599
+ * The description that appears in the subject field of the message that's currently selected.
18600
+ */
18601
+ subject: string;
18602
+ }
18573
18603
  /**
18574
18604
  * Provides methods to get and set the sensitivity level of an appointment. To learn more about sensitivity levels, see
18575
18605
  * {@link https://support.microsoft.com/office/4a76d05b-6c29-4a0d-9096-71784a6b12c1 | Mark your email as Normal, Personal, Private, or Confidential}.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.392",
3
+ "version": "1.0.394",
4
4
  "description": "TypeScript definitions for Office.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -45,6 +45,6 @@
45
45
  },
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
- "typesPublisherContentHash": "d1594d9b07c6dc9f5d7d3485f09c19a9482348312886cbc25db0997c0659239a",
48
+ "typesPublisherContentHash": "ad2874e9e7f1f867fc94b86ee6ada63b22bbbe769f2c0cd0f2fb587cad6daa66",
49
49
  "typeScriptVersion": "4.3"
50
50
  }