@types/office-js-preview 1.0.601 → 1.0.602

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-preview (https://github.com
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: Mon, 02 Jun 2025 15:36:26 GMT
11
+ * Last updated: Mon, 02 Jun 2025 23:02:52 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -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.
8973
+ */
8974
+ HostConfig = 1
8975
+ }
8946
8976
  /**
8947
8977
  * Specifies the category color.
8948
8978
  *
@@ -13107,9 +13137,7 @@ declare namespace Office {
13107
13137
  */
13108
13138
  appendOnSendAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
13109
13139
  /**
13110
- * Returns the current body in a specified format.
13111
- *
13112
- * This method returns the entire current body in the format specified by `coercionType`.
13140
+ * Returns the entire current body in the format specified by `coercionType`.
13113
13141
  *
13114
13142
  * @remarks
13115
13143
  * [Api set: Mailbox 1.3]
@@ -13128,17 +13156,28 @@ declare namespace Office {
13128
13156
  * 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.
13136
13177
  */
13137
- getAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
13178
+ getAsync(coercionType: Office.CoercionType | string, options: Office.AsyncContextOptions & { bodyMode?: MailboxEnums.BodyMode }, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
13138
13179
  /**
13139
- * Returns the current body in a specified format.
13140
- *
13141
- * This method returns the entire current body in the format specified by `coercionType`.
13180
+ * Returns the entire current body in the format specified by `coercionType`.
13142
13181
  *
13143
13182
  * @remarks
13144
13183
  * [Api set: Mailbox 1.3]
@@ -13157,9 +13196,16 @@ declare namespace Office {
13157
13196
  * 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.
13163
13209
  */
13164
13210
  getAsync(coercionType: Office.CoercionType | string, callback?: (asyncResult: Office.AsyncResult<string>) => void): void;
13165
13211
  /**
@@ -13432,20 +13478,36 @@ declare namespace Office {
13432
13478
  * - 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.
13447
13509
  */
13448
- setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
13510
+ setAsync(data: string, options: Office.AsyncContextOptions & CoercionTypeOptions & { bodyMode?: MailboxEnums.BodyMode }, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
13449
13511
  /**
13450
13512
  * Replaces the entire body with the specified text.
13451
13513
  *
@@ -13486,6 +13548,19 @@ declare namespace Office {
13486
13548
  * - 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.
@@ -13494,7 +13569,7 @@ declare namespace Office {
13494
13569
  *
13495
13570
  * @param data - The string that will replace the existing body. The string is limited to 1,000,000 characters.
13496
13571
  * @param callback - Optional. When the method completes, the function passed in the `callback` parameter is called with a single parameter
13497
- * of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
13572
+ * of type Office.AsyncResult. Any errors encountered will be provided in the `asyncResult.error` property.
13498
13573
  */
13499
13574
  setAsync(data: string, callback?: (asyncResult: Office.AsyncResult<void>) => void): void;
13500
13575
  /**
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/office-js-preview",
3
- "version": "1.0.601",
3
+ "version": "1.0.602",
4
4
  "description": "TypeScript definitions for office-js-preview",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/office-js-preview",
6
6
  "license": "MIT",
@@ -46,7 +46,7 @@
46
46
  "scripts": {},
47
47
  "dependencies": {},
48
48
  "peerDependencies": {},
49
- "typesPublisherContentHash": "d41db94d7b6f43a3b0fae93bcbfce717ec72efd2d55be4150a269de70f28b108",
49
+ "typesPublisherContentHash": "99518f464f3a9a6929377886ef3d3894e11a3acdd085c164bb3becde72b33120",
50
50
  "typeScriptVersion": "5.1",
51
51
  "nonNpm": true
52
52
  }