Skip to content

Commit d296f2a

Browse files
[office-js][office-js-preview] (Outlook) Document support for the Body.getAsync improvements on mobile devices (DefinitelyTyped#73276)
1 parent 3cd139a commit d296f2a

File tree

2 files changed

+62
-26
lines changed

2 files changed

+62
-26
lines changed

types/office-js-preview/index.d.ts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9051,14 +9051,16 @@ declare namespace Office {
90519051
*
90529052
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
90539053
*
9054-
* **Important**: This enum is only supported in Outlook on the web and new Outlook on Windows. On these platforms, users can organize their messages as
9055-
* conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**. This user setting affects the portion of the body of a message that's displayed.
9054+
* **Important**: This enum is only supported in Outlook on the web, on mobile devices (starting in Version 4.2538.0), and in the new Outlook on Windows.
90569055
*
9057-
* The `BodyMode` enum supports the following message organization settings.
9056+
* In Outlook on the web and the new Outlook on Windows, users can organize their messages as conversations or individual messages in
9057+
* **Settings** \> **Mail** \> **Layout** \> **Message organization**. This user setting affects the portion of the body of a message that's displayed.
9058+
* The `BodyMode` enum supports the following message organization settings on these clients.
90589059
*
9059-
* - Conversations: **Group messages by conversation** > **All messages from the selected conversation** or **Show email grouped by conversation** > **Newest on top**\/**Newest on bottom**
9060+
* - Conversations: **Group messages by conversation** \> **All messages from the selected conversation** or
9061+
* **Show email grouped by conversation** \> **Newest on top**\/**Newest on bottom**
90609062
*
9061-
* - Individual messages: **Do not group messages** > **Only a single message** or **Show email as individual messages**
9063+
* - Individual messages: **Do not group messages** \> **Only a single message** or **Show email as individual messages**
90629064
*
90639065
* For more information, see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}.
90649066
*/
@@ -9068,9 +9070,11 @@ declare namespace Office {
90689070
*/
90699071
FullBody = 0,
90709072
/**
9071-
* The body mode depends on the user's current setting for message organization (that is, messages are organized as conversations or individual messages).
9072-
* If messages are organized by conversation, it specifies only the current body of the reply. Conversely, if messages are organized as individual
9073+
* In Outlook on the web and the new Outlook on Windows, the body mode depends on the user's current setting for message organization (that is, messages are organized as conversations or individual messages).
9074+
* If messages are organized by conversation, it specifies the body of the current reply. Conversely, if messages are organized as individual
90739075
* messages, it specifies the entire body of a message, including previous messages from the same conversation thread.
9076+
*
9077+
* In Outlook on mobile, specifies the body of the current reply.
90749078
*/
90759079
HostConfig = 1
90769080
}
@@ -13300,22 +13304,29 @@ declare namespace Office {
1330013304
* in the `getAsync` call may not always provide reliable formatting. Specify `Office.CoercionType.Html` instead especially if the body contains
1330113305
* formatted elements, such as tables, lists, and links.
1330213306
*
13303-
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
13304-
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13307+
* - In Outlook on the web and in the new Outlook on Windows, users can organize their messages as conversations or individual messages in
13308+
* **Settings** \> **Mail** \> **Layout** \> **Message organization** (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
1330513309
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
1330613310
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
1330713311
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
1330813312
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
1330913313
*
13314+
* - In Outlook on mobile devices, the `bodyMode` property is available starting with Version 4.2538.0.
13315+
*
13316+
* - In Outlook on mobile devices, specifying `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` returns the body of the current reply.
13317+
*
13318+
* - In Outlook on mobile devices, while in quick reply mode (the reply field at the bottom of the message), only the body of the current reply is returned.
13319+
* This applies even if `bodyMode: Office.MailboxEnums.BodyMode.FullBody` is specified in the `getAsync` call.
13320+
*
1331013321
* - The `bodyMode` option isn't supported on a message that's loaded using the `loadItemByIdAsync` method. For more information, see
1331113322
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
1331213323
*
1331313324
* @param coercionType - The format for the returned body.
1331413325
* @param options - An object literal that contains one or more of the following properties.
1331513326
* `asyncContext`: Any data you want to access in the callback function.
13316-
* `bodyMode`: In Outlook on the web and new Outlook on Windows, specifies whether only the body of the current message or the entire body of a message conversation is returned.
13327+
* `bodyMode`: In Outlook on the web, on mobile devices, and in the new Outlook on Windows, specifies whether only the body of the current message or the entire body of a message conversation is returned.
1331713328
* If a value isn't specified, `bodyMode` defaults to `Office.MailboxEnums.BodyMode.FullBody`, which returns the entire body of a message conversation. The `bodyMode` property only
13318-
* applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
13329+
* applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic) and on Mac.
1331913330
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
1332013331
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
1332113332
*/
@@ -13340,13 +13351,20 @@ declare namespace Office {
1334013351
* in the `getAsync` call may not always provide reliable formatting. Specify `Office.CoercionType.Html` instead especially if the body contains
1334113352
* formatted elements, such as tables, lists, and links.
1334213353
*
13343-
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
13344-
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13354+
* - In Outlook on the web and in the new Outlook on Windows, users can organize their messages as conversations or individual messages in
13355+
* **Settings** \> **Mail** \> **Layout** \> **Message organization** (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
1334513356
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
1334613357
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
1334713358
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
1334813359
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
1334913360
*
13361+
* - In Outlook on mobile devices, the `bodyMode` property is available starting with Version 4.2538.0.
13362+
*
13363+
* - In Outlook on mobile devices, specifying `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` returns the body of the current reply.
13364+
*
13365+
* - In Outlook on mobile devices, while in quick reply mode (the reply field at the bottom of the message), only the body of the current reply is returned.
13366+
* This applies even if `bodyMode: Office.MailboxEnums.BodyMode.FullBody` is specified in the `getAsync` call.
13367+
*
1335013368
* @param coercionType - The format for the returned body.
1335113369
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
1335213370
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.

types/office-js/index.d.ts

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9041,14 +9041,16 @@ declare namespace Office {
90419041
*
90429042
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
90439043
*
9044-
* **Important**: This enum is only supported in Outlook on the web and new Outlook on Windows. On these platforms, users can organize their messages as
9045-
* conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**. This user setting affects the portion of the body of a message that's displayed.
9044+
* **Important**: This enum is only supported in Outlook on the web, on mobile devices (starting in Version 4.2538.0), and in the new Outlook on Windows.
90469045
*
9047-
* The `BodyMode` enum supports the following message organization settings.
9046+
* In Outlook on the web and the new Outlook on Windows, users can organize their messages as conversations or individual messages in
9047+
* **Settings** \> **Mail** \> **Layout** \> **Message organization**. This user setting affects the portion of the body of a message that's displayed.
9048+
* The `BodyMode` enum supports the following message organization settings on these clients.
90489049
*
9049-
* - Conversations: **Group messages by conversation** > **All messages from the selected conversation** or **Show email grouped by conversation** > **Newest on top**\/**Newest on bottom**
9050+
* - Conversations: **Group messages by conversation** \> **All messages from the selected conversation** or
9051+
* **Show email grouped by conversation** \> **Newest on top**\/**Newest on bottom**
90509052
*
9051-
* - Individual messages: **Do not group messages** > **Only a single message** or **Show email as individual messages**
9053+
* - Individual messages: **Do not group messages** \> **Only a single message** or **Show email as individual messages**
90529054
*
90539055
* For more information, see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}.
90549056
*/
@@ -9058,9 +9060,11 @@ declare namespace Office {
90589060
*/
90599061
FullBody = 0,
90609062
/**
9061-
* The body mode depends on the user's current setting for message organization (that is, messages are organized as conversations or individual messages).
9062-
* If messages are organized by conversation, it specifies only the current body of the reply. Conversely, if messages are organized as individual
9063+
* In Outlook on the web and the new Outlook on Windows, the body mode depends on the user's current setting for message organization (that is, messages are organized as conversations or individual messages).
9064+
* If messages are organized by conversation, it specifies the body of the current reply. Conversely, if messages are organized as individual
90639065
* messages, it specifies the entire body of a message, including previous messages from the same conversation thread.
9066+
*
9067+
* In Outlook on mobile, specifies the body of the current reply.
90649068
*/
90659069
HostConfig = 1
90669070
}
@@ -13252,22 +13256,29 @@ declare namespace Office {
1325213256
* in the `getAsync` call may not always provide reliable formatting. Specify `Office.CoercionType.Html` instead especially if the body contains
1325313257
* formatted elements, such as tables, lists, and links.
1325413258
*
13255-
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
13256-
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13259+
* - In Outlook on the web and in the new Outlook on Windows, users can organize their messages as conversations or individual messages in
13260+
* **Settings** \> **Mail** \> **Layout** \> **Message organization** (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
1325713261
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
1325813262
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
1325913263
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
1326013264
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
1326113265
*
13266+
* - In Outlook on mobile devices, the `bodyMode` property is available starting with Version 4.2538.0.
13267+
*
13268+
* - In Outlook on mobile devices, specifying `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` returns the body of the current reply.
13269+
*
13270+
* - In Outlook on mobile devices, while in quick reply mode (the reply field at the bottom of the message), only the body of the current reply is returned.
13271+
* This applies even if `bodyMode: Office.MailboxEnums.BodyMode.FullBody` is specified in the `getAsync` call.
13272+
*
1326213273
* - The `bodyMode` option isn't supported on a message that's loaded using the `loadItemByIdAsync` method. For more information, see
1326313274
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
1326413275
*
1326513276
* @param coercionType - The format for the returned body.
1326613277
* @param options - An object literal that contains one or more of the following properties.
1326713278
* `asyncContext`: Any data you want to access in the callback function.
13268-
* `bodyMode`: In Outlook on the web and new Outlook on Windows, specifies whether only the body of the current message or the entire body of a message conversation is returned.
13279+
* `bodyMode`: In Outlook on the web, on mobile devices, and in the new Outlook on Windows, specifies whether only the body of the current message or the entire body of a message conversation is returned.
1326913280
* If a value isn't specified, `bodyMode` defaults to `Office.MailboxEnums.BodyMode.FullBody`, which returns the entire body of a message conversation. The `bodyMode` property only
13270-
* applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
13281+
* applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic) and on Mac.
1327113282
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
1327213283
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
1327313284
*/
@@ -13292,13 +13303,20 @@ declare namespace Office {
1329213303
* in the `getAsync` call may not always provide reliable formatting. Specify `Office.CoercionType.Html` instead especially if the body contains
1329313304
* formatted elements, such as tables, lists, and links.
1329413305
*
13295-
* - In Outlook on the web and new Outlook on Windows, users can organize their messages as conversations or individual messages in **Settings** > **Mail** > **Layout** > **Message organization**
13296-
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13306+
* - In Outlook on the web and in the new Outlook on Windows, users can organize their messages as conversations or individual messages in
13307+
* **Settings** \> **Mail** \> **Layout** \> **Message organization** (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
1329713308
* This setting affects how much of a message's body is displayed to the user (that is, the entire conversation thread of a message or just the current message).
1329813309
* In Message Compose mode, particularly for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
1329913310
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
1330013311
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
1330113312
*
13313+
* - In Outlook on mobile devices, the `bodyMode` property is available starting with Version 4.2538.0.
13314+
*
13315+
* - In Outlook on mobile devices, specifying `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` returns the body of the current reply.
13316+
*
13317+
* - In Outlook on mobile devices, while in quick reply mode (the reply field at the bottom of the message), only the body of the current reply is returned.
13318+
* This applies even if `bodyMode: Office.MailboxEnums.BodyMode.FullBody` is specified in the `getAsync` call.
13319+
*
1330213320
* @param coercionType - The format for the returned body.
1330313321
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
1330413322
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.

0 commit comments

Comments
 (0)