You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: types/office-js-preview/index.d.ts
+93-18Lines changed: 93 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -8943,6 +8943,36 @@ declare namespace Office {
8943
8943
*/
8944
8944
Item = "item"
8945
8945
}
8946
+
/**
8947
+
* Specifies the portion of a message's body displayed for replies to a conversation thread with more than one message.
8948
+
*
8949
+
* @remarks
8950
+
*
8951
+
* **{@link https://learn.microsoft.com/office/dev/add-ins/outlook/outlook-add-ins-overview#extension-points | Applicable Outlook mode}**: Message Compose
8952
+
*
8953
+
* **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
8954
+
* 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.
8955
+
*
8956
+
* The `BodyMode` enum supports the following message organization settings.
8957
+
*
8958
+
* - Conversations: **Group messages by conversation** > **All messages from the selected conversation** or **Show email grouped by conversation** > **Newest on top**\/**Newest on bottom**
8959
+
*
8960
+
* - Individual messages: **Do not group messages** > **Only a single message** or **Show email as individual messages**
8961
+
*
8962
+
* For more information, see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}.
8963
+
*/
8964
+
enum BodyMode {
8965
+
/**
8966
+
* The entire body of a message, including previous messages from the same conversation thread.
8967
+
*/
8968
+
FullBody = 0,
8969
+
/**
8970
+
* The body mode depends on the user's current setting for message organization (that is, messages are organized as conversations or individual messages).
8971
+
* If messages are organized by conversation, it specifies only the current body of the reply. Conversely, if messages are organized as individual
8972
+
* messages, it specifies the entire body of a message, including previous messages from the same conversation thread.
* if the body contains formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call.
13129
13157
* Otherwise, you may receive an unexpected value, such as an empty string.
13130
13158
*
13159
+
* - 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**
13160
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13161
+
* 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).
13162
+
* In Message Compose mode, particulary for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
13163
+
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
13164
+
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
13165
+
*
13166
+
* - The `bodyMode` option isn't supported on a message that's loaded using the `loadItemByIdAsync` method. For more information, see
13167
+
* {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
13168
+
*
13131
13169
* @param coercionType - The format for the returned body.
13132
-
* @param options - An object literal that contains one or more of the following properties:-
13133
-
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
13170
+
* @param options - An object literal that contains one or more of the following properties.
13171
+
* `asyncContext`: Any data you want to access in the callback function.
13172
+
* `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.
13173
+
* 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
13174
+
* applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
13134
13175
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
13135
-
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
13176
+
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
* if the body contains formatted elements, such as tables, lists, and links, specify `Office.CoercionType.Html` in the `getAsync` call.
13158
13197
* Otherwise, you may receive an unexpected value, such as an empty string.
13159
13198
*
13199
+
* - 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**
13200
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13201
+
* 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).
13202
+
* In Message Compose mode, particulary for replies to a conversation thread with more than one message, if you want the returned body to reflect the user's setting,
13203
+
* specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `getAsync` call. If messages are grouped by conversation,
13204
+
* only the body of the current reply is returned. Conversely, if messages are displayed individually, the entire conversation thread is returned.
13205
+
*
13160
13206
* @param coercionType - The format for the returned body.
13161
13207
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
13162
-
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
13208
+
* of type Office.AsyncResult. The body is provided in the requested format in the `asyncResult.value` property.
* - The `setAsync` method isn't supported on a message that's currently loaded using the `loadItemByIdAsync` method.
13433
13479
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
13434
13480
*
13481
+
* - 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**
13482
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13483
+
* 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).
13484
+
* In Message Compose mode, particulary for replies to a conversation thread with more than one message, if you want to honor the user's settings when
13485
+
* setting the body of a message, specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `setAsync` call. If messages are grouped by conversation,
13486
+
* only the body of the current reply is set. Conversely, if messages are displayed individually, the entire body, including previous messages
13487
+
* in the conversation thread, is replaced.
13488
+
*
13489
+
* - In Outlook on the web and new Outlook on Windows, if the `bodyMode` property isn't specified or is set to `Office.MailboxEnums.BodyMode.FullBody`, the entire body of a message,
13490
+
* including previous messages from the conversation thread, is replaced. This applies even if a user's messages are organized by conversation. In this scenario, the user's
13491
+
* setting is temporarily changed to **Individual messages: Do not group messages** > **Only a single message** or **Show email as individual messages** during the `setAsync` call.
13492
+
* A notification is shown to the user to alert them to this change. Once the call completes, the user's setting is reinstated.
13493
+
*
13435
13494
* **Errors**:
13436
13495
*
13437
13496
* - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
13438
13497
*
13439
13498
* - `InvalidFormatError`: The `options.coercionType` parameter is set to `Office.CoercionType.Html` and the message body is in plain text.
13440
13499
*
13441
-
* @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters.
13442
-
* @param options - An object literal that contains one or more of the following properties:-
13443
-
* `asyncContext`: Developers can provide any object they wish to access in the callback function.
13444
-
* `coercionType`: The desired format for the body. The string in the `data` parameter will be converted to this format.
13500
+
* @param data - The string that replaces the existing body. The string is limited to 1,000,000 characters.
13501
+
* @param options - An object literal that contains one or more of the following properties.
13502
+
* `asyncContext`: Any data you want to access in the callback function.
13503
+
* `coercionType`: The desired format for the body. The string in the `data` parameter is converted to this format.
13504
+
* `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 set.
13505
+
* If a value isn't specified, `bodyMode` defaults to `Office.MailboxEnums.BodyMode.FullBody`, which replaces the entire body, including previous messages in the conversation thread.
13506
+
* The `bodyMode` property only applies to replies on the Message Compose surface. It's ignored in Outlook on Windows (classic), on Mac, and on mobile devices.
13445
13507
* @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
13446
-
* of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
13508
+
* of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
* - The `setAsync` method isn't supported on a message that's currently loaded using the `loadItemByIdAsync` method.
13487
13549
* For more information, see {@link https://learn.microsoft.com/office/dev/add-ins/outlook/item-multi-select | Activate your Outlook add-in on multiple messages}.
13488
13550
*
13551
+
* - 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**
13552
+
* (see {@link https://support.microsoft.com/office/57fe0cd8-e90b-4b1b-91e4-a0ba658c0042 | Change how the message list is displayed in Outlook}).
13553
+
* 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).
13554
+
* In Message Compose mode, particulary for replies in a conversation thread with more than one message, if you want to honor the user's settings when
13555
+
* setting the body of a message, specify the `bodyMode: Office.MailboxEnums.BodyMode.HostConfig` parameter in your `setAsync` call. If messages are grouped by conversation,
13556
+
* only the body of the current reply is set. Conversely, if messages are displayed individually, the entire body, including previous messages
13557
+
* in the conversation thread, is replaced.
13558
+
*
13559
+
* - In Outlook on the web and new Outlook on Windows, if the `bodyMode` property isn't specified or is set to `Office.MailboxEnums.BodyMode.FullBody`, the entire body of a message,
13560
+
* including previous messages from the conversation thread, is replaced. This applies even if a user's messages are organized by conversation. In this scenario, the user's
13561
+
* setting is temporarily changed to **Individual messages: Do not group messages** > **Only a single message** or **Show email as individual messages** during the `setAsync` call.
13562
+
* A notification is shown to the user to alert them to this change. Once the call completes, the user's setting is reinstated.
13563
+
*
13489
13564
* **Errors**:
13490
13565
*
13491
13566
* - `DataExceedsMaximumSize`: The data parameter is longer than 1,000,000 characters.
0 commit comments